diff options
author | megamage <none@none> | 2008-11-07 10:03:34 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-07 10:03:34 -0600 |
commit | 20215523536e769f7eaa2e65ced706e9c3e34c8f (patch) | |
tree | d8f7dd115e9d17a17acd10f3d356f1dbf0c0822a /src | |
parent | fd3fcb461253bb8d269faa90af877e1e3e8b12a8 (diff) |
[svn] Update serpent shrine scripts. Patch provided by streetrat.
--HG--
branch : trunk
Diffstat (limited to 'src')
9 files changed, 224 insertions, 22 deletions
diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index 7888227e9f3..c09eed02d66 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -159,6 +159,7 @@ scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp \ scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp \ scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp \ scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp \ scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp \ scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp \ scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index e20c07354cc..bec1d21036c 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -237,6 +237,7 @@ extern void AddSC_boss_lady_vashj(); extern void AddSC_boss_leotheras_the_blind(); extern void AddSC_boss_morogrim_tidewalker(); extern void AddSC_instance_serpentshrine_cavern(); +extern void AddSC_boss_the_lurker_below(); //--Slave Pens @@ -1420,6 +1421,7 @@ void ScriptsInit() AddSC_boss_leotheras_the_blind(); AddSC_boss_morogrim_tidewalker(); AddSC_instance_serpentshrine_cavern(); + AddSC_boss_the_lurker_below(); //--Slave Pens //--Steam Vault diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index 9219696fc18..8608945014e 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -1661,6 +1661,10 @@ > </File> <File + RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lurker_below.cpp" + > + </File> + <File RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lady_vashj.cpp" > </File> diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 3d3d9e425de..dfd8dd44e7b 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -1906,6 +1906,10 @@ > </File> <File + RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lurker_below.cpp" + > + </File> + <File RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lady_vashj.cpp" > </File> diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index ac0b9414118..80e5cb2481f 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -1892,6 +1892,10 @@ > </File> <File + RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lurker_below.cpp" + > + </File> + <File RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lady_vashj.cpp" > </File> diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp index 27265e3d464..993007d441c 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp @@ -198,7 +198,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI ShieldGeneratorChannel[1] = 0; ShieldGeneratorChannel[2] = 0; ShieldGeneratorChannel[3] = 0; - + m_creature->SetCorpseDelay(1000*60*60); } @@ -597,23 +597,11 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI void Reset() { - m_creature->SetSpeed(MOVE_WALK,0.6,true);//walk - m_creature->SetSpeed(MOVE_RUN,0.6,true);//run + m_creature->SetSpeed(MOVE_WALK,0.6);//walk + m_creature->SetSpeed(MOVE_RUN,0.6);//run move = 0; phase = 1; Vashj = NULL; - } - - void Aggro(Unit *who) { return; } - - void MoveInLineOfSight(Unit *who){return;} - - void UpdateAI(const uint32 diff) - { - if(!pInstance) - return; - - if (!Vashj){ Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)); } for (int i = 0;i<8;i++)//search for nearest waypoint (up on stairs) { @@ -633,15 +621,27 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI } } } + if (pInstance) + Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)); + } + + void Aggro(Unit *who) { return; } + + void MoveInLineOfSight(Unit *who){return;} + + void UpdateAI(const uint32 diff) + { + if(!pInstance) + return; if (!Vashj) { - m_creature->Say("Error Vashj not found!", LANG_UNIVERSAL, NULL); return; } - + if(move < diff) { + m_creature->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE); if (phase == 1) { m_creature->GetMotionMaster()->MovePoint(0, x, y, z); diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp new file mode 100644 index 00000000000..d3c628f6897 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp @@ -0,0 +1,182 @@ +/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: boss_the_lurker_below
+SD%Complete: 10
+SDComment:
+SDCategory: The Lurker Below
+EndScriptData */
+
+#include "precompiled.h"
+#include "def_serpent_shrine.h"
+#include "../../../creature/simple_ai.h"
+#include "Spell.h"
+
+#define SPELL_SPOUT 37433
+#define SPELL_SPOUT_2 42835
+#define SPELL_KNOCKBACK 19813
+#define SPELL_GEYSER 37478
+#define SPELL_WHIRL 37660
+#define SPELL_WATERBOLT 37138
+#define SPELL_SUBMERGE 37550
+#define SPELL_EMERGE 20568
+
+#define EMOTE_SPOUT "takes a deep breath."
+
+#define MOB_COILFANG_GUARDIAN 21873
+#define MOB_COILFANG_AMBUSHER 21865
+
+//Ambusher spells
+#define SPELL_SPREAD_SHOT 37790
+#define SPELL_SHOOT 37770
+
+//Guardian spells
+#define SPELL_ARCINGSMASH 38761 // Wrong SpellId. Can't find the right one.
+#define SPELL_HAMSTRING 26211
+
+struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public ScriptedAI
+{
+ boss_the_lurker_belowAI(Creature *c) : ScriptedAI(c) {Reset();}
+
+ void Reset()
+ {
+
+ }
+
+ void MoveInLineOfSight(Unit *who)
+ {
+
+ }
+
+ void Aggro(Unit *who)
+ {
+
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+
+ }
+};
+
+CreatureAI* GetAI_mob_coilfang_guardian(Creature *_Creature)
+{
+ SimpleAI* ai = new SimpleAI (_Creature);
+
+ ai->Spell[0].Enabled = true;
+ ai->Spell[0].Spell_Id = SPELL_ARCINGSMASH;
+ ai->Spell[0].Cooldown = 15000;
+ ai->Spell[0].First_Cast = 5000;
+ ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET;
+
+ ai->Spell[1].Enabled = true;
+ ai->Spell[1].Spell_Id = SPELL_HAMSTRING;
+ ai->Spell[1].Cooldown = 10000;
+ ai->Spell[1].First_Cast = 2000;
+ ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET;
+
+ return ai;
+}
+
+struct TRINITY_DLL_DECL mob_coilfang_ambusherAI : public Scripted_NoMovementAI
+{
+ mob_coilfang_ambusherAI(Creature *c) : Scripted_NoMovementAI(c)
+ {
+ Reset();
+ SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SHOOT);
+ if(TempSpell)
+ TempSpell->Effect[0] = 2;//change spell effect from weapon % dmg to simple phisical dmg
+ }
+
+ uint32 MultiShotTimer;
+ uint32 ShootBowTimer;
+
+ void Reset()
+ {
+ MultiShotTimer = 10000;
+ ShootBowTimer = 4000;
+
+ }
+
+ void Aggro(Unit *who)
+ {
+
+ }
+
+ void MoveInLineOfSight(Unit *who)
+ {
+ if (!who || m_creature->getVictim()) return;
+
+ if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ {
+ AttackStart(who);
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(MultiShotTimer < diff)
+ {
+ if(m_creature->getVictim())
+ DoCast(m_creature->getVictim(), SPELL_SPREAD_SHOT, true);
+
+ MultiShotTimer = 10000;
+ ShootBowTimer += 1500;//add global cooldown
+ }else MultiShotTimer -= diff;
+
+ if(ShootBowTimer < diff)
+ {
+ Unit* target = NULL;
+ target = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ int bp0 = 1100;
+ if(target)
+ m_creature->CastCustomSpell(target,SPELL_SHOOT,&bp0,NULL,NULL,true);
+ ShootBowTimer = 4000;
+ MultiShotTimer += 1500;//add global cooldown
+ }else ShootBowTimer -= diff;
+ }
+};
+
+CreatureAI* GetAI_mob_coilfang_ambusher(Creature *_Creature)
+{
+ return new mob_coilfang_ambusherAI (_Creature);
+}
+
+CreatureAI* GetAI_boss_the_lurker_below(Creature *_Creature)
+{
+ return new boss_the_lurker_belowAI (_Creature);
+}
+
+void AddSC_boss_the_lurker_below()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name="boss_the_lurker_below";
+ newscript->GetAI = GetAI_boss_the_lurker_below;
+ m_scripts[nrscripts++] = newscript;
+
+ newscript = new Script;
+ newscript->Name="mob_coilfang_guardian";
+ newscript->GetAI = GetAI_mob_coilfang_guardian;
+ m_scripts[nrscripts++] = newscript;
+
+ newscript = new Script;
+ newscript->Name="mob_coilfang_ambusher";
+ newscript->GetAI = GetAI_mob_coilfang_ambusher;
+ m_scripts[nrscripts++] = newscript;
+}
+
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h index 9d8cdad6849..04daa79ffac 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h @@ -20,9 +20,10 @@ #define DATA_SHIELDGENERATOR2 13 #define DATA_SHIELDGENERATOR3 14 #define DATA_SHIELDGENERATOR4 15 -#define DATA_THELURKERBELOWEVENT 16 -#define DATA_TIDALVESS 17 -#define DATA_FATHOMLORDKARATHRESSEVENT 18 -#define DATA_LEOTHERAS 19 -#define DATA_LEOTHERAS_EVENT_STARTER 20 +#define DATA_THELURKERBELOW 16 +#define DATA_THELURKERBELOWEVENT 17 +#define DATA_TIDALVESS 18 +#define DATA_FATHOMLORDKARATHRESSEVENT 19 +#define DATA_LEOTHERAS 20 +#define DATA_LEOTHERAS_EVENT_STARTER 21 #endif diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp index d34c8910c2f..de0f829c3d1 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp @@ -39,6 +39,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance { instance_serpentshrine_cavern(Map *Map) : ScriptedInstance(Map) {Initialize();}; + uint64 LurkerBelow; uint64 Sharkkis; uint64 Tidalvess; uint64 Caribdis; @@ -55,6 +56,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void Initialize() { + LurkerBelow = 0; Sharkkis = 0; Tidalvess = 0; Caribdis = 0; @@ -89,6 +91,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance case 21212: LadyVashj = creature->GetGUID(); break; case 21214: Karathress = creature->GetGUID(); break; case 21966: Sharkkis = creature->GetGUID(); break; + case 21217: LurkerBelow = creature->GetGUID(); break; case 21965: Tidalvess = creature->GetGUID(); break; case 21964: Caribdis = creature->GetGUID(); break; case 21215: LeotherasTheBlind = creature->GetGUID(); break;} @@ -106,6 +109,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance { switch(identifier) { + case DATA_THELURKERBELOW: return LurkerBelow; case DATA_SHARKKIS: return Sharkkis; case DATA_TIDALVESS: return Tidalvess; case DATA_CARIBDIS: return Caribdis; |