diff options
author | Subv <s.v.h21@hotmail.com> | 2012-08-12 12:18:02 -0500 |
---|---|---|
committer | Subv <s.v.h21@hotmail.com> | 2012-08-12 12:20:51 -0500 |
commit | 7d75c2818df5545e1633d20403be1c640fcde410 (patch) | |
tree | 1f4d83496ab1ea4aa881ba7275c5172b17a78592 | |
parent | a09369991a5d4811e5d5c95411a7df5d78a40919 (diff) |
Scripts/Quests: Removed some deprecated scripts and fixed quest 26050
-rw-r--r-- | sql/updates/world/2012_08_17_00_world_misc_434.sql | 38 | ||||
-rwxr-xr-x | src/server/game/Scripting/ScriptLoader.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/arathi_highlands.cpp | 63 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/boss_kruul.cpp | 160 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/burning_steppes.cpp | 128 |
6 files changed, 82 insertions, 310 deletions
diff --git a/sql/updates/world/2012_08_17_00_world_misc_434.sql b/sql/updates/world/2012_08_17_00_world_misc_434.sql new file mode 100644 index 00000000000..aa6c11ee1f8 --- /dev/null +++ b/sql/updates/world/2012_08_17_00_world_misc_434.sql @@ -0,0 +1,38 @@ +DELETE FROM `creature_text` WHERE `entry`=2768; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(2768,0,0,'Ok, $N. Follow me to the cave where I''ll attempt to harness the power of the rune stone into these goggles.',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_1'), +(2768,1,0,'I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage.',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_2'), +(2768,2,0,'I''ll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me.',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_3'), +(2768,3,0,'%s begins tinkering with the goggles before the stone.',16,0,100,0,0,0,'Professor Phizzlethorpe - EMOTE_PROGRESS_4'), +(2768,4,0,'Help!!! Get these things off me so I can get my work done!',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_AGGRO'), +(2768,5,0,'Almost done! Just a little longer!',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_5'), +(2768,6,0,'I''ve done it! I have harnessed the power of the stone into the goggles! Let''s get out of here!',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_6'), +(2768,7,0,'Phew! Glad to be back from that creepy cave.',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_7'), +(2768,8,0,'%s hands one glowing goggles over to Doctor Draxlegauge.',16,0,100,0,0,0,'Professor Phizzlethorpe - EMOTE_PROGRESS_8'), +(2768,9,0,'Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!',12,0,100,0,0,0,'Professor Phizzlethorpe - SAY_PROGRESS_9'); + +DELETE FROM `script_waypoint` WHERE `entry`=2768; +INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES +(2768,1,-2072.32,-2089.59,9.14603,0,''), +(2768,2,-2078.18,-2096.31,10.8916,0,''), +(2768,3,-2079.21,-2105.22,13.3174,0,''), +(2768,4,-2074.81,-2108.72,14.1485,0,''), +(2768,5,-2076,-2116.21,16.3934,0,''), +(2768,6,-2073.31,-2123.92,18.6202,4000,''), +(2768,7,-2064.41,-2133.33,21.5776,0,''), +(2768,8,-2044.08,-2153.12,20.121,18000,''), +(2768,9,-2044.08,-2153.12,20.121,3000,''), +(2768,10,-2044.08,-2153.12,20.121,0,''), +(2768,11,-2044.08,-2153.12,20.121,14000,''), +(2768,12,-2063.89,-2133.33,21.5648,0,''), +(2768,13,-2075,-2121.98,17.8443,0,''), +(2768,14,-2074.83,-2108.53,14.1036,0,''), +(2768,15,-2079.59,-2091.61,9.80862,0,''), +(2768,16,-2071.29,-2086.44,8.5181,0,''), +(2768,17,-2066.46,-2085.97,8.9241,7000,''); + +DELETE FROM `creature_questrelation` WHERE `id`=2768 AND `quest`=26050; +INSERT INTO `creature_questrelation` (`id`, `quest`) +VALUES (2768, 26050); + +UPDATE `creature_template` SET `ScriptName`='npc_professor_phizzlethorpe' WHERE `entry`=2768;
\ No newline at end of file diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 128d28a9954..2db840bf39a 100755 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -245,7 +245,6 @@ void AddSC_instance_zulgurub(); //void AddSC_alterac_mountains(); void AddSC_arathi_highlands(); void AddSC_blasted_lands(); -void AddSC_boss_kruul(); void AddSC_burning_steppes(); void AddSC_duskwood(); void AddSC_eastern_plaguelands(); @@ -865,7 +864,6 @@ void AddEasternKingdomsScripts() //AddSC_alterac_mountains(); AddSC_arathi_highlands(); AddSC_blasted_lands(); - AddSC_boss_kruul(); AddSC_burning_steppes(); AddSC_duskwood(); AddSC_eastern_plaguelands(); diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt index 5dc3b52dec1..de3e6ae32a6 100644 --- a/src/server/scripts/EasternKingdoms/CMakeLists.txt +++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt @@ -32,7 +32,6 @@ set(scripts_STAT_SRCS EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp EasternKingdoms/isle_of_queldanas.cpp - EasternKingdoms/boss_kruul.cpp EasternKingdoms/ZulGurub/boss_hakkar.cpp EasternKingdoms/ZulGurub/boss_mandokir.cpp EasternKingdoms/ZulGurub/boss_marli.cpp diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp index b0d59fe8b5a..9db03971756 100644 --- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp @@ -47,8 +47,12 @@ enum eEnums SAY_PROGRESS_7 = 7, EMOTE_PROGRESS_8 = 8, SAY_PROGRESS_9 = 9, + + EVENT_SAY_3 = 1, + EVENT_SAY_6 = 2, + EVENT_SAY_8 = 3, - QUEST_SUNKEN_TREASURE = 665, + QUEST_GOGGLE_BOGGLE = 26050, MOB_VENGEFUL_SURGE = 2776 }; @@ -73,33 +77,22 @@ class npc_professor_phizzlethorpe : public CreatureScript switch (waypointId) { - case 4: + case 6: Talk(SAY_PROGRESS_2, player->GetGUID()); - break; - case 5: - Talk(SAY_PROGRESS_3, player->GetGUID()); + events.ScheduleEvent(EVENT_SAY_3, 3000); break; case 8: Talk(EMOTE_PROGRESS_4); - break; - case 9: - me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); - me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); - break; - case 10: - Talk(SAY_PROGRESS_5, player->GetGUID()); + me->SummonCreature(MOB_VENGEFUL_SURGE, -2065.505f, -2136.88f, 22.20362f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + me->SummonCreature(MOB_VENGEFUL_SURGE, -2059.249f, -2134.88f, 21.51582f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); break; case 11: - Talk(SAY_PROGRESS_6, player->GetGUID()); - SetRun(); + Talk(SAY_PROGRESS_5, player->GetGUID()); + events.ScheduleEvent(EVENT_SAY_6, 11000); break; - case 19: + case 17: Talk(SAY_PROGRESS_7, player->GetGUID()); - break; - case 20: - Talk(EMOTE_PROGRESS_8); - Talk(SAY_PROGRESS_9, player->GetGUID()); - player->GroupEventHappens(QUEST_SUNKEN_TREASURE, me); + events.ScheduleEvent(EVENT_SAY_8, 6000); break; } } @@ -116,8 +109,34 @@ class npc_professor_phizzlethorpe : public CreatureScript void UpdateAI(const uint32 diff) { + Player* player = GetPlayerForEscort(); + if (!player) + return; + + events.Update(diff); + + while (uint32 event = events.ExecuteEvent()) + { + switch (event) + { + case EVENT_SAY_3: + Talk(SAY_PROGRESS_3, player->GetGUID()); + break; + case EVENT_SAY_6: + Talk(SAY_PROGRESS_6, player->GetGUID()); + SetRun(); + break; + case EVENT_SAY_8: + Talk(EMOTE_PROGRESS_8); + Talk(SAY_PROGRESS_9, player->GetGUID()); + player->GroupEventHappens(QUEST_GOGGLE_BOGGLE, me); + break; + } + } npc_escortAI::UpdateAI(diff); } + + EventMap events; }; CreatureAI* GetAI(Creature* creature) const @@ -127,13 +146,13 @@ class npc_professor_phizzlethorpe : public CreatureScript bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { - if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE) + if (quest->GetQuestId() == QUEST_GOGGLE_BOGGLE) { creature->AI()->Talk(SAY_PROGRESS_1, player->GetGUID()); if (npc_escortAI* pEscortAI = CAST_AI(npc_professor_phizzlethorpeAI, (creature->AI()))) pEscortAI->Start(false, false, player->GetGUID(), quest); - creature->setFaction(113); + creature->setFaction(42); } return true; } diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp deleted file mode 100644 index 6a1ba633660..00000000000 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 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, see <http://www.gnu.org/licenses/>. - */ - -/* ScriptData -SDName: Boss_Kruul -SD%Complete: 100 -SDComment: Highlord Kruul are presumably no longer in-game on regular bases, however future events could bring him back. -SDCategory: Bosses -EndScriptData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" - -#define SPELL_SHADOWVOLLEY 21341 -#define SPELL_CLEAVE 20677 -#define SPELL_THUNDERCLAP 23931 -#define SPELL_TWISTEDREFLECTION 21063 -#define SPELL_VOIDBOLT 21066 -#define SPELL_RAGE 21340 -#define SPELL_CAPTURESOUL 21054 - -class boss_kruul : public CreatureScript -{ -public: - boss_kruul() : CreatureScript("boss_kruul") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_kruulAI (creature); - } - - struct boss_kruulAI : public ScriptedAI - { - boss_kruulAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowVolley_Timer; - uint32 Cleave_Timer; - uint32 ThunderClap_Timer; - uint32 TwistedReflection_Timer; - uint32 VoidBolt_Timer; - uint32 Rage_Timer; - uint32 Hound_Timer; - - void Reset() - { - ShadowVolley_Timer = 10000; - Cleave_Timer = 14000; - ThunderClap_Timer = 20000; - TwistedReflection_Timer = 25000; - VoidBolt_Timer = 30000; - Rage_Timer = 60000; //Cast rage after 1 minute - Hound_Timer = 8000; - } - - void EnterCombat(Unit* /*who*/) - { - } - - void KilledUnit(Unit* /*victim*/) - { - // When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70, 000 health. - DoCast(me, SPELL_CAPTURESOUL); - } - - void SummonHounds(Unit* victim) - { - if (Creature* Hound = DoSpawnCreature(19207, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000)) - Hound->AI()->AttackStart(victim); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //ShadowVolley_Timer - if (ShadowVolley_Timer <= diff) - { - if (urand(0, 99) < 45) - DoCast(me->getVictim(), SPELL_SHADOWVOLLEY); - - ShadowVolley_Timer = 5000; - } else ShadowVolley_Timer -= diff; - - //Cleave_Timer - if (Cleave_Timer <= diff) - { - if (urand(0, 1)) - DoCast(me->getVictim(), SPELL_CLEAVE); - - Cleave_Timer = 10000; - } else Cleave_Timer -= diff; - - //ThunderClap_Timer - if (ThunderClap_Timer <= diff) - { - if (urand(0, 9) < 2) - DoCast(me->getVictim(), SPELL_THUNDERCLAP); - - ThunderClap_Timer = 12000; - } else ThunderClap_Timer -= diff; - - //TwistedReflection_Timer - if (TwistedReflection_Timer <= diff) - { - DoCast(me->getVictim(), SPELL_TWISTEDREFLECTION); - TwistedReflection_Timer = 30000; - } else TwistedReflection_Timer -= diff; - - //VoidBolt_Timer - if (VoidBolt_Timer <= diff) - { - if (urand(0, 9) < 4) - DoCast(me->getVictim(), SPELL_VOIDBOLT); - - VoidBolt_Timer = 18000; - } else VoidBolt_Timer -= diff; - - //Rage_Timer - if (Rage_Timer <= diff) - { - DoCast(me, SPELL_RAGE); - Rage_Timer = 70000; - } else Rage_Timer -= diff; - - //Hound_Timer - if (Hound_Timer <= diff) - { - SummonHounds(me->getVictim()); - SummonHounds(me->getVictim()); - SummonHounds(me->getVictim()); - - Hound_Timer = 45000; - } else Hound_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; -}; - -void AddSC_boss_kruul() -{ - new boss_kruul(); -} diff --git a/src/server/scripts/EasternKingdoms/burning_steppes.cpp b/src/server/scripts/EasternKingdoms/burning_steppes.cpp index eec747d6d73..3f8e86753dd 100644 --- a/src/server/scripts/EasternKingdoms/burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/burning_steppes.cpp @@ -18,140 +18,18 @@ /* ScriptData SDName: Burning_Steppes -SD%Complete: 100 -SDComment: Quest support: 4224, 4866 +SD%Complete: 0 +SDComment: SDCategory: Burning Steppes EndScriptData */ -/* ContentData -npc_ragged_john -EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -/*###### -## npc_ragged_john -######*/ - -#define GOSSIP_HELLO "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him." -#define GOSSIP_SELECT1 "So what did you do?" -#define GOSSIP_SELECT2 "Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'." -#define GOSSIP_SELECT3 "Ironfoe?" -#define GOSSIP_SELECT4 "Interesting... continue John." -#define GOSSIP_SELECT5 "So that's how Windsor died..." -#define GOSSIP_SELECT6 "So how did he die?" -#define GOSSIP_SELECT7 "Ok so where the hell is he? Wait a minute! Are you drunk?" -#define GOSSIP_SELECT8 "WHY is he in Blackrock Depths?" -#define GOSSIP_SELECT9 "300? So the Dark Irons killed him and dragged him into the Depths?" -#define GOSSIP_SELECT10 "Ahh... Ironfoe" -#define GOSSIP_SELECT11 "Thanks, Ragged John. Your story was very uplifting and informative" - -class npc_ragged_john : public CreatureScript -{ -public: - npc_ragged_john() : CreatureScript("npc_ragged_john") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(2714, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(2715, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->SEND_GOSSIP_MENU(2716, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->SEND_GOSSIP_MENU(2717, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - player->SEND_GOSSIP_MENU(2718, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->SEND_GOSSIP_MENU(2719, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - player->SEND_GOSSIP_MENU(2720, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); - player->SEND_GOSSIP_MENU(2721, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+8: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); - player->SEND_GOSSIP_MENU(2722, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+9: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); - player->SEND_GOSSIP_MENU(2723, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+10: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - player->SEND_GOSSIP_MENU(2725, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+11: - player->CLOSE_GOSSIP_MENU(); - player->AreaExploredOrEventHappens(4224); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (creature->isQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - player->SEND_GOSSIP_MENU(2713, creature->GetGUID()); - return true; - } - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_ragged_johnAI (creature); - } - - struct npc_ragged_johnAI : public ScriptedAI - { - npc_ragged_johnAI(Creature* creature) : ScriptedAI(creature) {} - - void Reset() {} - - void MoveInLineOfSight(Unit* who) - { - if (who->HasAura(16468)) - { - if (who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 15) && who->isInAccessiblePlaceFor(me)) - { - DoCast(who, 16472); - CAST_PLR(who)->AreaExploredOrEventHappens(4866); - } - } - - ScriptedAI::MoveInLineOfSight(who); - } - - void EnterCombat(Unit* /*who*/) {} - }; -}; void AddSC_burning_steppes() { - new npc_ragged_john(); + } |