NicolaDering.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/NicolaDering.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.04.22 05:04:03
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 3, "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. if GetFactionAmount(Spawn,11) <0 then
  19. FaceTarget(NPC,Spawn)
  20. FactionCheckingCallout(NPC, Spawn, faction)
  21. elseif math.random(1,100)<=20 then
  22. FaceTarget(NPC,Spawn)
  23. GenericEcologyHail(NPC, Spawn, faction)
  24. end
  25. end
  26. function respawn(NPC)
  27. spawn(NPC)
  28. end
  29. function waypoints(NPC)
  30. MovementLoopAddLocation(NPC, 335.72, -20.99, 146.2, 2, 1)
  31. MovementLoopAddLocation(NPC, 335.72, -20.99, 146.2, 2, math.random(6,8),"Cheer")
  32. MovementLoopAddLocation(NPC, 335.72, -20.99, 146.2, 2, 1)
  33. MovementLoopAddLocation(NPC, 335.72, -20.99, 146.2, 2, 0)
  34. MovementLoopAddLocation(NPC, 338.61, -20.99, 144.14, 2, 1)
  35. MovementLoopAddLocation(NPC, 338.61, -20.99, 144.14, 2, math.random(8,10),"EcologyEmotes")
  36. MovementLoopAddLocation(NPC, 343.95, -20.99, 149.41, 2, 0)
  37. MovementLoopAddLocation(NPC, 348.80, -20.99, 148.93, 2, 1)
  38. MovementLoopAddLocation(NPC, 348.80, -20.99, 148.93, 2,8 ,"ForHarold")
  39. MovementLoopAddLocation(NPC, 348.80, -20.99, 148.93, 2, 1)
  40. MovementLoopAddLocation(NPC, 347.34, -20.99, 146.27, 2, 0)
  41. MovementLoopAddLocation(NPC, 348.04, -21, 142.99, 2, math.random(0,5))
  42. MovementLoopAddLocation(NPC, 350.41, -21, 139.33, 2, math.random(0,5))
  43. MovementLoopAddLocation(NPC, 353.67, -20.99, 137.95, 2, 1)
  44. MovementLoopAddLocation(NPC, 353.67, -20.99, 137.95, 2, math.random(8,10),"EcologyEmotes")
  45. MovementLoopAddLocation(NPC, 353.67, -20.99, 137.95, 2, 1)
  46. MovementLoopAddLocation(NPC, 357.45, -21, 138.6, 2, math.random(0,5))
  47. MovementLoopAddLocation(NPC, 356.56, -21, 141.04, 2, math.random(0,5))
  48. MovementLoopAddLocation(NPC, 348.41, -21, 144.37, 2, 0)
  49. MovementLoopAddLocation(NPC, 344.98, -20.99, 149.85, 2, 1)
  50. local check = MakeRandomInt(1,2)
  51. if check == 1 then
  52. MovementLoopAddLocation(NPC, 344.98, -20.99, 149.85, 2, 8,"ForGretta")
  53. else
  54. end
  55. MovementLoopAddLocation(NPC, 344.98, -20.99, 149.85, 2, 1)
  56. MovementLoopAddLocation(NPC, 340.48, -20.99, 151.36, 2, 0)
  57. MovementLoopAddLocation(NPC, 340.69, -20.99, 153.14, 2, 0)
  58. MovementLoopAddLocation(NPC, 340.37, -20.99, 154.58, 2, 0)
  59. MovementLoopAddLocation(NPC, 339.94, -20.99, 154.73, 2, 1)
  60. MovementLoopAddLocation(NPC, 339.94, -20.99, 154.73, 2, math.random(4,8),"Cheer")
  61. MovementLoopAddLocation(NPC, 340.88, -20.99, 153.28, 2, 0)
  62. MovementLoopAddLocation(NPC, 340.4, -20.99, 151.76, 2, 0)
  63. MovementLoopAddLocation(NPC, 342.14, -20.99, 149.44, 2, 0)
  64. MovementLoopAddLocation(NPC, 337.79, -20.99, 144.74, 2, 0)
  65. MovementLoopAddLocation(NPC, 337.79, -20.99, 144.74, 2,1)
  66. end
  67. function ForHarold(NPC,Spawn)
  68. local Copper = GetSpawn(NPC, 2220095)
  69. if Copper ~= nil then
  70. SetTarget(NPC,Copper)
  71. SetTarget(Copper,NPC)
  72. FaceTarget(NPC,Copper)
  73. choice = math.random(1,3)
  74. if choice == 1 then
  75. PlayFlavor(NPC, "","", "sniff", 0, 0)
  76. elseif choice == 2 then
  77. PlayFlavor(NPC, "","", "scold", 0, 0)
  78. else
  79. PlayFlavor(NPC, "","", "agree", 0, 0)
  80. AddTimer(NPC, 2000, "CopperEmotes")
  81. end
  82. end
  83. end
  84. function CopperEmotes(NPC,Spawn)
  85. local Copper = GetSpawn(NPC, 2220095)
  86. if Copper ~= nil then
  87. choice = math.random(1,3)
  88. if choice == 1 then
  89. PlayFlavor(Copper, "","", "confused", 0, 0)
  90. elseif choice == 2 then
  91. PlayFlavor(Copper, "","", "agree", 0, 0)
  92. elseif choice == 3 then
  93. PlayFlavor(Copper, "","", "wink", 0, 0)
  94. end
  95. end
  96. end
  97. function Cheer(NPC,Spawn)
  98. choice = math.random(1,3)
  99. if choice == 1 then
  100. PlayFlavor(NPC, "","", "no", 0, 0)
  101. elseif choice == 2 then
  102. PlayFlavor(NPC, "","", "smile", 0, 0)
  103. else
  104. PlayFlavor(NPC, "","", "agree", 0, 0)
  105. end
  106. end
  107. function ForGretta(NPC)
  108. local Gretta = GetSpawn(NPC, 2220094)
  109. if Gretta ~= nil then
  110. choice = math.random(1,3)
  111. if choice == 1 then
  112. PlayFlavor(NPC, "","", "no", 0, 0)
  113. elseif choice == 2 then
  114. PlayFlavor(NPC, "","", "stinky", 0, 0)
  115. else
  116. PlayFlavor(NPC, "","", "agree", 0, 0)
  117. AddTimer(NPC, 2000, "GrettaEmotes")
  118. end
  119. end
  120. end
  121. function GrettaEmotes(NPC,Spawn)
  122. local Gretta = GetSpawn(NPC, 2220094)
  123. if Gretta ~= nil then
  124. choice = math.random(1,3)
  125. if choice == 1 then
  126. PlayFlavor(Gretta, "","", "smile", 0, 0)
  127. elseif choice == 2 then
  128. PlayFlavor(Gretta, "","", "agree", 0, 0)
  129. else
  130. PlayFlavor(Gretta, "","", "stinky", 0, 0)
  131. end
  132. end
  133. end