9
3

agravelyillcitizen3.lua 924 B

12345678910111213141516171819202122232425262728293031323334353637
  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 respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function SpawnAccess(NPC, Spawn)
  17. if HasQuest(Spawn, QUEST) and GetQuestStep(Spawn, QUEST) == 1 then
  18. AddSpawnAccess(NPC, Spawn)
  19. else
  20. RemoveSpawnAccess(NPC, Spawn)
  21. end
  22. end
  23. function casted_on(NPC, Spawn, Message)
  24. if Message == "Examine" then
  25. SetStepComplete(Spawn, QUEST, 1)
  26. SendMessage(Spawn, "This citizen is listless, and non-responsive. It appears that she is close to death.")
  27. SpawnSet(NPC, "display_hand_icon", "0")
  28. SpawnSet(NPC, "show_command_icon", "0")
  29. end
  30. end