From 8607dc0410dd2eaf6040d34dee9bc1483b2c957d Mon Sep 17 00:00:00 2001 From: Tiberon Date: Tue, 12 May 2026 18:10:35 -0700 Subject: [PATCH] Add ENM Timer NPCs and some additional ENM KIs --- scripts/enum/unique_event.lua | 3 +- scripts/globals/enm.lua | 105 ++++++++++++++++++ scripts/missions/cop/3_5_Darkness_Named.lua | 3 +- scripts/zones/Attohwa_Chasm/npcs/Jakaka.lua | 6 +- scripts/zones/Bastok_Mines/DefaultActions.lua | 1 - scripts/zones/Bastok_Mines/npcs/Gregory.lua | 25 +++++ scripts/zones/Lower_Jeuno/DefaultActions.lua | 1 - .../zones/Lower_Jeuno/npcs/Ghebi_Damomohe.lua | 41 ++++++- scripts/zones/RuLude_Gardens/npcs/Venessa.lua | 2 + .../Southern_San_dOria/DefaultActions.lua | 1 - .../zones/Southern_San_dOria/npcs/Ophelia.lua | 25 +++++ .../Tavnazian_Safehold/DefaultActions.lua | 1 - .../Tavnazian_Safehold/npcs/Morangeart.lua | 41 +++++++ .../zones/Uleguerand_Range/npcs/Zebada.lua | 6 +- scripts/zones/Upper_Jeuno/DefaultActions.lua | 1 - scripts/zones/Upper_Jeuno/npcs/Moritz.lua | 25 +++++ .../zones/Windurst_Woods/DefaultActions.lua | 1 - scripts/zones/Windurst_Woods/npcs/Istvan.lua | 25 +++++ 18 files changed, 298 insertions(+), 15 deletions(-) create mode 100644 scripts/globals/enm.lua create mode 100644 scripts/zones/Bastok_Mines/npcs/Gregory.lua create mode 100644 scripts/zones/Southern_San_dOria/npcs/Ophelia.lua create mode 100644 scripts/zones/Tavnazian_Safehold/npcs/Morangeart.lua create mode 100644 scripts/zones/Upper_Jeuno/npcs/Moritz.lua create mode 100644 scripts/zones/Windurst_Woods/npcs/Istvan.lua diff --git a/scripts/enum/unique_event.lua b/scripts/enum/unique_event.lua index 3f097bed699..694913918ef 100644 --- a/scripts/enum/unique_event.lua +++ b/scripts/enum/unique_event.lua @@ -1,4 +1,4 @@ ------------------------------------ +----------------------------------- -- Unique Events ----------------------------------- xi = xi or {} @@ -24,4 +24,5 @@ xi.uniqueEvent = MHAURA_INTRODUCTION = 8, HYRIA_INTRODUCTION = 9, VANESSA_ENM_COMPLETE = 10, + ENM_TIMER_NPCS_INTRO = 11, } diff --git a/scripts/globals/enm.lua b/scripts/globals/enm.lua new file mode 100644 index 00000000000..c363f28bb12 --- /dev/null +++ b/scripts/globals/enm.lua @@ -0,0 +1,105 @@ +----------------------------------- +-- Shared functionality for ENM timer NPCs +-- Ophelia (Southern San dOria) +-- Gregory (Bastok Mines) +-- Istvan (Windurst Woods) +-- Moritz (Upper Jeuno) +----------------------------------- + +xi = xi or {} +xi.enm = xi.enm or {} + +local cutscenes = +{ + ['Moritz' ] = { introduction = 10028, recurring = 10029, default = 10027 }, + ['Ophelia'] = { introduction = 752, recurring = 753, default = 751 }, + ['Gregory'] = { introduction = 257, recurring = 258, default = 256 }, + ['Istvan' ] = { introduction = 693, recurring = 694, default = 692 }, +} + +local enmOptionToEnablementCriteria = +{ + [ 1] = { missionReq = xi.mission.id.cop.THE_RITES_OF_LIFE, cooldownPlayerVar = '[ENM]abandonmentTimer' }, --Spire Of Holla + [ 2] = { missionReq = xi.mission.id.cop.THE_RITES_OF_LIFE, cooldownPlayerVar = '[ENM]antipathyTimer' }, --Spire Of Dem + [ 3] = { missionReq = xi.mission.id.cop.THE_RITES_OF_LIFE, cooldownPlayerVar = '[ENM]animusTimer' }, --Spire Of Mea + [ 4] = { missionReq = xi.mission.id.cop.SLANDEROUS_UTTERINGS, cooldownPlayerVar = '[ENM]acrimonyTimer' }, --Spire Of Vahzl + [ 5] = { missionReq = xi.mission.id.cop.AN_ETERNAL_MELODY, cooldownPlayerVar = '[ENM]MonarchBeard' }, --Monarch Linn + [ 6] = { missionReq = xi.ki.PSOXJA_PASS, cooldownPlayerVar = '[ENM]AstralCovenant' }, --The Shrouded Maw + [ 7] = { missionReq = nil, cooldownPlayerVar = '[ENM]OperatingLever' }, --Mine Shaft 2716 Lever + [ 8] = { missionReq = nil, cooldownPlayerVar = '[ENM]ZephyrFan' }, --Bearclaw Pinnacle + [ 9] = { missionReq = nil, cooldownPlayerVar = '[ENM]MiasmaFilter' }, --Boneyard Gully + [100] = { missionReq = nil, cooldownPlayerVar = '[ENM]GateDial' }, --Mine Shaft 2716 Dial +} + +local function hasPlayerTriggeredEnmCoolDown(player) + for _, v in pairs(enmOptionToEnablementCriteria) do + if player:getCharVar(v.cooldownPlayerVar) > 0 then + return true + end + end + + return false +end + +local function getBitmaskForAvailableENMs(player) + -- The cutscene allows filtering of which ENMs are shown to the player + -- 2^option aligns the bitmask to the ENM + local bitmask = 0 + local copMissionProgress = player:getCurrentMission(xi.mission.log_id.COP) + + for i = 1, 5 do + if copMissionProgress <= enmOptionToEnablementCriteria[i].missionReq then + bitmask = bitmask + bit.lshift(1, i) + end + end + + -- Special case for AstralCovenant, which is holding a ki vs a mission + if not player:hasKeyItem(xi.ki.PSOXJA_PASS) then + bitmask = bitmask + bit.lshift(1, 6) + end + + -- Note: Bearclaw Pinnacle, Boneyard Gully, and Mine Shaft 2716 are never actually filtered - they have no pre-req + return bitmask +end + +xi.enm.timerNpcOnTrigger = function(player, npc) + local hasPlayerAckdIntro = player:hasCompletedUniqueEvent(xi.uniqueEvent.ENM_TIMER_NPCS_INTRO) + -- using hasPlayerAckdIntro to prevent re-querying multiple player vars (enm timers) post introduction + -- players must complete an ENM before these NPCs will interact with them + if hasPlayerAckdIntro or hasPlayerTriggeredEnmCoolDown(player) then + if not hasPlayerAckdIntro then + player:startEvent(cutscenes[npc:getName()].introduction, getBitmaskForAvailableENMs(player)) + else + player:startEvent(cutscenes[npc:getName()].recurring, getBitmaskForAvailableENMs(player)) + end + else + player:startEvent(cutscenes[npc:getName()].default) + end +end + +xi.enm.timerNpcOnEventUpdate = function(player, csid, option) + -- update required for a decline + if option == 0 then + player:updateEvent(1) + return + end + + local enmAvailableVanaTime = player:getCharVar(enmOptionToEnablementCriteria[option].cooldownPlayerVar) + if enmAvailableVanaTime > VanadielTime() then + player:updateEvent(0, enmAvailableVanaTime) + else + player:updateEvent(0) + end +end + +xi.enm.timerNpcOnEventFinish = function(player, csid, option) + local npc = player:getEventTarget() + -- Handle intro CS + if + csid == cutscenes[npc:getName()].introduction and option >= 0 and + option <= 100 + then + -- verified via capture, all NPCs share a single Intro CS. Once done at one NPC, the rest do not trigger it. + player:setUniqueEvent(xi.uniqueEvent.ENM_TIMER_NPCS_INTRO) + end +end diff --git a/scripts/missions/cop/3_5_Darkness_Named.lua b/scripts/missions/cop/3_5_Darkness_Named.lua index 1495a6b7eb6..0156483778b 100644 --- a/scripts/missions/cop/3_5_Darkness_Named.lua +++ b/scripts/missions/cop/3_5_Darkness_Named.lua @@ -1,4 +1,4 @@ ------------------------------------ +----------------------------------- -- Darkness Named -- Promathia 3-5 ----------------------------------- @@ -46,6 +46,7 @@ mission.sections = npcUtil.tradeHasExactly(trade, xi.item.GRAY_CHIP) ) then + -- ToDo Uncaptured CS 51 seems to imply you traded the wrong item return mission:progressEvent(52, xi.settings.main.GIL_RATE * 500) end end, diff --git a/scripts/zones/Attohwa_Chasm/npcs/Jakaka.lua b/scripts/zones/Attohwa_Chasm/npcs/Jakaka.lua index 57924db60cf..4b236fb1e57 100644 --- a/scripts/zones/Attohwa_Chasm/npcs/Jakaka.lua +++ b/scripts/zones/Attohwa_Chasm/npcs/Jakaka.lua @@ -24,9 +24,9 @@ entity.onTrigger = function(player, npc) if player:hasKeyItem(xi.ki.MIASMA_FILTER) then player:startEvent(11) else - if miasmaFilterCD >= GetSystemTime() then + if miasmaFilterCD >= VanadielTime then -- Both Vanadiel time and unix timestamps are based on seconds. Add the difference to the event. - player:startEvent(14, VanadielTime() + (miasmaFilterCD - GetSystemTime())) + player:startEvent(14, miasmaFilterCD) else if player:hasItem(xi.item.POUCH_OF_PARRADAMO_STONES) or @@ -43,7 +43,7 @@ end entity.onEventFinish = function(player, csid, option, npc) if csid == 12 then npcUtil.giveKeyItem(player, xi.ki.MIASMA_FILTER) - player:setCharVar('[ENM]MiasmaFilter', GetSystemTime() + (xi.settings.main.ENM_COOLDOWN * 3600)) -- Current time + (ENM_COOLDOWN*1hr in seconds) + player:setCharVar('[ENM]MiasmaFilter', VanadielTime() + (xi.settings.main.ENM_COOLDOWN * 3600)) -- Current time + (ENM_COOLDOWN*1hr in seconds) elseif csid == 13 then npcUtil.giveItem(player, xi.item.FLAXEN_POUCH) end diff --git a/scripts/zones/Bastok_Mines/DefaultActions.lua b/scripts/zones/Bastok_Mines/DefaultActions.lua index 30cb7affa4c..f95f6c53668 100644 --- a/scripts/zones/Bastok_Mines/DefaultActions.lua +++ b/scripts/zones/Bastok_Mines/DefaultActions.lua @@ -18,7 +18,6 @@ return { ['Goraow'] = { event = 105 }, ['Gorvik'] = { event = 185 }, ['Gray_Wolf'] = { event = 19 }, - ['Gregory'] = { event = 256 }, ['Gumbah'] = { event = 52 }, ['Hound_Nose'] = { event = 132 }, ['Leonie'] = { event = 568 }, diff --git a/scripts/zones/Bastok_Mines/npcs/Gregory.lua b/scripts/zones/Bastok_Mines/npcs/Gregory.lua new file mode 100644 index 00000000000..5df53d3fc45 --- /dev/null +++ b/scripts/zones/Bastok_Mines/npcs/Gregory.lua @@ -0,0 +1,25 @@ +----------------------------------- +-- Area: Bastok Mines +-- NPC: Gregory +-- Type: ENM Quest Timer +-- !pos 51.530 -1 -83.940 234 +----------------------------------- +---@type TNpcEntity +local entity = {} + +entity.onTrade = function(player, npc, trade) +end + +entity.onTrigger = function(player, npc) + xi.enm.timerNpcOnTrigger(player, npc) +end + +entity.onEventUpdate = function(player, csid, option) + xi.enm.timerNpcOnEventUpdate(player, csid, option) +end + +entity.onEventFinish = function(player, csid, option) + xi.enm.timerNpcOnEventFinish(player, csid, option) +end + +return entity diff --git a/scripts/zones/Lower_Jeuno/DefaultActions.lua b/scripts/zones/Lower_Jeuno/DefaultActions.lua index d3a76eee435..911ac903d2f 100644 --- a/scripts/zones/Lower_Jeuno/DefaultActions.lua +++ b/scripts/zones/Lower_Jeuno/DefaultActions.lua @@ -15,7 +15,6 @@ return { ['Faursel'] = { event = 10065 }, ['Garnev'] = { event = 207 }, ['Geuhbe'] = { event = 10033 }, - ['Ghebi_Damomohe'] = { event = 106, options = 4 }, ['Greyson'] = { event = 20082 }, ['Guide_Stone'] = { messageSpecial = ID.text.GUIDE_STONE }, ['Gurdern'] = { event = 112 }, diff --git a/scripts/zones/Lower_Jeuno/npcs/Ghebi_Damomohe.lua b/scripts/zones/Lower_Jeuno/npcs/Ghebi_Damomohe.lua index 3fdabc91d9e..1a5ea00557d 100644 --- a/scripts/zones/Lower_Jeuno/npcs/Ghebi_Damomohe.lua +++ b/scripts/zones/Lower_Jeuno/npcs/Ghebi_Damomohe.lua @@ -1,13 +1,49 @@ ------------------------------------ +----------------------------------- -- Area: Lower Jeuno -- NPC: Ghebi Damomohe -- Starts and Finishes Quest: Tenshodo Membership +-- ENM Quest Activator -- !pos 16 0 -5 245 -- TODO Enum shop items ----------------------------------- ---@type TNpcEntity local entity = {} +entity.onTrade = function(player, npc, trade) + local astralCovenantCD = player:getCharVar('[ENM]AstralCovenant') + + if + npcUtil.tradeHas(trade, xi.item.FLORID_STONE) and + player:hasKeyItem(xi.ki.PSOXJA_PASS) and + astralCovenantCD < VanadielTime() + then + player:startEvent(10047, 1782) + player:confirmTrade() + end +end + +--TODO: Need a capture of a player with PSOXJA_PASS and Tenshodo Membership quest avaiable to see how they interact +-- for now, Tenshodo Membership will block ENM. +entity.onTrigger = function(player, npc) + local astralCovenantCD = player:getCharVar('[ENM]AstralCovenant') + + if + player:hasKeyItem(xi.ki.PSOXJA_PASS) and + not player:hasKeyItem(xi.ki.ASTRAL_COVENANT) + then + if astralCovenantCD < VanadielTime() then + -- Tells player about Florid Stone - option 1 value 4 filters the "hidden" selection for Tenshodo Membership + player:startEvent(106, 4, 1, xi.item.FLORID_STONE, xi.ki.PSOXJA_PASS, xi.ki.ASTRAL_COVENANT) + else + -- Tells player they are on cooldown + player:startEvent(106, 4, 2, xi.ki.ASTRAL_COVENANT, astralCovenantCD) + end + else + -- Standard interaction + player:startEvent(106, 4) + end +end + entity.onEventFinish = function(player, csid, option, npc) if csid == 106 and option == 0 then local stock = @@ -18,6 +54,9 @@ entity.onEventFinish = function(player, csid, option, npc) } xi.shop.general(player, stock, xi.fameArea.NORG) + elseif csid == 10047 then + player:setCharVar('[ENM]AstralCovenant', VanadielTime() + (xi.settings.main.ENM_COOLDOWN * 3600)) -- Current time + (ENM_COOLDOWN*1hr in seconds) + npcUtil.giveKeyItem(player, xi.ki.ASTRAL_COVENANT) end end diff --git a/scripts/zones/RuLude_Gardens/npcs/Venessa.lua b/scripts/zones/RuLude_Gardens/npcs/Venessa.lua index 99eb38db255..30891ce3686 100644 --- a/scripts/zones/RuLude_Gardens/npcs/Venessa.lua +++ b/scripts/zones/RuLude_Gardens/npcs/Venessa.lua @@ -1,7 +1,9 @@ ----------------------------------- -- Area: Ru'Lude Gardens -- NPC: Venessa +-- Type: ENM ----------------------------------- +---@type TNpcEntity local entity = {} local rewardMap = diff --git a/scripts/zones/Southern_San_dOria/DefaultActions.lua b/scripts/zones/Southern_San_dOria/DefaultActions.lua index 4ea9f4989bc..ad14944b746 100644 --- a/scripts/zones/Southern_San_dOria/DefaultActions.lua +++ b/scripts/zones/Southern_San_dOria/DefaultActions.lua @@ -37,7 +37,6 @@ return { ['Malecharisant'] = { text = ID.text.WEST_GATE }, ['Maugie'] = { event = 46 }, ['Melledanne'] = { event = 943 }, - ['Ophelia'] = { event = 751 }, ['Paouala'] = { event = 82 }, ['Phillone'] = { event = 29 }, ['qm2'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, diff --git a/scripts/zones/Southern_San_dOria/npcs/Ophelia.lua b/scripts/zones/Southern_San_dOria/npcs/Ophelia.lua new file mode 100644 index 00000000000..dd3c06fb2cd --- /dev/null +++ b/scripts/zones/Southern_San_dOria/npcs/Ophelia.lua @@ -0,0 +1,25 @@ +----------------------------------- +-- Area: Southern San d'Oria +-- NPC: Ophelia +-- Type: ENM Quest Timer +-- !pos -25 2 -94.6 230 +----------------------------------- +---@type TNpcEntity +local entity = {} + +entity.onTrade = function(player, npc, trade) +end + +entity.onTrigger = function(player, npc) + xi.enm.timerNpcOnTrigger(player, npc) +end + +entity.onEventUpdate = function(player, csid, option) + xi.enm.timerNpcOnEventUpdate(player, csid, option) +end + +entity.onEventFinish = function(player, csid, option) + xi.enm.timerNpcOnEventFinish(player, csid, option) +end + +return entity diff --git a/scripts/zones/Tavnazian_Safehold/DefaultActions.lua b/scripts/zones/Tavnazian_Safehold/DefaultActions.lua index a1534321861..077fac80729 100644 --- a/scripts/zones/Tavnazian_Safehold/DefaultActions.lua +++ b/scripts/zones/Tavnazian_Safehold/DefaultActions.lua @@ -33,7 +33,6 @@ return { ['Mengrenaux'] = { event = 270 }, ['Meret'] = { event = 584 }, ['Merol'] = { event = 340 }, - ['Morangeart'] = { event = 523 }, ['Nery'] = { event = 372 }, ['Noam'] = { event = 363 }, ['Odeya'] = { event = 150 }, diff --git a/scripts/zones/Tavnazian_Safehold/npcs/Morangeart.lua b/scripts/zones/Tavnazian_Safehold/npcs/Morangeart.lua new file mode 100644 index 00000000000..689760f742e --- /dev/null +++ b/scripts/zones/Tavnazian_Safehold/npcs/Morangeart.lua @@ -0,0 +1,41 @@ +----------------------------------- +-- Area: Tavnazian Safehold +-- NPC: Morangeart +-- Type: ENM Quest Activator +-- !pos -74.308 -24.782 -28.475 26 +----------------------------------- +---@type TNpcEntity +local entity = {} + +entity.onTrade = function(player, npc, trade) +end + +entity.onTrigger = function(player, npc) + local monarchBeardCD = player:getCharVar('[ENM]MonarchBeard') + + if player:getCurrentMission(xi.mission.log_id.COP) > xi.mission.id.cop.AN_ETERNAL_MELODY then + if player:hasKeyItem(xi.ki.MONARCH_BEARD) then + player:startEvent(520) + else + if monarchBeardCD < VanadielTime() then + player:startEvent(521) + else + player:startEvent(522, monarchBeardCD) + end + end + else + player:startEvent(523) + end +end + +entity.onEventUpdate = function(player, csid, option) +end + +entity.onEventFinish = function(player, csid, option) + if csid == 521 then + npcUtil.giveKeyItem(player, xi.ki.MONARCH_BEARD) + player:setCharVar('[ENM]MonarchBeard', VanadielTime() + (xi.settings.main.ENM_COOLDOWN * 3600)) -- Current time + (ENM_COOLDOWN*1hr in seconds) + end +end + +return entity diff --git a/scripts/zones/Uleguerand_Range/npcs/Zebada.lua b/scripts/zones/Uleguerand_Range/npcs/Zebada.lua index f87d090b05b..60b4c865f57 100644 --- a/scripts/zones/Uleguerand_Range/npcs/Zebada.lua +++ b/scripts/zones/Uleguerand_Range/npcs/Zebada.lua @@ -24,9 +24,9 @@ entity.onTrigger = function(player, npc) if player:hasKeyItem(xi.ki.ZEPHYR_FAN) then player:startEvent(12) else - if zephyrFanCD >= GetSystemTime() then + if zephyrFanCD >= VanadielTime() then -- Both Vanadiel time and unix timestamps are based on seconds. Add the difference to the event. - player:startEvent(15, VanadielTime() + (zephyrFanCD - GetSystemTime())) + player:startEvent(15, zephyrFanCD) else if player:hasItem(xi.item.HANDFUL_OF_CHAMNAET_ICE) or @@ -43,7 +43,7 @@ end entity.onEventFinish = function(player, csid, option, npc) if csid == 13 then npcUtil.giveKeyItem(player, xi.ki.ZEPHYR_FAN) - player:setCharVar('[ENM]ZephyrFan', GetSystemTime() + (xi.settings.main.ENM_COOLDOWN * 3600)) -- Current time + (ENM_COOLDOWN*1hr in seconds) + player:setCharVar('[ENM]ZephyrFan', VanadielTime() + (xi.settings.main.ENM_COOLDOWN * 3600)) -- Current time + (ENM_COOLDOWN*1hr in seconds) elseif csid == 14 then npcUtil.giveItem(player, xi.item.COTTON_POUCH) end diff --git a/scripts/zones/Upper_Jeuno/DefaultActions.lua b/scripts/zones/Upper_Jeuno/DefaultActions.lua index ba0b1b01aee..14921fae911 100644 --- a/scripts/zones/Upper_Jeuno/DefaultActions.lua +++ b/scripts/zones/Upper_Jeuno/DefaultActions.lua @@ -35,7 +35,6 @@ return { ['Mhao_Kehtsoruho'] = { event = 10173 }, ['Migliorozz'] = { event = 10026 }, ['Mojuro-Nojuro'] = { event = 128 }, - ['Moritz'] = { event = 10027 }, ['Nekha_Shachaba'] = { event = 123 }, ['Nevela'] = { event = 69 }, ['Olgald'] = { event = 10122 }, diff --git a/scripts/zones/Upper_Jeuno/npcs/Moritz.lua b/scripts/zones/Upper_Jeuno/npcs/Moritz.lua new file mode 100644 index 00000000000..d4755d18ce4 --- /dev/null +++ b/scripts/zones/Upper_Jeuno/npcs/Moritz.lua @@ -0,0 +1,25 @@ +----------------------------------- +-- Area: Upper Jeuno +-- NPC: Moritz +-- Type: ENM Quest Timer +-- !pos 2.1 1.8 60.5 244 +----------------------------------- +---@type TNpcEntity +local entity = {} + +entity.onTrade = function(player, npc, trade) +end + +entity.onTrigger = function(player, npc) + xi.enm.timerNpcOnTrigger(player, npc) +end + +entity.onEventUpdate = function(player, csid, option) + xi.enm.timerNpcOnEventUpdate(player, csid, option) +end + +entity.onEventFinish = function(player, csid, option) + xi.enm.timerNpcOnEventFinish(player, csid, option) +end + +return entity diff --git a/scripts/zones/Windurst_Woods/DefaultActions.lua b/scripts/zones/Windurst_Woods/DefaultActions.lua index 384a6add87b..14c37e8e805 100644 --- a/scripts/zones/Windurst_Woods/DefaultActions.lua +++ b/scripts/zones/Windurst_Woods/DefaultActions.lua @@ -25,7 +25,6 @@ return { ['Hayah_Dahbalesahma'] = { event = 263 }, ['Hlif'] = { event = 434 }, ['Hohl_Nhaesin'] = { event = 342 }, - ['Istvan'] = { event = 692 }, ['Iya_Rihyo'] = { event = 419 }, ['Kapeh_Myohrye'] = { event = 340 }, -- There is at current an unknown mission/quest/status that alters their dialog. Windurst citizens get something different than other nations. ['Khomi_Tibariah'] = { event = 262 }, diff --git a/scripts/zones/Windurst_Woods/npcs/Istvan.lua b/scripts/zones/Windurst_Woods/npcs/Istvan.lua new file mode 100644 index 00000000000..daa98784200 --- /dev/null +++ b/scripts/zones/Windurst_Woods/npcs/Istvan.lua @@ -0,0 +1,25 @@ +----------------------------------- +-- Area: Windurst Woods +-- NPC: Istvan +-- Type: ENM Quest Timer +-- !pos 116.294 -6 -98.164 241 +----------------------------------- +---@type TNpcEntity +local entity = {} + +entity.onTrade = function(player, npc, trade) +end + +entity.onTrigger = function(player, npc) + xi.enm.timerNpcOnTrigger(player, npc) +end + +entity.onEventUpdate = function(player, csid, option) + xi.enm.timerNpcOnEventUpdate(player, csid, option) +end + +entity.onEventFinish = function(player, csid, option) + xi.enm.timerNpcOnEventFinish(player, csid, option) +end + +return entity