소스 검색

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.
Image 3 년 전
부모
커밋
31f74f7e34
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua

+ 8 - 3
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
+end