Ok tengo el boss creado ahora como hago para meterlo al server este archivo lo tengo en un block de notas. esto se pete como un parche?
[CODE]
#include “ScriptPCH.h”
enum eNums
{
SPELL_ICEARMOR = 36881,
SPELL_FROSTBOLT = 59251,
SPELL_FIREBALL = 57628
SPELL_ENRAGE = 54287
};
class example : public CreatureScript
{
public:
example() : CreatureScript(“example”){}
uint32 Icearmor_Timer;
uint32 Frostbolt_Timer;
uint32 Fireball_Timer;
uint32 Enrage_Timer;
uint32 Phase;
CreatureAI* GetAI_example(Creature* pCreature) const
{
return new exampleAI(pCreature);
}
struct exampleAI : public ScriptedAI
{
exampleAI(Creature *c) : ScriptedAI(c) {}
void Reset()
{
Icearmor_Timer = 0;
Frostbolt_Timer = 0;
Fireball_Timer = 5000;
Enrage_Timer = 300000;
Phase = 1;
}
void KilledUnit(Unit * /victim/)
{
me->MonsterYell(“Muere manco!!! HAHAHAHAHAHAHA”, LANG_UNIVERSAL, NULL);
}
void JustDied(Unit * /victim/)
{
me->MonsterYell(“PFFF Me ganaron seguro con ayuda de algun GM!!..”, LANG_UNIVERSAL, NULL);
}
void EnterCombat(Unit * /who/)
{
me->MonsterYell(“Porque demoraron tanto!! huele a muerto!!”, LANG_UNIVERSAL, NULL);
}
void UpdateAI(const uint32 uiDiff)
{
if (!me->getVictim())
{
if (Icearmor_Timer <= uiDiff)
{
DoCast(me, SPELL_ICEARMOR);
Icearmor_Timer = 18000000;
}
else
Icearmor_Timer -= uiDiff;
}
if (!UpdateVictim())
return;
if (((me->GetHealth()*100 / me->GetMaxHealth()) < 55) && (Phase == 1))
{
Phase = 2;
}
if (Phase == 1)
{
if (Frostbolt_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLT);
Frostbolt_Timer = 3000;
}
else
Frostbolt_Timer -= uiDiff;
if (Fireball_Timer <= uiDiff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_FIREBALL);
Fireball_Timer = 10000;
}
else
Fireball_Timer -= uiDiff;
}
if (Phase == 2)
{
if (Fireball_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_FIREBALL);
Fireball_Timer = 3000;
}
else
Fireball_Timer -= uiDiff;
}
if (Enrage_Timer <= uiDiff)
{
DoCast(me, SPELL_ENRAGE);
}
DoMeleeAttackIfReady();
}
};
};
void AddSC_example()
{
new example();
}
[/code][/CODE]