0% found this document useful (0 votes)
9 views2 pages

Horde Boss

The document defines a Horde boss creature script for World of Warcraft. The script includes functions for the boss's abilities, phases, and death event.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Horde Boss

The document defines a Horde boss creature script for World of Warcraft. The script includes functions for the boss's abilities, phases, and death event.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include "ScriptPCH.

h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuras.h"
#include "Player.h"

enum eNums
{
SPELL_FROSTSHOCK = 23115,
SPELL_CHILL = 21098,
SPELL_ICEBLOCK = 41590,
};

class horde_boss : public CreatureScript


{
public:
horde_boss() : CreatureScript("hordeboss"){}

CreatureAI * GetAI(Creature * pCreature) const


{
return new horde_bossAI(pCreature);
}

struct horde_bossAI : public ScriptedAI


{
horde_bossAI(Creature *c) : ScriptedAI(c){}

uint32 Frostshock_Timer;
uint32 Chill_Timer;

int phase;
int percentPassed;

void Reset()
{
me->SetHealth(me->GetMaxHealth());
phase = 1;
percentPassed = 0;
Frostshock_Timer = 8000;
Chill_Timer = 3000;
}
void EnterCombat(Unit * /*who*/)
{
percentPassed = 1;
}
void JustDied(Unit* pPlayer)
{
char msg[250];
snprintf(msg, 250, "|cffff0000[Event System]|r The |cff00ccff
Alliance|r have won the Horde vs Alliance event! ", pPlayer->GetName()); // The
message
sWorld->SendGlobalText(msg, NULL);
}
void UpdateAI(const uint32 uiDiff)
{
ScriptedAI::UpdateAI(uiDiff);
if (!UpdateVictim())
return;

if (Frostshock_Timer <= uiDiff)


{
DoCast(me->getVictim(), SPELL_FROSTSHOCK);
Frostshock_Timer = 15000;
}
else
Frostshock_Timer -= uiDiff;
DoMeleeAttackIfReady();

if (Chill_Timer<= uiDiff)
{
DoCast(me->getVictim(), SPELL_CHILL);
Chill_Timer = 3000;
}
else
Chill_Timer -= uiDiff;
DoMeleeAttackIfReady();

if (me->GetHealthPct() <= 10 && percentPassed == 1)


{
DoCast(me, SPELL_ICEBLOCK, true);
percentPassed = 2;
}

switch (phase)
{
case 1:
if (percentPassed == 2)

{
phase = 2;
}
break;
}
}
};
};

void AddSC_hordeboss()
{
new horde_boss();
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy