Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- uint32 auras[] = { 48162, 48074, 48170, 43223, 36880, 467, 48469 };
- #define DISTANCE 4.0f
- #define RANDOM_1 "There we go; all patched up."
- #define RANDOM_2 "Better be glad you got here in time. That looks infected."
- #define RANDOM_3 "Next time, I'm gonna charge you."
- #define RANDOM_4 "How about we stop putting ourselves in danger? I don't have infinite mana you know?"
- class the_doctor() : public CreatureScript
- {
- public:
- the_doctor() : CreatureScript("the_doctor") { }
- struct the_doctorAI : public ScriptedAI
- {
- the_doctorAI(Creature* creature) : ScriptedAI(creature){}
- void MoveInLineOfSight(Unit* player)
- {
- if(!player || !player->IsAlive())
- return;
- if(me->IsWithinDistInMap(player, DISTANCE))
- {
- if(me->GetDistance(player) <= DISTANCE)
- {
- switch (urand(1, 4))
- {
- case 1:
- me->MonsterSay(RANDOM_1, LANG_UNIVERSAL, player->GetGUID());
- player->CastSpell(player, 17683, true);
- for(int i = 0; i < 7; i++)
- player->AddAura(auras[i], player);
- break;
- case 2:
- me->MonsterSay(RANDOM_2, LANG_UNIVERSAL, player->GetGUID());
- player->CastSpell(player, 17683, true);
- for(int i = 0; i < 7; i++)
- player->AddAura(auras[i], player);
- break;
- case 3:
- me->MonsterSay(RANDOM_3, LANG_UNIVERSAL, player->GetGUID());
- player->CastSpell(player, 17683, true);
- for(int i = 0; i < 7; i++)
- player->AddAura(auras[i], player);
- break;
- case 4:
- me->MonsterSay(RANDOM_4, LANG_UNIVERSAL, player->GetGUID());
- player->CastSpell(player, 17683, true);
- for(int i = 0; i < 7; i++)
- player->AddAura(auras[i], player);
- break;
- }
- }
- }
- }
- };
- CreatureAI * GetAI(Creature * creature) const
- {
- return new the_doctor(creature);
- }
- };
- void AddSC_the_doctor()
- {
- new the_doctor();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement