9
3

DrobbixWangleport.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/DrobbixWangleport.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.28 03:10:04
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. waypoints(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,6)then
  17. Garbled(NPC,Spawn)
  18. else
  19. GenericEcology2Hail(NPC, Spawn, faction)
  20. end
  21. end
  22. function InRange(NPC,Spawn)
  23. if GetFactionAmount(Spawn,12)<0 then
  24. FactionCheckCallout(NPC,Spawn,faction)
  25. else
  26. if not HasLanguage(Spawn,6)then
  27. if math.random(0,100)<40 then
  28. FaceTarget(NPC, Spawn)
  29. Garbled(NPC,Spawn)
  30. end
  31. else
  32. end
  33. end
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end
  38. function Door(NPC,Spawn)
  39. local door = GetSpawn(NPC, 1380083)
  40. UseWidget(door)
  41. end
  42. function Action(NPC)
  43. local choice = MakeRandomInt(1, 4)
  44. if choice == 1 then
  45. PlayFlavor(NPC, "", "", "mood_angry", 0, 0)
  46. elseif choice == 2 then
  47. PlayFlavor(NPC, "", "", "ponder", 0, 0)
  48. elseif choice == 3 then
  49. PlayFlavor(NPC, "", "", "sniff", 0, 0)
  50. elseif choice == 4 then
  51. PlayFlavor(NPC, "", "", "tapfoot", 0, 0)
  52. end
  53. end
  54. function waypoints(NPC)
  55. MovementLoopAddLocation(NPC, -0.13, 3, 69.75, 2, 1)
  56. MovementLoopAddLocation(NPC, -0.13, 3, 69.75, 2, 9,"EcologyEmotes")
  57. MovementLoopAddLocation(NPC, 1.49, 3, 69.67, 2, 0)
  58. MovementLoopAddLocation(NPC, 6.01, 3, 66.28, 2, 0)
  59. MovementLoopAddLocation(NPC, 8.08, 3, 64.2, 2, 0)
  60. MovementLoopAddLocation(NPC, 8.84, 3.1, 62.79, 2, 0)
  61. MovementLoopAddLocation(NPC, 8.45, 3.05, 61.79, 2, 0)
  62. MovementLoopAddLocation(NPC, 6.68, 3.05, 60.22, 2, 1)
  63. MovementLoopAddLocation(NPC, 6.68, 3.05, 60.22, 2, 20,"EcologyEmotes")
  64. MovementLoopAddLocation(NPC, 8.27, 3.05, 60.36, 2, 0)
  65. MovementLoopAddLocation(NPC, 9.19, 3.1, 62.83, 2, 0)
  66. MovementLoopAddLocation(NPC, 8.4, 3, 65.43, 2, 0)
  67. MovementLoopAddLocation(NPC, 9.88, 3, 72.99, 2, 1)
  68. MovementLoopAddLocation(NPC, 9.88, 3, 72.99, 2, 20,"EcologyEmotes")
  69. MovementLoopAddLocation(NPC, 9.87, 3, 71.39, 2, 0)
  70. MovementLoopAddLocation(NPC, 7.55, 3, 69.95, 2, 0)
  71. MovementLoopAddLocation(NPC, -1.04, 3, 74.89, 2, 0)
  72. MovementLoopAddLocation(NPC, -4.14, 3, 71.86, 2, 2,"Door")
  73. MovementLoopAddLocation(NPC, -6.55, 3, 66.59, 2, 1,"Door")
  74. MovementLoopAddLocation(NPC, -6.55, 3, 66.59, 2, 30,"EcologyEmotes")
  75. MovementLoopAddLocation(NPC, -7.63, 3, 68.17, 2, 1)
  76. MovementLoopAddLocation(NPC, -7.63, 3, 68.17, 2, 30,"EcologyEmotes")
  77. MovementLoopAddLocation(NPC, -6.22, 3, 68.95, 2, 2,"Door")
  78. MovementLoopAddLocation(NPC, -3.9, 3, 72.09, 2, 0,"Door")
  79. MovementLoopAddLocation(NPC, -1.1, 3, 70.3, 2, 0)
  80. MovementLoopAddLocation(NPC, 16.13, 3.01, 69.46, 2, 0)
  81. MovementLoopAddLocation(NPC, 17.6, 3.01, 69.63, 2, 0)
  82. MovementLoopAddLocation(NPC, 19.61, 3.02, 67.38, 2, 0)
  83. MovementLoopAddLocation(NPC, 21.14, 2.9, 63.64, 2, 0)
  84. MovementLoopAddLocation(NPC, 20.21, 2.93, 58.37, 2, 1)
  85. MovementLoopAddLocation(NPC, 20.21, 2.93, 58.37, 2, 30,"EcologyEmotes")
  86. MovementLoopAddLocation(NPC, 21.16, 2.89, 58.96, 2, 0)
  87. MovementLoopAddLocation(NPC, 22.71, 2.96, 61.57, 2, 0)
  88. MovementLoopAddLocation(NPC, 22.18, 2.95, 65.19, 2, 0)
  89. MovementLoopAddLocation(NPC, 20.63, 2.95, 68.28, 2, 0)
  90. MovementLoopAddLocation(NPC, 16.65, 3.01, 69.91, 2, 0)
  91. MovementLoopAddLocation(NPC, 10.05, 3, 71.04, 2, 0)
  92. MovementLoopAddLocation(NPC, 7.41, 3, 70.44, 2, 0)
  93. MovementLoopAddLocation(NPC, 2.1, 3, 72.41, 2, 0)
  94. end
  95. function Door(NPC,Spawn)
  96. local door = GetSpawn(NPC, 1360080)
  97. UseWidget(door)
  98. end