From 04752bfdd48290d3aaa637b8f3510caa92135143 Mon Sep 17 00:00:00 2001 From: Nobutadas Date: Mon, 6 Jul 2026 18:57:28 -0500 Subject: [PATCH] [lua] Assault exit event bug fix and event skipped --- scripts/globals/assault/container.lua | 18 ++++++++++++++++-- .../Ilrusi_Atoll/npcs/Rune_of_Release.lua | 2 +- .../Lebros_Cavern/npcs/Rune_of_Release.lua | 2 +- .../Leujaoam_Sanctum/npcs/Rune_of_Release.lua | 2 +- .../npcs/Rune_of_Release.lua | 2 +- scripts/zones/Periqia/npcs/Rune_of_Release.lua | 2 +- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/scripts/globals/assault/container.lua b/scripts/globals/assault/container.lua index f321d430887..cde72b630f5 100644 --- a/scripts/globals/assault/container.lua +++ b/scripts/globals/assault/container.lua @@ -407,7 +407,14 @@ xi.assault.onInstanceFailure = function(instance) entity:messageSpecial(zones[zoneID].text.MISSION_FAILED, 10, 10) entity:setCharVar('assaultEntered', 0) entity:setCharVar('AssaultFailed', 1) - entity:startEvent(102) + if entity:isInEvent() then + entity:release() + entity:timer(1, function(entityArg) + entityArg:startEvent(102) + end) + else + entity:startEvent(102) + end end end @@ -457,7 +464,14 @@ local function awardCompletionPoints(player, instance) member:setCharVar('assaultEntered', 0) member:setCharVar('Assault_Armband', 0) - member:startEvent(102) + if member:getID() ~= player:getID() and member:isInEvent() then -- Player is finishing Rune of Release event: do not interrupt. + member:release() + member:timer(1, function(memberArg) + memberArg:startEvent(102) + end) + else + member:startEvent(102) + end end end diff --git a/scripts/zones/Ilrusi_Atoll/npcs/Rune_of_Release.lua b/scripts/zones/Ilrusi_Atoll/npcs/Rune_of_Release.lua index f0a19cd8418..1f5131f5b7c 100644 --- a/scripts/zones/Ilrusi_Atoll/npcs/Rune_of_Release.lua +++ b/scripts/zones/Ilrusi_Atoll/npcs/Rune_of_Release.lua @@ -10,7 +10,7 @@ entity.onTrigger = function(player, npc) local instance = npc:getInstance() if instance and instance:completed() then - player:startEvent(100, 4) + player:startOptionalCutscene(100, { [0] = 4, cs_option = 0, canSkip = true }) end end diff --git a/scripts/zones/Lebros_Cavern/npcs/Rune_of_Release.lua b/scripts/zones/Lebros_Cavern/npcs/Rune_of_Release.lua index 944ae409105..ea97f78c7b1 100644 --- a/scripts/zones/Lebros_Cavern/npcs/Rune_of_Release.lua +++ b/scripts/zones/Lebros_Cavern/npcs/Rune_of_Release.lua @@ -8,7 +8,7 @@ entity.onTrigger = function(player, npc) local instance = npc:getInstance() if instance and instance:completed() then - player:startEvent(100, 2) + player:startOptionalCutscene(100, { [0] = 2, cs_option = 0, canSkip = true }) end end diff --git a/scripts/zones/Leujaoam_Sanctum/npcs/Rune_of_Release.lua b/scripts/zones/Leujaoam_Sanctum/npcs/Rune_of_Release.lua index e426d2434f8..cb0e083abce 100644 --- a/scripts/zones/Leujaoam_Sanctum/npcs/Rune_of_Release.lua +++ b/scripts/zones/Leujaoam_Sanctum/npcs/Rune_of_Release.lua @@ -9,7 +9,7 @@ entity.onTrigger = function(player, npc) local instance = npc:getInstance() if instance and instance:completed() then - player:startEvent(100, 0) + player:startOptionalCutscene(100, { [0] = 0, cs_option = 0, canSkip = true }) end end diff --git a/scripts/zones/Mamool_Ja_Training_Grounds/npcs/Rune_of_Release.lua b/scripts/zones/Mamool_Ja_Training_Grounds/npcs/Rune_of_Release.lua index a6ebeafb7c7..078f74ec841 100644 --- a/scripts/zones/Mamool_Ja_Training_Grounds/npcs/Rune_of_Release.lua +++ b/scripts/zones/Mamool_Ja_Training_Grounds/npcs/Rune_of_Release.lua @@ -8,7 +8,7 @@ entity.onTrigger = function(player, npc) local instance = npc:getInstance() if instance and instance:completed() then - player:startEvent(100, 1) + player:startOptionalCutscene(100, { [0] = 1, cs_option = 0, canSkip = true }) end end diff --git a/scripts/zones/Periqia/npcs/Rune_of_Release.lua b/scripts/zones/Periqia/npcs/Rune_of_Release.lua index 5aae31a833d..966286a8069 100644 --- a/scripts/zones/Periqia/npcs/Rune_of_Release.lua +++ b/scripts/zones/Periqia/npcs/Rune_of_Release.lua @@ -10,7 +10,7 @@ entity.onTrigger = function(player, npc) local instance = npc:getInstance() if instance and instance:completed() then - player:startEvent(100, 3) + player:startOptionalCutscene(100, { [0] = 3, cs_option = 0, canSkip = true }) end end