Code:
/*
Titanium Warior --
By Easelm --
Ultimatum-WoW --
This script is going to be in Ulduar as a trash mob script on the server: Ultimatum-WoW,
but I was like this is wayy to cool to just keep it. I mean this script is awesome just
for a trash mob, lol. Enjoy!
*/
#include "StdAfx.h"
#include "Setup.h"
#include "Base.h"
#define TitaniumWarrior 68947
/* Battle Stance Moves */
#define BattleStance 2457
#define Rend 36991
#define Charge 11578
#define MortalStrike 47486
/* End */
/* Defensive Stance Moves */
#define DefensiveStance 71
#define Disarm 676
#define ShieldWall 871
#define Devastate 47498
#define ThunderClap 47502
#define ShieldBlock 2565
/* End */
/* Berserker Stance Moves */
#define BerserkerStance 2458
#define Intercept 20252
#define Whirlwind 1680
#define Bladestorm 63784
/* End */
class TitaniumWarriorAI : public ArcScriptCreatureAI
{
ARCSCRIPT_FACTORY_FUNCTION(TitaniumWarriorAI, ArcScriptCreatureAI);
TitaniumWarriorAI(Creature* pCreature) : ArcScriptCreatureAI(pCreature)
{
AddEmote(Event_OnCombatStart, "Intruders!", Text_Yell);
AddEmote(Event_OnTargetDied, "You will not pass.", Text_Yell);
AddEmote(Event_OnDied, "I... have failed..", Text_Yell);
AddSpell(Rend, Target_Current, 33, 0, 9);
AddSpell(Charge, Target_RandomPlayer, 10, 0, 100);
mBlade = AddSpell(Bladestorm, Target_RandomPlayer, 0, 0, 0);
mMortalStrike = AddSpell(MortalStrike, Target_Current, 0, 0, 80);
}
void OnCombatStart(Unit *pTarget)
{
_unit->SetDualWield(false); // Just to make sure he doesn't do anything funny.
ParentClass::OnCombatStart(pTarget);
}
void OnDied(Unit *pKiller)
{
CancelAllSpells();
CancelAllTimers();
RemoveAllAuras();
_unit->SetDualWield(false);
ParentClass::OnDied(pTarget);
}
void AIUpdate()
{
if(GetHealthPercent() <= 90) // Berserker Stance
{
_unit->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 40343); //, 54560
_unit->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 40343);
_unit->SetDualWield(true);
_unit->SetUInt32Value(UNIT_FIELD_BASEATTACKTIME, 1982); // , 1982
AddSpell(BerserkerStance, Target_Self, 100, 0, 600, 1, 0, false, "Feel my wrath!", Text_Yell);
AddSpell(Intercept, Target_RandomPlayer, 46, 0, 12, 0, 43);
AddSpell(Whirlwind, Target_Current, 53, 0, 23);
}
if(GetHealthPercent() <= 45) // Defensive Stance
{
_unit->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 39291); // One handed Sword
_unit->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 39716); // Shield
_unit->SetDualWield(true);
_unit->SetUInt32Value(UNIT_FIELD_BASEATTACKTIME, 1782);
AddSpell(DefensiveStance, Target_Self, 100, 0, 600, 0, 0, false, "Let's see how tough you are now!", Text_Yell);
AddSpell(Disarm, Target_Current, 34, 0, 32);
AddSpell(ShieldWall, Target_Self, 43, 0, 100);
AddSpell(Devastate, Target_Current, 48, 0, 17);
AddSpell(ThunderClap, Target_Current, 44, 0, 12);
AddSpell(ShieldBlock, Target_Self, 33, 0, 34);
}
if(GetHealthPercent() <= 10) // Unstable Bladestorm
{
_unit->SetDualWield(false);
_unit->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 40343);
_unit->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
CancelAllSpells();
CancelAllTimers();
CastSpell(mMortalStrike);
CastSpell(mBlade);
}
ParentClass::AIUpdate();
ParentClass::AIUpdate();
ParentClass::AIUpdate();
}
protected:
SpellDesc* mBlade;
SpellDesc* mMortalStrike;
};
void SetupTitaniumWarrior(ScriptMgr* mgr)
{
mgr->register_creature_script(TitaniumWarrior, &TitaniumWarriorAI::Create);
}
*note* i did not make this *