From 91cb5663d00bb18066141fc78e4524b46d7fbf69 Mon Sep 17 00:00:00 2001 From: InnovationGuru Date: Mon, 30 Mar 2026 18:15:50 -0400 Subject: [PATCH] Implemented Storm on the Horizon --- .../crystalWar/Storm_on_the_Horizon.lua | 138 ++++++++++++++++++ sql/npc_list.sql | 2 +- 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 scripts/quests/crystalWar/Storm_on_the_Horizon.lua diff --git a/scripts/quests/crystalWar/Storm_on_the_Horizon.lua b/scripts/quests/crystalWar/Storm_on_the_Horizon.lua new file mode 100644 index 00000000000..f5dbe082762 --- /dev/null +++ b/scripts/quests/crystalWar/Storm_on_the_Horizon.lua @@ -0,0 +1,138 @@ +----------------------------------- +-- Storm on the Horizon +----------------------------------- +-- !addquest 7 35 +-- Blatherix : !pos -310 -12 -43 87 +-- Gentle Tiger : !pos -203 -9 0 87 +-- Monument : !pos 300 -63 497 88 +-- qm5 : !pos 260 33 515 89 +----------------------------------- + +local quest = Quest:new(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.STORM_ON_THE_HORIZON) + +quest.reward = +{ + item = xi.item.ICARUS_WING, +} + +quest.sections = +{ + -- Zone into Bastok Markets [S] from North Gustaberg [S] + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + player:hasCompletedQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.BURDEN_OF_SUSPICION) + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + onZoneIn = function(player, prevZone) + if + quest:getVar(player, 'Prog') == 1 and + prevZone == xi.zone.NORTH_GUSTABERG_S and + not quest:getMustZone(player) and + quest:getVar(player, 'Timer') <= VanadielUniqueDay() + then + return 56 + end + end, + + ['Blatherix'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') == 0 then + return quest:progressEvent(37) + else + return quest:event(38) + end + end, + }, + + onEventFinish = + { + [37] = function(player, csid, option, npc) + if npcUtil.giveItem(player, xi.item.ELIXIR) then + quest:setVar(player, 'Prog', 1) + quest:setVar(player, 'Timer', VanadielUniqueDay() + 1) + quest:setMustZone(player) + end + end, + + [56] = function(player, csid, option, npc) + quest:begin(player) + quest:setVar(player, 'Prog', 2) + end, + }, + }, + }, + + -- Gentle Tiger -> Monument -> Grauberg ??? reward/completion + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = + { + onTrigger = function(player, npc) + local questProgress = quest:getVar(player, 'Prog') + + if questProgress == 2 then + return quest:progressEvent(57) + elseif questProgress == 3 then + return quest:event(58) + end + end, + }, + + onEventFinish = + { + [57] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 3) + end, + } + }, + + [xi.zone.NORTH_GUSTABERG_S] = + { + ['Monument'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') == 3 then + return quest:progressEvent(4) + end + end, + }, + + onEventFinish = + { + [4] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 4) + end, + }, + }, + + [xi.zone.GRAUBERG_S] = + { + ['qm5'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') == 4 then + return quest:progressEvent(16) + end + end, + }, + + onEventFinish = + { + [16] = function(player, csid, option, npc) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/sql/npc_list.sql b/sql/npc_list.sql index 8cb009b2a24..12844a931a3 100644 --- a/sql/npc_list.sql +++ b/sql/npc_list.sql @@ -9876,7 +9876,7 @@ INSERT INTO `npc_list` VALUES (17138547,'Monument','Monument',99,299.929,-62.800 INSERT INTO `npc_list` VALUES (17138548,'Derek_Karst','Derek Karst',0,0.000,0.000,0.000,0,40,40,0,1,0,6,27,0x01000C01811071208530A240A250006000700000,32,'WOTG',1); INSERT INTO `npc_list` VALUES (17138549,'Pale_Eagle','Pale Eagle',0,0.000,0.000,0.000,0,40,40,0,0,0,6,27,0x0100060800103A203A303A403A505D6000700000,32,'WOTG',1); INSERT INTO `npc_list` VALUES (17138550,'Volker','Volker',128,0.626,-0.101,0.709,0,40,40,0,0,0,6,27,0x0000CC0800000000000000000000000000000000,32,'WOTG',1); --- NC: INSERT INTO `npc_list` VALUES (17138551,'NOT_CAPTURED',' ',0,0.000,0.000,0.000,0,50,50,0,0,0,0,0,0x0000320000000000000000000000000000000000,0,NULL,0); +INSERT INTO `npc_list` VALUES (17138551,'blank','',0,0.000,0.000,0.000,0,50,50,0,0,0,0,0,0x0000AB0400000000000000000000000000000000,0,'WOTG',1); INSERT INTO `npc_list` VALUES (17138552,'Klara','Klara',0,0.000,0.000,0.000,0,40,40,0,0,0,6,27,0x0000D50800000000000000000000000000000000,32,'WOTG',1); INSERT INTO `npc_list` VALUES (17138553,'Nicolaus','Nicolaus',0,0.000,0.000,0.000,0,40,40,0,0,0,6,27,0x0100070100108320003083408350006000700000,32,'WOTG',1); INSERT INTO `npc_list` VALUES (17138554,'blank','',0,0.000,0.000,0.000,0,40,40,0,0,0,6,27,0x0100060800103A203A303A403A505D603D710000,32,'WOTG',1);