atreasurechest.lua 964 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : SpawnScripts/FarJourneyFreeport/atreasurechest.lua
  3. Script Author : LethalEncounter
  4. Script Date : 2020.07.02
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function open(NPC, Player)
  11. SendStateCommand(NPC, 399)
  12. AddTimer(NPC, 2000, "finished_open_animation")
  13. if HasPendingLoot(NPC, Player) then
  14. ShowLootWindow(Player, NPC)
  15. DisplayText(Player, 12, "There appears to be something inside this box.")
  16. InstructionWindow(Player, -1.0, "This screen shows the contents of the box you just opened. Left click on the loot all button to take the items from the box.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_013_f0780e49.mp3", 1581263773, 1569244108, "tutorial_stage_17", "Left click on the loot all button.", "server")
  17. SetTutorialStep(player, 16)
  18. else
  19. DisplayText(Player, 12, "This box is empty.")
  20. end
  21. end
  22. function finished_open_animation(NPC)
  23. SendStateCommand(NPC, 400)
  24. end