Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Diff by Hammerfaust ( 15 years ago )
Index: scripts/outland/tempest_keep/arcatraz/boss_dalliah_the_doomsayer.cpp
===================================================================
--- scripts/outland/tempest_keep/arcatraz/boss_dalliah_the_doomsayer.cpp (revision 0)
+++ scripts/outland/tempest_keep/arcatraz/boss_dalliah_the_doomsayer.cpp (revision 0)
@@ -0,0 +1,248 @@
+/* Copyright (C) 2006 - 2010 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_dalliah_the_doomsayer
+SD%Complete:
+SDComment:
+SDCategory: Tempest Keep, arcatraz
+EndScriptData */
+
+#include "precompiled.h"
+#include "arcatraz.h"
+
+enum
+{
+ SAY_AGGRO = -2500040,
+ SAY_AGGRO_SOCC = -2500039,
+ SAY_SUCCESFUL_HEAL_1 = -2500038,
+ SAY_SUCCESFUL_HEAL_2 = -2500037,
+ SAY_KILLED_PLAYER1 = -2500036,
+ SAY_KILLED_PLAYER2 = -2500035,
+ SAY_WHIRLWIND_1 = -2500034,
+ SAY_WHIRLWIND_2 = -2500033,
+ SAY_WEAK_1_SOCC = -2500032,
+ SAY_WEAK_2_SOCC = -2500031,
+ SAY_DEATH = -2500030,
+ SAY_DEATH_SOCC = -2500029,
+
+ SPELL_HEAL = 36144,
+ SPELL_H_HEAL = 39013,
+
+ SPELL_WHIRLWIND = 36142,
+
+ SPELL_H_SHADOW_WAVE = 39016,
+
+ SPELL_GIFT_OF_THE_DOOMSAYER = 36173,
+ SPELL_H_GIFT_OF_THE_DOOMSAYER = 39009,
+};
+
+struct MANGOS_DLL_DECL boss_dalliah_the_doomsayerAI : public ScriptedAI
+{
+ boss_dalliah_the_doomsayerAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
+ m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty();
+ Reset();
+ }
+
+ ScriptedInstance* m_pInstance;
+
+ bool m_bIsRegularMode;
+ bool m_bSoccoSpeak;
+
+ //definition of timer variables
+ uint32 m_uiWhirlwind_Timer;
+ uint32 m_uiGiftOfTheDoomsayer_Timer;
+ uint32 m_uiShadowWave_Timer;
+ uint8 m_uiPhase;
+ uint32 m_uiSpeakDelay_Timer;
+
+ int32 m_iTextEntry;
+
+ Unit* m_pSoccothrates;
+
+ void Reset()
+ {
+ m_uiSpeakDelay_Timer = 9999999;
+ m_iTextEntry = 0;
+
+ m_bSoccoSpeak = false;
+ m_uiPhase = 0;
+ m_uiGiftOfTheDoomsayer_Timer = urand(15000, 25000);
+ m_uiWhirlwind_Timer = urand(20000, 25000);
+ m_uiShadowWave_Timer = urand(10000, 30000);
+
+ m_pSoccothrates = m_creature->GetMap()->GetUnit(m_pInstance->GetData64(DATA_SOCCOTHRATES));
+ }
+
+ void DoScriptTextSoccothrates(int32 iTextEntry)
+ {
+ m_pSoccothrates = m_creature->GetMap()->GetUnit(m_pInstance->GetData64(DATA_SOCCOTHRATES));
+ m_iTextEntry = iTextEntry;
+ m_uiSpeakDelay_Timer = 2500;
+ }
+
+ void EnterEvadeMode()
+ {
+ if (m_pInstance)
+ m_pInstance->SetData(TYPE_DALLIAH, NOT_STARTED);
+
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void Aggro(Unit* pUnit)
+ {
+ if (m_pInstance)
+ m_pInstance->SetData(TYPE_DALLIAH, IN_PROGRESS);
+
+ DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptTextSoccothrates(SAY_AGGRO_SOCC);
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ DoScriptText(SAY_DEATH, m_creature);
+ DoScriptTextSoccothrates(SAY_DEATH_SOCC);
+
+ if (m_pInstance)
+ m_pInstance->SetData(TYPE_DALLIAH, DONE);
+ }
+
+ void KilledUnit(Unit* pUnit)
+ {
+ DoScriptText(urand(0,1) ? SAY_KILLED_PLAYER1 : SAY_KILLED_PLAYER2, m_creature);
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
+ return;
+
+ if (m_uiSpeakDelay_Timer < uiDiff)
+ {
+ if(m_pSoccothrates && m_pSoccothrates->isAlive())
+ DoScriptText(m_iTextEntry, m_pSoccothrates);
+
+ m_uiSpeakDelay_Timer = 999999;
+ }
+ else
+ m_uiSpeakDelay_Timer -= uiDiff;
+
+ if (m_creature->GetHealthPercent() < 25.0f && !m_bSoccoSpeak)
+ {
+ DoScriptTextSoccothrates(urand(0,1) ? SAY_WEAK_1_SOCC : SAY_WEAK_2_SOCC);
+ m_bSoccoSpeak = true;
+ }
+
+ if (m_uiGiftOfTheDoomsayer_Timer < uiDiff)
+ {
+ Unit *pTarget = NULL;
+ ThreatList const& tList = m_creature->getThreatManager().getThreatList();
+ ThreatList::const_iterator itr = tList.begin();
+ std::vector<Unit *> target_list;
+ for (;itr != tList.end(); ++itr)
+ {
+ pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid());
+ // exclude pets & totems
+ if (pTarget && (pTarget->GetTypeId() != TYPEID_PLAYER || !pTarget->isAlive()))
+ {
+ pTarget = NULL;
+ continue;
+ }
+
+ if (pTarget)
+ target_list.push_back(pTarget);
+ }
+ if (target_list.size())
+ pTarget = *(target_list.begin()+rand()%target_list.size());
+
+ if(pTarget)
+ DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_GIFT_OF_THE_DOOMSAYER : SPELL_H_GIFT_OF_THE_DOOMSAYER,CAST_TRIGGERED);
+
+ m_uiGiftOfTheDoomsayer_Timer = urand(15000, 25000);
+ }
+ else
+ m_uiGiftOfTheDoomsayer_Timer -= uiDiff;
+
+ if (m_uiWhirlwind_Timer < uiDiff)
+ {
+ switch(m_uiPhase)
+ {
+ case 0:
+ DoCastSpellIfCan(m_creature,SPELL_WHIRLWIND);
+ m_uiWhirlwind_Timer = 6000;
+ m_uiPhase++;
+ break;
+ case 1:
+ DoCastSpellIfCan(m_creature,m_bIsRegularMode ? SPELL_HEAL : SPELL_H_HEAL);
+ m_uiWhirlwind_Timer = urand(20000, 25000);
+ m_uiPhase = 0;
+ break;
+ }
+ }
+ else
+ m_uiWhirlwind_Timer -= uiDiff;
+
+ if (!m_bIsRegularMode)
+ {
+ if (m_uiShadowWave_Timer < uiDiff)
+ {
+ Unit *pTarget = NULL;
+ ThreatList const& tList = m_creature->getThreatManager().getThreatList();
+ ThreatList::const_iterator itr = tList.begin();
+ std::vector<Unit *> target_list;
+ for (;itr != tList.end(); ++itr)
+ {
+ pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid());
+ // exclude pets & totems
+ if (pTarget && (pTarget->GetTypeId() != TYPEID_PLAYER || !pTarget->isAlive()))
+ {
+ pTarget = NULL;
+ continue;
+ }
+
+ if (pTarget)
+ target_list.push_back(pTarget);
+ }
+ if (target_list.size())
+ pTarget = *(target_list.begin()+rand()%target_list.size());
+
+ if(pTarget)
+ DoCastSpellIfCan(m_creature, SPELL_H_SHADOW_WAVE);
+
+ m_uiShadowWave_Timer = urand(10000, 20000);
+ }
+ else
+ m_uiShadowWave_Timer -= uiDiff;
+ }
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_dalliah_the_doomsayer(Creature* pCreature)
+{
+ return new boss_dalliah_the_doomsayerAI(pCreature);
+}
+
+void AddSC_boss_dalliah_the_doomsayer()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name = "boss_dalliah_the_doomsayer";
+ newscript->GetAI = &GetAI;_boss_dalliah_the_doomsayer;
+ newscript->RegisterSelf();
+}
\ No newline at end of file
Index: scripts/outland/tempest_keep/arcatraz/boss_wrath_scryer_soccothrates.cpp
===================================================================
--- scripts/outland/tempest_keep/arcatraz/boss_wrath_scryer_soccothrates.cpp (revision 0)
+++ scripts/outland/tempest_keep/arcatraz/boss_wrath_scryer_soccothrates.cpp (revision 0)
@@ -0,0 +1,275 @@
+/* Copyright (C) 2006 - 2010 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_wrath_scryer_soccothrates
+SD%Complete:
+SDComment:
+SDCategory: Tempest Keep, Arcatraz
+EndScriptData */
+
+#include "precompiled.h"
+#include "arcatraz.h"
+
+enum
+{
+ //textentry db entrys
+ SAY_ON_AGGRO = -2500027, //At last, a target for my frustrations!
+ SAY_ON_CHARGE1 = -2500023, //On guard!
+ SAY_ON_CHARGE2 = -2500024, //Defend yourself, for all the good it will do...
+ SAY_ON_UNIT_DEATH_1 = -2500026, //Yes, that was quite satisfying.
+ SAY_ON_UNIT_DEATH_2 = -2500028, //Yes, that was quite satisfying.
+ SAY_ON_DEAD = -2500025, //Knew this was... the only way out.
+
+ DALLIAH_SAY_ON_AGGRO = -2500022, //Don't worry about me kill that worthless dullard instead!
+ DALLIAH_SAY_ON_LOW_LIFE = -2500021, //More than you can handle, scryer?
+ DALLIAH_SAY_ON_DIE = -2500020, //Congratulations. I've wanted to do that for years.
+
+ SAY_INTRO = -2500019,
+
+ SPELL_FIRE_SHOCK = 35759,
+ SPELL_H_FIRE_SHOCK = 39006,
+ SPELL_KNOCK_BACK = 36512,
+ SPELL_IMMOLATION = 36051,
+ SPELL_H_IMMOLATION = 39007,
+
+ SPELL_FIRE_TAIL = 35769 // 35770 35769
+};
+
+
+struct MANGOS_DLL_DECL boss_wrath_scryer_soccothratesAI : public ScriptedAI
+{
+ boss_wrath_scryer_soccothratesAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
+ m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty();
+ Reset();
+ }
+
+ ScriptedInstance* m_pInstance;
+
+ uint32 m_uiKnockBack_Timer;
+ uint32 m_uiFellFireShock_Timer;
+ uint32 m_uiCharge_Timer;
+ uint32 m_uiSpeakDelay_Timer;
+
+ int32 m_iTextEntry;
+
+ Unit* m_pTarget;
+ Unit* m_pDalliah;
+
+ bool m_bIsRegularMode;
+ bool m_bMovingPhase;
+ bool m_bDalliahSpeak;
+ bool m_bIntro;
+
+ void Reset()
+ {
+ //Timers
+ m_uiKnockBack_Timer = urand(20000, 25000);
+ m_uiFellFireShock_Timer = urand(2500, 25000);
+ m_uiCharge_Timer = 9999999;
+ m_uiSpeakDelay_Timer = 9999999;
+ m_iTextEntry = 0;
+
+ m_bDalliahSpeak = false;
+ m_bMovingPhase = false;
+ m_bIntro = false;
+
+ m_pTarget = NULL;
+ m_pDalliah = m_creature->GetMap()->GetUnit(m_pInstance->GetData64(DATA_DALLIAH_THE_DOOMSAYER));
+ }
+
+ // Dalliahs speak function
+ void DoScriptTextDalliah(int32 iTextEntry)
+ {
+ m_pDalliah = m_creature->GetMap()->GetUnit(m_pInstance->GetData64(DATA_DALLIAH_THE_DOOMSAYER));
+ m_iTextEntry = iTextEntry;
+ m_uiSpeakDelay_Timer = 2500;
+ }
+
+ void MoveInLineOfSight(Unit *pWho)
+ {
+ if (!m_creature->getVictim() && pWho->isTargetableForAttack() && (m_creature->IsHostileTo(pWho)) && pWho->isInAccessablePlaceFor(m_creature))
+ {
+ if (!m_bIntro && m_pDalliah && m_pDalliah->isAlive() && m_creature->IsWithinDistInMap(pWho, 100))
+ {
+ m_bIntro = true;
+ DoScriptText(SAY_INTRO, m_creature);
+ }
+ }
+ ScriptedAI::MoveInLineOfSight(pWho);
+ }
+
+ void EnterEvadeMode()
+ {
+ if (m_pInstance)
+ m_pInstance->SetData(TYPE_SOCCOTHRATES, NOT_STARTED);
+
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void Aggro(Unit* pUnit)
+ {
+ if (m_pInstance)
+ m_pInstance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS);
+
+ m_creature->SetInCombatWithZone();
+ DoScriptText(SAY_ON_AGGRO, m_creature);
+ DoScriptTextDalliah(DALLIAH_SAY_ON_AGGRO);
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (m_pInstance)
+ m_pInstance->SetData(TYPE_SOCCOTHRATES, DONE);
+
+ DoScriptText(SAY_ON_DEAD, m_creature);
+ DoScriptTextDalliah(DALLIAH_SAY_ON_DIE);
+ }
+
+ void KilledUnit(Unit* pUnit)
+ {
+ DoScriptText(urand(0,1) ? SAY_ON_UNIT_DEATH_1 : SAY_ON_UNIT_DEATH_2, m_creature);
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
+ return;
+
+ if (m_uiSpeakDelay_Timer < uiDiff)
+ {
+ if(m_pDalliah && m_pDalliah->isAlive())
+ DoScriptText(m_iTextEntry, m_pDalliah);
+
+ m_uiSpeakDelay_Timer = 999999;
+ }
+ else
+ m_uiSpeakDelay_Timer -= uiDiff;
+
+ if (m_creature->GetHealthPercent() < 25.0f && !m_bDalliahSpeak)
+ {
+ DoScriptTextDalliah(DALLIAH_SAY_ON_LOW_LIFE);
+ m_bDalliahSpeak = true;
+ }
+
+ if (m_uiCharge_Timer < uiDiff)
+ {
+ if(!m_bMovingPhase)
+ {
+ m_pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0);
+ if(m_pTarget)
+ {
+ //Start Charge phase
+ DoScriptText(urand(0,1) ? SAY_ON_CHARGE1 : SAY_ON_CHARGE2, m_creature);
+ DoStartMovement(m_creature->getVictim());
+ m_creature->SetSpeedRate(MOVE_RUN, 5.0f);
+ m_creature->getThreatManager().addThreat(m_pTarget, 100000000.0f);
+ //m_creature->GetMotionMaster()->MoveChase(m_pTarget);
+ }
+ m_uiCharge_Timer = 0;
+ m_bMovingPhase = true;
+ }
+ else
+ {
+ if (m_pTarget && m_creature->IsWithinDistInMap(m_pTarget, ATTACK_DISTANCE))
+ {
+ //for a nice visual effect one extra fire on the end of line
+ DoCastSpellIfCan(m_creature,SPELL_FIRE_TAIL);
+ m_creature->SetSpeedRate(MOVE_RUN, 1.34f);
+ m_creature->getThreatManager().addThreat(m_pTarget, -100000000.0f);
+ m_uiCharge_Timer = 99999999;
+ m_bMovingPhase = false;
+ }
+ else
+ {
+ //m_creature->getVictim()->CastCustomSpell(m_creature,SPELL_FIRE_TAIL,0,0,0,false,0,0,m_creature->GetGUID());
+ DoCastSpellIfCan(m_creature,SPELL_FIRE_TAIL);
+ m_uiCharge_Timer = 100;
+ }
+ }
+ }
+ else
+ m_uiCharge_Timer -= uiDiff;
+
+ //Timer for a fireshock spell (do fire damage and apply dot casuing ? damge to targetted player)
+ if (m_uiFellFireShock_Timer < uiDiff)
+ {
+ Unit *pTarget = NULL;
+ ThreatList const& tList = m_creature->getThreatManager().getThreatList();
+ ThreatList::const_iterator itr = tList.begin();
+ std::vector<Unit *> target_list;
+ for (;itr != tList.end(); ++itr)
+ {
+ pTarget = m_creature->GetMap()->GetUnit((*itr)->getUnitGuid());
+ // exclude pets & totems
+ if (pTarget && (pTarget->GetTypeId() != TYPEID_PLAYER || !pTarget->isAlive()))
+ {
+ pTarget = NULL;
+ continue;
+ }
+ if (pTarget)
+ target_list.push_back(pTarget);
+ }
+ if (target_list.size())
+ pTarget = *(target_list.begin()+rand()%target_list.size());
+
+ if(pTarget)
+ DoCastSpellIfCan(pTarget,m_bIsRegularMode ? SPELL_FIRE_SHOCK : SPELL_H_FIRE_SHOCK,CAST_TRIGGERED);
+ m_uiFellFireShock_Timer = urand (5000, 10000);
+ }
+ else
+ m_uiFellFireShock_Timer -= uiDiff;
+
+
+ //Timer for Knockback (throw players away from soccorathes) and initial the charge timer
+ if (m_uiKnockBack_Timer < uiDiff)
+ {
+ DoResetThreat();
+ if(m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
+ {
+ DoStartNoMovement(m_creature->getVictim());
+ DoCastSpellIfCan(m_creature->getVictim(), SPELL_KNOCK_BACK);
+ m_uiCharge_Timer = 4500;
+ }
+ else
+ m_uiCharge_Timer = 0;
+
+ m_uiKnockBack_Timer = urand(20000, 25000);
+ m_creature->SetInCombatWithZone();
+ }
+ else
+ m_uiKnockBack_Timer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_wrath_scryer_soccothrates(Creature* pCreature)
+{
+ return new boss_wrath_scryer_soccothratesAI(pCreature);
+}
+
+void AddSC_boss_wrath_scryer_soccothrates()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "boss_wrath_scryer_soccothrates";
+ newscript->GetAI = &GetAI;_boss_wrath_scryer_soccothrates;
+ newscript->RegisterSelf();
+}
\ No newline at end of file
Revise this Paste