From 31f74f7e344013133ce7cc3f77a32cba2f55b81a Mon Sep 17 00:00:00 2001 From: Image <image.emagi@gmail.com> Date: Fri, 19 Mar 2021 17:03:28 -0400 Subject: [PATCH] Update atreasurechest.lua Fixed treasure chests in AoM client being pre-opened. They now swing open rather quickly when opened, but not sure we have any control over the speed of the animation. This is closer to how DoF behaves in far journey. --- .../FarJourneyFreeport/atreasurechest.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua b/server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua index b4bce6a76..a3c90451c 100644 --- a/server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua +++ b/server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua @@ -6,9 +6,13 @@ : --]] +function prespawn(NPC) + SpawnSet(NPC, "visual_state", 0) -- default visual state of 0, we set the visual state when we open it +end + function spawn(NPC) ChangeHandIcon(NPC, 0) - SpawnSet(NPC, "targetable", 0, true, true) + SpawnSet(NPC, "targetable", 0) end function respawn(NPC) @@ -26,10 +30,11 @@ function open(NPC, Player) else DisplayText(Player, 12, "This box is empty.") ChangeHandIcon(NPC, 0) - SpawnSet(NPC, "targetable", 0, true, true) + SpawnSet(NPC, "targetable", 0) end end function finished_open_animation(NPC) + SpawnSet(NPC, "visual_state", 11903) -- this swings open right in DoF, in AoM its really quick but better, not aware of any time we can expose SendStateCommand(NPC, 400) -end \ No newline at end of file +end