9
3

asuspiciousbarrelFALSE.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : SpawnScripts/WayfarersRest/asuspiciousbarrelFALSE.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.23 02:09:56
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function casted_on(NPC, Spawn, Message)
  11. local zone = GetZone(NPC)
  12. local Crate = (GetSpawnByLocationID(zone,133786871))
  13. local Barrel = (GetSpawnByLocationID(zone,133786872))
  14. if Message == "Inspect" then
  15. if Crate ~= nil then
  16. PlayFlavor(Crate,"","","result_dispell1_out",0,0)
  17. AddTimer(Crate,1500,"Despawning")
  18. end
  19. if Barrel ~= nil then
  20. PlayFlavor(Barrel,"","","result_dispell1_out",0,0)
  21. AddTimer(Barrel,1500,"Despawning")
  22. end
  23. if NPC ~= nil then
  24. PlayFlavor(NPC,"","","result_dispell1_out",0,0)
  25. AddTimer(NPC,1500,"Despawning")
  26. end
  27. end
  28. end
  29. function Despawning(NPC,Spawn)
  30. local zone = GetZone(NPC)
  31. local Crate = (GetSpawnByLocationID(zone,133786871))
  32. local Barrel = (GetSpawnByLocationID(zone,133786872))
  33. local Wall = (GetSpawnByLocationID(zone,133786875))
  34. if Crate ~= nil then
  35. Despawn(Crate)
  36. end
  37. if Barrel ~= nil then
  38. Despawn(Barrel)
  39. end
  40. if NPC ~= nil then
  41. Despawn(NPC)
  42. if Wall ~= nil then
  43. Despawn(Wall)
  44. end
  45. end
  46. end
  47. function respawn(NPC)
  48. spawn(NPC)
  49. end