• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[WotLK] [C++] Killsreak system - UPDATED

S

Seez

Guest
Okay, thanks alot..I guess I should have explained the problem more, When I kill a player, it gives me the token ONCE, then once i kill the same player again, it shoots the Killstreak ended message, but that person never had a killstreak That I killed, and it spams the message every time I kill that person over, I changed the max samevictim thing to 100..I really appologise for bugging you/everyone lol just trying to get this stuff done :"D

http://puu.sh/jyg6J/7ea1ce9267.jpg

Got to a 10 killstreak on Character "Seez" Despite the notification of killstreak ended,
Killed "Seez" @ 10 killstreak on "Testpriest" and nothing happens

Only shoots the message after the second kill of an enemy player, and then spams it every kill after that

Also, would it be difficult to add a function if there already isnt one that resets the persons killstreak on death or logout? Thanks again in advance!
 
Last edited:

Tommy

Founder
Well, glad you are testing then since I'm on and off the browser really fast. :p

You can check how many kills the victim had and set a value of what YOU think is a good kill streak to announce the message on:

Code:
    if (KillingStreak[kGUID].LastGUIDKill == vGUID)
    {
        KillingStreak[kGUID].KillCount++;
[COLOR="green"]        [COLOR="#FF8C00"]if (KillingStreak[vGUID].KillCount > 4) // 5+ is a good kill streak?[/COLOR]
        {
            std::ostringstream ss;
            ss << "|cffFF0000[Psychosis PvP]:|r |cff00FF00"
              << killer->GetName() 
              << "|r has ended |cff00FF00" 
              << killed->GetName() 
              << "'s|r kill streak of |cff00FFFF" 
              << KillingStreak[vGUID].KillCount 
              << "|r!";
            sWorld->SendGlobalText(ss.str().c_str(), NULL);
        }[/COLOR]
        KillingStreak[vGUID].KillCount = 1;
        killer->AddItem(ItemReward, 1);
        if (LooseTokenOnPvPDeath == true)
            killed->DestroyItemCount(ItemReward, AmountOfItemsYouWantTheVictimToLoose, true, false);
    }
 
S

Seez

Guest
0a9e2fb5b5.jpg

2c4d5dfa88.jpg

41a428c818.png


8a2557c9bd.png


No random spams after the kill, but tried at 5, 10 ,15 and 20 killstreak to kill the person with the streak and it doesnt announce that the streak has ended
 
Last edited:
S

Seez

Guest
tommy could u possibly help me get this working when u got time your fix didnt work, doesnt announce anything on streak end now
 

Tommy

Founder
Hm. Maybe instead of KillCount it should be kill streak?

Code:
if (KillingStreak[vGUID].KillStreak >= 5)

Output:

Code:
    if (KillingStreak[kGUID].LastGUIDKill == vGUID)
    {
        KillingStreak[kGUID].KillCount++;
        if (KillingStreak[vGUID].KillStreak >= 5)
        {
            std::ostringstream ss;
            ss << "|cffFF0000[Psychosis PvP]:|r |cff00FF00"
              << killer->GetName() 
              << "|r has ended |cff00FF00" 
              << killed->GetName() 
              << "'s|r kill streak of |cff00FFFF" 
              << KillingStreak[vGUID].KillCount 
              << "|r!";
            sWorld->SendGlobalText(ss.str().c_str(), NULL);
        }
        KillingStreak[vGUID].KillCount = 1;
        killer->AddItem(ItemReward, 1);
        if (LooseTokenOnPvPDeath == true)
            killed->DestroyItemCount(ItemReward, AmountOfItemsYouWantTheVictimToLoose, true, false);
    }

This script is really messy, especially with all the unnecessary variables. Surprised I never updated this, no offense to the creator. The logic behind KillCount is really flawed and confused me in thinking it was the KillStreak (didn't see the KillStreak variable at first). It isn't checking specific kills of a victim, only the kills of the killer -- which shouldn't be a factor since if you killed other players KillCount will continue to increase no matter what.
 
S

Seez

Guest
yeah it doesnt work sadly :( Its ok thought I really appreciate the help and or attempt :)
 

Optimus

Emulation Addict
Hey gentlemans,
is it possible for you to update this cool script for: TrinityCore rev. 431da2ffc984+ 2016-03-05 01:26:26 +0000 (3.3.5 branch) (Unix, Release) - TDB 335.60.

It will be so good if you can do that for me and the community.

Thanks in advance!
 
Top