Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**************
- PVPstreak
- **************/
- #include "ScriptPCH.h"
- #include "Chat.h"
- //Set experience
- #define CONFIG_XP 100
- /**************************
- The next version include more
- **************************/
- class Kill_You : public PlayerScript
- {
- public:
- Kill_You() : PlayerScript("Kill_You") { }
- void OnPVPKill(Player * Killer, Player * Deceased)
- {
- if (Killer->GetGUID() == Deceased->GetGUID())
- return;
- {
- /*--Gives Killer money--*/
- Killer->ModifyMoney(Killer->GetMoney() + 1000);
- //Resets casters full power
- Killer->ResetAllPowers();
- //Set killer spell
- Killer->CastSpell(Killer, 23128, true);
- //Killer info
- Killer->GetSession()->SendNotification("Well done, continue to !");
- //Deceased info
- Deceased->GetSession()->SendNotification("You must practice exercises !");
- }
- //Define kill experience
- uint32 Level_One = Killer->getLevel();
- uint32 Level_Two = Killer->getLevel();
- uint32 XP = 0;
- //Set experience
- if( Level_Two <= ( Level_One - 10 ) || Level_Two >= ( 10 + Level_One) )
- return;
- {
- //Experience config
- if(Level_One <= 10)
- XP = BASIC_XP;
- else if(Level_One <= 20 )
- XP = CONFIG_XP*2.5;
- else if(Level_One <= 30)
- XP = CONFIG_XP*3.5;
- else if (Level_One <= 40)
- XP = CONFIG_XP*4.5;
- else if (Level_One <= 50)
- XP = CONFIG_XP*5.5;
- else if (Level_One <= 60 )
- XP = CONFIG_XP*6.5;
- Killer->GiveXP(XP, Killer);
- }
- }
- };
- void AddSC_Kill_You()
- {
- new Kill_You();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement