aFarSeasdockhand.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/aFarSeasdockhand.lua
  3. Script Purpose : a Far Seas dockhand <Far Seas Trading Company>
  4. Script Author : theFoof
  5. Script Date : 2013.10.30
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 15, "InRange")
  10. MovementLoopAddLocation(NPC, -356.89, 30.06, 221.89, 2, 5)
  11. MovementLoopAddLocation(NPC, -340.84, 30.68, 213.38, 2, 0)
  12. MovementLoopAddLocation(NPC, -346.85, 30.68, 190.74, 2, 0)
  13. MovementLoopAddLocation(NPC, -372.11, 29.19, 188.43, 2, 0)
  14. MovementLoopAddLocation(NPC, -382, 27.92, 172.56, 2, 0)
  15. MovementLoopAddLocation(NPC, -396.69, 22.43, 139.94, 2, 0)
  16. MovementLoopAddLocation(NPC, -413.74, 24.45, 117.98, 2, 0)
  17. MovementLoopAddLocation(NPC, -407.96, 26.02, 96.43, 2, 0)
  18. MovementLoopAddLocation(NPC, -385.31, 38.69, 59.85, 2, 0)
  19. MovementLoopAddLocation(NPC, -388.58, 41.35, 48.87, 2, 0)
  20. MovementLoopAddLocation(NPC, -423.39, 52.31, 54.65, 2, 0)
  21. MovementLoopAddLocation(NPC, -422.64, 52.79, 47.93, 2, 0)
  22. MovementLoopAddLocation(NPC, -401.55, 52.79, 27.18, 2, 0)
  23. MovementLoopAddLocation(NPC, -438.03, 53.19, 25.34, 2, 0)
  24. MovementLoopAddLocation(NPC, -438.31, 52.31, 42.13, 2, 0)
  25. MovementLoopAddLocation(NPC, -423.39, 52.31, 54.65, 2, 0)
  26. MovementLoopAddLocation(NPC, -388.58, 41.35, 48.87, 2, 0)
  27. MovementLoopAddLocation(NPC, -385.31, 38.69, 59.85, 2, 0)
  28. MovementLoopAddLocation(NPC, -407.96, 26.02, 96.43, 2, 0)
  29. MovementLoopAddLocation(NPC, -413.74, 24.45, 117.98, 2, 0)
  30. MovementLoopAddLocation(NPC, -396.69, 22.43, 139.94, 2, 0)
  31. MovementLoopAddLocation(NPC, -382, 27.92, 172.56, 2, 0)
  32. MovementLoopAddLocation(NPC, -372.11, 29.19, 188.43, 2, 0)
  33. MovementLoopAddLocation(NPC, -346.85, 30.68, 190.74, 2, 0)
  34. MovementLoopAddLocation(NPC, -340.84, 30.68, 213.38, 2, 0)
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end
  39. function InRange(NPC, Spawn)
  40. local choice = math.random(1,3)
  41. if choice == 1 then
  42. PlayFlavor(NPC, "", "The Far Seas Trading Company is always looking for a few strong backs and brave souls.", "", 1689589577, 4560189, Spawn)
  43. elseif choice == 2 then
  44. PlayFlavor(NPC, "", "Watch your step around these parts, traveler.", "", 1689589577, 4560189, Spawn)
  45. else
  46. PlayFlavor(NPC, "", "Safe travels to you.", "", 0, 0, Spawn)
  47. end
  48. end
  49. function hailed(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  52. end