Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- enum eNums
- {
- SPELL_SOULSTORM = 68872,
- SPELL_SHADOWBLAST = 70866,
- SPELL_SHADOWBOLTVOLLEY = 55850,
- SPELL_SHADOWVOID = 55847,
- SPELL_RIBBONOFSOULS = 32422,
- SPELL_TELEPORT = 68988
- };
- #define EMOTE_GHOULS "Tharaman begins to summon Unstable Voidwraiths!"
- #define EMOTE_REVEAL "Tharaman reveals his true form!"
- #define EMOTE_INSIDE "Tharaman begins to cast soulstorm. Run in!"
- class boss_tharaman : public CreatureScript
- {
- public:
- boss_tharaman() : CreatureScript("boss_tharaman"){}
- CreatureAI* GetAI_Example(Creature* pCreature) const
- {
- return new boss_tharamanAI(pCreature);
- }
- struct boss_tharamanAI : public ScriptedAI
- {
- boss_tharamanAI(Creature *c) : ScriptedAI(c) {}
- uint32 RibbonofSouls_Timer;
- uint32 Soulstorm_Timer;
- uint32 ShadowboltVolley_Timer;
- uint32 ShadowVoid_Timer;
- uint32 ShadowBlast_Timer;
- uint32 Aod_Timer;
- uint32 Phase;
- void Reset()
- {
- RibbonofSouls_Timer = 5000;
- ShadowboltVolley_Timer = 10000;
- ShadowVoid_Timer = 20000;
- ShadowBlast_Timer = 0;
- Soulstorm_Timer = 1000;
- Aod_Timer = 2000;
- Phase = 0;
- }
- void KilledUnit(Unit * /*victim*/)
- {
- me->MonsterYell("You cannot escape the clutch of the void!", LANG_UNIVERSAL, NULL);
- }
- void JustDied(Unit * /*victim*/)
- {
- me->MonsterYell("Let the void...consume me...", LANG_UNIVERSAL, NULL);
- }
- void EnterCombat(Unit * /*who*/)
- {
- me->MonsterYell("You fools. You think you can silence the void?", LANG_UNIVERSAL, NULL);
- }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!me->getVictim())
- return;
- if (!UpdateVictim())
- return;
- if (me->GetHealthPct() < 60 && Phase == 1)
- {
- me->MonsterYell("Witness...Witness the power of the void!", LANG_UNIVERSAL, NULL);
- DoCast(me, SPELL_TELEPORT);
- me->MonsterTextEmote(EMOTE_INSIDE, 0, true);
- }
- if (me->GetHealthPct() < 35 && Phase == 2)
- {
- me->RemoveAurasDueToSpell(SPELL_SOULSTORM);
- me->SetDisplayId(19338);
- me->MonsterTextEmote(EMOTE_REVEAL, 0, true);
- me->MonsterYell("You know nothing... NOTHING of my limitless power!", LANG_UNIVERSAL, NULL);
- }
- if (Phase == 0)
- {
- if (RibbonofSouls_Timer <=uiDiff)
- {
- DoCast(me->getVictim(), SPELL_RIBBONOFSOULS);
- RibbonofSouls_Timer = 5000;
- }
- else
- {
- RibbonofSouls_Timer -= uiDiff;
- }
- if (ShadowboltVolley_Timer <=uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
- ShadowboltVolley_Timer = 12500;
- }
- else
- {
- ShadowboltVolley_Timer -= uiDiff;
- }
- if (ShadowVoid_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOWVOID);
- ShadowVoid_Timer = 20000;
- }
- else
- {
- ShadowVoid_Timer -= uiDiff;
- }
- if (RibbonofSouls_Timer <=uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_RIBBONOFSOULS);
- RibbonofSouls_Timer = 5000;
- }
- else
- {
- RibbonofSouls_Timer -= uiDiff;
- }
- }
- if (Phase == 1)
- {
- if (ShadowBlast_Timer <= uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SHADOWBLAST);
- ShadowBlast_Timer = 1000000;
- }
- else
- {
- ShadowBlast_Timer -= uiDiff;
- }
- if (Soulstorm_Timer <= uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SOULSTORM);
- Soulstorm_Timer = 1000000;
- }
- else
- {
- Soulstorm_Timer -= uiDiff;
- }
- if (Aod_Timer <=uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- me->SummonCreature(18869, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 220000);
- me->MonsterSay("Rise and feed...", LANG_UNIVERSAL, NULL);
- Aod_Timer = 2000;
- }
- else
- {
- Aod_Timer -= uiDiff;
- }
- if (ShadowVoid_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOWVOID);
- ShadowVoid_Timer = 20000;
- }
- else
- {
- ShadowVoid_Timer -= uiDiff;
- }
- }
- if (Phase == 2)
- {
- if (RibbonofSouls_Timer <=uiDiff)
- {
- DoCast(me->getVictim(), SPELL_RIBBONOFSOULS);
- RibbonofSouls_Timer = 5000;
- }
- else
- {
- RibbonofSouls_Timer -= uiDiff;
- }
- if (ShadowboltVolley_Timer <=uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
- ShadowboltVolley_Timer = 12500;
- }
- else
- {
- ShadowboltVolley_Timer -= uiDiff;
- }
- if (ShadowVoid_Timer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOWVOID);
- ShadowVoid_Timer = 20000;
- }
- else
- {
- ShadowVoid_Timer -= uiDiff;
- }
- if (RibbonofSouls_Timer <=uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_RIBBONOFSOULS);
- RibbonofSouls_Timer = 5000;
- }
- else
- {
- RibbonofSouls_Timer -= uiDiff;
- }
- if (me->HasAura(SPELL_SOULSTORM))
- return;
- }
- DoMeleeAttackIfReady();
- };
- };
- };
- void AddSC_boss_tharaman()
- {
- new boss_tharaman();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement