{Quest} Betrayal

Hi, i’d like to share my repair of Betrayal quest. This is my first fix posting on this forum and I tried to stick to the rules. However, I didn’t find the rules of ID and GUID… In addition, scripts are done barefoot EventAI not only in Smartscripts. So please comment on the modifications, would be a shame to throw away completely.

[CODE]SET @ENTRY := 28503; – Overlord Drakuru Entry
DELETE FROM gossip_menu WHERE entry=@ENTRY;
DELETE FROM gossip_menu_option WHERE menu_id=@ENTRY;
DELETE FROM gossip_scripts WHERE id=@ENTRY;
– add gossip menu for Overlord Dakuru
INSERT INTO gossip_menu (entry,text_id) VALUES
(@ENTRY, 13422);
INSERT INTO gossip_menu_option (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, action_script_id, box_coded, box_money, box_text)VALUES
(@ENTRY,0,0,“I am ready to accompany you. Drakkuru”,1,1,0,0,@ENTRY,0,0,‘’),
(@ENTRY,1,0,“GOSSIP_OPTION_QUESTGIVER”,2,2,0,0,0,0,0,‘’);
INSERT INTO gossip_scripts (id, delay, command, datalong, datalong2, dataint, x, y, z, o) VALUES
(@ENTRY,3,10,28998,60000,0,6181.63,-2019.19,590.87,2.74), – summon drakuru at top the voltarus
(@ENTRY,0,15,52863,1,0,0,0,0,0); – cast Drakuru Betrayal Teleport, teleport player to him
INSERT INTO spell_target_position VALUES
– condition for drakuru gossip, avaiablae after player complete previous questline
DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup =28503;
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName) VALUES
(‘15’,‘28503’,‘0’,‘0’,‘9’,‘12713’,‘0’,‘0’,‘0’,‘’);
(52863,571,6165.81,-2012.27,590.88,5.87); – Insert teleportation position for spell Drakuru Betrayal Teleport

– insert text for EventAI scripts for Overlord Drakuru and Lich King
INSERT INTO creature_ai_texts (entry,content_default,sound,TYPE,COMMENT) VALUES
(-11000,‘Behold, mon! We be creatin da greatest Scourge army ever seen!’,14023,0,‘Drakuru say’),
(-11001,‘These be da FIRST of many! We shall sweep across ZulDrak LIKE da wind…’,14024,0,‘Drakuru say’),
(-11002,‘What treachery IS this? You be payin FOR this deceit WITH your life, mon!’,14025,0,‘Drakuru say’),
(-11003,‘Ya done turned your back ON destiny, mon. NOW you gunna die!’,14029,1,‘Drakuru say’),
(-11004,‘Fool! Ya coulda been havin great POWER, mon!’,14026,1,‘Drakuru say’),
(-11005,‘I shoulda known NOT TO be trustin nobody!’,14028,1,‘Drakuru say’),
(-11006,‘Your betrayal NOT gunna be slowin me down NONE, mon.’,14030,1,‘Drakuru say’),
(-11007,‘I never needed ya, mon. I can crush ZulDrak without ya!’,14031,1,‘Drakuru say’),
(-11008,‘How could dis be? Da Lich King said he be havin great plans FOR you, mon…’,14027,1,‘Drakuru say’),
(-11009,‘ENOUGH!’,14020,1,‘Drakuru say’),
(-110010,‘MASTER, dis mortal scum be DOUBLE-crossin us. Dey must be made TO suffer!’,14022,0,‘Drakuru say’),
(-110011,‘You have failed me, Drakuru!’,14762,0,‘TLK say’),
(-110012,‘It IS you who should suffer. Be content that your death IS a QUICK one…’,14763,0,‘TLK say’),
(-110013,‘AS FOR you…’,14764,0,‘TLK say’),
(-110014,‘I spare your insignificant life AS a reward FOR this amusing betrayal. There may yet be a shred IN potential IN you.’,14765,0,‘TLK say’),
(-110015,‘Be warned…’,14766,0,‘TLK say’),
(-110016,‘WHEN NEXT we meet I shall REQUIRE much more TO justify your life.’,14767,0,‘TLK say’);

– Overlord Drakuru eventai
SET @cid := 28998;
DELETE FROM creature_ai_scripts WHERE (creature_id=@cid);
INSERT INTO creature_ai_scripts VALUES
(2899801,@cid,1,4,100,0,5000,5000,0,0,1,-11000,0,0,5,378,0,0,32,28931,0,2893001,‘Overlord Drakuru - OOC - say,emote & summon Blightblood Troll’),
(2899802,@cid,1,4,100,0,7000,7000,0,0,0,0,0,0,0,0,0,0,32,28931,0,2893002,‘Overlord Drakuru - OOC - summon Blightblood Troll’),
(2899803,@cid,1,4,100,0,10000,10000,0,0,0,0,0,0,0,0,0,0,32,28931,0,2893003,‘Overlord Drakuru - OOC - summon Blightblood Troll’),
(2899804,@cid,1,4,100,0,13000,13000,0,0,1,-11001,0,0,5,1,0,0,32,28931,0,2893004,‘Overlord Drakuru - OOC - summon Blightblood Troll’),
(2899806,@cid,1,4,100,0,23000,23000,0,0,1,-11002,0,0,2,14,0,0,5,1,0,0,‘Overlord Drakuru - OOC - say,drakuru & become hostile)’),
(2899807,@cid,0,4,100,0,15000,25000,0,0,1,-11006,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat say’),
(2899808,@cid,0,4,100,0,10000,15000,0,0,1,-11003,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat say’),
(2899809,@cid,0,4,100,0,28000,38000,0,0,1,-11007,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat say’),
(2899810,@cid,0,4,100,0,23000,27000,0,0,1,-11004,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat say’),
(2899811,@cid,0,4,100,0,40000,42000,0,0,1,-11008,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat say’),
(2899812,@cid,2,0,100,0,4,1,0,0,18,33956676,0,0,21,0,0,0,22,2,0,0,‘Overlord Drakuru - in 3% health stop combat, become unatackable and switch to phase2’),
(2899814,@cid,0,11,100,0,1000,1000,0,0,1,-11009,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - phase 2 - say’),
(2899816,@cid,0,11,100,0,6000,6000,0,0,1,-11005,0,0,32,28498,0,284981,0,0,0,0,‘Overlord Drakuru - phase 2 - say,summon lich king’),
(2899818,@cid,0,11,100,0,16000,16000,0,0,1,-110010,0,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - phase 2 - say’),
(2899820,@cid,0,11,100,0,43000,43000,0,0,0,0,0,0,11,54248,0,16,0,0,0,0,‘Overlord Drakuru - phase 2 - cast drakkuru death’),
(2899821,@cid,0,11,100,0,44000,44000,0,0,11,54253,0,16,41,0,0,0,0,0,0,0,‘Overlord Drakuru - phase 2 - cast spawn drakkuru skuul and force despawn’),
(2899825,@cid,0,0,100,1,10000,15000,6000,15000,11,54087,2,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat - cast blight crystal’),
(2899826,@cid,0,0,100,1,10000,15000,5000,15000,11,54113,4,0,0,0,0,0,0,0,0,0,‘Overlord Drakuru - combat - cast shadow bolt’);

– EventAI for Lich King which appears at roof of voltarus
SET @cid := 28498;
DELETE FROMcreature_ai_scripts WHERE (creature_id=@cid);
INSERT INTOcreature_ai_scripts (id,creature_id,event_type,event_inverse_phase_mask,event_chance,event_flags,event_param1,event_param2,event_param3,event_param4,action1_type,action1_param1,action1_param2,action1_param3,action2_type,action2_param1,action2_param2,action2_param3,action3_type,action3_param1,action3_param2,action3_param3,comment)VALUES
(2849801,@cid,11,0,100,0,0,0,0,0,11,51807,0,16,18,33686340,0,0,0,0,0,0,‘TLK - summons cast Arthas Portal and make self untargetable’),
(2849802,@cid,1,0,100,0,17000,17000,0,0,1,-110011,0,0,5,1,0,0,0,0,0,0,‘TLK - say text to drakuru’),
(2849804,@cid,1,0,100,0,25000,25000,0,0,1,-110012,0,0,5,25,0,0,0,0,0,0,‘TLK - say text to drakuru’),
(2849806,@cid,1,0,100,0,32000,32000,0,0,5,463,0,16,0,0,0,0,0,0,0,0,‘TLK - emote’),
(2849807,@cid,1,0,100,0,33000,33000,0,0,11,51825,0,0,0,0,0,0,0,0,0,0,‘TLK - cast Arthas Scourge Drakuru’),
(28498010,@cid,1,0,100,0,39000,39000,0,0,1,-110013,0,0,5,25,0,0,0,0,0,0,‘TLK - say text to drakuru’),
(28498012,@cid,1,0,100,0,44000,44000,0,0,1,-110014,0,0,5,378,0,0,0,0,0,0,‘TLK - say text to drakuru’),
(28498014,@cid,1,0,100,0,59000,59000,0,0,1,-110015,0,0,5,1,0,0,0,0,0,0,‘TLK - say text to drakuru’),
(28498016,@cid,1,0,100,0,64000,64000,0,0,1,-110016,0,0,5,1,0,0,0,0,0,0,‘TLK - say text to drakuru’),
(28498018,@cid,1,0,100,0,72000,72000,0,0,41,0,0,0,0,0,0,0,0,0,0,0,‘TLK - Force despawn self’);

INSERT INTO creature_ai_summons (id,position_x,position_y,position_z,orientation,spawntimesecs,comment) VALUES
(‘2893001’,‘6222.865234’,‘-2026.533936’,‘586.759216’,‘2.598638’,‘240000’,‘position for blightblood troll summon’),
(‘2893002’,‘6184.201172’,‘-1969.864380’,‘586.759460’,‘4.078330’,‘240000’,‘position for blightblood troll summon’),
(‘2893003’,‘6127.485840’,‘-2008.546143’,‘586.759766’,‘5.861971’,‘240000’,‘position for blightblood troll summon’),
(‘2893004’,‘6166.171387’,‘-2065.311523’,‘586.759033’,‘1.056119’,‘240000’,‘position for blightblood troll summon’),
(‘284981’,‘6147.79’,‘-2012.28’,‘590.87’,‘6.09’,‘72000’,‘position for Lich King summon’);

[/sql][/CODE]

Sorry, but EventAI is deprecated and this never goes to enter on core on this way, you need to make it SmartAI.

also, menu_id is not a random value you assign, it is taken from sniffs

I tried this script some time ago and it worked very well! Someone should try to convert it to SAI

Removed uneeded custom npc_text id. Data for that line already existed in DB…

(Nice bump /emoticons/default_tongue.png)

Converting.

Has this been converted yet? I’ve been a long time absent.