9
3

OreColdstein.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/OreColdstein.lua
  3. Script Purpose : movement path for ore coldstein
  4. Script Author : theFoof
  5. Script Date : 2013.9.26
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 5, "InRange")
  10. MovementLoopAddLocation(NPC, -163.4, 148.64, 7.9, 2, 0)
  11. MovementLoopAddLocation(NPC, -166.86, 148.52, 33.36, 2, 0)
  12. MovementLoopAddLocation(NPC, -141.97, 147.09, 45.75, 2, 0)
  13. MovementLoopAddLocation(NPC, -111.31, 146.5, 17.37, 2, 0)
  14. MovementLoopAddLocation(NPC, -84.11, 146.36, 25.1, 2, 0)
  15. MovementLoopAddLocation(NPC, -77.74, 146.44, 19.53, 2, 0)
  16. MovementLoopAddLocation(NPC, -91.21, 146.53, -2.92, 2, 0)
  17. MovementLoopAddLocation(NPC, -67.78, 146.96, -21.08, 2, 0)
  18. MovementLoopAddLocation(NPC, -17.86, 146.43, -20.44, 2, 0)
  19. MovementLoopAddLocation(NPC, -6.99, 146.23, -50.87, 2, 0)
  20. MovementLoopAddLocation(NPC, -76.01, 146.74, -69.34, 2, 0)
  21. MovementLoopAddLocation(NPC, -76.38, 152.58, -103.59, 2, 0)
  22. MovementLoopAddLocation(NPC, -58.53, 153.69, -121.51, 2, 0)
  23. MovementLoopAddLocation(NPC, -39.7, 153.11, -115.98, 2, 3)
  24. MovementLoopAddLocation(NPC, -46.91, 153.78, -132.33, 2, 0)
  25. MovementLoopAddLocation(NPC, -63.83, 153.06, -144.21, 2, 0)
  26. MovementLoopAddLocation(NPC, -109.03, 150.91, -145.99, 2, 0)
  27. MovementLoopAddLocation(NPC, -109.43, 152.32, -121.26, 2, 0)
  28. MovementLoopAddLocation(NPC, -76.97, 152.54, -102.32, 2, 0)
  29. MovementLoopAddLocation(NPC, -80.46, 146.45, -75.78, 2, 0)
  30. MovementLoopAddLocation(NPC, -109.02, 147.1, -63.48, 2, 0)
  31. MovementLoopAddLocation(NPC, -94.14, 145.53, -33.29, 2, 0)
  32. MovementLoopAddLocation(NPC, -109.89, 146.24, -12.32, 2, 0)
  33. MovementLoopAddLocation(NPC, -129.26, 147.06, 3.77, 2, 0)
  34. MovementLoopAddLocation(NPC, -142.7, 148.73, 4.83, 2, 0)
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end
  39. function InRange(NPC)
  40. if GetTempVariable(NPC, "chat_timer") == nil then
  41. local choice = math.random(1,4)
  42. if choice == 1 then
  43. PlayFlavor(NPC, "", "Comin' through!", "nod", 1689589577, 4560189)
  44. elseif choice == 2 then
  45. PlayFlavor(NPC, "", "Coldain with a purpose!", "hello", 0, 0)
  46. elseif choice == 3 then
  47. PlayFlavor(NPC, "", "Juss passin' through!", "hello", 0, 0)
  48. elseif choice == 4 then
  49. PlayFlavor(NPC, "", "BURP! 'Scuse me!", "hello", 0, 0)
  50. end
  51. SetTempVariable(NPC, "chat_timer", "1")
  52. AddTimer(NPC, 30000, "ChatTimer")
  53. end
  54. end
  55. function hailed(NPC)
  56. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  57. end
  58. function ChatTimer(NPC)
  59. SetTempVariable(NPC, "chat_timer", nil)
  60. end