From d9336ca974be3960152983c3c75bc48df77a6ad9 Mon Sep 17 00:00:00 2001 From: Aeshur Date: Tue, 21 Apr 2026 15:07:08 -0400 Subject: [PATCH] [lua] Honor Under Fire quest --- scripts/globals/quests.lua | 2 +- .../quests/crystalWar/Honor_Under_Fire.lua | 208 ++++++++++++++++++ .../quests/crystalWar/Quelling_the_Storm.lua | 6 +- 3 files changed, 212 insertions(+), 4 deletions(-) create mode 100644 scripts/quests/crystalWar/Honor_Under_Fire.lua diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index 55c73c244df..7ef6bacf2d4 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -749,7 +749,7 @@ xi.quest.id = A_FEAST_FOR_GNATS = 40, SAY_IT_WITH_A_HANDBAG = 41, -- + TODO: Can be completed, but reward latent not implemented QUELLING_THE_STORM = 42, -- + Converted - HONOR_UNDER_FIRE = 43, + HONOR_UNDER_FIRE = 43, -- + Converted THE_PRICE_OF_VALOR = 44, -- + Converted BONDS_THAT_NEVER_DIE = 45, -- + Converted THE_LONG_MARCH_NORTH = 46, diff --git a/scripts/quests/crystalWar/Honor_Under_Fire.lua b/scripts/quests/crystalWar/Honor_Under_Fire.lua new file mode 100644 index 00000000000..a141853a248 --- /dev/null +++ b/scripts/quests/crystalWar/Honor_Under_Fire.lua @@ -0,0 +1,208 @@ +----------------------------------- +-- Honor Under Fire +----------------------------------- +-- !addquest 7 43 +-- Gentle Tiger : !pos -203.932 -9.998 2.237 87 +-- ??? (qm8) : !pos -356.278 -32.117 285.950 83 +-- Beastman Ensign : !pos 241.000 -31.995 242.999 83 +----------------------------------- + +local quest = Quest:new(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.HONOR_UNDER_FIRE) + +quest.reward = +{ + item = xi.item.ELIXIR_TANK, +} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + player:hasCompletedQuest(xi.questLog.CRYSTAL_WAR, xi.quest.id.crystalWar.QUELLING_THE_STORM) and + player:getCurrentMission(xi.mission.log_id.WOTG) >= xi.mission.id.wotg.CROSSROADS_OF_TIME + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = quest:progressEvent(66), + + onEventFinish = + { + [66] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 0 + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = quest:event(67), + }, + + [xi.zone.VUNKERL_INLET_S] = + { + ['qm8'] = quest:progressEvent(114), + + onEventFinish = + { + [114] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 1) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 1 + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = quest:event(67), + }, + + [xi.zone.VUNKERL_INLET_S] = + { + ['Beastman_Ensign'] = quest:progressEvent(115), + + onEventFinish = + { + [115] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 2) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 2 + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = quest:progressEvent(68), + + onEventFinish = + { + [68] = function(player, csid, option, npc) + if npcUtil.giveKeyItem(player, xi.ki.FLARE_GRENADE) then + quest:setVar(player, 'Prog', 3) + end + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 3 + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = quest:event(69), + }, + + [xi.zone.VUNKERL_INLET_S] = + { + ['Beastman_Ensign'] = quest:progressEvent(116), + + onEventFinish = + { + [116] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 4) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 4 + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = + { + onTrigger = function(player, npc) + if player:hasKeyItem(xi.ki.FLARE_GRENADE) then + return quest:event(69) + else + return quest:progressEvent(70) + end + end, + }, + + onEventFinish = + { + [70] = function(player, csid, option, npc) + npcUtil.giveKeyItem(player, xi.ki.FLARE_GRENADE) + end, + }, + }, + + [xi.zone.EVERBLOOM_HOLLOW] = + { + onEventFinish = + { + -- Honor Under Fire instance is not implemented currently. + [10000] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 5) + player:setPos(241.000, -31.995, 242.999, 0, xi.zone.VUNKERL_INLET_S) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 5 + end, + + [xi.zone.VUNKERL_INLET_S] = + { + onZoneIn = function(player, prevZone) + if prevZone == xi.zone.EVERBLOOM_HOLLOW then + return 117 + end + end, + + onEventFinish = + { + [117] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 6) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED and vars.Prog == 6 + end, + + [xi.zone.BASTOK_MARKETS_S] = + { + ['Gentle_Tiger'] = quest:progressEvent(71), + + onEventFinish = + { + [71] = function(player, csid, option, npc) + quest:complete(player) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/quests/crystalWar/Quelling_the_Storm.lua b/scripts/quests/crystalWar/Quelling_the_Storm.lua index 565709cc46a..254870a3c8b 100644 --- a/scripts/quests/crystalWar/Quelling_the_Storm.lua +++ b/scripts/quests/crystalWar/Quelling_the_Storm.lua @@ -210,9 +210,9 @@ quest.sections = npcUtil.tradeHasExactly( trade, { - xi.item.GOBLIN_MESS_TIN, - xi.item.GOBLIN_MUSHPOT, - xi.item.PINCH_OF_TWINKLE_POWDER, + xi.item.GOBLIN_MESS_TIN, + xi.item.GOBLIN_MUSHPOT, + xi.item.PINCH_OF_TWINKLE_POWDER, } ) then