- diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp
- index 3134cae..a8ea3cc 100644
- --- a/scripts/outland/netherstorm.cpp
- +++ b/scripts/outland/netherstorm.cpp
- @@ -17,7 +17,7 @@
- /* ScriptData
- SDName: Netherstorm
- SD%Complete: 80
- -SDComment: Quest support: 10191, 10198, 10299, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10425, 10438, 10924.
- +SDComment: Quest support: 10191, 10198, 10299, 10310, 10321, 10322, 10323, 10329, 10330, 10337, 10338, 10365(Shutting Down Manaforge), 10406, 10425, 10438, 10924.
- SDCategory: Netherstorm
- EndScriptData */
- @@ -30,6 +30,7 @@ npc_maxx_a_million
- npc_zeppit
- npc_protectorate_demolitionist
- npc_captured_vanguard
- +npc_drijya
- EndContentData */
- #include "precompiled.h"
- @@ -1136,6 +1137,235 @@ bool QuestAccept_npc_captured_vanguard(Player* pPlayer, Creature* pCreature, con
- return true;
- }
- +/*######
- +## npc_drijya
- +######*/
- +
- +enum
- +{
- + SAY_DRIJYA_START = -1000963,
- + SAY_DRIJYA_1 = -1000964,
- + SAY_DRIJYA_2 = -1000965,
- + SAY_DRIJYA_3 = -1000966,
- + SAY_DRIJYA_4 = -1000967,
- + SAY_DRIJYA_5 = -1000968,
- + SAY_DRIJYA_6 = -1000969,
- + SAY_DRIJYA_7 = -1000970,
- + SAY_DRIJYA_COMPLETE = -1000971,
- +
- + NPC_EXPLODE_TRIGGER = 20296,
- + NPC_TERROR_IMP = 20399,
- + NPC_LEGION_TROOPER = 20402,
- + NPC_LEGION_DESTROYER = 20403,
- +
- + GO_SMOKE = 185318,
- + GO_FIRE = 185317,
- + GO_BIG_FIRE = 185319,
- +
- + QUEST_ID_WARP_GATE = 10310,
- +
- + MAX_TROOPERS = 9,
- + MAX_IMPS = 6,
- +};
- +
- +struct MANGOS_DLL_DECL npc_drijyaAI : public npc_escortAI
- +{
- + npc_drijyaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); }
- +
- + uint8 m_uiSpawnCount;
- + uint32 m_uiSpawnImpTimer;
- + uint32 m_uiSpawnTrooperTimer;
- + uint32 m_uiSpawnDestroyerTimer;
- + uint32 m_uiDestroyingTimer;
- +
- + ObjectGuid m_explodeTriggerGuid;
- +
- + void Reset() override
- + {
- + if (!HasEscortState(STATE_ESCORT_ESCORTING))
- + {
- + m_uiSpawnCount = 0;
- + m_uiSpawnImpTimer = 0;
- + m_uiSpawnTrooperTimer = 0;
- + m_uiSpawnDestroyerTimer = 0;
- + m_uiDestroyingTimer = 0;
- + }
- + }
- +
- + void Aggro(Unit* pWho) override
- + {
- + if ((pWho->GetEntry() == NPC_TERROR_IMP || pWho->GetEntry() == NPC_LEGION_TROOPER) && urand(0, 1))
- + DoScriptText(SAY_DRIJYA_3, m_creature);
- + }
- +
- + void DoSpawnCreature(uint32 uiEntry)
- + {
- + if (Creature* pTrigger = m_creature->GetMap()->GetCreature(m_explodeTriggerGuid))
- + m_creature->SummonCreature(uiEntry, pTrigger->GetPositionX(), pTrigger->GetPositionY(), pTrigger->GetPositionZ(), pTrigger->GetOrientation(), TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 10000);
- + }
- +
- + void JustSummoned(Creature* pSummoned) override
- + {
- + switch (pSummoned->GetEntry())
- + {
- + case NPC_TERROR_IMP:
- + case NPC_LEGION_TROOPER:
- + case NPC_LEGION_DESTROYER:
- + pSummoned->AI()->AttackStart(m_creature);
- + break;
- + }
- + }
- +
- + void WaypointReached(uint32 uiPointId) override
- + {
- + switch (uiPointId)
- + {
- + case 0:
- + DoScriptText(SAY_DRIJYA_START, m_creature);
- + SetRun();
- + break;
- + case 1:
- + DoScriptText(SAY_DRIJYA_1, m_creature);
- + break;
- + case 5:
- + DoScriptText(SAY_DRIJYA_2, m_creature);
- + break;
- + case 7:
- + SetEscortPaused(true);
- + m_uiDestroyingTimer = 60000;
- + m_uiSpawnImpTimer = 15000;
- + m_uiSpawnCount = 0;
- + m_creature->HandleEmoteCommand(EMOTE_STATE_WORK);
- + if (Creature* pTrigger = GetClosestCreatureWithEntry(m_creature, NPC_EXPLODE_TRIGGER, 30.0f))
- + m_explodeTriggerGuid = pTrigger->GetObjectGuid();
- + break;
- + case 8:
- + // ToDo: respawn the fire and smoke
- + DoScriptText(SAY_DRIJYA_4, m_creature);
- + break;
- + case 12:
- + SetEscortPaused(true);
- + m_uiDestroyingTimer = 60000;
- + m_uiSpawnTrooperTimer = 15000;
- + m_uiSpawnCount = 0;
- + m_creature->HandleEmoteCommand(EMOTE_STATE_WORK);
- + break;
- + case 13:
- + // ToDo: respawn the fire and smoke
- + DoScriptText(SAY_DRIJYA_5, m_creature);
- + break;
- + case 17:
- + SetEscortPaused(true);
- + m_uiDestroyingTimer = 60000;
- + m_uiSpawnDestroyerTimer = 15000;
- + m_creature->HandleEmoteCommand(EMOTE_STATE_WORK);
- + break;
- + case 18:
- + // ToDo: respawn the fire and smoke and cast the explode visual spell
- + DoScriptText(SAY_DRIJYA_6, m_creature);
- + break;
- + case 19:
- + DoScriptText(SAY_DRIJYA_7, m_creature);
- + break;
- + case 22:
- + SetRun(false);
- + break;
- + case 26:
- + if (Player* pPlayer = GetPlayerForEscort())
- + {
- + DoScriptText(SAY_DRIJYA_COMPLETE, m_creature, pPlayer);
- + pPlayer->GroupEventHappens(QUEST_ID_WARP_GATE, m_creature);
- + }
- + break;
- + }
- + }
- +
- + void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override
- + {
- + if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER)
- + {
- + m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN);
- + Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true);
- + }
- + }
- +
- + void UpdateEscortAI(const uint32 uiDiff) override
- + {
- + if (m_uiSpawnImpTimer)
- + {
- + if (m_uiSpawnImpTimer <= uiDiff)
- + {
- + DoSpawnCreature(NPC_TERROR_IMP);
- + ++m_uiSpawnCount;
- +
- + if (m_uiSpawnCount == MAX_IMPS)
- + m_uiSpawnImpTimer = 0;
- + else
- + m_uiSpawnImpTimer = 3500;
- + }
- + else
- + m_uiSpawnImpTimer -= uiDiff;
- + }
- +
- + if (m_uiSpawnTrooperTimer)
- + {
- + if (m_uiSpawnTrooperTimer <= uiDiff)
- + {
- + DoSpawnCreature(NPC_LEGION_TROOPER);
- + ++m_uiSpawnCount;
- +
- + if (m_uiSpawnCount == MAX_TROOPERS)
- + m_uiSpawnTrooperTimer = 0;
- + else
- + m_uiSpawnTrooperTimer = 3500;
- + }
- + else
- + m_uiSpawnTrooperTimer -= uiDiff;
- + }
- +
- + if (m_uiSpawnDestroyerTimer)
- + {
- + if (m_uiSpawnDestroyerTimer <= uiDiff)
- + {
- + DoSpawnCreature(NPC_LEGION_DESTROYER);
- + m_uiSpawnDestroyerTimer = 0;
- + }
- + else
- + m_uiSpawnDestroyerTimer -= uiDiff;
- + }
- +
- + if (m_uiDestroyingTimer)
- + {
- + if (m_uiDestroyingTimer <= uiDiff)
- + {
- + SetEscortPaused(false);
- + m_creature->HandleEmoteCommand(EMOTE_STATE_NONE);
- + m_uiDestroyingTimer = 0;
- + }
- + else
- + m_uiDestroyingTimer -= uiDiff;
- + }
- +
- + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
- + return;
- +
- + DoMeleeAttackIfReady();
- + }
- +};
- +
- +CreatureAI* GetAI_npc_drijya(Creature* pCreature)
- +{
- + return new npc_drijyaAI(pCreature);
- +}
- +
- +bool QuestAccept_npc_drijya(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
- +{
- + if (pQuest->GetQuestId() == QUEST_ID_WARP_GATE)
- + pCreature->AI()->SendAIEvent(AI_EVENT_START_ESCORT, pPlayer, pCreature, pQuest->GetQuestId());
- +
- + return true;
- +}
- +
- void AddSC_netherstorm()
- {
- Script* pNewScript;
- @@ -1187,4 +1417,10 @@ void AddSC_netherstorm()
- pNewScript->GetAI = &GetAI_npc_captured_vanguard;
- pNewScript->pQuestAcceptNPC = &QuestAccept_npc_captured_vanguard;
- pNewScript->RegisterSelf();
- +
- + pNewScript = new Script;
- + pNewScript->Name = "npc_drijya";
- + pNewScript->GetAI = &GetAI_npc_drijya;
- + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_drijya;
- + pNewScript->RegisterSelf();
- }
- diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql
- index 79c3d0b..4a09be9 100644
- --- a/sql/mangos_scriptname_full.sql
- +++ b/sql/mangos_scriptname_full.sql
- @@ -880,6 +880,7 @@ UPDATE creature_template SET ScriptName='npc_maxx_a_million' WHERE entry=19589;
- UPDATE creature_template SET ScriptName='npc_zeppit' WHERE entry=22484;
- UPDATE creature_template SET ScriptName='npc_protectorate_demolitionist' WHERE entry=20802;
- UPDATE creature_template SET ScriptName='npc_captured_vanguard' WHERE entry=20763;
- +UPDATE creature_template SET ScriptName='npc_drijya' WHERE entry=20281;
- /* */
- /* THE NEXUS */
- diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql
- index 07da1a7..98ceaa1 100644
- --- a/sql/scriptdev2_script_full.sql
- +++ b/sql/scriptdev2_script_full.sql
- @@ -1037,7 +1037,17 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
- (-1000959,'This part of forest are very danger for us. We must be a careful!',0,0,0,0,'stinky ignatz SAY_STINKY_FIRST_STOP'),
- (-1000960,'Kill two monsters, who stay near Bogbean plant and then I gather a bogbean.',0,0,0,0,'stinky ignatz SAY_STINKY_2_MONSTERS'),
- (-1000961,'I am gathering a bogbean. It takes some time.',0,0,0,69,'stinky ignatz SAY_STINKY_GATHERING'),
- -(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END');
- +(-1000962,'Thanks you for help.',0,0,0,0,'stinky ignatz SAY_STINKY_END'),
- +
- +(-1000963,'Very well. Before we head down there, take a moment to prepare yourself.',0,0,0,0,'drijya SAY_DRIJYA_START'),
- +(-1000964,'Let\'s proceed at a brisk pace.',0,0,0,0,'drijya SAY_DRIJYA_1'),
- +(-1000965,'We\'ll start at that first energy pylon, straight ahead. Remember, try to keep them off of me.',0,0,0,0,'drijya SAY_DRIJYA_2'),
- +(-1000966,'Keep them off me!',0,0,0,0,'drijya SAY_DRIJYA_3'),
- +(-1000967,'I\'m done with this pylon. On to the next.',0,0,0,0,'drijya SAY_DRIJYA_4'),
- +(-1000968,'Alright, pylon two down. Now for the heat manifold.',0,0,0,0,'drijya SAY_DRIJYA_5'),
- +(-1000969,'That should do it. The teleporter should blow any second now !',0,0,0,0,'drijya SAY_DRIJYA_6'),
- +(-1000970,'Ok, let\'s get out of here!',0,0,0,0,'drijya SAY_DRIJYA_7'),
- +(-1000971,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,0,'drijya SAY_DRIJYA_COMPLETE');
- -- -1 033 000 SHADOWFANG KEEP
- INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
- @@ -7454,4 +7464,34 @@ INSERT INTO script_waypoint VALUES
- (4880, 23, -2904.04, -3601.35, 34.969, 0, ''),
- (4880, 24, -2907.6, -3612.73, 34.2434, 10000, 'SAY_STINKY_END');
- +DELETE FROM script_waypoint WHERE entry=20281;
- +INSERT INTO script_waypoint VALUES
- +(20281, 0, 3096.416, 2801.408, 118.149, 10000, ''),
- +(20281, 1, 3096.516, 2801.065, 118.128, 0, ''),
- +(20281, 2, 3099.995, 2796.665, 118.118, 0, ''),
- +(20281, 3, 3098.759, 2786.174, 117.125, 0, ''),
- +(20281, 4, 3087.792, 2754.602, 115.441, 0, ''),
- +(20281, 5, 3080.718, 2730.793, 115.930, 9000, ''),
- +(20281, 6, 3060.235, 2731.306, 115.122, 0, ''),
- +(20281, 7, 3050.863, 2727.388, 114.054, 0, ''),
- +(20281, 8, 3052.113, 2728.104, 114.032, 8000, ''),
- +(20281, 9, 3055.008, 2724.972, 113.687, 0, ''),
- +(20281, 10, 3053.777, 2718.427, 113.684, 0, ''),
- +(20281, 11, 3028.622, 2693.375, 114.670, 0, ''),
- +(20281, 12, 3022.430, 2695.297, 113.406, 0, ''),
- +(20281, 13, 3024.591, 2694.684, 114.164, 8000, ''),
- +(20281, 14, 3025.463, 2700.755, 113.514, 0, ''),
- +(20281, 15, 3011.336, 2716.782, 113.691, 0, ''),
- +(20281, 16, 3010.882, 2726.991, 114.239, 0, ''),
- +(20281, 17, 3009.178, 2729.083, 114.324, 0, ''),
- +(20281, 18, 3011.358, 2727.707, 114.235, 25000, ''),
- +(20281, 19, 3012.583, 2728.452, 114.211, 0, ''),
- +(20281, 20, 3033.888, 2736.437, 114.369, 0, ''),
- +(20281, 21, 3071.492, 2741.502, 116.462, 0, ''),
- +(20281, 22, 3087.792, 2754.602, 115.441, 0, ''),
- +(20281, 23, 3094.505, 2770.198, 115.744, 0, ''),
- +(20281, 24, 3103.510, 2784.362, 116.857, 0, ''),
- +(20281, 25, 3099.995, 2796.665, 118.118, 0, ''),
- +(20281, 26, 3096.290, 2801.027, 118.096, 0, '');
- +
- -- EOF
- diff --git a/sql/updates/r9999_mangos.sql b/sql/updates/r9999_mangos.sql
- new file mode 100644
- index 0000000..22290ed
- --- /dev/null
- +++ b/sql/updates/r9999_mangos.sql
- @@ -0,0 +1 @@
- +UPDATE creature_template SET ScriptName='npc_drijya' WHERE entry=20281;
- diff --git a/sql/updates/r9999_scriptdev2.sql b/sql/updates/r9999_scriptdev2.sql
- new file mode 100644
- index 0000000..0efdd62
- --- /dev/null
- +++ b/sql/updates/r9999_scriptdev2.sql
- @@ -0,0 +1,41 @@
- +DELETE FROM script_texts WHERE entry BETWEEN -1000971 AND -1000963;
- +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
- +(-1000963,'Very well. Before we head down there, take a moment to prepare yourself.',0,0,0,0,'drijya SAY_DRIJYA_START'),
- +(-1000964,'Let\'s proceed at a brisk pace.',0,0,0,0,'drijya SAY_DRIJYA_1'),
- +(-1000965,'We\'ll start at that first energy pylon, straight ahead. Remember, try to keep them off of me.',0,0,0,0,'drijya SAY_DRIJYA_2'),
- +(-1000966,'Keep them off me!',0,0,0,0,'drijya SAY_DRIJYA_3'),
- +(-1000967,'I\'m done with this pylon. On to the next.',0,0,0,0,'drijya SAY_DRIJYA_4'),
- +(-1000968,'Alright, pylon two down. Now for the heat manifold.',0,0,0,0,'drijya SAY_DRIJYA_5'),
- +(-1000969,'That should do it. The teleporter should blow any second now !',0,0,0,0,'drijya SAY_DRIJYA_6'),
- +(-1000970,'Ok, let\'s get out of here!',0,0,0,0,'drijya SAY_DRIJYA_7'),
- +(-1000971,'Thank you, $n! I couldn\'t have done it without you. You\'ll let Gahruj know?',0,0,0,0,'drijya SAY_DRIJYA_COMPLETE');
- +
- +DELETE FROM script_waypoint WHERE entry=20281;
- +INSERT INTO script_waypoint VALUES
- +(20281, 0, 3096.416, 2801.408, 118.149, 10000, ''),
- +(20281, 1, 3096.516, 2801.065, 118.128, 0, ''),
- +(20281, 2, 3099.995, 2796.665, 118.118, 0, ''),
- +(20281, 3, 3098.759, 2786.174, 117.125, 0, ''),
- +(20281, 4, 3087.792, 2754.602, 115.441, 0, ''),
- +(20281, 5, 3080.718, 2730.793, 115.930, 9000, ''),
- +(20281, 6, 3060.235, 2731.306, 115.122, 0, ''),
- +(20281, 7, 3050.863, 2727.388, 114.054, 0, ''),
- +(20281, 8, 3052.113, 2728.104, 114.032, 8000, ''),
- +(20281, 9, 3055.008, 2724.972, 113.687, 0, ''),
- +(20281, 10, 3053.777, 2718.427, 113.684, 0, ''),
- +(20281, 11, 3028.622, 2693.375, 114.670, 0, ''),
- +(20281, 12, 3022.430, 2695.297, 113.406, 0, ''),
- +(20281, 13, 3024.591, 2694.684, 114.164, 8000, ''),
- +(20281, 14, 3025.463, 2700.755, 113.514, 0, ''),
- +(20281, 15, 3011.336, 2716.782, 113.691, 0, ''),
- +(20281, 16, 3010.882, 2726.991, 114.239, 0, ''),
- +(20281, 17, 3009.178, 2729.083, 114.324, 0, ''),
- +(20281, 18, 3011.358, 2727.707, 114.235, 25000, ''),
- +(20281, 19, 3012.583, 2728.452, 114.211, 0, ''),
- +(20281, 20, 3033.888, 2736.437, 114.369, 0, ''),
- +(20281, 21, 3071.492, 2741.502, 116.462, 0, ''),
- +(20281, 22, 3087.792, 2754.602, 115.441, 0, ''),
- +(20281, 23, 3094.505, 2770.198, 115.744, 0, ''),
- +(20281, 24, 3103.510, 2784.362, 116.857, 0, ''),
- +(20281, 25, 3099.995, 2796.665, 118.118, 0, ''),
- +(20281, 26, 3096.290, 2801.027, 118.096, 0, '');