Index: base/guard_ai.cpp =================================================================== --- base/guard_ai.cpp (revision 1597) +++ base/guard_ai.cpp (working copy) @@ -34,31 +34,133 @@ guardAI::guardAI(Creature* pCreature) : ScriptedAI(pCreature), GlobalCooldown(0), - BuffTimer(0) + ZoneAttackMsgTimer(0), + _Aggro(0) {} void guardAI::Reset() { + if(_Aggro == 2) + _Aggro = 1; GlobalCooldown = 0; - BuffTimer = 0; //Rebuff as soon as we can + Bandage = 0; + Potion = 0; + OffHand = 0; + Help = urand(30000, 50000); + yell = false; + //m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+750,true); + if(!(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 4423)) + { + m_creature->setPowerType(POWER_RAGE); + m_creature->SetMaxPower(POWER_RAGE,500); + m_creature->SetPower(POWER_RAGE,0); + bool elite = false; + int temp3 = 0; + int temp4 = 0; + int temp5 = 0; + int temp6 = 0; + temp3 = m_creature->getLevel(); + elite = m_creature->isElite(); + if(elite) + { + temp4 = temp3 * 200; + temp5 = temp3 * 120; + temp6 = temp3 * 8; + } + else + { + if(temp3 < 71) + { + temp4 = temp3 * 125; + temp5 = temp3 * 75; + temp6 = temp3 * 5; + } + else + { + temp4 = temp3 * 175; + temp5 = temp3 * 105; + temp6 = temp3 * 7; + } + } + if(m_creature->GetEntry() == 12481) + temp4 = temp4 * 4; + if(m_creature->GetEntry() == 12480) + temp4 = temp4 * 6; + if(m_creature->GetEntry() == 5624) + temp4 = temp4 * 3; + m_creature->SetMaxHealth(temp4); + m_creature->SetHealth(temp4); + m_creature->SetArmor(temp5); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,temp6); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,temp6); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,temp6); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,temp6); + m_creature->SetResistance(SPELL_SCHOOL_FROST,temp6); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,temp6); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,temp6); + } } void guardAI::Aggro(Unit *who) { - if (m_creature->GetEntry() == 15184) + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) { switch(urand(0, 2)) { case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; - case 1: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; - case 2: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; + case 1: DoScriptText(SAY_GUARD_SIL_AGGRO2, m_creature, who); break; + case 2: DoScriptText(SAY_GUARD_SIL_AGGRO3, m_creature, who); break; } + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; } +} - if (SpellEntry const *spell = m_creature->reachWithSpellAttack(who)) - DoCastSpell(who, spell); +void guardAI::DamageDeal(Unit *done_to, uint32 &damage) +{ + if(m_creature->GetEntry() == 4423) + return; + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0: temp1 = temp2 + 40;break; + case 1: temp1 = temp2 + 50;break; + case 2: temp1 = temp2 + 60;break; + case 3: temp1 = temp2 + 70;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); } +void guardAI::DamageTaken(Unit *done_by, uint32 &damage) +{ + if(damage > m_creature->GetHealth()) + return; + + if(m_creature->GetEntry() == 4423) + return; + + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0: temp1 = temp2 + 20;break; + case 1: temp1 = temp2 + 30;break; + case 2: temp1 = temp2 + 40;break; + case 3: temp1 = temp2 + 50;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + void guardAI::JustDied(Unit *Killer) { //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels @@ -73,61 +175,273 @@ GlobalCooldown -= diff; else GlobalCooldown = 0; - //Buff timer (only buff when we are alive and not in combat - if (m_creature->isAlive() && !m_creature->isInCombat()) - if (BuffTimer < diff) - { - //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; - if (info && !GlobalCooldown) - { - //Cast the buff spell - DoCastSpell(m_creature, info); + //Always decrease Bandage + if (Bandage > diff) + Bandage -= diff; + else Bandage = 0; - //Set our global cooldown - GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + //Always decrease OffHand + if (OffHand > diff) + OffHand -= diff; + else OffHand = 0; - //Set our timer to 10 minutes before rebuff - BuffTimer = 600000; - } //Try agian in 30 seconds - else BuffTimer = 30000; - }else BuffTimer -= diff; + //Always decrease Potion + if (Potion > diff) + Potion -= diff; + else Potion = 0; + if(!m_creature->isAlive()) + return; + + if (!m_creature->isInCombat() && !(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 4423)) + { + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = temp1; + temp1 = temp2 - 3; + if(temp1 > 0) + m_creature->SetPower(POWER_RAGE,temp1); + else + m_creature->SetPower(POWER_RAGE,0); + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help && !(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 4423)) + { + int entry = m_creature->GetEntry(); + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + 20; + else + X = x - 20; + if(y > Y) + Y = y + 20; + else + Y = y - 20; + m_creature->GetRespawnCoord(x,y,z); + + if(entry != 12480 && entry != 12481) + { + Helper = DoSpawnCreature(entry, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + /* Helper = DoSpawnCreature(entry, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); */ + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); + }else + { + Helper = DoSpawnCreature(68, (float) (X - x + 3), (float) (Y - y - 3), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); + Creature* Helper2 = NULL; + Helper2 = DoSpawnCreature(68, (float) (X - x - 3), (float) (Y - y + 3), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper2 && enemy) + ((CreatureAI*)Helper2->AI())->AttackStart(enemy); + Creature* Helper3 = NULL; + Helper3 = DoSpawnCreature(68, (float) (X - x + 3), (float) (Y - y + 3), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper3 && enemy) + ((CreatureAI*)Helper3->AI())->AttackStart(enemy); + } + + Help = urand(45000, 75000); + } + // Make sure our attack is ready and we arn't currently casting if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) { + if(m_creature->getVictim() && m_creature->SelectHostileTarget() && m_creature->GetEntry() == 3084 && OffHand > 0 && OffHand < 500) + { + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKOFF); + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + OffHand = 0; + } //If we are within range melee the target if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) { + + if(_Aggro != 2 && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 5624) + { + _Aggro = 2; + DoCast(m_creature,2457); + return; + } + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 39 && m_creature->HasAura(2458,0) && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 5624) + { + DoCast(m_creature,2457); + return; + } + bool Healing = false; - SpellEntry const *info = NULL; + int info = 0; + int Change = 0; //Select a healing spell if less than 30% hp - if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30) - info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + if(Potion == 0 && !Healing) + { + Potion = 60000; + info = 17534; + Healing = true; + } + else + { + if(Bandage == 0 && !Healing) + { + Bandage = 60000; + info = 38919; + Healing = true; + } + else + if(m_creature->HasAura(2457,0)) + { + info = 2458; + Change = 3; + } + }//if bandage + }//if health <40% + else + { + if(!m_creature->HasAura(2048,0) && m_creature->GetPower(POWER_RAGE) > 100) + { + info = 2048; + Change = 3; + } + else + { + if(enemy && !enemy->HasAura(25203,0) && m_creature->GetPower(POWER_RAGE) > 100) + { + info = 25203; + Change = 4; + } + //select a hostile spell + else + { + if(enemy && m_creature->GetPower(POWER_RAGE) > 100) + { + switch(urand(0, 7)) + { + case 0: + info = 29707; + break; + case 1: + info = 11574; + break; + case 2: + info = 30022; + break; + case 3: + info = 11597; + break; + case 4: + if(m_creature->HasAura(2457,0)) + info = 25248; + else info = 20569; + break; + case 5: + if(m_creature->HasAura(2457,0)) + info = 20560; + else info = 6554; + break; + case 6: + if(m_creature->HasAura(2457,0)) + info = 11581; + else info = 1680; + break; + case 7: + info = 11597; + break; + }//switch + }//if rage + }//else hostile spell + }//if no demoralizing + }//if no battle shout - //No healing spell available, select a hostile spell - if (info) Healing = true; - else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); + if(m_creature->GetEntry() == 4423) + info = 0; - //20% chance to replace our white hit with a spell - if (info && !urand(0, 4) && !GlobalCooldown) + if(m_creature->GetEntry() == 5624) { + info = 0; + if(!m_creature->HasAura(41924,0)) + DoCast(m_creature, 41924); + } + + //50% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { //Cast the spell - if (Healing)DoCastSpell(m_creature, info); - else DoCastSpell(m_creature->getVictim(), info); - + if (Healing)DoCast(m_creature, info); + else + { + if(Change == 3) + { + DoCast(m_creature, info); + } + else + { + if(Change == 4) + DoCast(enemy, info); + else + DoCast(enemy, info); + } + } //Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; } else m_creature->AttackerStateUpdate(m_creature->getVictim()); m_creature->resetAttackTimer(); + if(m_creature->GetEntry() == 3084) + OffHand = 1000; } } else @@ -164,7 +478,7 @@ GlobalCooldown = GENERIC_CREATURE_COOLDOWN; } //If no spells available and we arn't moving run to target - else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=CHASE_MOTION_TYPE) + else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=CHASE_MOTION_TYPE) { //Cancel our current spell and then mutate new movement generator m_creature->InterruptNonMeleeSpells(false); Index: base/guard_ai.h =================================================================== --- base/guard_ai.h (revision 1597) +++ base/guard_ai.h (working copy) @@ -14,7 +14,17 @@ ~guardAI() {} uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) - uint32 BuffTimer; //This variable keeps track of buffs + uint32 Bandage; + uint32 Potion; + uint32 Help; + uint32 OffHand; + uint32 ZoneAttackMsgTimer; + bool yell; + int _Aggro; + float temp1; + float temp2; + Unit* enemy; + Creature* Helper; void Reset(); @@ -22,6 +32,10 @@ void JustDied(Unit *Killer); + void DamageDeal(Unit *done_to, uint32 &damage); + + void DamageTaken(Unit *done_by, uint32 &damage); + void UpdateAI(const uint32 diff); //common used for guards in main cities Index: scripts/guards/ancient_of_war.cpp =================================================================== --- scripts/guards/ancient_of_war.cpp (revision 0) +++ scripts/guards/ancient_of_war.cpp (revision 0) @@ -0,0 +1,253 @@ +/* +############################### + Ancient of War, of Lore v 2.0 + (Darnassus protectors) +############################### + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + +struct MANGOS_DLL_DECL ancient_of_warAI : public ScriptedAI +{ + ancient_of_warAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + + if(m_creature->GetEntry() == 3469) + m_creature->SetMaxHealth(167000); + else m_creature->SetMaxHealth(250000); + if(m_creature->GetEntry() == 3469) + m_creature->SetHealth(167000); + else m_creature->SetMaxHealth(250000); + m_creature->SetArmor(19200); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,1620); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,270); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3500,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void wood() +{ + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + Helper = DoSpawnCreature(4423, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help && m_creature->GetEntry() == 3469) + { + for(int i = 0; i < 5;i++) + { + wood(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + // Thorns + if(!m_creature->HasAura(25640,0)) + { + info = 25640; + Change = 1; + } + else + { + if(enemy) + { + switch(urand(0, 4)) + { + case 0: + // Grasping Vines + info = 22924; + break; + case 1: + // Choking Vines + info = 35244; + break; + case 2: + // Entangling Roots + info = 20699; + break; + case 3: + // Knock Away + info = 40434; + break; + case 4: + // Knockdown + info = 46183; + break; + }//switch + }//if rage + } + if(m_creature->GetEntry() == 3468) + info = 0; + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_ancient_of_war(Creature* pCreature) +{ + return new ancient_of_warAI (pCreature); +} + +void AddSC_ancient_of_war() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "ancient_of_war"; + newscript->GetAI = &GetAI_ancient_of_war; + newscript->RegisterSelf(); +} Index: scripts/guards/archbishop_benedictus.cpp =================================================================== --- scripts/guards/archbishop_benedictus.cpp (revision 0) +++ scripts/guards/archbishop_benedictus.cpp (revision 0) @@ -0,0 +1,387 @@ +/* +############################## + Archbishop Benedictus v 2.0 +############################## + +by Myav +*/ + +#include "precompiled.h" +#include "../../base/simple_ai.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL archbishop_benedictusAI : public ScriptedAI +{ + archbishop_benedictusAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + uint32 InnerTimer; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + + m_creature->SetMaxHealth(255000); + m_creature->SetHealth(255000); + m_creature->SetMaxPower(POWER_MANA,180000); + m_creature->SetPower(POWER_MANA,180000); + m_creature->SetArmor(5720); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } + +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if (InnerTimer > diff) + InnerTimer -= diff; + else InnerTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + + if(!m_creature->HasAura(48073,0)) + { + // Divine Spirit 6 + DoCast(m_creature, 48073); + return; + } + if(!m_creature->HasAura(48168,0)) + { + // Inner Fire 9 + DoCast(m_creature, 48168); + return; + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + // Mass Dispel + info = 32375; + break; + case 1: + // Pain Suppression + info = 33206; + Change = 1; + break; + case 2: + // Power Infusion + info = 10060; + Change = 1; + break; + case 3: + // Power Word: Shield + info = 41373; + Change = 1; + break; + case 4: + // Circle of Healing + info = 48089; + Change = 1; + break; + case 5: + // Holy Nova + info = 59701; + break; + case 6: + // Renew + info = 37260; + Change = 1; + break; + case 7: + // Empowered Smite + info = 41471; + break; + case 8: + // Heal + info = 39013; + Change = 1; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_cathedral_of_light(Creature* pCreature) +{ + SimpleAI* ai = new SimpleAI (pCreature); + + uint32 CreatureID = pCreature->GetEntry(); + + ai->m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + ai->m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + + switch (CreatureID) + { + //Duthorian Rall + case 6171: + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = 48952; //Holy Shield 6 + ai->Spell[0].Cooldown = 30000; + ai->Spell[0].First_Cast = 500; + ai->Spell[0].Cast_Target_Type = CAST_SELF; + + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = 10308; //Hammer of Justice 4 + ai->Spell[1].Cooldown = 45000; + ai->Spell[1].First_Cast = 10000; + ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = 48934; //Greater Blessing of Might 5 + ai->Spell[2].Cooldown = 120000; + ai->Spell[2].First_Cast = 5000; + ai->Spell[2].Cast_Target_Type = CAST_SELF; + + ai->Spell[3].Enabled = true; + ai->Spell[3].Spell_Id = 48825; //Holy Shock 7 + ai->Spell[3].Cooldown = 20000; + ai->Spell[3].First_Cast = 15000; + ai->Spell[3].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[4].Enabled = true; + ai->Spell[4].Spell_Id = 48782; //Holy Light 13 + ai->Spell[4].Cooldown = 15000; + ai->Spell[4].First_Cast = 20000; + ai->Spell[4].Cast_Target_Type = CAST_SELF; + + ai->Spell[5].Enabled = true; + ai->Spell[5].Spell_Id = 48801; //Exorcism 9 + ai->Spell[5].Cooldown = 15000; + ai->Spell[5].First_Cast = 30000; + ai->Spell[5].Cast_Target_Type = CAST_HOSTILE_TARGET; + break; + + //High Priestess Laurena + case 376: + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = 48168; //Inner Fire 9 + ai->Spell[0].Cooldown = 120000; + ai->Spell[0].First_Cast = 500; + ai->Spell[0].Cast_Target_Type = CAST_SELF; + + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = 48078; //Holy Nova 9 + ai->Spell[1].Cooldown = 30000; + ai->Spell[1].First_Cast = 10000; + ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = 48066; //Power Word: Shield 14 + ai->Spell[2].Cooldown = 15000; + ai->Spell[2].First_Cast = 5000; + ai->Spell[2].Cast_Target_Type = CAST_SELF; + + ai->Spell[3].Enabled = true; + ai->Spell[3].Spell_Id = 48123; //Smite 12 + ai->Spell[3].Cooldown = 20000; + ai->Spell[3].First_Cast = 15000; + ai->Spell[3].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[4].Enabled = true; + ai->Spell[4].Spell_Id = 48089; //Circle of Healing 7 + ai->Spell[4].Cooldown = 15000; + ai->Spell[4].First_Cast = 20000; + ai->Spell[4].Cast_Target_Type = CAST_SELF; + + ai->Spell[5].Enabled = true; + ai->Spell[5].Spell_Id = 48068; //Renew 14 + ai->Spell[5].Cooldown = 25000; + ai->Spell[5].First_Cast = 25000; + ai->Spell[5].Cast_Target_Type = CAST_SELF; + + ai->Spell[6].Enabled = true; + ai->Spell[6].Spell_Id = 48063; //Greater Heal 9 + ai->Spell[6].Cooldown = 15000; + ai->Spell[6].First_Cast = 30000; + ai->Spell[6].Cast_Target_Type = CAST_SELF; + + ai->Spell[7].Enabled = true; + ai->Spell[7].Spell_Id = 48072; //Prayer of Healing 7 + ai->Spell[7].Cooldown = 25000; + ai->Spell[7].First_Cast = 35000; + ai->Spell[7].Cast_Target_Type = CAST_SELF; + break; + } + + ai->Reset(); + + return ai; +} +CreatureAI* GetAI_archbishop_benedictus(Creature* pCreature) +{ + return new archbishop_benedictusAI (pCreature); +} + +void AddSC_archbishop_benedictus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "archbishop_benedictus"; + newscript->GetAI = &GetAI_archbishop_benedictus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "cathedral_of_light"; + newscript->GetAI = &GetAI_cathedral_of_light; + newscript->RegisterSelf(); +} Index: scripts/guards/g_marcus_jonathan.cpp =================================================================== --- scripts/guards/g_marcus_jonathan.cpp (revision 0) +++ scripts/guards/g_marcus_jonathan.cpp (revision 0) @@ -0,0 +1,200 @@ +/* +############################### + General Marcus Jonathan v 1.0 + (Stormwind protector) +############################### + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +struct MANGOS_DLL_DECL g_marcus_jonathanAI : public ScriptedAI +{ + g_marcus_jonathanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + + m_creature->SetMaxHealth(98000); + m_creature->SetHealth(98000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void grunts() +{ + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + Helper = DoSpawnCreature(68, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void UpdateAI(const uint32 diff) +{ + //Always decrease our global cooldown first + if (GlobalCooldown > diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!m_creature->isAlive()) + return; + + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help) + { + + for(int i = 0; i < 4;i++) + { + grunts(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_g_marcus_jonathan(Creature* pCreature) +{ + return new g_marcus_jonathanAI (pCreature); +} + +void AddSC_g_marcus_jonathan() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "g_marcus_jonathan"; + newscript->GetAI = &GetAI_g_marcus_jonathan; + newscript->RegisterSelf(); +} Index: scripts/guards/high_fire_mage.cpp =================================================================== --- scripts/guards/high_fire_mage.cpp (revision 0) +++ scripts/guards/high_fire_mage.cpp (revision 0) @@ -0,0 +1,254 @@ +/* +############################## + Lady Catrana Prestor v 1.0 +############################## + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL high_fire_mageAI : public ScriptedAI +{ + high_fire_mageAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + +// m_creature->SetMaxHealth(120000); +// m_creature->SetHealth(120000); + m_creature->SetMaxPower(POWER_MANA,90000); + m_creature->SetPower(POWER_MANA,90000); + m_creature->SetArmor(5720); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+1000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + // Molten Armor 3 + if(!m_creature->HasAura(43046,0)) + { + DoCast(m_creature, 43046); + return; + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + // Mana Shield + info = 38151; + Change = 1; + break; + case 1: + // Blast Wave + info = 38536; + break; + case 2: + // Dragon's Breath + info = 42950; + break; + case 3: + // Fire Blast + info = 42873; + break; + case 4: + // Firebal + info = 41383; + break; + case 5: + // Pyroblast + info = 38535; + break; + case 6: + // Improved Counterspell + info = 12598; + break; + case 7: + // Arcane Power + info = 12042; + Change = 1; + break; + case 8: + // Scorch + info = 38636; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_high_fire_mage(Creature* pCreature) +{ + return new high_fire_mageAI (pCreature); +} + +void AddSC_high_fire_mage() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "high_fire_mage"; + newscript->GetAI = &GetAI_high_fire_mage; + newscript->RegisterSelf(); +} Index: scripts/guards/high_sorcerer_andromath.cpp =================================================================== --- scripts/guards/high_sorcerer_andromath.cpp (revision 0) +++ scripts/guards/high_sorcerer_andromath.cpp (revision 0) @@ -0,0 +1,252 @@ +/* +############################## + High Sorcerer Andromath v 1.0 +############################## + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL high_sorcerer_andromathAI : public ScriptedAI +{ + high_sorcerer_andromathAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + +// m_creature->SetMaxHealth(120000); +// m_creature->SetHealth(120000); + m_creature->SetMaxPower(POWER_MANA,90000); + m_creature->SetPower(POWER_MANA,90000); + m_creature->SetArmor(5720); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+1000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + // Ice Armor 6 + if(!m_creature->HasAura(43008,0)) + { + DoCast(m_creature, 43008); + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + // Ice Barrier 8 + info = 43039; + Change = 1; + break; + case 1: + // Blizzard + info = 41382; + break; + case 2: + // Knockdown + info = 5164; + break; + case 3: + // Charged Arcane Explosion + info = 37106; + break; + case 4: + // Cone of Cold + info = 29717; + break; + case 5: + // Frost Nova + info = 31250; + break; + case 6: + // Arcane Blast + info = 24857; + break; + case 7: + // Frostbolt + info = 41486; + break; + case 8: + // Arcane Missiles + info = 39414; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_high_sorcerer_andromath(Creature* pCreature) +{ + return new high_sorcerer_andromathAI (pCreature); +} + +void AddSC_high_sorcerer_andromath() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "high_sorcerer_andromath"; + newscript->GetAI = &GetAI_high_sorcerer_andromath; + newscript->RegisterSelf(); +} Index: scripts/guards/highlord_bolvar_fordragon.cpp =================================================================== --- scripts/guards/highlord_bolvar_fordragon.cpp (revision 0) +++ scripts/guards/highlord_bolvar_fordragon.cpp (revision 0) @@ -0,0 +1,256 @@ +/* +################################# + highlord Bolvar Fordragon v 1.0 +################################# + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL highlord_bolvar_fordragonAI : public ScriptedAI +{ + highlord_bolvar_fordragonAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + +// m_creature->SetMaxHealth(380000); +// m_creature->SetHealth(380000); + m_creature->SetMaxPower(POWER_MANA,150000); + m_creature->SetPower(POWER_MANA,150000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + + if(!m_creature->HasAura(54043,0)) // Retribution Aura + { + DoCast(m_creature, 54043); + return; + } + + if(!m_creature->HasAura(20165,0)) // Seal of Light + { + DoCast(m_creature, 20165); + return; + } + + if(!m_creature->HasAura(25898,0)) // Greater Blessing of Kings + { + DoCast(m_creature, 25898); + return; + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + info = 36946; // Consecration + break; + case 1: + info = 38921; // Holy Shock + break; + case 2: + info = 48827; // Avenger's Shield + break; + case 3: + info = 41367; // Divine Shield + Change = 1; + break; + case 4: + info = 10308; // Hammer of Justice + break; + case 5: + info = 31904; // Holy Shield + Change = 1; + break; + case 6: + info = 41450; // Blessing of Protection + Change = 1; + break; + case 7: + info = 31884; // Avenging Wrath + Change = 1; + break; + case 8: + info = 48932; // Blessing of Might + Change = 1; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance + +} +}; +CreatureAI* GetAI_highlord_bolvar_fordragon(Creature* pCreature) +{ + return new highlord_bolvar_fordragonAI (pCreature); +} + +void AddSC_highlord_bolvar_fordragon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "highlord_bolvar_fordragon"; + newscript->GetAI = &GetAI_highlord_bolvar_fordragon; + newscript->RegisterSelf(); +} Index: scripts/guards/officers.cpp =================================================================== --- scripts/guards/officers.cpp (revision 0) +++ scripts/guards/officers.cpp (revision 0) @@ -0,0 +1,402 @@ +/* +##################### + City Officers v 4 +##################### + +by Myav +*/ + +#include "precompiled.h" +#include "../../base/guard_ai.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + +struct MANGOS_DLL_DECL city_officerAI : public ScriptedAI +{ + city_officerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0; _Aggro = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 OffHand; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + bool yell; + int _Aggro; + float temp1; + float temp2; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = 5000; + OffHand = 0; + Potioncd = 0; + yell = false; + + m_creature->setPowerType(POWER_RAGE); + m_creature->SetMaxPower(POWER_RAGE,500); + m_creature->SetPower(POWER_RAGE,0); + if(m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + m_creature->SetMaxHealth(33600); + else + { + if(m_creature->GetEntry() == 18103) + m_creature->SetMaxHealth(47400); + else m_creature->SetMaxHealth(67000); + } + if(m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + m_creature->SetHealth(33600); + else + { + if(m_creature->GetEntry() == 18103) + m_creature->SetHealth(47400); + else m_creature->SetHealth(67000); + } + if(m_creature->GetEntry() == 21970 || m_creature->GetEntry() == 21971) + m_creature->SetMaxHealth(45725); + if(m_creature->GetEntry() == 21970 || m_creature->GetEntry() == 21971) + m_creature->SetHealth(45725); + m_creature->SetArmor(9600); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,540); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,540); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,540); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,540); + m_creature->SetResistance(SPELL_SCHOOL_FROST,540); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,540); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,540); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+1000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } + +} + +void DamageDeal(Unit *done_to, uint32 &damage) +{ + if(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 18103) + return; + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0: temp1 = temp2 + 40;break; + case 1: temp1 = temp2 + 50;break; + case 2: temp1 = temp2 + 60;break; + case 3: temp1 = temp2 + 70;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + +void DamageTaken(Unit *done_by, uint32 &damage) +{ + if(damage > m_creature->GetHealth()) + return; + + if(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 18103) + return; + + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0:temp1 = temp2 + 20;break; + case 1:temp1 = temp2 + 30;break; + case 2:temp1 = temp2 + 40;break; + case 3:temp1 = temp2 + 50;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + + +void guards() +{ + int entry = 0; + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + if(m_creature->getFaction() == 85) + entry = 3296; + if(m_creature->getFaction() == 79) + entry = 4262; + if(m_creature->getFaction() == 11) + entry = 68; + if(m_creature->getFaction() == 71) + entry = 5624; + if(m_creature->getFaction() == 57) + entry = 5595; + if(m_creature->getFaction() == 105) + entry = 3084; + if(m_creature->getFaction() == 1638) + entry = 16733; + if(m_creature->getFaction() == 1604) + entry = 16222; + Helper = DoSpawnCreature(entry, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + /* Helper = DoSpawnCreature(entry, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); */ + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void UpdateAI(const uint32 diff) +{ + + if (m_creature->GetHealth()GetMaxHealth()*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease our OffHand cooldown first + if (OffHand > diff) + OffHand -= diff; + else OffHand = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Buff timer (only buff when we are alive and not in combat + if (!m_creature->isInCombat()) + { + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = temp1; + temp1 = temp2 - 3; + if(temp1 > 0) + m_creature->SetPower(POWER_RAGE,temp1); + else + m_creature->SetPower(POWER_RAGE,0); + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + { + if(m_creature->getFaction() == 85) + m_creature->MonsterSay("Orgrimmar is under Invasion! Guards!! Help me!",LANG_ORCISH,0); + if(m_creature->getFaction() == 79) + m_creature->MonsterSay("Darnassus is under Invasion! Guards!! Help me!",LANG_DARNASSIAN,0); + if(m_creature->getFaction() == 11) + m_creature->MonsterSay("Stormwind is under Invasion! Guards!! Help me!",LANG_COMMON,0); + if(m_creature->getFaction() == 71) + m_creature->MonsterSay("Undercity is under Invasion! Guards!! Help me!",LANG_GUTTERSPEAK,0); + if(m_creature->getFaction() == 57) + m_creature->MonsterSay("Ironforge is under Invasion! Guards!! Help me!",LANG_DWARVISH,0); + if(m_creature->getFaction() == 105) + m_creature->MonsterSay("Thunder Bluff is under Invasion! Guards!! Help me!",LANG_TAURAHE,0); + if(m_creature->getFaction() == 1638) + m_creature->MonsterSay("The Exodar is under Invasion! Guards!! Help me!",LANG_DRAENEI,0); + if(m_creature->getFaction() == 1604) + m_creature->MonsterSay("Silvermoon is under Invasion! Guards!! Help me!",LANG_THALASSIAN,0); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BATTLEROAR); + for(int i = 0; i < 3;i++) + { + guards(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + if(m_creature->getVictim() && m_creature->SelectHostileTarget() && OffHand > 0 && OffHand < 500) + { + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKOFF); + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + OffHand = 0; + } + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + + if(_Aggro != 2 && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + { + _Aggro = 2; + DoCast(m_creature,2457); + return; + } + + int Change = 0; + int info = 0; + + /* if(!m_creature->HasAura(47440,0) && m_creature->GetPower(POWER_RAGE) > 50) + { + info = 47440; + Change = 1; + } + else + { */ + if(!m_creature->HasAura(47436,0) && m_creature->GetPower(POWER_RAGE) > 50) + { + info = 47436; + Change = 1; + } + else + if(enemy && m_creature->GetPower(POWER_RAGE) > 100) + { + switch(urand(0, 8)) + { + case 0: + // Heroic Strike + info = 47450; + break; + case 1: + // Bloodthirst + info = 30335; + break; + case 2: + // Piercing Howl + info = 12323; + break; + case 3: + // Intimidating Shout + info = 5246; + break; + case 4: + // Concussion Blow + info = 12809; + break; + case 5: + // Cleave + info = 40504; + break; + case 6: + // Disarm + info = 31955; + break; + case 7: + // Hamstring + info = 30989; + break; + case 8: + // Whirlwind + info = 13736; + break; + }//switch + }//if rage + /* } */ + + if(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 18103) + info = 0; + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + OffHand = 1000; + }//end attack ready + }// end attack distance +} +}; +CreatureAI* GetAI_city_officer(Creature* pCreature) +{ + return new city_officerAI (pCreature); +} +CreatureAI* GetAI_city_guard(Creature* pCreature) +{ + return new guardAI (pCreature); +} +void AddSC_city_officer() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "city_officer"; + newscript->GetAI = &GetAI_city_officer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "city_guard"; + newscript->GetAI = &GetAI_city_guard; + newscript->RegisterSelf(); +} Index: scripts/guards/overlord_saurfang.cpp =================================================================== --- scripts/guards/overlord_saurfang.cpp (revision 0) +++ scripts/guards/overlord_saurfang.cpp (revision 0) @@ -0,0 +1,253 @@ +/* +############################## + High Overlord Saurfang v 1.0 + (Orgrimmar protector) +############################## + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + +struct MANGOS_DLL_DECL overlord_saurfangAI : public ScriptedAI +{ + overlord_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + m_creature->SetMaxHealth(98000); + m_creature->SetHealth(98000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+2000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void grunts() +{ + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + m_creature->MonsterSay("Protection, to the aid!",LANG_UNIVERSAL,0); + if (m_creature->GetEntry() == 466) // Proverka al marcus + Helper = DoSpawnCreature(68, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + else + Helper = DoSpawnCreature(3296, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if (Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void JustDied(Unit*) +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + m_creature->RemoveAllAttackers(); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+2000,false); +} +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help) + { + + for(int i = 0; i < 4;i++) + { + grunts(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(!m_creature->HasAura(8269,0)) + { + info = 8269; // Frenzy + Change = 1; + } + else + { + if(enemy) + { + switch(urand(0, 4)) + { + case 0: + info = 11430; // Slam + break; + case 1: + info = 31955; // Disarm + break; + case 2: + info = 20276; // Knockdown + break; + case 3: + info = 41400; // Whirlwind + break; + case 4: + info = 41197; // Shield Bash + break; + }//switch + }//if rage + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_overlord_saurfang(Creature* pCreature) +{ + return new overlord_saurfangAI (pCreature); +} + +void AddSC_overlord_saurfang() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "overlord_saurfang"; + newscript->GetAI = &GetAI_overlord_saurfang; + newscript->RegisterSelf(); +} Index: scripts/guards/thrall.cpp =================================================================== --- scripts/guards/thrall.cpp (revision 0) +++ scripts/guards/thrall.cpp (revision 0) @@ -0,0 +1,276 @@ +/* +############ + Thrall v 1 +############ + +by Myav +*/ + +#include "precompiled.h" +#include "../../base/guard_ai.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + + +struct MANGOS_DLL_DECL thrallAI : public ScriptedAI +{ + thrallAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + float temp1; + float temp2; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = 5000; + Potioncd = 0; + + m_creature->setPowerType(POWER_RAGE); + m_creature->SetMaxPower(POWER_RAGE,500); + m_creature->SetPower(POWER_RAGE,0); +// m_creature->SetMaxHealth(360000); +// m_creature->SetHealth(360000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void DamageDeal(Unit *done_to, uint32 &damage) +{ + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 4)) + { + case 0:temp1 = temp2 + 40;break; + case 1:temp1 = temp2 + 50;break; + case 2:temp1 = temp2 + 60;break; + case 3:temp1 = temp2 + 70;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + +void DamageTaken(Unit *done_by, uint32 &damage) +{ + if(damage > m_creature->GetHealth()) + return; + + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 4)) + { + case 0:temp1 = temp2 + 20;break; + case 1:temp1 = temp2 + 30;break; + case 2:temp1 = temp2 + 40;break; + case 3:temp1 = temp2 + 50;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealth()GetMaxHealth()*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Buff timer (only buff when we are alive and not in combat + if (!m_creature->isInCombat()) + { + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = temp1; + temp1 = temp2 - 3; + if(temp1 > 0) + m_creature->SetPower(POWER_RAGE,temp1); + else + m_creature->SetPower(POWER_RAGE,0); + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!m_creature->HasAura(41447,0)) // Enrage + { + DoCast(m_creature,41447); + return; + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + + + if(!m_creature->getVictim()->HasAura(29584,0) && m_creature->GetPower(POWER_RAGE) > 50) + { + info = 29584; // Demoralizing Shout + } + else + + if(enemy && m_creature->GetPower(POWER_RAGE) > 60) + { + switch(urand(0, 7)) + { + case 0: + info = 37476; // Cleave + break; + case 1: + info = 36706; // Thunderclap + break; + case 2: + info = 38618; // Whirlwind + break; + case 3: + info = 12975; // Last Stand + Change = 1; + break; + case 4: + info = 12809; // Concussion Blow + break; + case 5: + info = 36138; // Hammer Stun + break; + case 6: + info = 47486; // Mortal Strike + break; + case 7: + info = 34620; // Slam + break; + } //switch + } //if rage + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCast(m_creature, info); + else DoCast(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance + +} +}; +CreatureAI* GetAI_thrall(Creature* pCreature) +{ + return new thrallAI (pCreature); +} +void AddSC_thrall() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "thrall"; + newscript->GetAI = &GetAI_thrall; + newscript->RegisterSelf(); +} Index: system/ScriptLoader.cpp =================================================================== --- system/ScriptLoader.cpp (revision 1597) +++ system/ScriptLoader.cpp (working copy) @@ -9,6 +9,17 @@ //custom +//guards +extern void AddSC_ancient_of_war(); +extern void AddSC_archbishop_benedictus(); +extern void AddSC_g_marcus_jonathan(); +extern void AddSC_high_fire_mage(); +extern void AddSC_high_sorcerer_andromath(); +extern void AddSC_highlord_bolvar_fordragon(); +extern void AddSC_city_officer(); +extern void AddSC_overlord_saurfang(); +extern void AddSC_thrall(); + //examples extern void AddSC_example_creature(); extern void AddSC_example_escort(); @@ -401,6 +412,17 @@ //custom + //guards + AddSC_ancient_of_war(); + AddSC_archbishop_benedictus(); + AddSC_g_marcus_jonathan(); + AddSC_high_fire_mage(); + AddSC_high_sorcerer_andromath(); + AddSC_highlord_bolvar_fordragon(); + AddSC_city_officer(); + AddSC_overlord_saurfang(); + AddSC_thrall(); + //examples AddSC_example_creature(); AddSC_example_escort(); Index: VC80/80ScriptDev2.vcproj =================================================================== --- VC80/80ScriptDev2.vcproj (revision 1597) +++ VC80/80ScriptDev2.vcproj (working copy) @@ -405,6 +405,17 @@ Name="custom" > + + + + + + + + + + + Index: VC90/90ScriptDev2.vcproj =================================================================== --- VC90/90ScriptDev2.vcproj (revision 1597) +++ VC90/90ScriptDev2.vcproj (working copy) @@ -404,6 +404,17 @@ Name="custom" > + + + + + + + + + + +