Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*************************************************************************
- * [Created By], *
- * Tommy aka QQrofl *
- * *
- * *
- **************************************************************************/
- #include "ScriptPCH.h"
- #include "Battleground.h"
- enum Amounts
- {
- MONEY_AMOUNT = 30000,
- EXPERIENCE_AMOUNT = 300
- };
- class reward_player_onkill : public PlayerScript
- {
- public:
- reward_player_onkill() : PlayerScript("reward_player_onkill") { }
- void OnPVPKill(Player * killer, Player * victim)
- {
- if(killer->GetGUID() == victim->GetGUID())
- return;
- Battleground * bg = killer->GetBattleground();
- if(bg)
- {
- killer->ModifyMoney(killer->GetMoney() + MONEY_AMOUNT);
- killer->GiveXP(EXPERIENCE_AMOUNT, victim);
- killer->MonsterWhisper("|cffffff00Money and experience given!|r", killer->GetGUID());
- }
- else
- {
- // The player doesn't get the reward xp and money
- killer->MonsterWhisper("|cffffff00You must be in a battleground to receive the rewards.|r", killer->GetGUID());
- }
- }
- };
- void AddSC_reward_player_kill()
- {
- new reward_player_onkill;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement