SmithyFindlebop.lua 645 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/SmithyFindlebop.lua
  3. Script Purpose : Smithy Findlebop <Weaponsmith>
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericWeaponsmithVoiceOvers.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. FaceTarget(NPC, Spawn)
  18. GenericWeaponsmithHail(NPC, Spawn)
  19. end
  20. end
  21. function LeaveRange(NPC, Spawn)
  22. end
  23. function hailed(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. GenericWeaponsmithHail(NPC, Spawn)
  26. end