9
3

EnterWarning.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/TroubledHaunt/EnterWarning.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.27 01:11:03
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  10. SetTempVariable(NPC, "Enter", "true")
  11. end
  12. function InRange(NPC,Spawn,Zone)
  13. if GetTempVariable(NPC,"Enter")=="true" then
  14. SetTempVariable(NPC, "Enter", "false")
  15. local con = CreateConversation()
  16. AddConversationOption(con, "I must purge the anger from these tormented souls.","Close")
  17. StartDialogConversation(con, 1, NPC, Spawn, "The cold air of this home seeps under your skin. A chill travels up your spine as you witness listless souls parading about in apparent anguish. Perhaps conquering their anger will calm them.")
  18. PlayFlavor(Spawn,"","","shiver",0,0)
  19. end
  20. end
  21. function Close(NPC,Spawn)
  22. CloseConversation(NPC,Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. end
  27. function respawn(NPC)
  28. spawn(NPC)
  29. end