ravez
Respected Member
Hey.
I saw you had updated this script Tommy, and here's the updated part;
But It's not really working. I compiled fine with no errors, however now when ingame I logged on to two character and killed eachother like 17 times. But there were no announces of killing sprees. So I thought it might conflicted with the token system Trinitycore has built in and I disabled that, but it still didn't work. It didn't even reward Emblem of Frost id 49426 as stated in the script.
Now if It's not too much to ask for, I'm looking for help on what's wrong.
Would it be possible for someone of you to help me, please?
And thank you in advance.
I saw you had updated this script Tommy, and here's the updated part;
Code:
class System_OnPvPKill : public PlayerScript
{
public:
System_OnPvPKill() : PlayerScript("System_OnPvPKill") { }
struct SystemInfo
{
uint32 KillStreak;
uint32 LastGUIDKill;
};
static std::map<uint32, SystemInfo> KillingStreak;
void OnPvPKill(Player *pKiller, Player *pVictim)
{
uint32 kGUID;
uint32 vGUID;
kGUID = pKiller->GetGUID();
vGUID = pVictim->GetGUID();
if(kGUID == vGUID)
return;
if(KillingStreak[kGUID].LastGUIDKill == vGUID)
return;
KillingStreak[kGUID].KillStreak++;
KillingStreak[vGUID].KillStreak = 0;
KillingStreak[kGUID].LastGUIDKill = vGUID;
KillingStreak[vGUID].LastGUIDKill = 0;
switch(KillingStreak[kGUID].KillStreak)
{
char msg[500];
case 1:
pKiller->AddItem(49426, 1);
break;
case 2:
pKiller->AddItem(49426, 1);
break;
case 3:
pKiller->AddItem(49426, 1);
break;
case 4:
pKiller->AddItem(49426, 1);
break;
case 5:
pKiller->AddItem(49426, 1);
break;
case 6:
pKiller->AddItem(49426, 1);
break;
case 7:
pKiller->AddItem(49426, 1);
break;
case 8:
pKiller->AddItem(49426, 1);
break;
case 9:
pKiller->AddItem(49426, 1);
break;
case 10:
pKiller->AddItem(49426, 3);
sprintf(msg, "[PvP System]: %s killed %s and is on a kill streak! ", pKiller->GetName().c_str(), pVictim->GetName().c_str());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;
case 11:
pKiller->AddItem(49426, 2);
break;
case 12:
pKiller->AddItem(49426, 2);
break;
case 13:
pKiller->AddItem(49426, 2);
break;
case 14:
pKiller->AddItem(49426, 2);
break;
case 15:
pKiller->AddItem(49426, 2);
break;
case 16:
pKiller->AddItem(49426, 2);
break;
case 17:
pKiller->AddItem(49426, 2);
break;
case 18:
pKiller->AddItem(49426, 2);
break;
case 19:
pKiller->AddItem(49426, 2);
break;
case 20:
pKiller->AddItem(49426, 4);
sprintf(msg, "[PvP System]: %s killed %s and is on a RaMpAgE! ", pKiller->GetName().c_str(), pVictim->GetName().c_str());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;
case 21:
pKiller->AddItem(49426, 3);
break;
case 22:
pKiller->AddItem(49426, 3);
break;
case 23:
pKiller->AddItem(49426, 3);
break;
case 24:
pKiller->AddItem(49426, 3);
break;
case 25:
pKiller->AddItem(49426, 3);
break;
case 26:
pKiller->AddItem(49426, 3);
break;
case 27:
pKiller->AddItem(49426, 3);
break;
case 28:
pKiller->AddItem(49426, 3);
break;
case 29:
pKiller->AddItem(49426, 3);
break;
case 30:
pKiller->AddItem(49426, 5);
sprintf(msg, "[PvP System]: %s killed %s and is Unstopable! ", pKiller->GetName().c_str(), pVictim->GetName().c_str());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;
case 31:
pKiller->AddItem(49426, 4);
break;
case 32:
pKiller->AddItem(49426, 4);
break;
case 33:
pKiller->AddItem(49426, 4);
break;
case 34:
pKiller->AddItem(49426, 4);
break;
case 35:
pKiller->AddItem(49426, 4);
break;
case 36:
pKiller->AddItem(49426, 4);
break;
case 37:
pKiller->AddItem(49426, 4);
break;
case 38:
pKiller->AddItem(49426, 4);
break;
case 39:
pKiller->AddItem(49426, 4);
break;
case 40:
pKiller->AddItem(49426, 6);
sprintf(msg, "[PvP System]: %s killed %s and is DOMINATING! ", pKiller->GetName().c_str(), pVictim->GetName().c_str());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
break;
case 41:
pKiller->AddItem(49426, 5);
break;
case 42:
pKiller->AddItem(49426, 5);
break;
case 43:
pKiller->AddItem(49426, 5);
break;
case 44:
pKiller->AddItem(49426, 5);
break;
case 45:
pKiller->AddItem(49426, 5);
break;
case 46:
pKiller->AddItem(49426, 5);
break;
case 47:
pKiller->AddItem(49426, 5);
break;
case 48:
pKiller->AddItem(49426, 5);
break;
case 49:
pKiller->AddItem(49426, 5);
break;
case 50:
pKiller->AddItem(49426, 7);
sprintf(msg, "[PvP System]: %s killed %s and is Godlike! ", pKiller->GetName().c_str(), pVictim->GetName().c_str());
sWorld->SendServerMessage(SERVER_MSG_STRING, msg);
KillingStreak[kGUID].KillStreak = 0;
break;
}
}
};
void AddSC_System_OnPvPkill()
{
new System_OnPvPKill;
}
But It's not really working. I compiled fine with no errors, however now when ingame I logged on to two character and killed eachother like 17 times. But there were no announces of killing sprees. So I thought it might conflicted with the token system Trinitycore has built in and I disabled that, but it still didn't work. It didn't even reward Emblem of Frost id 49426 as stated in the script.
Now if It's not too much to ask for, I'm looking for help on what's wrong.
Would it be possible for someone of you to help me, please?
And thank you in advance.
Last edited: