remove CRLF from alterac_valley scripts.
--HG-- branch : trunk
This commit is contained in:
@@ -1,203 +1,203 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptedPch.h"
|
#include "ScriptedPch.h"
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_ARCANE_EXPLOSION = 46608,
|
SPELL_ARCANE_EXPLOSION = 46608,
|
||||||
SPELL_CONE_OF_COLD = 38384,
|
SPELL_CONE_OF_COLD = 38384,
|
||||||
SPELL_FIREBALL = 46988,
|
SPELL_FIREBALL = 46988,
|
||||||
SPELL_FROSTBOLT = 46987
|
SPELL_FROSTBOLT = 46987
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Yells
|
enum Yells
|
||||||
{
|
{
|
||||||
YELL_AGGRO = -2100019,
|
YELL_AGGRO = -2100019,
|
||||||
YELL_EVADE = -2100020
|
YELL_EVADE = -2100020
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Creatures
|
enum Creatures
|
||||||
{
|
{
|
||||||
NPC_WATER_ELEMENTAL = 25040
|
NPC_WATER_ELEMENTAL = 25040
|
||||||
};
|
};
|
||||||
|
|
||||||
enum WaterElementalSpells
|
enum WaterElementalSpells
|
||||||
{
|
{
|
||||||
SPELL_WATERBOLT = 46983
|
SPELL_WATERBOLT = 46983
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mob_water_elementalAI : public ScriptedAI
|
struct mob_water_elementalAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_water_elementalAI(Creature *c) : ScriptedAI(c) {}
|
mob_water_elementalAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
uint32 uiWaterBoltTimer;
|
uint32 uiWaterBoltTimer;
|
||||||
uint64 uiBalindaGUID;
|
uint64 uiBalindaGUID;
|
||||||
uint32 uiResetTimer;
|
uint32 uiResetTimer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiWaterBoltTimer = 3*IN_MILISECONDS;
|
uiWaterBoltTimer = 3*IN_MILISECONDS;
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(uiWaterBoltTimer < diff)
|
if(uiWaterBoltTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_WATERBOLT);
|
DoCast(m_creature->getVictim(), SPELL_WATERBOLT);
|
||||||
uiWaterBoltTimer = 5*IN_MILISECONDS;
|
uiWaterBoltTimer = 5*IN_MILISECONDS;
|
||||||
} else uiWaterBoltTimer -= diff;
|
} else uiWaterBoltTimer -= diff;
|
||||||
|
|
||||||
// check if creature is not outside of building
|
// check if creature is not outside of building
|
||||||
if(uiResetTimer < diff)
|
if(uiResetTimer < diff)
|
||||||
{
|
{
|
||||||
if (Creature *pBalinda = Unit::GetCreature(*m_creature, uiBalindaGUID))
|
if (Creature *pBalinda = Unit::GetCreature(*m_creature, uiBalindaGUID))
|
||||||
if (m_creature->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
|
if (m_creature->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
} else uiResetTimer -= diff;
|
} else uiResetTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_balindaAI : public ScriptedAI
|
struct boss_balindaAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_balindaAI(Creature *c) : ScriptedAI(c), Summons(m_creature) {}
|
boss_balindaAI(Creature *c) : ScriptedAI(c), Summons(m_creature) {}
|
||||||
|
|
||||||
uint32 uiArcaneExplosionTimer;
|
uint32 uiArcaneExplosionTimer;
|
||||||
uint32 uiConeOfColdTimer;
|
uint32 uiConeOfColdTimer;
|
||||||
uint32 uiFireBoltTimer;
|
uint32 uiFireBoltTimer;
|
||||||
uint32 uiFrostboltTimer;
|
uint32 uiFrostboltTimer;
|
||||||
uint32 uiResetTimer;
|
uint32 uiResetTimer;
|
||||||
uint32 uiWaterElementalTimer;
|
uint32 uiWaterElementalTimer;
|
||||||
|
|
||||||
SummonList Summons;
|
SummonList Summons;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
|
uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||||
uiConeOfColdTimer = 8*IN_MILISECONDS;
|
uiConeOfColdTimer = 8*IN_MILISECONDS;
|
||||||
uiFireBoltTimer = 1*IN_MILISECONDS;
|
uiFireBoltTimer = 1*IN_MILISECONDS;
|
||||||
uiFrostboltTimer = 4*IN_MILISECONDS;
|
uiFrostboltTimer = 4*IN_MILISECONDS;
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
uiWaterElementalTimer = 0;
|
uiWaterElementalTimer = 0;
|
||||||
|
|
||||||
Summons.DespawnAll();
|
Summons.DespawnAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
{
|
{
|
||||||
DoScriptText(YELL_AGGRO, m_creature);
|
DoScriptText(YELL_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustRespawned()
|
void JustRespawned()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summoned)
|
void JustSummoned(Creature* summoned)
|
||||||
{
|
{
|
||||||
((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID();
|
((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID();
|
||||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
|
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
|
||||||
summoned->setFaction(m_creature->getFaction());
|
summoned->setFaction(m_creature->getFaction());
|
||||||
Summons.Summon(summoned);
|
Summons.Summon(summoned);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
Summons.DespawnAll();
|
Summons.DespawnAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiWaterElementalTimer < diff)
|
if (uiWaterElementalTimer < diff)
|
||||||
{
|
{
|
||||||
if(Summons.empty())
|
if(Summons.empty())
|
||||||
m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS);
|
m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS);
|
||||||
uiWaterElementalTimer = 50*IN_MILISECONDS;
|
uiWaterElementalTimer = 50*IN_MILISECONDS;
|
||||||
} else uiWaterElementalTimer -= diff;
|
} else uiWaterElementalTimer -= diff;
|
||||||
|
|
||||||
if (uiArcaneExplosionTimer < diff)
|
if (uiArcaneExplosionTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION);
|
DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION);
|
||||||
uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
|
uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||||
} else uiArcaneExplosionTimer -= diff;
|
} else uiArcaneExplosionTimer -= diff;
|
||||||
|
|
||||||
if (uiConeOfColdTimer < diff)
|
if (uiConeOfColdTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_CONE_OF_COLD);
|
DoCast(m_creature->getVictim(), SPELL_CONE_OF_COLD);
|
||||||
uiConeOfColdTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS);
|
uiConeOfColdTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||||
} else uiConeOfColdTimer -= diff;
|
} else uiConeOfColdTimer -= diff;
|
||||||
|
|
||||||
if (uiFireBoltTimer < diff)
|
if (uiFireBoltTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_FIREBALL);
|
DoCast(m_creature->getVictim(), SPELL_FIREBALL);
|
||||||
uiFireBoltTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS);
|
uiFireBoltTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS);
|
||||||
} else uiFireBoltTimer -= diff;
|
} else uiFireBoltTimer -= diff;
|
||||||
|
|
||||||
if (uiFrostboltTimer < diff)
|
if (uiFrostboltTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_FROSTBOLT);
|
DoCast(m_creature->getVictim(), SPELL_FROSTBOLT);
|
||||||
uiFrostboltTimer = urand(4*IN_MILISECONDS,12*IN_MILISECONDS);
|
uiFrostboltTimer = urand(4*IN_MILISECONDS,12*IN_MILISECONDS);
|
||||||
} else uiFrostboltTimer -= diff;
|
} else uiFrostboltTimer -= diff;
|
||||||
|
|
||||||
|
|
||||||
// check if creature is not outside of building
|
// check if creature is not outside of building
|
||||||
if(uiResetTimer < diff)
|
if(uiResetTimer < diff)
|
||||||
{
|
{
|
||||||
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
DoScriptText(YELL_EVADE, m_creature);
|
DoScriptText(YELL_EVADE, m_creature);
|
||||||
}
|
}
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
} else uiResetTimer -= diff;
|
} else uiResetTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_balinda(Creature *_Creature)
|
CreatureAI* GetAI_boss_balinda(Creature *_Creature)
|
||||||
{
|
{
|
||||||
return new boss_balindaAI (_Creature);
|
return new boss_balindaAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureAI* GetAI_mob_water_elemental(Creature *_Creature)
|
CreatureAI* GetAI_mob_water_elemental(Creature *_Creature)
|
||||||
{
|
{
|
||||||
return new mob_water_elementalAI (_Creature);
|
return new mob_water_elementalAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_boss_balinda()
|
void AddSC_boss_balinda()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "boss_balinda";
|
newscript->Name = "boss_balinda";
|
||||||
newscript->GetAI = &GetAI_boss_balinda;
|
newscript->GetAI = &GetAI_boss_balinda;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "mob_water_elemental";
|
newscript->Name = "mob_water_elemental";
|
||||||
newscript->GetAI = &GetAI_mob_water_elemental;
|
newscript->GetAI = &GetAI_mob_water_elemental;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
};
|
};
|
||||||
@@ -1,138 +1,138 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptedPch.h"
|
#include "ScriptedPch.h"
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_WHIRLWIND = 15589,
|
SPELL_WHIRLWIND = 15589,
|
||||||
SPELL_WHIRLWIND2 = 13736,
|
SPELL_WHIRLWIND2 = 13736,
|
||||||
SPELL_KNOCKDOWN = 19128,
|
SPELL_KNOCKDOWN = 19128,
|
||||||
SPELL_FRENZY = 8269,
|
SPELL_FRENZY = 8269,
|
||||||
SPELL_SWEEPING_STRIKES = 18765, // not sure
|
SPELL_SWEEPING_STRIKES = 18765, // not sure
|
||||||
SPELL_CLEAVE = 20677, // not sure
|
SPELL_CLEAVE = 20677, // not sure
|
||||||
SPELL_WINDFURY = 35886, // not sure
|
SPELL_WINDFURY = 35886, // not sure
|
||||||
SPELL_STORMPIKE = 51876 // not sure
|
SPELL_STORMPIKE = 51876 // not sure
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Yells
|
enum Yells
|
||||||
{
|
{
|
||||||
YELL_AGGRO = -1810000,
|
YELL_AGGRO = -1810000,
|
||||||
YELL_EVADE = -1810001,
|
YELL_EVADE = -1810001,
|
||||||
YELL_RESPAWN = -1810002,
|
YELL_RESPAWN = -1810002,
|
||||||
YELL_RANDOM1 = -1810003,
|
YELL_RANDOM1 = -1810003,
|
||||||
YELL_RANDOM2 = -1810004,
|
YELL_RANDOM2 = -1810004,
|
||||||
YELL_RANDOM3 = -1810005,
|
YELL_RANDOM3 = -1810005,
|
||||||
YELL_RANDOM4 = -1810006,
|
YELL_RANDOM4 = -1810006,
|
||||||
YELL_RANDOM5 = -1810007
|
YELL_RANDOM5 = -1810007
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_drektharAI : public ScriptedAI
|
struct boss_drektharAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_drektharAI(Creature *c) : ScriptedAI(c) {}
|
boss_drektharAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
uint32 uiWhirlwindTimer;
|
uint32 uiWhirlwindTimer;
|
||||||
uint32 uiWhirlwind2Timer;
|
uint32 uiWhirlwind2Timer;
|
||||||
uint32 uiKnockdownTimer;
|
uint32 uiKnockdownTimer;
|
||||||
uint32 uiFrenzyTimer;
|
uint32 uiFrenzyTimer;
|
||||||
uint32 uiYellTimer;
|
uint32 uiYellTimer;
|
||||||
uint32 uiResetTimer;
|
uint32 uiResetTimer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiWhirlwindTimer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS);
|
uiWhirlwindTimer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||||
uiWhirlwind2Timer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS);
|
uiWhirlwind2Timer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||||
uiKnockdownTimer = 12*IN_MILISECONDS;
|
uiKnockdownTimer = 12*IN_MILISECONDS;
|
||||||
uiFrenzyTimer = 6*IN_MILISECONDS;
|
uiFrenzyTimer = 6*IN_MILISECONDS;
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
|
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
{
|
{
|
||||||
DoScriptText(YELL_AGGRO, m_creature);
|
DoScriptText(YELL_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustRespawned()
|
void JustRespawned()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
DoScriptText(YELL_RESPAWN, m_creature);
|
DoScriptText(YELL_RESPAWN, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiWhirlwindTimer <= diff)
|
if (uiWhirlwindTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND);
|
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND);
|
||||||
uiWhirlwindTimer = urand(8*IN_MILISECONDS,18*IN_MILISECONDS);
|
uiWhirlwindTimer = urand(8*IN_MILISECONDS,18*IN_MILISECONDS);
|
||||||
} else uiWhirlwindTimer -= diff;
|
} else uiWhirlwindTimer -= diff;
|
||||||
|
|
||||||
if (uiWhirlwind2Timer <= diff)
|
if (uiWhirlwind2Timer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2);
|
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2);
|
||||||
uiWhirlwind2Timer = urand(7*IN_MILISECONDS,25*IN_MILISECONDS);
|
uiWhirlwind2Timer = urand(7*IN_MILISECONDS,25*IN_MILISECONDS);
|
||||||
} else uiWhirlwind2Timer -= diff;
|
} else uiWhirlwind2Timer -= diff;
|
||||||
|
|
||||||
if (uiKnockdownTimer <= diff)
|
if (uiKnockdownTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_KNOCKDOWN);
|
DoCast(m_creature->getVictim(), SPELL_KNOCKDOWN);
|
||||||
uiKnockdownTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
|
uiKnockdownTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||||
} else uiKnockdownTimer -= diff;
|
} else uiKnockdownTimer -= diff;
|
||||||
|
|
||||||
if (uiFrenzyTimer <= diff)
|
if (uiFrenzyTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_FRENZY);
|
DoCast(m_creature->getVictim(), SPELL_FRENZY);
|
||||||
uiFrenzyTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
|
uiFrenzyTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||||
} else uiFrenzyTimer -= diff;
|
} else uiFrenzyTimer -= diff;
|
||||||
|
|
||||||
if (uiYellTimer <= diff)
|
if (uiYellTimer <= diff)
|
||||||
{
|
{
|
||||||
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5), m_creature);
|
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5), m_creature);
|
||||||
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
|
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
|
||||||
} else uiYellTimer -= diff;
|
} else uiYellTimer -= diff;
|
||||||
|
|
||||||
// check if creature is not outside of building
|
// check if creature is not outside of building
|
||||||
if(uiResetTimer <= diff)
|
if(uiResetTimer <= diff)
|
||||||
{
|
{
|
||||||
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
DoScriptText(YELL_EVADE, m_creature);
|
DoScriptText(YELL_EVADE, m_creature);
|
||||||
}
|
}
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
} else uiResetTimer -= diff;
|
} else uiResetTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_drekthar(Creature *_Creature)
|
CreatureAI* GetAI_boss_drekthar(Creature *_Creature)
|
||||||
{
|
{
|
||||||
return new boss_drektharAI (_Creature);
|
return new boss_drektharAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_boss_drekthar()
|
void AddSC_boss_drekthar()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "boss_drekthar";
|
newscript->Name = "boss_drekthar";
|
||||||
newscript->GetAI = &GetAI_boss_drekthar;
|
newscript->GetAI = &GetAI_boss_drekthar;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
@@ -1,129 +1,129 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptedPch.h"
|
#include "ScriptedPch.h"
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_CLEAVE = 15284,
|
SPELL_CLEAVE = 15284,
|
||||||
SPELL_FRIGHTENING_SHOUT = 19134,
|
SPELL_FRIGHTENING_SHOUT = 19134,
|
||||||
SPELL_WHIRLWIND1 = 15589,
|
SPELL_WHIRLWIND1 = 15589,
|
||||||
SPELL_WHIRLWIND2 = 13736,
|
SPELL_WHIRLWIND2 = 13736,
|
||||||
SPELL_MORTAL_STRIKE = 16856
|
SPELL_MORTAL_STRIKE = 16856
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Yells
|
enum Yells
|
||||||
{
|
{
|
||||||
YELL_AGGRO = -1810021,
|
YELL_AGGRO = -1810021,
|
||||||
YELL_EVADE = -1810022
|
YELL_EVADE = -1810022
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_galvangarAI : public ScriptedAI
|
struct boss_galvangarAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_galvangarAI(Creature *c) : ScriptedAI(c) {}
|
boss_galvangarAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
|
|
||||||
uint32 uiCleaveTimer;
|
uint32 uiCleaveTimer;
|
||||||
uint32 uiFrighteningShoutTimer;
|
uint32 uiFrighteningShoutTimer;
|
||||||
uint32 uiWhirlwind1Timer;
|
uint32 uiWhirlwind1Timer;
|
||||||
uint32 uiWhirlwind2Timer;
|
uint32 uiWhirlwind2Timer;
|
||||||
uint32 uiMortalStrikeTimer;
|
uint32 uiMortalStrikeTimer;
|
||||||
uint32 uiResetTimer;
|
uint32 uiResetTimer;
|
||||||
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiCleaveTimer = urand(1*IN_MILISECONDS,9*IN_MILISECONDS);
|
uiCleaveTimer = urand(1*IN_MILISECONDS,9*IN_MILISECONDS);
|
||||||
uiFrighteningShoutTimer = urand(2*IN_MILISECONDS,19*IN_MILISECONDS);
|
uiFrighteningShoutTimer = urand(2*IN_MILISECONDS,19*IN_MILISECONDS);
|
||||||
uiWhirlwind1Timer = urand(1*IN_MILISECONDS,13*IN_MILISECONDS);
|
uiWhirlwind1Timer = urand(1*IN_MILISECONDS,13*IN_MILISECONDS);
|
||||||
uiWhirlwind2Timer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
|
uiWhirlwind2Timer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||||
uiMortalStrikeTimer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
|
uiMortalStrikeTimer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
{
|
{
|
||||||
DoScriptText(YELL_AGGRO, m_creature);
|
DoScriptText(YELL_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustRespawned()
|
void JustRespawned()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiCleaveTimer <= diff)
|
if (uiCleaveTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_CLEAVE);
|
DoCast(m_creature->getVictim(), SPELL_CLEAVE);
|
||||||
uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS);
|
uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS);
|
||||||
} else uiCleaveTimer -= diff;
|
} else uiCleaveTimer -= diff;
|
||||||
|
|
||||||
if (uiFrighteningShoutTimer <= diff)
|
if (uiFrighteningShoutTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT);
|
DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT);
|
||||||
uiFrighteningShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
|
uiFrighteningShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||||
} else uiFrighteningShoutTimer -= diff;
|
} else uiFrighteningShoutTimer -= diff;
|
||||||
|
|
||||||
if (uiWhirlwind1Timer <= diff)
|
if (uiWhirlwind1Timer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND1);
|
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND1);
|
||||||
uiWhirlwind1Timer = urand(6*IN_MILISECONDS,10*IN_MILISECONDS);
|
uiWhirlwind1Timer = urand(6*IN_MILISECONDS,10*IN_MILISECONDS);
|
||||||
} else uiWhirlwind1Timer -= diff;
|
} else uiWhirlwind1Timer -= diff;
|
||||||
|
|
||||||
if (uiWhirlwind2Timer <= diff)
|
if (uiWhirlwind2Timer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2);
|
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2);
|
||||||
uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
|
uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
|
||||||
} else uiWhirlwind2Timer -= diff;
|
} else uiWhirlwind2Timer -= diff;
|
||||||
|
|
||||||
if (uiMortalStrikeTimer <= diff)
|
if (uiMortalStrikeTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE);
|
DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE);
|
||||||
uiMortalStrikeTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS);
|
uiMortalStrikeTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||||
} else uiMortalStrikeTimer -= diff;
|
} else uiMortalStrikeTimer -= diff;
|
||||||
|
|
||||||
// check if creature is not outside of building
|
// check if creature is not outside of building
|
||||||
if(uiResetTimer <= diff)
|
if(uiResetTimer <= diff)
|
||||||
{
|
{
|
||||||
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
DoScriptText(YELL_EVADE, m_creature);
|
DoScriptText(YELL_EVADE, m_creature);
|
||||||
}
|
}
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
} else uiResetTimer -= diff;
|
} else uiResetTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_galvangar(Creature *_Creature)
|
CreatureAI* GetAI_boss_galvangar(Creature *_Creature)
|
||||||
{
|
{
|
||||||
return new boss_galvangarAI (_Creature);
|
return new boss_galvangarAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_boss_galvangar()
|
void AddSC_boss_galvangar()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "boss_galvangar";
|
newscript->Name = "boss_galvangar";
|
||||||
newscript->GetAI = &GetAI_boss_galvangar;
|
newscript->GetAI = &GetAI_boss_galvangar;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,129 +1,129 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptedPch.h"
|
#include "ScriptedPch.h"
|
||||||
|
|
||||||
enum Yells
|
enum Yells
|
||||||
{
|
{
|
||||||
YELL_AGGRO = -1810008,
|
YELL_AGGRO = -1810008,
|
||||||
YELL_EVADE = -1810009,
|
YELL_EVADE = -1810009,
|
||||||
YELL_RESPAWN1 = -1810010,
|
YELL_RESPAWN1 = -1810010,
|
||||||
YELL_RESPAWN2 = -1810011,
|
YELL_RESPAWN2 = -1810011,
|
||||||
YELL_RANDOM1 = -1810012,
|
YELL_RANDOM1 = -1810012,
|
||||||
YELL_RANDOM2 = -1810013,
|
YELL_RANDOM2 = -1810013,
|
||||||
YELL_RANDOM3 = -1810014,
|
YELL_RANDOM3 = -1810014,
|
||||||
YELL_RANDOM4 = -1810015,
|
YELL_RANDOM4 = -1810015,
|
||||||
YELL_RANDOM5 = -1810016,
|
YELL_RANDOM5 = -1810016,
|
||||||
YELL_RANDOM6 = -1810017,
|
YELL_RANDOM6 = -1810017,
|
||||||
YELL_RANDOM7 = -1810018
|
YELL_RANDOM7 = -1810018
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_AVATAR = 19135,
|
SPELL_AVATAR = 19135,
|
||||||
SPELL_THUNDERCLAP = 15588,
|
SPELL_THUNDERCLAP = 15588,
|
||||||
SPELL_STORMBOLT = 20685 // not sure
|
SPELL_STORMBOLT = 20685 // not sure
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_vanndarAI : public ScriptedAI
|
struct boss_vanndarAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_vanndarAI(Creature *c) : ScriptedAI(c) {}
|
boss_vanndarAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
|
|
||||||
uint32 uiAvatarTimer;
|
uint32 uiAvatarTimer;
|
||||||
uint32 uiThunderclapTimer;
|
uint32 uiThunderclapTimer;
|
||||||
uint32 uiStormboltTimer;
|
uint32 uiStormboltTimer;
|
||||||
uint32 uiResetTimer;
|
uint32 uiResetTimer;
|
||||||
uint32 uiYellTimer;
|
uint32 uiYellTimer;
|
||||||
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiAvatarTimer = 3*IN_MILISECONDS;
|
uiAvatarTimer = 3*IN_MILISECONDS;
|
||||||
uiThunderclapTimer = 4*IN_MILISECONDS;
|
uiThunderclapTimer = 4*IN_MILISECONDS;
|
||||||
uiStormboltTimer = 6*IN_MILISECONDS;
|
uiStormboltTimer = 6*IN_MILISECONDS;
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
|
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
{
|
{
|
||||||
DoScriptText(YELL_AGGRO, m_creature);
|
DoScriptText(YELL_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustRespawned()
|
void JustRespawned()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
DoScriptText(RAND(YELL_RESPAWN1,YELL_RESPAWN2), m_creature);
|
DoScriptText(RAND(YELL_RESPAWN1,YELL_RESPAWN2), m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiAvatarTimer <= diff)
|
if (uiAvatarTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_AVATAR);
|
DoCast(m_creature->getVictim(), SPELL_AVATAR);
|
||||||
uiAvatarTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS);
|
uiAvatarTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||||
} else uiAvatarTimer -= diff;
|
} else uiAvatarTimer -= diff;
|
||||||
|
|
||||||
if (uiThunderclapTimer <= diff)
|
if (uiThunderclapTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP);
|
DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP);
|
||||||
uiThunderclapTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
|
uiThunderclapTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||||
} else uiThunderclapTimer -= diff;
|
} else uiThunderclapTimer -= diff;
|
||||||
|
|
||||||
if (uiStormboltTimer <= diff)
|
if (uiStormboltTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_STORMBOLT);
|
DoCast(m_creature->getVictim(), SPELL_STORMBOLT);
|
||||||
uiStormboltTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
|
uiStormboltTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
|
||||||
} else uiStormboltTimer -= diff;
|
} else uiStormboltTimer -= diff;
|
||||||
|
|
||||||
if (uiYellTimer <= diff)
|
if (uiYellTimer <= diff)
|
||||||
{
|
{
|
||||||
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5,YELL_RANDOM6,YELL_RANDOM7), m_creature);
|
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5,YELL_RANDOM6,YELL_RANDOM7), m_creature);
|
||||||
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
|
uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
|
||||||
} else uiYellTimer -= diff;
|
} else uiYellTimer -= diff;
|
||||||
|
|
||||||
// check if creature is not outside of building
|
// check if creature is not outside of building
|
||||||
if(uiResetTimer <= diff)
|
if(uiResetTimer <= diff)
|
||||||
{
|
{
|
||||||
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
DoScriptText(YELL_EVADE, m_creature);
|
DoScriptText(YELL_EVADE, m_creature);
|
||||||
}
|
}
|
||||||
uiResetTimer = 5*IN_MILISECONDS;
|
uiResetTimer = 5*IN_MILISECONDS;
|
||||||
} else uiResetTimer -= diff;
|
} else uiResetTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_vanndar(Creature *_Creature)
|
CreatureAI* GetAI_boss_vanndar(Creature *_Creature)
|
||||||
{
|
{
|
||||||
return new boss_vanndarAI (_Creature);
|
return new boss_vanndarAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_boss_vanndar()
|
void AddSC_boss_vanndar()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "boss_vanndar";
|
newscript->Name = "boss_vanndar";
|
||||||
newscript->GetAI = &GetAI_boss_vanndar;
|
newscript->GetAI = &GetAI_boss_vanndar;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user