Skip to content

Commit 93dbe07

Browse files
committed
Merge pull request #4594 from Valcorb/master
DB\Quests: Fix Plan B
2 parents 73f79c4 + c75564b commit 93dbe07

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
-- [Q] Plan B (11658)
2+
SET @ENTRY_GUARD := 25342; -- Dead Caravan Guard
3+
SET @ENTRY_WORKER := 25343; -- Dead Caravan Worker
4+
SET @ITEM := 34842; -- Warsong Outfit
5+
SET @GOSSIP_1 := 9155;
6+
SET @GOSSIP_2 := 9156;
7+
SET @QUEST := 11658; -- Plan B
8+
9+
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_1;
10+
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_2;
11+
INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
12+
(@GOSSIP_1, 12388),
13+
(@GOSSIP_2, 12389);
14+
15+
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_1;
16+
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_2;
17+
INSERT INTO `gossip_menu_option` VALUES
18+
(@GOSSIP_1, 0, 0, 'Retrieve Warsong Outfit.', 1, 1, 0, 0, 0, 0, ''),
19+
(@GOSSIP_2, 0, 0, 'Retrieve Warsong Outfit.', 1, 1, 0, 0, 0, 0, '');
20+
21+
UPDATE `creature_template` SET `npcflag`=`npcflag`|1 WHERE `entry` IN (@ENTRY_GUARD, @ENTRY_WORKER);
22+
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=25342 AND `id`=2534201;
23+
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=25343 AND `id`=2534301;
24+
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_GUARD, @ENTRY_WORKER);
25+
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_GUARD AND `source_type`=0;
26+
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_WORKER AND `source_type`=0;
27+
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`)
28+
VALUES
29+
(@ENTRY_GUARD, 0, 0, 1, 62, 0, 100, 0, @GOSSIP_1, 0, 0, 0, 56, @ITEM, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Guard - On Gossip Select - Add Item Warsong Outfit'),
30+
(@ENTRY_GUARD, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Guard - On Gossip Select - Forced Despawn'),
31+
(@ENTRY_WORKER, 0, 0, 1, 62, 0, 100, 0, @GOSSIP_2, 0, 0, 0, 56, @ITEM, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Worker - On Gossip Select - Add Item Warsong Outfit'),
32+
(@ENTRY_WORKER, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Worker - On Gossip Select - Forced Despawn');
33+
34+
-- Conditions
35+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP_1;
36+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP_2;
37+
INSERT INTO `conditions` VALUES
38+
(15, @GOSSIP_1, 0, 0, 9, @QUEST, 0, 0, 0, '', 'Only show gossip if player has quest Plan B'),
39+
(15, @GOSSIP_2, 0, 0, 9, @QUEST, 0, 0, 0, '', 'Only show gossip if player has quest Plan B'),
40+
(15, @GOSSIP_1, 0, 0, 2, @ITEM, 10, 0, 0, '', 'Only show gossip if player has less then 10 outfits'),
41+
(15, @GOSSIP_2, 0, 0, 2, @ITEM, 10, 0, 0, '', 'Only show gossip if player has less then 10 outfits');

0 commit comments

Comments
 (0)