aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_script_texts.sql7
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/8248_world_script_texts.sql7
-rw-r--r--sql/updates/8248_world_scriptname.sql1
-rw-r--r--src/game/ScriptLoader.cpp2
-rw-r--r--src/scripts/northrend/nexus/oculus/boss_urom.cpp305
-rw-r--r--src/scripts/northrend/nexus/oculus/instance_oculus.cpp11
-rw-r--r--src/scripts/northrend/nexus/oculus/oculus.h3
8 files changed, 310 insertions, 27 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 581d129a5a2..2aa238d5a84 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -1815,6 +1815,13 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(26723,-1576043,'Dragonqueen... Life-Binder... preserve... me.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13454,1,0,0,'keristrasza SAY_DEATH'),
(26723,-1576044,'Stay. Enjoy your final moments.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13451,1,0,0,'keristrasza SAY_CRYSTAL_NOVA'),
+-- -1 578 000 THE NEXUS: OCULUS
+ (27655,-1578000,'What do we have here... those that would defy the Spell-Weaver? Those without foresight our understanding. How can i make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578001,'Clearly my pets failed. Perhaps another demonstration is in order.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578002,'Still you fight. Still you cling to misguided principles. If you survive, you''ll find me in the center ring.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578003,'Poor blind fools!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578004,'A taste... just a small taste... of the Spell-Weaver''s power!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+
-- -1 580 000 SUNWELL PLATEAU
(24850,-1580000,'Aggh! No longer will I be a slave to Malygos! Challenge me and you will be destroyed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12422,1,0,0,'kalecgos SAY_EVIL_AGGRO'),
(24850,-1580001,'I will purge you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12423,1,0,0,'kalecgos SAY_EVIL_SPELL1'),
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 227c8e881a7..e4299232a34 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -1010,6 +1010,7 @@ UPDATE `instance_template` SET `script`='instance_oculus' WHERE `map`=578;
UPDATE `creature_template` SET `ScriptName`='boss_drakos' WHERE `entry`=27654;
UPDATE `creature_template` SET `ScriptName`='npc_unstable_sphere' WHERE `entry`=28166;
UPDATE `creature_template` SET `ScriptName`='npc_oculus_drake' WHERE `entry` IN (27657,27658,27659);
+UPDATE `creature_template` SET `ScriptName`='boss_urom' WHERE `entry`=27655;
/* OBSIDIAN SANCTUM */
UPDATE `instance_template` SET `script`='instance_obsidian_sanctum' WHERE `map`=615;
diff --git a/sql/updates/8248_world_script_texts.sql b/sql/updates/8248_world_script_texts.sql
new file mode 100644
index 00000000000..58a13a4cc92
--- /dev/null
+++ b/sql/updates/8248_world_script_texts.sql
@@ -0,0 +1,7 @@
+DELETE FROM `script_texts` WHERE `entry` IN (-1578000,-1578001,-1578002,-1578003,-1578004);
+INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+ (27655,-1578000,'What do we have here... those that would defy the Spell-Weaver? Those without foresight our understanding. How can i make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578001,'Clearly my pets failed. Perhaps another demonstration is in order.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578002,'Still you fight. Still you cling to misguided principles. If you survive, you''ll find me in the center ring.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578003,'Poor blind fools!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
+ (27655,-1578004,'A taste... just a small taste... of the Spell-Weaver''s power!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''); \ No newline at end of file
diff --git a/sql/updates/8248_world_scriptname.sql b/sql/updates/8248_world_scriptname.sql
new file mode 100644
index 00000000000..bd455ffd06a
--- /dev/null
+++ b/sql/updates/8248_world_scriptname.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='boss_urom' WHERE `entry`=27655; \ No newline at end of file
diff --git a/src/game/ScriptLoader.cpp b/src/game/ScriptLoader.cpp
index 20bda66a611..2a619352420 100644
--- a/src/game/ScriptLoader.cpp
+++ b/src/game/ScriptLoader.cpp
@@ -355,6 +355,7 @@ void AddSC_boss_ormorok();
void AddSC_boss_keristrasza();
void AddSC_instance_nexus();
void AddSC_boss_drakos(); //The Nexus The Oculus
+void AddSC_boss_urom();
void AddSC_instance_oculus();
void AddSC_oculus();
void AddSC_boss_sartharion(); //Obsidian Sanctum
@@ -855,6 +856,7 @@ void AddScripts()
AddSC_boss_keristrasza();
AddSC_instance_nexus();
AddSC_boss_drakos(); //The Nexus The Oculus
+ AddSC_boss_urom();
AddSC_instance_oculus();
AddSC_oculus();
AddSC_boss_sartharion(); //Obsidian Sanctum
diff --git a/src/scripts/northrend/nexus/oculus/boss_urom.cpp b/src/scripts/northrend/nexus/oculus/boss_urom.cpp
index 12176ef4f8a..b8631cbe51a 100644
--- a/src/scripts/northrend/nexus/oculus/boss_urom.cpp
+++ b/src/scripts/northrend/nexus/oculus/boss_urom.cpp
@@ -14,11 +14,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/* ScriptData
+SDName: Urom
+SD%Complete: 80
+SDComment: Is not working SPELL_ARCANE_SHIELD. SPELL_FROSTBOMB has some issues, the damage aura should not stack.
+SDCategory: Instance Script
+EndScriptData */
+
#include "ScriptedPch.h"
#include "oculus.h"
enum Spells
{
+
SPELL_ARCANE_SHIELD = 53813, //Dummy --> Channeled, shields the caster from damage.
SPELL_EMPOWERED_ARCANE_EXPLOSION = 51110,
SPELL_EMPOWERED_ARCANE_EXPLOSION_2 = 59377,
@@ -30,65 +38,310 @@ enum Spells
SPELL_TIME_BOMB = 51121, //Deals arcane damage to a random player, and after 6 seconds, deals zone damage to nearby equal to the health missing of the target afflicted by the debuff.
SPELL_TIME_BOMB_2 = 59376
};
-//not in db
+
enum Yells
{
- SAY_AGGRO = -1578012,
- SAY_KILL_1 = -1578013,
- SAY_KILL_2 = -1578014,
- SAY_KILL_3 = -1578015,
- SAY_DEATH = -1578016,
- SAY_EXPLOSION_1 = -1578017,
- SAY_EXPLOSION_2 = -1578018,
- SAY_SUMMON_1 = -1578019,
- SAY_SUMMON_2 = -1578020,
- SAY_SUMMON_3 = -1578021
+ SAY_AGGRO_1 = -1578000,
+ SAY_AGGRO_2 = -1578001,
+ SAY_AGGRO_3 = -1578002,
+ SAY_AGGRO_4 = -1578003,
+ SAY_TELEPORT = -1578004,
+};
+
+enum eData
+{
+ DATA_SET_SUMMON_GROUP
+};
+
+enum eCreature
+{
+ NPC_PHANTASMAL_CLOUDSCRAPER = 27645,
+ NPC_PHANTASMAL_MAMMOTH = 27642,
+ NPC_PHANTASMAL_WOLF = 27644,
+
+ NPC_PHANTASMAL_AIR = 27650,
+ NPC_PHANTASMAL_FIRE = 27651,
+ NPC_PHANTASMAL_WATER = 27653,
+
+ NPC_PHANTASMAL_MURLOC = 27649,
+ NPC_PHANTASMAL_NAGAL = 27648,
+ NPC_PHANTASMAL_OGRE = 27647
+};
+
+struct Summons
+{
+ uint32 uiEntry[4];
+};
+
+static Summons Group[]=
+{
+ {NPC_PHANTASMAL_CLOUDSCRAPER,NPC_PHANTASMAL_CLOUDSCRAPER,NPC_PHANTASMAL_MAMMOTH,NPC_PHANTASMAL_WOLF},
+ {NPC_PHANTASMAL_AIR,NPC_PHANTASMAL_AIR,NPC_PHANTASMAL_WATER,NPC_PHANTASMAL_FIRE},
+ {NPC_PHANTASMAL_OGRE,NPC_PHANTASMAL_OGRE,NPC_PHANTASMAL_NAGAL,NPC_PHANTASMAL_MURLOC}
+};
+
+static uint32 TeleportSpells[]=
+{
+ SPELL_SUMMON_MENAGERIE,SPELL_SUMMON_MENAGERIE_2,SPELL_SUMMON_MENAGERIE_3
+};
+
+static int32 SayAggro[]=
+{
+ SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3,SAY_AGGRO_4
};
struct boss_uromAI : public ScriptedAI
{
- boss_uromAI(Creature *c) : ScriptedAI(c)
+ boss_uromAI(Creature* pCreature) : ScriptedAI(pCreature)
{
- pInstance = c->GetInstanceData();
+ pInstance = pCreature->GetInstanceData();
}
ScriptedInstance* pInstance;
+ float x,y;
+
+ bool bCanCast;
+ bool bCanGoBack;
+
+ uint8 uiGroup[3];
+
+ uint32 uiTeleportTimer;
+ uint32 uiArcaneExplosionTimer;
+ uint32 uiCastArcaneExplosionTimer;
+ uint32 uiFrostBombTimer;
+ uint32 uiTimeBombTimer;
+
void Reset()
{
+ if (pInstance && pInstance->GetData(DATA_VAROS_EVENT) != DONE)
+ DoCast(SPELL_ARCANE_SHIELD);
+
if (pInstance)
pInstance->SetData(DATA_UROM_EVENT, NOT_STARTED);
+
+ if (pInstance && pInstance->GetData(DATA_UROM_PLATAFORM) == 0)
+ {
+ uiGroup[0] = 0;
+ uiGroup[1] = 0;
+ uiGroup[2] = 0;
+ }
+
+ x,y = 0.0f;
+ bCanCast = false;
+ bCanGoBack = false;
+
+ me->GetMotionMaster()->MoveIdle();
+
+ uiTeleportTimer = urand(30000,35000);
+ uiArcaneExplosionTimer = 9000;
+ uiCastArcaneExplosionTimer = 2000;
+ uiFrostBombTimer = urand(5000,8000);
+ uiTimeBombTimer = urand(20000,25000);
}
- void EnterCombat(Unit* /*who*/)
- {
- DoScriptText(SAY_AGGRO, me);
+ void EnterCombat(Unit* pWho)
+ {
if (pInstance)
pInstance->SetData(DATA_UROM_EVENT, IN_PROGRESS);
+
+ SetGroups();
+ SummonGroups();
+ CastTeleport();
+
+ if (pInstance && pInstance->GetData(DATA_UROM_PLATAFORM) != 3)
+ pInstance->SetData(DATA_UROM_PLATAFORM,pInstance->GetData(DATA_UROM_PLATAFORM)+1);
+ }
+
+ void AttackStart(Unit* pWho)
+ {
+ if (!pWho)
+ return;
+
+ if (me->GetPositionZ() > 518.63)
+ DoStartNoMovement(pWho);
+
+ if (me->GetPositionZ() < 518.63)
+ {
+ if (me->Attack(pWho, true))
+ {
+ DoScriptText(SayAggro[3],me);
+
+ me->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(me);
+
+ me->GetMotionMaster()->MoveChase(pWho, 0,0);
+ }
+ }
+ }
+
+ void SetGroups()
+ {
+ if (!pInstance || pInstance->GetData(DATA_UROM_PLATAFORM) != 0)
+ return;
+
+ while (uiGroup[0] == uiGroup[1] || uiGroup[0] == uiGroup[2] || uiGroup[1] == uiGroup[2])
+ {
+ uiGroup[0] = urand(0,2);
+ uiGroup[1] = urand(0,2);
+ uiGroup[2] = urand(0,2);
+ }
+ }
+
+ void SetPosition(uint8 uiI)
+ {
+ switch(uiI)
+ {
+ case 0:
+ x = me->GetPositionX() + 4;
+ y = me->GetPositionY() - 4;
+ break;
+ case 1:
+ x = me->GetPositionX() + 4;
+ y = me->GetPositionY() + 4;
+ break;
+ case 2:
+ x = me->GetPositionX() - 4;
+ y = me->GetPositionY() + 4;
+ break;
+ case 3:
+ x = me->GetPositionX() - 4;
+ y = me->GetPositionY() - 4;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void SummonGroups()
+ {
+ if (!pInstance || pInstance->GetData(DATA_UROM_PLATAFORM) > 2)
+ return;
+
+ for (uint8 uiI = 0; uiI < 4 ; uiI++)
+ {
+ SetPosition(uiI);
+ me->SummonCreature(Group[uiGroup[pInstance->GetData(DATA_UROM_PLATAFORM)]].uiEntry[uiI],x,y,me->GetPositionZ(),me->GetOrientation());
+ }
+ }
+
+ void CastTeleport()
+ {
+ if (!pInstance || pInstance->GetData(DATA_UROM_PLATAFORM) > 2)
+ return;
+
+ DoScriptText(SayAggro[pInstance->GetData(DATA_UROM_PLATAFORM)],me);
+ DoCast(TeleportSpells[pInstance->GetData(DATA_UROM_PLATAFORM)]);
}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void UpdateAI(const uint32 /*diff*/)
+ void UpdateAI(const uint32 uiDiff)
{
//Return since we have no target
if (!UpdateVictim())
return;
+ if (!pInstance || pInstance->GetData(DATA_UROM_PLATAFORM) < 2)
+ return;
+
+ if (uiTeleportTimer <= uiDiff)
+ {
+ me->InterruptNonMeleeSpells(false);
+ DoScriptText(SAY_TELEPORT,me);
+ me->GetMotionMaster()->MoveIdle();
+ DoCast(SPELL_TELEPORT);
+ uiTeleportTimer = urand(30000,35000);
+
+ } else uiTeleportTimer -= uiDiff;
+
+ if (bCanCast && !me->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION))
+ {
+ if (uiCastArcaneExplosionTimer <= uiDiff)
+ {
+ bCanCast = false;
+ bCanGoBack = true;
+ DoCastAOE(SPELL_EMPOWERED_ARCANE_EXPLOSION);
+ uiCastArcaneExplosionTimer = 2000;
+ }else uiCastArcaneExplosionTimer -= uiDiff;
+ }
+
+ if (bCanGoBack)
+ {
+ if (uiArcaneExplosionTimer <= uiDiff)
+ {
+ Position pPos;
+ me->getVictim()->GetPosition(&pPos);
+
+ me->NearTeleportTo(pPos.GetPositionX(),pPos.GetPositionY(),pPos.GetPositionZ(),pPos.GetOrientation());
+ me->GetMotionMaster()->MoveChase(me->getVictim(),0,0);
+ me->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);
+
+ bCanCast = false;
+ bCanGoBack = false;
+ uiArcaneExplosionTimer = 9000;
+ } else uiArcaneExplosionTimer -= uiDiff;
+ }
+
+ if (!me->IsNonMeleeSpellCasted(false, true, true))
+ {
+ if (uiFrostBombTimer <= uiDiff)
+ {
+ DoCastVictim(SPELL_FROSTBOMB);
+ uiFrostBombTimer = urand(5000,8000);
+ } else uiFrostBombTimer -= uiDiff;
+
+ if (uiTimeBombTimer <= uiDiff)
+ {
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM))
+ DoCast(pUnit,SPELL_TIME_BOMB);
+
+ uiTimeBombTimer = urand(20000,25000);
+ } else uiTimeBombTimer -= uiDiff;
+ }
+
DoMeleeAttackIfReady();
}
+
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
-
if (pInstance)
pInstance->SetData(DATA_UROM_EVENT, DONE);
}
- void KilledUnit(Unit * victim)
+
+ void JustSummoned(Creature* pSummon)
{
- if (victim == me)
- return;
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2,SAY_KILL_3), me);
+ pSummon->SetInCombatWithZone();
+ }
+
+ void LeaveCombat()
+ {
+ me->RemoveAllAuras();
+ me->CombatStop(false);
+ me->DeleteThreatList();
+ }
+
+ void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
+ {
+ switch(pSpell->Id)
+ {
+ case SPELL_SUMMON_MENAGERIE:
+ me->SetHomePosition(968.66,1042.53,527.32,0.077);
+ LeaveCombat();
+ break;
+ case SPELL_SUMMON_MENAGERIE_2:
+ me->SetHomePosition(1164.02,1170.85,527.321,3.66);
+ LeaveCombat();
+ break;
+ case SPELL_SUMMON_MENAGERIE_3:
+ me->SetHomePosition(1118.31,1080.377,508.361,4.25);
+ LeaveCombat();
+ break;
+ case SPELL_TELEPORT:
+ me->AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE); // with out it the npc will fall down while is casting
+ bCanCast = true;
+ break;
+ default:
+ break;
+ }
}
};
@@ -99,7 +352,7 @@ CreatureAI* GetAI_boss_urom(Creature* pCreature)
void AddSC_boss_urom()
{
- Script *newscript;
+ Script* newscript;
newscript = new Script;
newscript->Name = "boss_urom";
diff --git a/src/scripts/northrend/nexus/oculus/instance_oculus.cpp b/src/scripts/northrend/nexus/oculus/instance_oculus.cpp
index 00a0e5e2967..49be2385a3c 100644
--- a/src/scripts/northrend/nexus/oculus/instance_oculus.cpp
+++ b/src/scripts/northrend/nexus/oculus/instance_oculus.cpp
@@ -34,11 +34,18 @@ struct instance_oculus : public ScriptedInstance
uint64 uiUrom;
uint64 uiEregos;
+ uint8 uiPlataformUrom;
+
uint8 m_auiEncounter[MAX_ENCOUNTER];
std::string str_data;
std::list<uint64> GameObjectList;
+ void Initialize()
+ {
+ uiPlataformUrom = 0;
+ }
+
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
{
switch(pCreature->GetEntry())
@@ -89,6 +96,9 @@ struct instance_oculus : public ScriptedInstance
case DATA_EREGOS_EVENT:
m_auiEncounter[3] = data;
break;
+ case DATA_UROM_PLATAFORM:
+ uiPlataformUrom = data;
+ break;
}
if (data == DONE)
@@ -103,6 +113,7 @@ struct instance_oculus : public ScriptedInstance
case DATA_VAROS_EVENT: return m_auiEncounter[1];
case DATA_UROM_EVENT: return m_auiEncounter[2];
case DATA_EREGOS_EVENT: return m_auiEncounter[3];
+ case DATA_UROM_PLATAFORM: return uiPlataformUrom;
}
return 0;
diff --git a/src/scripts/northrend/nexus/oculus/oculus.h b/src/scripts/northrend/nexus/oculus/oculus.h
index 93440dd6fc3..b212c9b8b6a 100644
--- a/src/scripts/northrend/nexus/oculus/oculus.h
+++ b/src/scripts/northrend/nexus/oculus/oculus.h
@@ -6,7 +6,8 @@ enum Data
DATA_DRAKOS_EVENT,
DATA_VAROS_EVENT,
DATA_UROM_EVENT,
- DATA_EREGOS_EVENT
+ DATA_EREGOS_EVENT,
+ DATA_UROM_PLATAFORM
};
enum Data64