Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- PVP boss script, copyright belongs to cyphric, creator.
- */
- #include "ScriptPCH.h"
- enum eNums
- {
- SPELL_SHADOWBOLT = 71297,
- SPELL_CURSEOFDOOM = 64157,
- SPELL_CORNEREDANDENRAGED = 52262,
- SPELL_DEMONARMOR = 687
- };
- class ArentosTheDemonLord: public CreatureScript
- {
- public:
- ArentosTheDemonLord() : CreatureScript("BossNO.1"){}
- ArentosTheDemonLordAI* GetAI_ArentosTheDemonLord(Creature* pCreature) const
- {
- return new ArentosTheDemonLord(pCreature);
- }
- struct ArentosTheDemonLordAI : public ScriptedAI
- {
- ArentosTheDemonLordAI(Creature *c) : ScriptedAI(c) {}
- uint32 ShadowBolt_Timer;
- uint32 CuresofDoom_Timer;
- uint32 CorneredandEnraged_Timer;
- uint32 DemonArmor_Timer ;
- uint32 phase;
- void Reset()
- {
- DemonArmor_Timer = 0;
- ShadowBolt_Timer = 10000;
- CurseofDoom_Timer = 30000;
- Phase = 1;
- }
- void KilledUnit(Unit *)
- {
- me->MonsterYell("Hahaha, one down!", LANG_UNIVERSAL, NULL)
- }
- void JustDied(Unit *)
- {
- me->MonsterYell("NO, I can't belive that you could kill me........ But I'm only the first of the 4 bosses, my master succeeds even me!", LANG_UNIVERSAL, NULL)
- }
- void EnterCombat(Unit *)
- {
- me->MonsterYell("You can not kill me, the master of demons!", LANG_UNIVERSAL, NULL)
- }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!me->getVictim())
- {
- if (DemonArmor_Timer <= uiDiff
- {
- DoCast(me, SPELL_DEMONARMOR);
- DemonArmor_Timer = 18000000;
- }
- else
- DemonArmor_Timer -= uiDiff;
- }
- if(!UpdateVictim())
- return;
- if (((me->GetMaxHealth()*100 / me->GetMaxHealth()) < 25) &&(Phase == 1))
- if (((me->GetMaxHealth()*25 / me->GetMaxHealth()) < 0) && (Phase == 2))
- {
- Phase = 2;
- }
- if (Phase == 1)
- {
- if(ShadowBolt_Timer <= uiDiff)
- {
- DoCast(me->getVictim(), SPELL_SHADOWBOLT);
- ShadowBolt_Timer = 5000
- }
- else
- ShadowBolt_Timer -= uiDiff;
- if(CuresofDoom_Timer <= uiDiff)
- {
- if (Unit * pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- DoCast(pTarget, SPELL_CURSEOFDOOM);
- CurseofDoom_Timer = 109000
- }
- else
- CurseofDoom_Timer -=uiDiff
- }
- if (Phase == 2)
- {
- if(CorneredandEnraged_Timer <= uiDiff)
- {
- DoCast(me, SPELL_CORNEREDANDENRAGED);
- CorneredandEnraged_Timer = 0;
- }
- else
- CorneredandEnraged_Timer -= uiDiff;
- }
- DoMeleeAttackIfReady();
- }
- };
- };
- void AddSC_ArentosTheDemonLord()
- {
- new ArentosTheDemonLord();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement