edward.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : edward.lua
  3. Script Purpose : Waypoint Path for edward.lua
  4. Script Author : Devn00b
  5. Script Date : 07/31/2020 07:33:41 PM
  6. Script Notes : Dialogue updated 5.1.2022 Dorbin
  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. GenericEcologyHail(NPC, Spawn, faction)
  16. end
  17. function InRange(NPC,Spawn)
  18. GenericEcologyCallout(NPC, Spawn, faction)
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function waypoints(NPC)
  24. MovementLoopAddLocation(NPC, 711.38, -17.06, -318.18, 2, math.random(10,20))
  25. MovementLoopAddLocation(NPC, 711.38, -17.06, -318.18, 2, 1,"Doors")
  26. MovementLoopAddLocation(NPC, 722.35, -17.08, -322.32, 2, math.random(0,15))
  27. MovementLoopAddLocation(NPC, 718.1, -17.11, -331.35, 2, math.random(0,10))
  28. MovementLoopAddLocation(NPC, 702.47, -17.38, -325.88, 2, math.random(0,8))
  29. MovementLoopAddLocation(NPC, 691.47, -18.94, -279.4, 2, math.random(0,8))
  30. MovementLoopAddLocation(NPC, 660.2, -19.01, -270.46, 2, math.random(0,8))
  31. MovementLoopAddLocation(NPC, 651.47, -21.25, -289.71, 2, math.random(0,8))
  32. MovementLoopAddLocation(NPC, 650.19, -21.73, -304.1, 2, math.random(0,8))
  33. MovementLoopAddLocation(NPC, 645.24, -13.37, -359.65, 2, math.random(0,8))
  34. MovementLoopAddLocation(NPC, 668.52, -11.63, -366.57, 2, math.random(0,8))
  35. MovementLoopAddLocation(NPC, 701.69, -15.2, -377.6, 2, math.random(0,8))
  36. MovementLoopAddLocation(NPC, 703.02, -14.13, -401.34, 2, math.random(0,8))
  37. MovementLoopAddLocation(NPC, 704.74, -15.76, -418.69, 2, math.random(0,8))
  38. MovementLoopAddLocation(NPC, 703.02, -14.13, -401.34, 2, math.random(0,8))
  39. MovementLoopAddLocation(NPC, 701.69, -15.2, -377.6, 2, math.random(0,8))
  40. MovementLoopAddLocation(NPC, 668.52, -11.63, -366.57, 2, math.random(0,8))
  41. MovementLoopAddLocation(NPC, 645.24, -13.37, -359.65, 2, math.random(0,8))
  42. MovementLoopAddLocation(NPC, 650.19, -21.73, -304.1, 2, math.random(0,8))
  43. MovementLoopAddLocation(NPC, 651.47, -21.25, -289.71, 2, math.random(0,8))
  44. MovementLoopAddLocation(NPC, 660.2, -19.01, -270.46, 2, math.random(0,8))
  45. MovementLoopAddLocation(NPC, 691.47, -18.94, -279.4, 2, math.random(0,8))
  46. MovementLoopAddLocation(NPC, 702.47, -17.38, -325.88, 2, math.random(0,8))
  47. MovementLoopAddLocation(NPC, 718.1, -17.11, -331.35, 2, math.random(0,10))
  48. MovementLoopAddLocation(NPC, 721.84, -17.08, -323.21, 2, math.random(0,15))
  49. MovementLoopAddLocation(NPC, 721.84, -17.08, -323.21, 2, 2,"Doors")
  50. MovementLoopAddLocation(NPC, 711.38, -17.06, -318.18, 2, math.random(10,20))
  51. end
  52. function Doors(NPC,Spawn)
  53. local widget = GetSpawn(NPC, 207099)
  54. UseWidget(widget)
  55. AddTimer(NPC,50,"Doors2",1,Spawn)
  56. end
  57. function Doors2(NPC,Spawn)
  58. local widget2 = GetSpawn(NPC, 2070100)
  59. UseWidget(widget2)
  60. end