Advertisement
Guest User

Untitled

a guest
Aug 24th, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 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. else
  23. {
  24. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
  25.  
  26. player->ADD_GOSSIP_ITEM(5, "Doplneni Zivotu i Many", GOSSIP_SENDER_MAIN, 7001);
  27. player->ADD_GOSSIP_ITEM(5, "Odebrani Cooldown", GOSSIP_SENDER_MAIN, 7003);
  28. player->ADD_GOSSIP_ITEM(5, "Odebrani Resurrection Sickness", GOSSIP_SENDER_MAIN, 7006);
  29.  
  30. if ( player->GetTeam() == ALLIANCE )
  31. {
  32. player->ADD_GOSSIP_ITEM(5, "Odebrani Exhaustion", GOSSIP_SENDER_MAIN, 7004);
  33. }
  34. else
  35. {
  36. player->ADD_GOSSIP_ITEM(5, "Odebrani Sated", GOSSIP_SENDER_MAIN, 7005);
  37. }
  38. player->ADD_GOSSIP_ITEM(5, "Buffy", GOSSIP_SENDER_MAIN, 7100);
  39.  
  40.  
  41. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
  42. }
  43. return true;
  44. }
  45.  
  46. bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 uiAction)
  47. {
  48.  
  49. if (sender == GOSSIP_SENDER_MAIN)
  50. {
  51. player->PlayerTalkClass->ClearMenus();
  52. switch(uiAction)
  53. {
  54. case 7001: //Restore Health
  55. player->CLOSE_GOSSIP_MENU();
  56. player->SetHealth(player->GetMaxHealth());
  57. player->CastSpell(player,61456,false);
  58. player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
  59. player->CastSpell(player,61456,false);
  60. _creature->MonsterWhisper("Zivoty a Mana byla doplnena.", player->GetGUID());
  61. break;
  62. case 7003: //Remove Cooldown
  63. player->CLOSE_GOSSIP_MENU();
  64. player->RemoveAllSpellCooldown();
  65. player->CastSpell(player,75459,false);
  66. _creature->MonsterWhisper("Cooldowny byly resetovany.", player->GetGUID());
  67. break;
  68. case 7004: //Remove Exhaustion
  69. player->CLOSE_GOSSIP_MENU();
  70. player->RemoveAurasDueToSpell(57723);
  71. player->CastSpell(player,61456,false);
  72. _creature->MonsterWhisper("Exhaustion byl odebran.", player->GetGUID());
  73. break;
  74. case 7005: //Remove Sated
  75. player->CLOSE_GOSSIP_MENU();
  76. player->RemoveAurasDueToSpell(57724);
  77. player->CastSpell(player,61456,false);
  78. _creature->MonsterWhisper("Sated byl odebran.", player->GetGUID());
  79. break;
  80. case 7006: //Remove Sickness
  81. player->CLOSE_GOSSIP_MENU();
  82. player->RemoveAurasDueToSpell(15007);
  83. player->CastSpell(player,61456,false);
  84. _creature->MonsterWhisper("Resurrection Sickness byl odebran.", player->GetGUID());
  85. break;
  86. case 7100: //Buffy - Menu
  87. player->ADD_GOSSIP_ITEM(5, "Stamina", GOSSIP_SENDER_MAIN, 7101);
  88. player->ADD_GOSSIP_ITEM(5, "Spirit", GOSSIP_SENDER_MAIN, 7102);
  89. player->ADD_GOSSIP_ITEM(5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 7103);
  90. player->ADD_GOSSIP_ITEM(5, "Intellect", GOSSIP_SENDER_MAIN, 7104);
  91. player->ADD_GOSSIP_ITEM(5, "King", GOSSIP_SENDER_MAIN, 7106);
  92. player->ADD_GOSSIP_ITEM(5, "Vsechno !", GOSSIP_SENDER_MAIN, 7107);
  93. player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_creature->GetGUID());
  94. break;
  95. case 7101: //Stamina
  96. _creature->CastSpell(player,STAMINA,false);
  97. break;
  98. case 7102: //Spirit
  99. _creature->CastSpell(player,SPIRIT,false);
  100. break;
  101. case 7103: //Wild
  102. _creature->CastSpell(player,PACKA,false);
  103. break;
  104. case 7104: //Intelect
  105. _creature->CastSpell(player,MANA,false);
  106. break;
  107. case 7106: //King
  108. _creature->CastSpell(player,KING,false);
  109. break;
  110. case 7107: //Vsechno
  111. player->CLOSE_GOSSIP_MENU();
  112. _creature->CastSpell(player,STAMINA,false);
  113. _creature->CastSpell(player,SPIRIT,false);
  114. _creature->CastSpell(player,PACKA,false);
  115. _creature->CastSpell(player,MANA,false);
  116. _creature->CastSpell(player,KING,false);
  117. _creature->MonsterWhisper("Byl jsi kompletně nabuffován!", player->GetGUID());
  118. default:
  119. break;
  120. }
  121.  
  122. return true;
  123. }
  124. }
  125. };
  126.  
  127. void AddSC_doctor()
  128. {
  129. new doctor();
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement