Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class on_pvp_kill : public PlayerScript
- {
- public:
- on_pvp_kill() : PlayerScript("on_pvp_kill") { }
- void OnPVPKill(Player* killer, Player* killed)
- {
- if (killer->GetGUID() != killed->GetGUID())
- return;
- if (killer->GetAreaId() == 90 && killed->GetAreaId() == 90) // 90 is an example
- {
- killer->AddItem(30000, 2); // Item 30000 is an example (YOU WERE AWARDED AN ITEM!
- if (killed->HasItemCount(30000, 2)) // Check if the player has the items
- killed->DestroyItemCount(30000, 2, true); // You were killed, you lose an item
- }
- }
- };
- void AddSC_pvp_kill()
- {
- new on_pvp_kill();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement