Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2011
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.27 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. #define STAMINA 48161
  4. #define MANA 36880
  5. #define KING 56525
  6. #define PACKA 39233
  7. #define SPIRIT 39234
  8.  
  9. class doctor : public CreatureScript
  10. {
  11. public:
  12. doctor() : CreatureScript("doctor") { }
  13.  
  14. bool OnGossipHello(Player *player, Creature *_creature)
  15. {
  16. if (player->isInCombat())
  17. {
  18. player->CLOSE_GOSSIP_MENU();
  19. _creature->MonsterWhisper("Jsi v combatu. Prijd pozdeji.", player->GetGUID());
  20. return true;
  21. }
  22.  
  23. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
  24.  
  25. player->ADD_GOSSIP_ITEM(5, "Doplneni Zivotu i Many", GOSSIP_SENDER_MAIN, 7001);
  26. player->ADD_GOSSIP_ITEM(5, "Odebrani Cooldown", GOSSIP_SENDER_MAIN, 7003);
  27. player->ADD_GOSSIP_ITEM(5, "Odebrani Resurrection Sickness", GOSSIP_SENDER_MAIN, 7006);
  28. if ( player->GetTeam() == ALLIANCE )
  29. {
  30. player->ADD_GOSSIP_ITEM(5, "Odebrani Exhaustion", GOSSIP_SENDER_MAIN, 7004);
  31. }
  32. if ( player->GetTeam() == HORDE )
  33. {
  34. player->ADD_GOSSIP_ITEM(5, "Odebrani Sated", GOSSIP_SENDER_MAIN, 7005);
  35. }
  36. player->ADD_GOSSIP_ITEM(5, "Buffy", GOSSIP_SENDER_MAIN, 7100);
  37.  
  38.  
  39. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
  40.  
  41. return true;
  42. }
  43.  
  44. bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 action)
  45. {
  46. if (player->isInCombat())
  47. {
  48. player->CLOSE_GOSSIP_MENU();
  49. _creature->MonsterWhisper("Jsi v combatu. Prijd pozdeji.", player->GetGUID());
  50. return true;
  51. }
  52.  
  53. if (sender != GOSSIP_SENDER_MAIN)
  54. return true;
  55.  
  56. switch(action)
  57. {
  58. case 7000: //Menu - Main
  59. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
  60. player->ADD_GOSSIP_ITEM(5, "Doplneni Zivotu i Many", GOSSIP_SENDER_MAIN, 7001);
  61. player->ADD_GOSSIP_ITEM(5, "Odebrani Cooldown", GOSSIP_SENDER_MAIN, 7003);
  62. player->ADD_GOSSIP_ITEM(5, "Odebrani Resurrection Sickness", GOSSIP_SENDER_MAIN, 7006);
  63. if ( player->GetTeam() == ALLIANCE )
  64. {
  65. player->ADD_GOSSIP_ITEM(5, "Odebrani Exhaustion", GOSSIP_SENDER_MAIN, 7004);
  66. }
  67. if ( player->GetTeam() == HORDE )
  68. {
  69. player->ADD_GOSSIP_ITEM(5, "Odebrani Sated", GOSSIP_SENDER_MAIN, 7005);
  70. }
  71. player->ADD_GOSSIP_ITEM(5, "Buffy", GOSSIP_SENDER_MAIN, 7100);
  72.  
  73. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
  74. break;
  75. case 7001: //Restore Health
  76. player->CLOSE_GOSSIP_MENU();
  77. player->SetHealth(player->GetMaxHealth());
  78. player->CastSpell(player,61456,false);
  79. player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
  80. player->CastSpell(player,61456,false);
  81. _creature->MonsterWhisper("Zivoty a Mana byla doplnena.", player->GetGUID());
  82. break;
  83. case 7003: //Remove Cooldown
  84. player->CLOSE_GOSSIP_MENU();
  85. player->RemoveAllSpellCooldown();
  86. player->CastSpell(player,75459,false);
  87. _creature->MonsterWhisper("Cooldowny byly resetovany.", player->GetGUID());
  88. break;
  89. case 7004: //Remove Exhaustion
  90. player->CLOSE_GOSSIP_MENU();
  91. player->RemoveAurasDueToSpell(57723);
  92. player->CastSpell(player,61456,false);
  93. _creature->MonsterWhisper("Exhaustion byl odebran.", player->GetGUID());
  94. break;
  95. case 7005: //Remove Sated
  96. player->CLOSE_GOSSIP_MENU();
  97. player->RemoveAurasDueToSpell(57724);
  98. player->CastSpell(player,61456,false);
  99. _creature->MonsterWhisper("Sated byl odebran.", player->GetGUID());
  100. break;
  101. case 7006: //Remove Sickness
  102. player->CLOSE_GOSSIP_MENU();
  103. player->RemoveAurasDueToSpell(15007);
  104. player->CastSpell(player,61456,false);
  105. _creature->MonsterWhisper("Resurrection Sickness byl odebran.", player->GetGUID());
  106. break;
  107. case 7100: //Buffy - Menu
  108. player->ADD_GOSSIP_ITEM(5, "Stamina", GOSSIP_SENDER_MAIN, 7101);
  109. player->ADD_GOSSIP_ITEM(5, "Spirit", GOSSIP_SENDER_MAIN, 7102);
  110. player->ADD_GOSSIP_ITEM(5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 7103);
  111. player->ADD_GOSSIP_ITEM(5, "Intellect", GOSSIP_SENDER_MAIN, 7104);
  112. player->ADD_GOSSIP_ITEM(5, "King", GOSSIP_SENDER_MAIN, 7106);
  113. player->ADD_GOSSIP_ITEM(5, "Všechno !", GOSSIP_SENDER_MAIN, 7107);
  114. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_creature->GetGUID());
  115.  
  116. break;
  117. case 7101: //Stamina
  118. player->CastSpell(player,STAMINA,false);
  119. break;
  120. case 7102: //Spirit
  121. player->CastSpell(player,SPIRIT,false);
  122. break;
  123. case 7103: //Wild
  124. player->CastSpell(player,PACKA,false);
  125. break;
  126. case 7104: //Intelect
  127. player->CastSpell(player,MANA,false);
  128. break;
  129. case 7106: //King
  130. player->CastSpell(player,KING,false);
  131. break;
  132. case 7107: //Vsechno
  133. player->CLOSE_GOSSIP_MENU();
  134. player->CastSpell(player,STAMINA,false);
  135. player->CastSpell(player,SPIRIT,false);
  136. player->CastSpell(player,PACKA,false);
  137. player->CastSpell(player,MANA,false);
  138. player->CastSpell(player,KING,false);
  139. _creature->MonsterWhisper("Byl jsi kompletně nabuffován!", player->GetGUID());
  140. default:
  141. break;
  142. }
  143.  
  144. return true;
  145. }
  146. };
  147.  
  148. void AddSC_doctor()
  149. {
  150. new doctor();
  151. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement