9
3

agravelyillcitizen2.lua 960 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/Freeport/agravelyillcitizen.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.08.22 08:08:20
  5. Script Purpose :
  6. :
  7. --]]
  8. QUEST = 576
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 20, "SpawnAccess", "SpawnAccess")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. end
  18. function SpawnAccess(NPC, Spawn)
  19. if HasQuest(Spawn, QUEST) and GetQuestStep(Spawn, QUEST) == 3 then
  20. AddSpawnAccess(NPC, Spawn)
  21. else
  22. RemoveSpawnAccess(NPC, Spawn)
  23. end
  24. end
  25. function casted_on(NPC, Spawn, Message)
  26. if Message == "Examine" then
  27. SetStepComplete(Spawn, QUEST, 3)
  28. SendMessage(Spawn, "He reaches his arm out weakly to you, but then falls limp back to the ground.")
  29. SpawnSet(NPC, "display_hand_icon", "0")
  30. SpawnSet(NPC, "show_command_icon", "0")
  31. end
  32. end