TrellyGreenfoot.lua 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/TrellyGreenfoot.lua
  3. Script Purpose : Trelly Greenfoot
  4. Script Author : Scatman
  5. Script Date : 2009.09.15 / Recreated using Ecology VO 04.16.2022 -Dorbin
  6. Script Notes : Updated by Jabantiz (4/22/2017)
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. GenericRaceCheckHail(NPC, Spawn)
  16. end
  17. function InRange(NPC,Spawn)
  18. GenericRaceCheckCallout(NPC, Spawn)
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function waypoints(NPC)
  24. MovementLoopAddLocation(NPC, 809.94, -20.32, -622.21, 2)
  25. MovementLoopAddLocation(NPC, 825.57, -20.47, -622.01, 2, 1)
  26. MovementLoopAddLocation(NPC, 825.57, -20.47, -622.01, 2, math.random(10, 15),"Action")
  27. MovementLoopAddLocation(NPC, 827.49, -20.27, -615.30, 2)
  28. MovementLoopAddLocation(NPC, 833.85, -21.46, -611.10, 2, 1)
  29. MovementLoopAddLocation(NPC, 833.85, -21.46, -611.10, 2, math.random(20, 90),"Action")
  30. MovementLoopAddLocation(NPC, 835.92, -21.04, -606.67, 2)
  31. MovementLoopAddLocation(NPC, 838.36, -20.84, -604.75, 2)
  32. MovementLoopAddLocation(NPC, 844.63, -21.09, -605.69, 2)
  33. MovementLoopAddLocation(NPC, 851.91, -20.38, -609.75, 2)
  34. MovementLoopAddLocation(NPC, 860.75, -19.17, -609.59, 2)
  35. MovementLoopAddLocation(NPC, 870.01, -18.46, -603.19, 2, 1)
  36. MovementLoopAddLocation(NPC, 870.01, -18.46, -603.19, 2, math.random(15, 60),"Action")
  37. MovementLoopAddLocation(NPC, 862.12, -18.97, -606.58, 2)
  38. MovementLoopAddLocation(NPC, 853.15, -20.23, -610.54, 2)
  39. MovementLoopAddLocation(NPC, 849.14, -21.05, -618.29, 2, 1)
  40. MovementLoopAddLocation(NPC, 849.14, -21.05, -618.29, 2, math.random(25, 120),"Action")
  41. MovementLoopAddLocation(NPC, 844.49, -21.70, -625.31, 2)
  42. MovementLoopAddLocation(NPC, 841.65, -22.48, -633.37, 2)
  43. MovementLoopAddLocation(NPC, 844.45, -21.69, -645.01, 2, 1)
  44. MovementLoopAddLocation(NPC, 844.45, -21.69, -645.01, 2, math.random(15, 60),"Action")
  45. MovementLoopAddLocation(NPC, 837.38, -21.06, -646.00, 2)
  46. MovementLoopAddLocation(NPC, 824.73, -20.57, -650.46, 2)
  47. MovementLoopAddLocation(NPC, 812.28, -21.11, -650.56, 2)
  48. MovementLoopAddLocation(NPC, 806.82, -21.08, -631.67, 2, 1)
  49. MovementLoopAddLocation(NPC, 806.82, -21.08, -631.67, 2, math.random(15, 35),"Action")
  50. end
  51. function Action(NPC)
  52. local choice = MakeRandomInt(1, 4)
  53. if choice == 1 then
  54. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  55. elseif choice == 2 then
  56. PlayFlavor(NPC, "", "", "tap", 0, 0, Spawn)
  57. elseif choice == 3 then
  58. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  59. elseif choice == 4 then
  60. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  61. end
  62. end