Skip to content

Commit

Permalink
[087] Implement Tribute Run event completion in Dire Maul
Browse files Browse the repository at this point in the history
Based on the work of @Tobschinski

Please note that the Broken Trap part is incomplete and requires more work.
Also there are other events, gossips and creature movements in the instance which are not covered here.
  • Loading branch information
xfurry committed Jan 13, 2015
1 parent c695bb3 commit 05d779e
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions Updates/087_instance_dm_north.sql
@@ -0,0 +1,93 @@
-- ######################
-- DM: Tribute run script
-- ######################

-- texts
SET @DB_STRING_ENTRY:=2000005822;
DELETE FROM db_script_string WHERE entry BETWEEN @DB_STRING_ENTRY AND @DB_STRING_ENTRY+1;
INSERT INTO db_script_string (entry,content_default,sound,type,language,emote,comment) VALUES
(@DB_STRING_ENTRY+0,'OH NOES! Da king is dead! Uh... hail to da new king! Yeah!',0,1,0,0,'mizzle the crafty - new king 1'),
(@DB_STRING_ENTRY+1,'Yar, he\'s dead all right. That makes you da new king... well, all of you! Gordok is yours now, boss! You should talk to me so you can learn everything there is about being da king! I was... is his assistant! Yeah, that\'s why I\'m called da crafty one!',0,0,0,0,'mizzle the crafty - new king 2');

-- movement
DELETE FROM creature_movement_template WHERE entry=14353;
INSERT INTO creature_movement_template (entry,point,position_x,position_y,position_z,waittime,script_id,orientation) VALUES
(14353, 1, 683.2966, 484.3845, 29.54451, 0, 1435301, 0.017),
(14353, 2, 728.9432, 483.2973, 28.18182, 0, 0, 0),
(14353, 3, 757.3987, 482.5078, 28.17787, 0, 0, 0),
(14353, 4, 768.0496, 482.5014, 29.54162, 0, 0, 0),
(14353, 5, 778.0708, 482.7376, 34.93199, 0, 0, 0),
(14353, 6, 784.5805, 481.7013, 37.19804, 0, 0, 0),
(14353, 7, 816.5302, 482.3017, 37.31819, 1000, 1435307, 3.159),
(14353, 8, 816.5302, 482.3017, 37.31819, 1000, 1435308, 3.159);

-- movement script
DELETE FROM dbscripts_on_creature_movement WHERE id IN (1435301,1435307,1435308);
INSERT INTO dbscripts_on_creature_movement (id,delay,command,datalong,datalong2,buddy_entry,search_radius,data_flags,dataint,comments) VALUES
(1435301,1,0,0,0,0,0,0,@DB_STRING_ENTRY+0,'Mizzle - say new king 1'),
(1435307,0,32,1,0,0,0,0,0,'Mizzle - pause WP Movement'),
(1435307,0,0,0,0,0,0,0,@DB_STRING_ENTRY+1,'Mizzle - say new king 2'),
(1435308,0,32,1,0,0,0,0,0,'Mizzle - pause WP Movement'),
(1435308,0,9,35834,3600,0,0,0,0,'Mizzle - spawn tribute chest');

-- gossip conditions
SET @DB_CONDITION:=976;
DELETE FROM conditions WHERE condition_entry BETWEEN @DB_CONDITION+0 AND @DB_CONDITION+3;
INSERT INTO conditions VALUES
(@DB_CONDITION+0,1,22799,0), -- has King of Gortok aura
(@DB_CONDITION+1,-3,@DB_CONDITION+0,0), -- has not King of Gortok aura
(@DB_CONDITION+2,33,7,0), -- has WP == 7
(@DB_CONDITION+3,-1,@DB_CONDITION+0,@DB_CONDITION+2); -- has WP == 7 and has King of Gortok aura

-- gossip
UPDATE gossip_menu SET condition_id=@DB_CONDITION+1 WHERE entry=5708 AND text_id=6876;
UPDATE gossip_menu SET condition_id=@DB_CONDITION+3 WHERE entry=5708 AND text_id=6895;
UPDATE gossip_menu_option SET condition_id=@DB_CONDITION+1, action_script_id=570801 WHERE menu_id=5708 AND id=0;
UPDATE gossip_menu_option SET condition_id=@DB_CONDITION+3 WHERE menu_id=5708 AND id=1;
UPDATE gossip_menu_option SET action_script_id=574001 WHERE menu_id=5740;

-- gossip scripts
DELETE FROM dbscripts_on_gossip WHERE id IN (570801,574001);
INSERT INTO dbscripts_on_gossip (id,delay,command,datalong,datalong2,buddy_entry,search_radius,data_flags,dataint,comments) VALUES
(570801,0,15,22799,0,0,0,0,0,'Mizzle - cast King of the Gordok'),
(574001,0,32,0,0,0,0,0,0,'Mizzle - resume WP Movement');



-- Misc updates

-- link last 2 bosses
DELETE FROM creature_linking_template WHERE entry=14324;
INSERT INTO creature_linking_template VALUES
(14324,429,11501,3,0);

-- Delete Mizzle duplicate (summoned)
DELETE FROM creature WHERE guid=125640;
-- Tribute chest is despawned
UPDATE gameobject SET spawntimesecs=-7200 WHERE guid=35834;
-- Doors flags (thanks to Schmoozerd)
UPDATE gameobject_template SET flags=34 WHERE entry IN (177217,177219);
-- Creatures factions fix
UPDATE creature_template SET FactionAlliance=45, FactionHorde=45 WHERE entry IN (14326,14321,14323);



-- Broken Trap quest (partially complete - requires more research and investigation)
-- spell script target
DELETE FROM spell_script_target WHERE entry=5249;
INSERT INTO spell_script_target VALUES
(5249,1,14323,0);
-- ToDo: script spell 5249 to freeze npc 14323 and despawn the traps

-- Fixed trap GO spawn
DELETE FROM gameobject WHERE guid=121926;
INSERT INTO gameobject (guid,id,map,spawnMask,phaseMask,position_x,position_y,position_z,orientation,rotation0,rotation1,rotation2,rotation3,spawntimesecs,animprogress,state) VALUES
(121926, 179512, 429, 1, 1, 558.652, 550.057, -25.4008, 0, 0, 0, -0.771625, 0.636078, -7200, 255, 1);
-- ToDo: fix GO data (faction and radius)

-- Broken trap script
UPDATE quest_template SET CompleteScript=1193 WHERE entry=1193;
DELETE FROM dbscripts_on_quest_end WHERE id IN (1193);
INSERT INTO dbscripts_on_quest_end (id,delay,command,datalong,datalong2,buddy_entry,search_radius,data_flags,dataint,comments) VALUES
(1193,0,9,121926,3600,0,0,0,0,'spawn Fixed trap');
-- ToDo: this part might require updates (such as despawn the Quest provider GO)

This comment has been minimized.

Copy link
@cala

cala Jan 26, 2015

Contributor

Could we also lock the quest providing GO to prevent players from using it again?

This comment has been minimized.

Copy link
@xfurry

xfurry Jan 26, 2015

Author Contributor

Could we also lock the quest providing GO to prevent players from using it again?

I think we need to despawn it. Please check in sniff what is supposed to happen.

0 comments on commit 05d779e

Please sign in to comment.