Advertisement
SymbolixDEV

Duel Reset by SymbolixDEV

Mar 19th, 2014
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.35 KB | None | 0 0
  1. /*Duel Reset info.
  2. -------------------------------------------------------------------------------------
  3. /* Made by SymbolixDEV
  4. Script for: On Duel End Reset Hp , Cooldowns , cast stop , attack stop etc..
  5. Working on 19.3.2014 REV
  6. Compile Success
  7. Working : Test and work 100%
  8. What is good on this script ?
  9.  
  10. izgubi = losser
  11. pobeditel = winner
  12.  
  13. _________________________
  14. pobeditel->CastStop(); - Stop Cast on Duel End and give Evade
  15. pobeditel->Attackstop(); - Stop Attack on duel end !
  16. pobeditel->SetHealth(Losser->GetMaxHealth()); - set winner health to max
  17. pobeditel->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); - Remove Auras on Duel End
  18. pobeditel->RemoveAllSpellCooldown(); - Remove All Cooldowns on Duel End Again
  19. NOT CHANSE FOR DIE PEOPLE WITH THIS DUEL SCRIPT
  20. http://github.com/SymbolixDEV
  21. Thanks !
  22. --------------------------------------------------------------------------------------
  23. */
  24. // SymbolxiDEV Start !
  25.  
  26. // Please all remove my credits don't remove Credits !
  27. //Thanks SYMBOLIXDEV !
  28. #include "ScriptPCH.h"
  29. #include "Map.h"
  30.  
  31. /*Buffs - Start*/
  32. #define BUFF_MARK_OF_THE_WILD       48469
  33. #define BUFF_BLESSING_OF_WISDOM     48938
  34. #define BUFF_BLESSING_OF_KINGS      25898
  35. #define BUFF_BLESSING_OF_SANCTUARY  25899
  36. #define BUFF_BLESSING_OF_MIGHT      48932
  37. #define BUFF_POWER_WORD_FORTITUDE   48161
  38. /*Buff - End*/
  39. class Reset_OnDuelEnd : public PlayerScript
  40. {
  41. public:
  42.     Reset_OnDuelEnd() : PlayerScript("Reset_OnDuelEnd") {}
  43.  
  44.     void OnDuelStart(Player * pobeditel, Player * izgubi)
  45.     {
  46.         if (pobeditel->getPowerType() == POWER_ENERGY)
  47.             pobeditel->SetPower(POWER_ENERGY, pobeditel->GetMaxPower(POWER_ENERGY));
  48.         if (pobeditel->getPowerType() == POWER_RAGE)
  49.             pobeditel->SetPower(POWER_RAGE, 0);
  50.     }
  51.  
  52.     void OnDuelEnd(Player *pobeditel, Player *izgubi/*, Player *pet* SymbolixDEV */, DuelCompleteType type)
  53.     {
  54.             //Set Max Healt [START] //
  55.                     pobeditel->SetHealth(pobeditel->GetMaxHealth());
  56.                     izgubi->SetHealth(izgubi->GetMaxHealth());
  57.             if ( pobeditel->getPowerType() == POWER_MANA )
  58.                     pobeditel->SetPower(POWER_MANA, pobeditel->GetMaxPower(POWER_MANA));
  59.             if ( izgubi->getPowerType() == POWER_MANA )
  60.                     izgubi->SetPower(POWER_MANA, izgubi->GetMaxPower(POWER_MANA));
  61.             //Set Max Healt [END]
  62.             // Cast And Attack Stop [Start] //
  63.             pobeditel->CastStop();
  64.             izgubi->CastStop();
  65.             pobeditel->AttackStop();
  66.             izgubi->AttackStop();
  67.             // Cast And Attack Stop [END]
  68.             //Remove Cooldowns [START]
  69.             pobeditel->RemoveAllSpellCooldown();
  70.             izgubi->RemoveAllSpellCooldown();
  71.             //Remove Cooldowns [END}
  72.             //Combat Stop [START]
  73.             pobeditel->CombatStop();
  74.             izgubi->CombatStop();
  75.             //Combat Stop [END]
  76.             //Start Remove Auras and etc
  77.             //aura
  78.             pobeditel->RemoveAura(15007);
  79.             izgubi->RemoveAura(15007);
  80.             //buffs
  81.             pobeditel->CastSpell(pobeditel, BUFF_POWER_WORD_FORTITUDE, false);
  82.             izgubi->CastSpell(pobeditel, BUFF_POWER_WORD_FORTITUDE, false);
  83.             pobeditel->CastSpell(pobeditel, BUFF_BLESSING_OF_KINGS, false);
  84.             izgubi->CastSpell(pobeditel, BUFF_BLESSING_OF_KINGS, false);
  85.             izgubi->CastSpell(izgubi, 31719, true);
  86.             //add badge
  87.             pobeditel->AddItem(45624, 3);
  88.             //winer - give +7000 money / looser -7000
  89.             izgubi->ModifyMoney(-7000);
  90.             pobeditel->ModifyMoney(+7000);
  91.             // Winner 650 honor Reward
  92.             pobeditel->ModifyHonorPoints(650);
  93.             pobeditel->CastSpell(pobeditel, 11543, 1);
  94.             pobeditel->PlayDirectSound(11530, pobeditel);
  95.             izgubi->DurabilityRepairAll(false, 0, false);
  96.             pobeditel->DurabilityRepairAll(false, 0, false);
  97.             pobeditel->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
  98.             izgubi->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
  99.             // Debuffs
  100.             pobeditel->RemoveAura(57723);
  101.             pobeditel->RemoveAura(57724);
  102.             pobeditel->RemoveAura(25771);
  103.                 pobeditel->RemoveAura(41425);
  104.                 pobeditel->RemoveAura(61987);
  105.             pobeditel->RemoveAura(66233);
  106.                 pobeditel->RemoveAura(11196);
  107.             pobeditel->RemoveAura(47986);
  108.                     izgubi->RemoveAura(57723);
  109.                     izgubi->RemoveAura(57724);
  110.                 izgubi->RemoveAura(25771);
  111.                 izgubi->RemoveAura(41425);
  112.                 izgubi->RemoveAura(61987);
  113.                     izgubi->RemoveAura(66233);
  114.                     izgubi->RemoveAura(11196);
  115.                 izgubi->RemoveAura(47986);
  116.     }
  117. };
  118.  
  119. void AddSC_Reset()
  120. {
  121.     new Reset_OnDuelEnd;
  122. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement