Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #define NPC_TIRION_TOC 88888
- #define SPELL_SHADOWVOID 55847
- #define SPELL_UNHOLY_AURA 17467
- #define SPELL_UNHOLY_GROWTH 40545
- #define SPELL_SHADOWBOLTVOLLEY 55850
- class npc_herold_toc1 : public CreatureScript
- {
- public:
- npc_herold_toc1() : CreatureScript("npc_herold_toc1") { }
- CreatureAI* GetAI(Creature* pCreature) const
- {
- return new npc_herold_tocAI(pCreature);
- }
- struct npc_herold_tocAI : public ScriptedAI
- {
- npc_herold_tocAI(Creature * creature) : ScriptedAI(creature), Summons(me) { }
- uint32 ShadowVoid_Timer;
- uint32 Abomination_Timer;
- uint32 Geist_Timer;
- uint32 UnholyAura_Timer;
- uint32 ShadowboltVolley_Timer;
- uint32 Phase;
- bool checkTirion;
- SummonList Summons;
- TempSummon* tirion;
- void Reset()
- {
- ShadowVoid_Timer = 20000;
- Abomination_Timer = 13000;
- Geist_Timer = 10000;
- UnholyAura_Timer = 14000;
- ShadowboltVolley_Timer = 3000;
- Phase = 1;
- checkTirion = true;
- Summons.DespawnAll();
- tirion = me->SummonCreature(88888, 581.993042f, 139.784531f, 394.92639f, 4.7f, TEMPSUMMON_MANUAL_DESPAWN, 0);
- }
- void EnterCombat(Unit* /*who*/)
- {
- me->MonsterYell("The Scarlet Onslaught will triumph!", LANG_UNIVERSAL, NULL);
- }
- void KilledUnit(Unit * who)
- {
- me->MonsterSay("You never stood a chance against me, Champion...", LANG_UNIVERSAL, me->GetGUID());
- }
- void JustDied(Unit * killer)
- {
- Summons.DespawnAll();
- tirion = NULL;
- }
- void UpdateAI(const uint32 uiDiff)
- {
- if(!UpdateVictim())
- return;
- if(checkTirion)
- {
- if(tirion && tirion->isDead())
- {
- me->MonsterSay("You are NOTHING without your precious leader, champions!", LANG_UNIVERSAL, me->GetGUID());
- me->AddAura(70711, me);
- checkTirion = false;
- }
- }
- if (me->GetHealthPct() < 50 && Phase == 1)
- {
- Phase = 2;
- me->MonsterYell("You have hardly weakened me, Champions... you really don't stand a chance!", LANG_UNIVERSAL, NULL);
- }
- if (Phase == 1)
- {
- if (ShadowboltVolley_Timer <= uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
- ShadowboltVolley_Timer = 8450;
- }
- else ShadowboltVolley_Timer -= uiDiff;
- if (ShadowVoid_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOWVOID);
- ShadowVoid_Timer = 13500;
- } else ShadowVoid_Timer -= uiDiff;
- if (UnholyAura_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_UNHOLY_AURA);
- UnholyAura_Timer = 7000;
- } else UnholyAura_Timer -= uiDiff;
- if (Geist_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- me->SummonCreature(88889, 590.1231f, 139.784531f, 394.92639f, 4.7f, TEMPSUMMON_MANUAL_DESPAWN, 0);
- Geist_Timer = 8000;
- } else Geist_Timer -= uiDiff;
- if (Abomination_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- me->SummonCreature(88890, 581.993042f, 145.784531f, 394.92639f, 4.7f, TEMPSUMMON_MANUAL_DESPAWN, 0);
- Abomination_Timer = 15000;
- } else Abomination_Timer -= uiDiff;
- }
- if (Phase == 2)
- {
- if (ShadowboltVolley_Timer <= uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
- ShadowboltVolley_Timer = 5450;
- }
- else ShadowboltVolley_Timer -= uiDiff;
- if (ShadowVoid_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOWVOID);
- ShadowVoid_Timer = 8000;
- } else ShadowVoid_Timer -= uiDiff;
- if (UnholyAura_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_UNHOLY_AURA);
- UnholyAura_Timer = 7000;
- } else UnholyAura_Timer -= uiDiff;
- if (Geist_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- me->SummonCreature(88889, 590.1231f, 139.784531f, 394.92639f, 4.7f, TEMPSUMMON_MANUAL_DESPAWN, 0);
- Geist_Timer = 8000;
- } else Geist_Timer -= uiDiff;
- if (Abomination_Timer <=uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- me->SummonCreature(88890, 581.993042f, 145.784531f, 394.92639f, 4.7f, TEMPSUMMON_MANUAL_DESPAWN, 0);
- Abomination_Timer = 12000;
- } else Abomination_Timer -= uiDiff;
- }
- DoMeleeAttackIfReady();
- }
- void JustSummoned(Creature * summoned)
- {
- summoned->AI()->AttackStart(me);
- Summons.Summon(summoned);
- }
- };
- };
- class npc_tirion_toc2 : public CreatureScript
- {
- public:
- npc_tirion_toc2() : CreatureScript("npc_tirion_toc2") { }
- struct npc_tirion_tocAI : public ScriptedAI
- {
- npc_tirion_tocAI(Creature * c) : ScriptedAI(c) { }
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
- me->AddAura(9454, me);
- me->AddAura(71706, me);
- }
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
- }
- };
- CreatureAI * GetAI(Creature * pCreature) const
- {
- return new npc_tirion_tocAI(pCreature);
- }
- };
- class npc_abomination_toc3 : public CreatureScript
- {
- public:
- npc_abomination_toc3() : CreatureScript("npc_abomination_toc3") { }
- CreatureAI * GetAI(Creature * pCreature) const
- {
- return new npc_abomination_tocAI(pCreature);
- }
- struct npc_abomination_tocAI : public ScriptedAI
- {
- npc_abomination_tocAI(Creature * c) : ScriptedAI(c) { }
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
- me->AddAura(17467, me);
- }
- void EnterCombat(Unit* /*who*/)
- {
- me->MonsterSay("Mpphhhrglrgl...", LANG_UNIVERSAL, NULL);
- }
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
- if (Unit* victim = me->getVictim())
- if (victim->GetEntry() == NPC_TIRION_TOC)
- DoMeleeAttackIfReady();
- }
- };
- };
- class npc_geist_toc4 : public CreatureScript
- {
- public:
- npc_geist_toc4() : CreatureScript("npc_geist_toc4") { }
- CreatureAI * GetAI(Creature * pCreature) const
- {
- return new npc_geist_tocAI(pCreature);
- }
- struct npc_geist_tocAI : public ScriptedAI
- {
- npc_geist_tocAI(Creature * c) : ScriptedAI(c) { }
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
- }
- void EnterCombat(Unit* /*who*/)
- {
- me->MonsterSay("Mmmmmm... Tirion flavoured...", LANG_UNIVERSAL, NULL);
- }
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
- if (Unit* victim = me->getVictim())
- if (victim->GetEntry() == NPC_TIRION_TOC)
- DoMeleeAttackIfReady();
- }
- };
- };
- void TestScript()
- {
- new npc_herold_toc1;
- new npc_tirion_toc2;
- new npc_abomination_toc3;
- new npc_geist_toc4;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement