Advertisement
Guest User

Untitled

a guest
May 24th, 2011
1,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class gurubashipvp : public PlayerScript
  4. {
  5. public:
  6.     gurubashipvp() : PlayerScript("gurubashipvp") { }
  7.  
  8.     void OnPvPKill(Player *pKiller, Player *pVictim) {
  9.         int reward = 100; //How many points shall the killer get?
  10.         int pvparea = 2177; //Area ID of the place both characters must be to be eligible for reward
  11.         int area1 = pKiller->GetAreaId();
  12.         int area2 = pVictim->GetAreaId();
  13.         if(area1 == area2) {
  14.             int area = area;
  15.             if(area == pvparea) {
  16.                 if(pKiller->GetTeam() != pVictim->GetTeam()) {
  17.                     int honor = pKiller->GetHonorPoints();
  18.                     pKiller->ModifyHonorPoints(honor + reward);
  19.                 }
  20.             }
  21.         }
  22.     }
  23. };
  24.  
  25. void AddSC_gurubashipvp() {
  26.     new gurubashipvp;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement