mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Scripting/Storm Peaks: Quest 13285 "Forging the Keystone" now scripted.
Closes #6921
This commit is contained in:
53
sql/updates/world/2013_12_09_00_world_misc.sql
Normal file
53
sql/updates/world/2013_12_09_00_world_misc.sql
Normal file
@@ -0,0 +1,53 @@
|
||||
Fix for Quest 13285 "Forging the Keystone"
|
||||
|
||||
-- Missing Brann Bronzebeard spawn
|
||||
SET @GUID := 24;
|
||||
DELETE FROM `creature` WHERE `guid` IN (@GUID);
|
||||
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
|
||||
(@GUID,31810,571,1,1,0,1,7850.829,-1393.344,1534.143,5.88176,300,0,0,1,0,0);
|
||||
|
||||
-- Brann Bronzebeard creature update
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=10124,`minlevel`=80,`maxlevel`=80,`exp`=2,`npcflag`=3, `AIName`= '',ScriptName = 'npc_brann_bronzebeard' WHERE `entry`=31810;
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=31810;
|
||||
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(31810,0,0,1,0, '54500');
|
||||
|
||||
-- Add missing equipment for Brann Bronzebeard
|
||||
DELETE FROM `creature_equip_template` WHERE `entry`=31810;
|
||||
INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES (31810,1,1903,0,0);
|
||||
|
||||
-- Add Missing gossip for Brann Bronzebeard
|
||||
DELETE FROM `gossip_menu` WHERE (`entry`=10124 AND `text_id`=13641);
|
||||
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10124,13641);
|
||||
DELETE FROM `gossip_menu_option` WHERE (`menu_id`=10124);
|
||||
INSERT INTO `gossip_menu_option` (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, box_coded, box_money, box_text) VALUES
|
||||
(10124,0,0, 'I''m ready, Brann. Let''s make the keystone.',1,1,0,0,0,0, '');
|
||||
|
||||
-- Talk text for Brann Bronzebeard
|
||||
SET @ENTRY := 31810;
|
||||
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@ENTRY,0,0,'Let''s see if we can finish this keystone.',12,0,100,1,0,0, 'Brann Bronzebeard'),
|
||||
(@ENTRY,1,0,'The keystone is completed! We''ve done it, $N!',12,0,100,5,0,0, 'Brann Bronzebeard'),
|
||||
(@ENTRY,2,0,'Who knows what secrets await within Ulduar''s archives? I''m off to discover them. Thank you again for your help, $N. Without it, I''d still be searching for that key.',12,0,100,66,0,0, 'Brann Bronzebeard');
|
||||
|
||||
-- Spell "See Quest Brann Bronzebeard (TOI)" for quest "Forging the Keystone"
|
||||
DELETE FROM `spell_area` WHERE `spell`=60963;
|
||||
INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`,`quest_start_status`,`quest_end_status`) VALUES
|
||||
(60963, 4466, 13285, 0, 0, 0, 2, 1, 74, 11);
|
||||
|
||||
-- A Distant Voice creature update
|
||||
UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`unit_class`=2,`InhabitType`=4,`flags_extra`=`flags_extra`|128 WHERE `entry`=31814;
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=31814;
|
||||
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(31814,0,0,1,0, '35709');
|
||||
|
||||
-- Talk text for A Distant Voice
|
||||
SET @ENTRY := 31814;
|
||||
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@ENTRY,0,0,'Welcome, Brann Bronzebeard. I am all that remains of this temple''s guardian.',12,0,100,0,0,0, 'A Distant Voice'),
|
||||
(@ENTRY,1,0,'You have proven yourself as an explorer and seeker of knowledge.',12,0,100,0,0,0, 'A Distant Voice'),
|
||||
(@ENTRY,2,0,'You have been a steadfast ally to the Earthen.',12,0,100,0,0,0, 'A Distant Voice'),
|
||||
(@ENTRY,3,0,'You and your companion have proven yourselves in combat and in the pursuit of the keystone.',12,0,100,0,0,0, 'A Distant Voice'),
|
||||
(@ENTRY,4,0,'Your motives are pure. The keystone''s parts shall be reunited. Go to Ulduar and learn the answers to your questions, Brann Bronzebeard.',12,0,100,0,0,0, 'A Distant Voice');
|
||||
@@ -413,6 +413,181 @@ class npc_hyldsmeet_protodrake : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*#####
|
||||
# npc_brann_bronzebeard for Quest 13285 "Forging the Keystone"
|
||||
#####*/
|
||||
|
||||
enum BrannBronzebeard
|
||||
{
|
||||
NPC_BRANN_BRONZEBEARD = 31810,
|
||||
NPC_A_DISTANT_VOICE = 31814,
|
||||
OBJECT_TOL_SIGNAL_1 = 193590,
|
||||
OBJECT_TOL_SIGNAL_2 = 193591,
|
||||
OBJECT_TOL_SIGNAL_3 = 193592,
|
||||
OBJECT_TOL_SIGNAL_4 = 193593,
|
||||
OBJECT_TOL_SIGNAL_5 = 193594,
|
||||
SPELL_RESURRECTION = 58854,
|
||||
SAY_BRANN_1 = 0,
|
||||
SAY_BRANN_2 = 1,
|
||||
SAY_BRANN_3 = 2,
|
||||
SAY_VOICE_1 = 0,
|
||||
SAY_VOICE_2 = 1,
|
||||
SAY_VOICE_3 = 2,
|
||||
SAY_VOICE_4 = 3,
|
||||
SAY_VOICE_5 = 4,
|
||||
|
||||
EVENT_SCRIPT_1 = 1,
|
||||
EVENT_SCRIPT_2 = 2,
|
||||
EVENT_SCRIPT_3 = 3,
|
||||
EVENT_SCRIPT_4 = 4,
|
||||
EVENT_SCRIPT_5 = 5,
|
||||
EVENT_SCRIPT_6 = 6,
|
||||
EVENT_SCRIPT_7 = 7,
|
||||
EVENT_SCRIPT_8 = 8,
|
||||
EVENT_SCRIPT_9 = 9,
|
||||
EVENT_SCRIPT_10 = 10,
|
||||
EVENT_SCRIPT_11 = 11,
|
||||
EVENT_SCRIPT_12 = 12,
|
||||
EVENT_SCRIPT_13 = 13
|
||||
};
|
||||
|
||||
class npc_brann_bronzebeard : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_brann_bronzebeard() : CreatureScript("npc_brann_bronzebeard") { }
|
||||
|
||||
struct npc_brann_bronzebeardAI : public ScriptedAI
|
||||
{
|
||||
npc_brann_bronzebeardAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
memset(&objectGUID, 0, sizeof(objectGUID));
|
||||
playerGUID = 0;
|
||||
voiceGUID = 0;
|
||||
objectCounter = 0;
|
||||
}
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
playerGUID = player->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_1, 100);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SCRIPT_1:
|
||||
Talk(SAY_BRANN_1, playerGUID);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
if (Creature* voice = me->SummonCreature(NPC_A_DISTANT_VOICE, 7863.43f, -1396.585f, 1538.076f, 2.949606f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 49000))
|
||||
voiceGUID = voice->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_2, 4000);
|
||||
break;
|
||||
case EVENT_SCRIPT_2:
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePoint(0, 7861.488f, -1396.376f, 1534.059f, false);
|
||||
events.ScheduleEvent(EVENT_SCRIPT_3, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_3:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_WORK_MINING);
|
||||
events.ScheduleEvent(EVENT_SCRIPT_4, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_4:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
{
|
||||
voice->AI()->DoCast(voice, SPELL_RESURRECTION);
|
||||
voice->AI()->Talk(SAY_VOICE_1, playerGUID);
|
||||
}
|
||||
if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_1, 7860.273f, -1383.622f, 1538.302f, -1.658062f, 0, 0, -0.737277f, 0.6755905f, 0))
|
||||
objectGUID[objectCounter++] = go->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_5, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_5:
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
voice->AI()->Talk(SAY_VOICE_2, playerGUID);
|
||||
if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_2, 7875.67f, -1387.266f, 1538.323f, -2.373644f, 0, 0, -0.9271832f, 0.3746083f, 0))
|
||||
objectGUID[objectCounter++] = go->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_6, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_6:
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
voice->AI()->Talk(SAY_VOICE_3, playerGUID);
|
||||
if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_3, 7879.212f, -1401.175f, 1538.279f, 2.967041f, 0, 0, 0.9961939f, 0.08716504f, 0))
|
||||
objectGUID[objectCounter++] = go->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_7, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_7:
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
voice->AI()->Talk(SAY_VOICE_4, playerGUID);
|
||||
if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_4, 7868.944f, -1411.18f, 1538.213f, 2.111848f, 0, 0, 0.8703556f, 0.4924237f, 0))
|
||||
objectGUID[objectCounter++] = go->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_8, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_8:
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
voice->AI()->Talk(SAY_VOICE_5, playerGUID);
|
||||
if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_5, 7855.11f, -1406.839f, 1538.42f, 1.151916f, 0, 0, 0.5446386f, 0.8386708f, 0))
|
||||
objectGUID[objectCounter] = go->GetGUID();
|
||||
events.ScheduleEvent(EVENT_SCRIPT_9, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_9:
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
voice->AI()->DoCast(voice, SPELL_RESURRECTION);
|
||||
events.ScheduleEvent(EVENT_SCRIPT_10, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_10:
|
||||
Talk(SAY_BRANN_2, playerGUID);
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
|
||||
player->KilledMonsterCredit(me->GetEntry());
|
||||
events.ScheduleEvent(EVENT_SCRIPT_11, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_11:
|
||||
me->SetOrientation(2.932153f);
|
||||
me->SendMovementFlagUpdate(true);
|
||||
Talk(SAY_BRANN_3, playerGUID);
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, objectGUID[i]))
|
||||
go->Delete();
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SCRIPT_12, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_12:
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->SetWalk(false);
|
||||
me->GetMotionMaster()->MovePoint(0, 7799.908f, -1413.561f, 1534.829f, false);
|
||||
events.ScheduleEvent(EVENT_SCRIPT_13, 10000);
|
||||
break;
|
||||
case EVENT_SCRIPT_13:
|
||||
me->DisappearAndDie();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
uint64 playerGUID;
|
||||
uint64 objectGUID[5];
|
||||
uint64 voiceGUID;
|
||||
uint8 objectCounter;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_brann_bronzebeardAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
enum CloseRift
|
||||
{
|
||||
SPELL_DESPAWN_RIFT = 61665
|
||||
@@ -467,7 +642,7 @@ class spell_close_rift : public SpellScriptLoader
|
||||
enum JokkumScriptcast
|
||||
{
|
||||
SPELL_JOKKUM_KILL_CREDIT = 56545,
|
||||
SPELL_JOKKUM_SUMMON = 56541
|
||||
SPELL_JOKKUM_SUMMON = 56541,
|
||||
};
|
||||
|
||||
class spell_jokkum_scriptcast : public SpellScriptLoader
|
||||
@@ -514,6 +689,7 @@ void AddSC_storm_peaks()
|
||||
new npc_freed_protodrake();
|
||||
new npc_icefang();
|
||||
new npc_hyldsmeet_protodrake();
|
||||
new npc_brann_bronzebeard();
|
||||
new spell_close_rift();
|
||||
new spell_jokkum_scriptcast();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user