9
3

Beggars_Court_Wanderers.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/Beggars_Court_Wanderers.luaBeggars_Court_Wanderers.lua
  3. Script Purpose : Waypoint Path for Beggars_Court_Wanderers.lua
  4. Script Author : Cynnar \\ Dorbin
  5. Script Date : 7/8/2018 04:07:20 PM
  6. Script Notes : <special-instructions>
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. function spawn(NPC)
  11. waypoints(NPC)
  12. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,7)then
  17. Garbled(NPC,Spawn)
  18. else
  19. GenericEcologyHail(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,7)then
  27. if math.random(0,100)<40 then
  28. Garbled(NPC,Spawn)
  29. end
  30. else
  31. end
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end
  37. function waypoints(NPC)
  38. MovementLoopAddLocation(NPC, -2.22, 4.25, -52.19, 2, 0)
  39. MovementLoopAddLocation(NPC, 1.12, 4.75, -50.66, 2, 1)
  40. MovementLoopAddLocation(NPC, 1.12, 4.75, -50.66, 2, 30,"Drink")
  41. MovementLoopAddLocation(NPC, 1.12, 4.75, -50.66, 2, 30,"Drink")
  42. MovementLoopAddLocation(NPC, 1.12, 4.75, -50.66, 2, 0)
  43. MovementLoopAddLocation(NPC, -0.95, 4.62, -48.96, 2, 0)
  44. MovementLoopAddLocation(NPC, -3.03, 4.25, -48.47, 2, 0)
  45. MovementLoopAddLocation(NPC, -5.82, 4, -46.53, 2, 0)
  46. MovementLoopAddLocation(NPC, -5.96, 4, -40.98, 2, 0)
  47. MovementLoopAddLocation(NPC, -6.91, 3.49, -37.73, 2, 0)
  48. MovementLoopAddLocation(NPC, -7.05, 3, -33.77, 2, 0)
  49. MovementLoopAddLocation(NPC, -5.73, 3, -28.01, 2, 0)
  50. MovementLoopAddLocation(NPC, -2.71, 3.5, -25.03, 2, 0)
  51. MovementLoopAddLocation(NPC, -0.28, 4, -25.22, 2, 0)
  52. MovementLoopAddLocation(NPC, 4.83, 4.25, -21.53, 2, 0)
  53. MovementLoopAddLocation(NPC, 7.08, 4.25, -19.58, 2, 0)
  54. MovementLoopAddLocation(NPC, 11.47, 4.25, -18.33, 2, 0)
  55. MovementLoopAddLocation(NPC, 12.02, 4, -15.98, 2, 0)
  56. MovementLoopAddLocation(NPC, 8.59, 3.5, -5.93, 2, 1)
  57. MovementLoopAddLocation(NPC, 8.59, 3.5, -5.93, 2, 30,"EcologyEmotes")
  58. MovementLoopAddLocation(NPC, 8.59, 3.5, -5.93, 2, 0)
  59. MovementLoopAddLocation(NPC, 8.13, 3.5, -1.38, 2, 0)
  60. MovementLoopAddLocation(NPC, 7.68, 3.5, 0.65, 2, 0)
  61. MovementLoopAddLocation(NPC, 9.9, 3.5, 1.93, 2, 1)
  62. MovementLoopAddLocation(NPC, 9.9, 3.5, 1.93, 2, 30,"EcologyEmotes")
  63. MovementLoopAddLocation(NPC, 9.5, 3.5, 1.43, 2, 0)
  64. MovementLoopAddLocation(NPC, 7.69, 3.5, 0.3, 2, 0)
  65. MovementLoopAddLocation(NPC, 3.2, 3.5, -3.73, 2, 0)
  66. MovementLoopAddLocation(NPC, -0.57, 3.5, -9.73, 2, 0)
  67. MovementLoopAddLocation(NPC, -0.02, 3.5, -14.56, 2, 1)
  68. MovementLoopAddLocation(NPC, -0.02, 3.5, -14.56, 2, 30,"EcologyEmotes")
  69. MovementLoopAddLocation(NPC, -1.46, 3.5, -15.43, 2, 1)
  70. MovementLoopAddLocation(NPC, -1.46, 3.5, -15.43, 2, 30,"EcologyEmotes")
  71. MovementLoopAddLocation(NPC, -1.08, 3.5, -19.37, 2, 0)
  72. MovementLoopAddLocation(NPC, -4.98, 3.39, -21.98, 2, 0)
  73. MovementLoopAddLocation(NPC, -7.68, 3, -25.86, 2, 0)
  74. MovementLoopAddLocation(NPC, -4.99, 4, -38.14, 2, 0)
  75. MovementLoopAddLocation(NPC, -6.17, 4, -44.67, 2, 0)
  76. MovementLoopAddLocation(NPC, -6.68, 4, -49.76, 2, 0)
  77. end
  78. function Drink(NPC)
  79. PlayFlavor(NPC,"","","drinking_idle",0,0)
  80. AddTimer(NPC,8000, "Drink2")
  81. end
  82. function Drink2(NPC)
  83. choice = math.random(1,4)
  84. if choice == 1 then
  85. PlayFlavor(NPC,"","","yawn",0,0)
  86. elseif choice == 2 then
  87. PlayFlavor(NPC,"","","drinking_idle",0,0)
  88. elseif choice == 3 then
  89. PlayFlavor(NPC,"","","sniff",0,0)
  90. else
  91. PlayFlavor(NPC,"","","happy",0,0)
  92. end
  93. AddTimer(NPC,6000, "Drink3")
  94. end
  95. function Drink3(NPC)
  96. PlayFlavor(NPC,"","","drinking_idle",0,0)
  97. end