diff options
-rw-r--r-- | sql/updates/9600_world_script_texts.sql | 6 | ||||
-rw-r--r-- | sql/updates/9600_world_script_waypoint.sql | 38 | ||||
-rw-r--r-- | sql/updates/9600_world_scriptname.sql | 1 | ||||
-rw-r--r-- | src/server/scripts/Outland/netherstorm.cpp | 110 |
4 files changed, 152 insertions, 3 deletions
diff --git a/sql/updates/9600_world_script_texts.sql b/sql/updates/9600_world_script_texts.sql new file mode 100644 index 00000000000..77a96b48ac9 --- /dev/null +++ b/sql/updates/9600_world_script_texts.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000578 AND -1000575; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000575,'All systems on-line. Prepare yourself, we leave shortly.',0,0,0,0,'max_a_million SAY_START'), +(-1000576,'Be careful in there and come back in one piece!',0,0,0,0,'bot-specialist_alley SAY_ALLEY_FAREWELL'), +(-1000577,'Proceed.',0,0,0,0,'max_a_million SAY_CONTINUE'), +(-1000578,'You are back! Were you able to get all of the machines?',0,0,0,0,'bot-specialist_alley SAY_ALLEY_FINISH'); diff --git a/sql/updates/9600_world_script_waypoint.sql b/sql/updates/9600_world_script_waypoint.sql new file mode 100644 index 00000000000..dc86912639e --- /dev/null +++ b/sql/updates/9600_world_script_waypoint.sql @@ -0,0 +1,38 @@ +DELETE FROM script_waypoint WHERE entry = 19589; +INSERT INTO script_waypoint VALUES +(19589, 1, 3358.22, 3728.25, 141.204, 0, ''), +(19589, 2, 3368.05, 3715.51, 142.057, 0, ''), +(19589, 3, 3389.04, 3701.21, 144.648, 0, ''), +(19589, 4, 3419.51, 3691.41, 146.598, 0, ''), +(19589, 5, 3437.83, 3699.2, 147.235, 0, ''), +(19589, 6, 3444.85, 3700.89, 147.088, 0, ''), +(19589, 7, 3449.89, 3700.14, 148.118, 0, ''), +(19589, 8, 3443.55, 3682.09, 149.219, 0, ''), +(19589, 9, 3452.6, 3674.65, 150.226, 0, ''), +(19589, 10, 3462.6, 3659.01, 152.436, 0, ''), +(19589, 11, 3469.18, 3649.47, 153.178, 0, ''), +(19589, 12, 3475.11, 3639.41, 157.213, 0, ''), +(19589, 13, 3482.26, 3617.69, 159.126, 0, ''), +(19589, 14, 3492.7, 3606.27, 156.419, 0, ''), +(19589, 15, 3493.52, 3595.06, 156.581, 0, ''), +(19589, 16, 3490.4, 3588.45, 157.764, 0, ''), +(19589, 17, 3485.21, 3585.69, 159.979, 0, ''), +(19589, 18, 3504.68, 3594.44, 152.862, 0, ''), +(19589, 19, 3523.6, 3594.48, 145.393, 0, ''), +(19589, 20, 3537.01, 3576.71, 135.748, 0, ''), +(19589, 21, 3551.73, 3573.12, 128.013, 0, ''), +(19589, 22, 3552.12, 3614.08, 127.847, 0, ''), +(19589, 23, 3536.14, 3639.78, 126.031, 0, ''), +(19589, 24, 3522.94, 3646.47, 131.989, 0, ''), +(19589, 25, 3507.21, 3645.69, 138.1527, 0, ''), +(19589, 26, 3485.15, 3645.64, 137.755, 0, ''), +(19589, 27, 3472.18, 3633.88, 140.352, 0, ''), +(19589, 28, 3435.34, 3613.69, 140.725, 0, ''), +(19589, 29, 3417.4, 3612.4, 141.143, 0, ''), +(19589, 30, 3411.04, 3621.14, 142.454, 0, ''), +(19589, 31, 3404.47, 3636.89, 144.434, 0, ''), +(19589, 32, 3380.55, 3657.06, 144.332, 0, ''), +(19589, 33, 3375, 3676.86, 145.298, 0, ''), +(19589, 34, 3388.87, 3685.48, 146.818, 0, ''), +(19589, 35, 3393.99, 3699.4, 144.858, 0, ''), +(19589, 36, 3354.95, 3726.02, 141.428, 0, ''); diff --git a/sql/updates/9600_world_scriptname.sql b/sql/updates/9600_world_scriptname.sql new file mode 100644 index 00000000000..590b48aba1f --- /dev/null +++ b/sql/updates/9600_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_maxx_a_million_escort', MovementType=2 WHERE entry=19589; diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index ff56a224802..3f35f8fcd69 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -18,8 +18,8 @@ /* ScriptData SDName: Netherstorm -SD%Complete: 75 -SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10299,10321,10322,10323,10329,10330,10338,10365(Shutting Down Manaforge), 10198 +SD%Complete: 80 +SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10299,10321,10322,10323,10329,10330,10338,10365(Shutting Down Manaforge), 10198, 10191 SDCategory: Netherstorm EndScriptData */ @@ -28,6 +28,7 @@ npc_manaforge_control_console go_manaforge_control_console npc_commander_dawnforge npc_bessy +npc_maxx_a_million EndContentData */ #include "ScriptPCH.h" @@ -933,9 +934,111 @@ public: }; /*###### -## +## npc_maxx_a_million ######*/ +enum +{ + QUEST_MARK_V_IS_ALIVE = 10191, + GO_DRAENEI_MACHINE = 183771 +}; + +class npc_maxx_a_million_escort : public CreatureScript +{ +public: + npc_maxx_a_million_escort() : CreatureScript("npc_maxx_a_million_escort") { } + + CreatureAI *GetAI(Creature* pCreature) const + { + return new npc_maxx_a_million_escortAI(pCreature); + } + + struct npc_maxx_a_million_escortAI : public npc_escortAI + { + npc_maxx_a_million_escortAI(Creature* pCreature) : npc_escortAI(pCreature) {} + + bool bTake; + uint32 uiTakeTimer; + + void Reset() + { + bTake=false; + uiTakeTimer=3000; + } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + if (!pPlayer) + return; + + switch (i) + { + case 7: + case 17: + case 29: + //Find Object and "work" + if ( GameObject* pGO = GetClosestGameObjectWithEntry(me,GO_DRAENEI_MACHINE,INTERACTION_DISTANCE)) + { + // take the GO -> animation + me->HandleEmoteCommand(EMOTE_STATE_LOOT); + SetEscortPaused(true); + bTake=true; + } + break; + case 36: //return and quest_complete + if (pPlayer) + pPlayer->CompleteQuest(QUEST_MARK_V_IS_ALIVE); + break; + } + } + + void JustDied(Unit* pKiller) + { + Player* pPlayer = GetPlayerForEscort(); + if (pPlayer) + pPlayer->FailQuest(QUEST_MARK_V_IS_ALIVE); + } + + void UpdateAI(const uint32 uiDiff) + { + npc_escortAI::UpdateAI(uiDiff); + + if (bTake) + { + if (uiTakeTimer < uiDiff) + { + me->HandleEmoteCommand(EMOTE_STATE_NONE); + if (GameObject* pGO = GetClosestGameObjectWithEntry(me,GO_DRAENEI_MACHINE,INTERACTION_DISTANCE)) + { + SetEscortPaused(false); + bTake=false; + uiTakeTimer = 3000; + pGO->Delete(); + } + } + else + uiTakeTimer -= uiDiff; + } + DoMeleeAttackIfReady(); + } + }; + + bool OnQuestAccept(Player* pPlayer, Creature* pCreature, const Quest* pQuest) + { + if (pQuest->GetQuestId() == QUEST_MARK_V_IS_ALIVE) + { + if (npc_maxx_a_million_escortAI* pEscortAI = CAST_AI(npc_maxx_a_million_escort::npc_maxx_a_million_escortAI, pCreature->AI())) + { + pCreature->setFaction(113); + pEscortAI->Start(false,false,pPlayer->GetGUID()); + } + } + return true; + } +}; + + void AddSC_netherstorm() { new go_manaforge_control_console(); @@ -945,4 +1048,5 @@ void AddSC_netherstorm() new npc_professor_dabiri(); new mob_phase_hunter(); new npc_bessy(); + new npc_maxx_a_million_escort(); } |