9
3

TrinatalisValdamaya.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. --[[
  2. Script Name : SpawnScripts/Castleview/TrinatalisValdamaya.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.29 04:10:08
  5. Script Purpose :
  6. :
  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 waypoints(NPC)
  21. MovementLoopAddLocation(NPC, 702.16, -15.69, -138.8, 2, 1)
  22. MovementLoopAddLocation(NPC, 702.16, -15.69, -138.8, 2, 25,"Action")
  23. MovementLoopAddLocation(NPC, 702.05, -15.69, -137.97, 2, 0)
  24. MovementLoopAddLocation(NPC, 703.61, -15.69, -138.4, 2, 0)
  25. MovementLoopAddLocation(NPC, 702.71, -15.69, -140.22, 2, 0)
  26. MovementLoopAddLocation(NPC, 698.17, -15.69, -143.19, 2, 0)
  27. MovementLoopAddLocation(NPC, 696.17, -15.69, -144.37, 2, 1)
  28. MovementLoopAddLocation(NPC, 696.17, -15.69, -144.37, 2, 25,"Action")
  29. MovementLoopAddLocation(NPC, 695.75, -15.69, -144.18, 2, 0)
  30. MovementLoopAddLocation(NPC, 696.85, -15.69, -143.24, 2, 0)
  31. MovementLoopAddLocation(NPC, 701.53, -15.69, -144.15, 2, 0)
  32. MovementLoopAddLocation(NPC, 704.67, -14.69, -146.34, 2, 2,"Door1")
  33. MovementLoopAddLocation(NPC, 707.31, -14.89, -148.85, 2, 0)
  34. MovementLoopAddLocation(NPC, 708.1, -14.97, -149.8, 2, 0)
  35. MovementLoopAddLocation(NPC, 710.36, -16.16, -152.83, 2, 0)
  36. MovementLoopAddLocation(NPC, 714.46, -16.16, -153.88, 2, 0)
  37. MovementLoopAddLocation(NPC, 719.97, -16.16, -155.85, 2, 0)
  38. MovementLoopAddLocation(NPC, 726.35, -15.21, -156.74, 2, 0)
  39. MovementLoopAddLocation(NPC, 730.93, -15.22, -163.29, 2, 1)
  40. MovementLoopAddLocation(NPC, 730.93, -15.22, -163.29, 2, 25,"Action")
  41. MovementLoopAddLocation(NPC, 729.79, -15.22, -164.02, 2, 0)
  42. MovementLoopAddLocation(NPC, 729.63, -15.23, -162.56, 2, 0)
  43. MovementLoopAddLocation(NPC, 732.47, -15.21, -158.06, 2, 0)
  44. MovementLoopAddLocation(NPC, 734.54, -15.17, -153.59, 2, 0)
  45. MovementLoopAddLocation(NPC, 734.87, -15.19, -142.08, 2, 0)
  46. MovementLoopAddLocation(NPC, 735.1, -15.19, -141.85, 2, 0)
  47. MovementLoopAddLocation(NPC, 736.82, -14.71, -140.91, 2, 2,"Door2")
  48. MovementLoopAddLocation(NPC, 739.2, -14.69, -140.35, 2, 0)
  49. MovementLoopAddLocation(NPC, 742.03, -14.69, -140.83, 2, 0)
  50. MovementLoopAddLocation(NPC, 744.89, -14.69, -142.01, 2, 0)
  51. MovementLoopAddLocation(NPC, 745.69, -14.69, -149.09, 2, 1)
  52. MovementLoopAddLocation(NPC, 745.69, -14.69, -149.09, 2, 25,"Action")
  53. MovementLoopAddLocation(NPC, 746.22, -14.69, -149.82, 2, 0)
  54. MovementLoopAddLocation(NPC, 747.28, -14.69, -147.38, 2, 0)
  55. MovementLoopAddLocation(NPC, 749.4, -14.69, -139.72, 2, 1)
  56. MovementLoopAddLocation(NPC, 749.4, -14.69, -139.72, 2, 25,"Action")
  57. MovementLoopAddLocation(NPC, 748.35, -14.69, -139.96, 2, 0)
  58. MovementLoopAddLocation(NPC, 746.35, -14.69, -141.34, 2, 0)
  59. MovementLoopAddLocation(NPC, 742.87, -14.69, -141.55, 2, 0)
  60. MovementLoopAddLocation(NPC, 739.71, -14.69, -140.13, 2, 2,"Door2")
  61. MovementLoopAddLocation(NPC, 734.56, -15.19, -140.21, 2, 0)
  62. MovementLoopAddLocation(NPC, 734.85, -15.24, -149.07, 2, 0)
  63. MovementLoopAddLocation(NPC, 729.99, -15.49, -150.73, 2, 0)
  64. MovementLoopAddLocation(NPC, 726.56, -15.93, -150.68, 2, 0)
  65. MovementLoopAddLocation(NPC, 716.27, -16.2, -147.73, 2, 1)
  66. MovementLoopAddLocation(NPC, 716.27, -16.2, -147.73, 2, 25,"Action")
  67. MovementLoopAddLocation(NPC, 716.62, -16.21, -147.08, 2, 0)
  68. MovementLoopAddLocation(NPC, 717.69, -16.23, -147.07, 2, 0)
  69. MovementLoopAddLocation(NPC, 718.04, -16.22, -149.7, 2, 0)
  70. MovementLoopAddLocation(NPC, 716.76, -16.19, -151.76, 2, 0)
  71. MovementLoopAddLocation(NPC, 713.67, -16.16, -152.99, 2, 0)
  72. MovementLoopAddLocation(NPC, 708.53, -14.96, -148.87, 2, 0)
  73. MovementLoopAddLocation(NPC, 705.47, -14.69, -146.56, 2, 2,"Door1")
  74. MovementLoopAddLocation(NPC, 702.42, -15.69, -143.61, 2, 0)
  75. end
  76. function Door1(NPC,Spawn)
  77. local door = GetSpawn(NPC, 2360079)
  78. UseWidget(door)
  79. end
  80. function Door2(NPC,Spawn)
  81. local door2 = GetSpawn(NPC, 2360078)
  82. UseWidget(door2)
  83. end
  84. function Action(NPC)
  85. local choice = MakeRandomInt(1, 4)
  86. if choice == 1 then
  87. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  88. elseif choice == 2 then
  89. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  90. elseif choice == 3 then
  91. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  92. elseif choice == 4 then
  93. PlayFlavor(NPC, "", "", "tap", 0, 0, Spawn)
  94. end
  95. end