Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #define STAMINA 48161
- #define MANA 36880
- #define KING 56525
- #define PACKA 39233
- #define SPIRIT 39234
- class doctor : public CreatureScript
- {
- public:
- doctor() : CreatureScript("doctor") { }
- bool OnGossipHello(Player *player, Creature *_creature)
- {
- if (player->isInCombat())
- {
- player->CLOSE_GOSSIP_MENU();
- _creature->MonsterWhisper("Jsi v combatu. Prijd pozdeji.", player->GetGUID());
- return true;
- }
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
- player->ADD_GOSSIP_ITEM(5, "Doplneni Zivotu i Many", GOSSIP_SENDER_MAIN, 7001);
- player->ADD_GOSSIP_ITEM(5, "Odebrani Cooldown", GOSSIP_SENDER_MAIN, 7003);
- player->ADD_GOSSIP_ITEM(5, "Odebrani Resurrection Sickness", GOSSIP_SENDER_MAIN, 7006);
- if ( player->GetTeam() == ALLIANCE )
- {
- player->ADD_GOSSIP_ITEM(5, "Odebrani Exhaustion", GOSSIP_SENDER_MAIN, 7004);
- }
- if ( player->GetTeam() == HORDE )
- {
- player->ADD_GOSSIP_ITEM(5, "Odebrani Sated", GOSSIP_SENDER_MAIN, 7005);
- }
- player->ADD_GOSSIP_ITEM(5, "Buffy", GOSSIP_SENDER_MAIN, 7100);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 action)
- {
- if (player->isInCombat())
- {
- player->CLOSE_GOSSIP_MENU();
- _creature->MonsterWhisper("Jsi v combatu. Prijd pozdeji.", player->GetGUID());
- return true;
- }
- if (sender != GOSSIP_SENDER_MAIN)
- return true;
- switch(action)
- {
- case 7000: //Menu - Main
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
- player->ADD_GOSSIP_ITEM(5, "Doplneni Zivotu i Many", GOSSIP_SENDER_MAIN, 7001);
- player->ADD_GOSSIP_ITEM(5, "Odebrani Cooldown", GOSSIP_SENDER_MAIN, 7003);
- player->ADD_GOSSIP_ITEM(5, "Odebrani Resurrection Sickness", GOSSIP_SENDER_MAIN, 7006);
- if ( player->GetTeam() == ALLIANCE )
- {
- player->ADD_GOSSIP_ITEM(5, "Odebrani Exhaustion", GOSSIP_SENDER_MAIN, 7004);
- }
- if ( player->GetTeam() == HORDE )
- {
- player->ADD_GOSSIP_ITEM(5, "Odebrani Sated", GOSSIP_SENDER_MAIN, 7005);
- }
- player->ADD_GOSSIP_ITEM(5, "Buffy", GOSSIP_SENDER_MAIN, 7100);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
- break;
- case 7001: //Restore Health
- player->CLOSE_GOSSIP_MENU();
- player->SetHealth(player->GetMaxHealth());
- player->CastSpell(player,61456,false);
- player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
- player->CastSpell(player,61456,false);
- _creature->MonsterWhisper("Zivoty a Mana byla doplnena.", player->GetGUID());
- break;
- case 7003: //Remove Cooldown
- player->CLOSE_GOSSIP_MENU();
- player->RemoveAllSpellCooldown();
- player->CastSpell(player,75459,false);
- _creature->MonsterWhisper("Cooldowny byly resetovany.", player->GetGUID());
- break;
- case 7004: //Remove Exhaustion
- player->CLOSE_GOSSIP_MENU();
- player->RemoveAurasDueToSpell(57723);
- player->CastSpell(player,61456,false);
- _creature->MonsterWhisper("Exhaustion byl odebran.", player->GetGUID());
- break;
- case 7005: //Remove Sated
- player->CLOSE_GOSSIP_MENU();
- player->RemoveAurasDueToSpell(57724);
- player->CastSpell(player,61456,false);
- _creature->MonsterWhisper("Sated byl odebran.", player->GetGUID());
- break;
- case 7006: //Remove Sickness
- player->CLOSE_GOSSIP_MENU();
- player->RemoveAurasDueToSpell(15007);
- player->CastSpell(player,61456,false);
- _creature->MonsterWhisper("Resurrection Sickness byl odebran.", player->GetGUID());
- break;
- case 7100: //Buffy - Menu
- player->ADD_GOSSIP_ITEM(5, "Stamina", GOSSIP_SENDER_MAIN, 7101);
- player->ADD_GOSSIP_ITEM(5, "Spirit", GOSSIP_SENDER_MAIN, 7102);
- player->ADD_GOSSIP_ITEM(5, "Mark of the Wild", GOSSIP_SENDER_MAIN, 7103);
- player->ADD_GOSSIP_ITEM(5, "Intellect", GOSSIP_SENDER_MAIN, 7104);
- player->ADD_GOSSIP_ITEM(5, "King", GOSSIP_SENDER_MAIN, 7106);
- player->ADD_GOSSIP_ITEM(5, "Všechno !", GOSSIP_SENDER_MAIN, 7107);
- player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_creature->GetGUID());
- break;
- case 7101: //Stamina
- player->CastSpell(player,STAMINA,false);
- break;
- case 7102: //Spirit
- player->CastSpell(player,SPIRIT,false);
- break;
- case 7103: //Wild
- player->CastSpell(player,PACKA,false);
- break;
- case 7104: //Intelect
- player->CastSpell(player,MANA,false);
- break;
- case 7106: //King
- player->CastSpell(player,KING,false);
- break;
- case 7107: //Vsechno
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player,STAMINA,false);
- player->CastSpell(player,SPIRIT,false);
- player->CastSpell(player,PACKA,false);
- player->CastSpell(player,MANA,false);
- player->CastSpell(player,KING,false);
- _creature->MonsterWhisper("Byl jsi kompletně nabuffován!", player->GetGUID());
- default:
- break;
- }
- return true;
- }
- };
- void AddSC_doctor()
- {
- new doctor();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement