Cilindari.lua 628 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : SpawnScripts/Castleview/Cilindari.lua
  3. Script Purpose : Cilindari <Alchemist>
  4. Script Author : Scatman
  5. Script Date : 2009.10.03
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericAlchemistVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if math.random(0, 100) <= 25 then
  17. GenericAlchemistHail(NPC, Spawn)
  18. end
  19. end
  20. function LeaveRange(NPC, Spawn)
  21. end
  22. function hailed(NPC, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. GenericAlchemistHail(NPC, Spawn)
  25. end