Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- enum Spells
- {
- FROST_BLAST = 27808,
- GREATER_HEALING_WAVE = 77472
- };
- class Test : public CreatureScript
- {
- public:
- Test() : CreatureScript("Test"){}
- CreatureAI*GetAI(Creature*pCreature) const
- {
- return new TestAI (pCreature);
- }
- struct TestAI : public ScriptAI
- {
- TestAI(Creature* c) : ScriptAI(c, TEST){}
- uint32 phase;
- void EnterCombat (Unit * /*Who*/)
- {
- _EnterCombat();
- me->MonsterSay("It's simply! You gona DIE! ",LANG_UNIVERSAL,NULL);
- }
- void UpdateAI(const uint32 uiDiff)
- {
- switch(phase)
- {
- case 1 :
- if(me->HealthBelowPct(30))
- {break} else {DoCast(me->getVictim(), FROST_BLAST);}
- case 2 :
- Docast(me, GREATER_HEALING_WAVE);
- }
- }
- };
- };
- void AddSC_Test()
- {
- new Test();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement