Azteco

PvP Zone

Jan 7th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.26 KB | None | 0 0
  1. // Made By Sinistah/ToxicDev
  2.  
  3. enum config
  4. {
  5.     TOKEN = 11111, // Entry Id Of The Item Defined Here
  6.     AMMOUNT = 1,    // Ammount Of The TOKEN's Given
  7.     AREAIDONE = 172, // Area Id For Location One
  8.     AREAIDTWO = 232 // Area Id For Location Two
  9. };  
  10.  
  11. class itemonkill : public PlayerScript
  12. {
  13. public:
  14.     itemonkill() : PlayerScript("itemonkill") { }
  15.  
  16.     void OnPVPKill(Player * killer, Player * victim)
  17.     {
  18.         if ((killer->GetAreaId() == AREAIDONE || killer->GetAreaId() == AREAIDTWO) && killer->GetGUID() != victim->GetGUID())
  19.         {
  20.             if (killer->GetSession()->GetRemoteAddress() == victim->GetSession()->GetRemoteAddress())
  21.                 killer->GetSession()->SendNotification("[PvP System] Your Victim Has Same Ip Adress As You! No Reward Was Given.");
  22.             else if (victim->HasAura(2479))
  23.                 killer->GetSession()->SendNotification("[PvP System] Your Victim Had Honorless Target Aura! No Reward Was Given");
  24.             else
  25.             {
  26.                 killer->GetSession()->SendNotification("[PvP System] You Were Rewarded For Killing %s!", victim->GetName());    
  27.                 killer->AddItem(TOKEN, AMMOUNT);
  28.             }
  29.         }
  30.     }
  31. };
  32.  
  33. void AddSC_itemonkill()
  34. {
  35.     new itemonkill;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment