agrovedeer.lua 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/agrovedeer.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.09.05 07:09:57
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. SetInfoStructUInt(NPC, "friendly_target_npc", 1)
  12. Diseased(NPC)
  13. ChooseMovement(NPC)
  14. end
  15. function Diseased(NPC)
  16. choice= MakeRandomInt(1,2)
  17. if choice == 1 then
  18. CastSpell(NPC,993)
  19. SetTempVariable(NPC,"Update","false" )
  20. else
  21. SetTempVariable(NPC,"Update","true" )
  22. end
  23. end
  24. function casted_on(NPC, Spawn, SpellName) --Priests use minor heal if the deer is diseased. These deer will then give updates for scouts to scouts.
  25. if HasSpellEffect(NPC,993) then
  26. if SpellName == 'Minor Healing' or SpellName == 'Minor Arch Healing' or SpellName == 'Cure' or SpellName == 'Cure Noxious' then
  27. choice = MakeRandomInt(1,2)
  28. if choice ==1 then
  29. SendMessage(Spawn, "The grove deer bleats appreciatively as it appears healthier.")
  30. elseif choice ==2 then
  31. SendMessage(Spawn, "The grove deer's hooves stomp thankfully as its disease abates.")
  32. end
  33. CastSpell(NPC,993,1, NPC)
  34. SpawnSet(NPC,"visual_state",0)
  35. FaceTarget(NPC,Spawn)
  36. SetTempVariable(NPC,"Update","true" )
  37. AddTimer(NPC,120000,"DiseaseReturn")
  38. end
  39. end
  40. end
  41. function DiseaseReturn(NPC) --Reset Disease
  42. CastSpell(NPC,993,1, NPC)
  43. SetTempVariable(NPC,"Update","false" )
  44. end
  45. function death (NPC,Spawn) -- Gives Quest Update if on the scout quest 'Deer Hunt'. ONLY Healthy deer update.
  46. if GetQuestStep(Spawn,5737)==1 then
  47. if GetTempVariable(NPC, "Update") == "true" then
  48. -- if not HasSpellEffect(NPC,993) then
  49. AddStepProgress(Spawn,5737,1,1)
  50. SendMessage(Spawn, "You successfully harvest the grove deer.")
  51. else
  52. SendMessage(Spawn, "This deer's meat was diseased! A priest could have healed this disease away.")
  53. end
  54. end
  55. end
  56. function ChooseMovement(NPC)
  57. if GetSpawnLocationID(NPC)==133774734 then
  58. MovementLoopAddLocation(NPC, 184.21, 1.3, 90.95, 2, math.random(5,10))
  59. MovementLoopAddLocation(NPC, 185.05, 1.3, 94.3, 2, math.random(5,10))
  60. MovementLoopAddLocation(NPC, 181.7, 1.35, 98.49, 2, math.random(5,10))
  61. MovementLoopAddLocation(NPC, 177.85, 1.33, 99, 2, math.random(5,10))
  62. MovementLoopAddLocation(NPC, 171.03, 1.37, 99.51, 2, math.random(5,10))
  63. MovementLoopAddLocation(NPC, 173.6, 1.34, 96.78, 2, math.random(5,10))
  64. MovementLoopAddLocation(NPC, 176.8, 1.33, 95.76, 2, math.random(5,10))
  65. MovementLoopAddLocation(NPC, 178.98, 1.32, 97.99, 2, math.random(5,10))
  66. MovementLoopAddLocation(NPC, 176, 1.33, 94.95, 2, math.random(5,10))
  67. MovementLoopAddLocation(NPC, 172.27, 1.35, 94, 2, math.random(5,10))
  68. MovementLoopAddLocation(NPC, 169.03, 1.38, 99.98, 2, math.random(5,10))
  69. MovementLoopAddLocation(NPC, 173.22, 1.37, 100.47, 2, math.random(5,10))
  70. MovementLoopAddLocation(NPC, 174.96, 1.34, 95.8, 2, math.random(5,10))
  71. MovementLoopAddLocation(NPC, 173.92, 1.34, 89.92, 2, math.random(5,10))
  72. MovementLoopAddLocation(NPC, 176.87, 1.33, 87.9, 2, math.random(5,10))
  73. MovementLoopAddLocation(NPC, 183.13, 1.31, 84.96, 2, math.random(5,10))
  74. MovementLoopAddLocation(NPC, 184.59, 1.3, 86.69, 2, math.random(5,10))
  75. MovementLoopAddLocation(NPC, 183.13, 1.31, 84.96, 2, math.random(5,10))
  76. MovementLoopAddLocation(NPC, 176.87, 1.33, 87.9, 2, math.random(5,10))
  77. MovementLoopAddLocation(NPC, 173.92, 1.34, 89.92, 2, math.random(5,10))
  78. MovementLoopAddLocation(NPC, 174.96, 1.34, 95.8, 2, math.random(5,10))
  79. MovementLoopAddLocation(NPC, 173.22, 1.37, 100.47, 2, math.random(5,10))
  80. MovementLoopAddLocation(NPC, 169.03, 1.38, 99.98, 2, math.random(5,10))
  81. MovementLoopAddLocation(NPC, 172.27, 1.35, 94, 2, math.random(5,10))
  82. MovementLoopAddLocation(NPC, 176, 1.33, 94.95, 2, math.random(5,10))
  83. MovementLoopAddLocation(NPC, 178.98, 1.32, 97.99, 2, math.random(5,10))
  84. MovementLoopAddLocation(NPC, 176.8, 1.33, 95.76, 2, math.random(5,10))
  85. MovementLoopAddLocation(NPC, 173.6, 1.34, 96.78, 2, math.random(5,10))
  86. MovementLoopAddLocation(NPC, 171.03, 1.37, 99.51, 2, math.random(5,10))
  87. MovementLoopAddLocation(NPC, 177.85, 1.33, 99, 2, math.random(5,10))
  88. MovementLoopAddLocation(NPC, 181.7, 1.35, 98.49, 2, math.random(5,10))
  89. MovementLoopAddLocation(NPC, 185.05, 1.3, 94.3, 2, math.random(5,10))
  90. MovementLoopAddLocation(NPC, 184.21, 1.3, 90.95, 2, math.random(5,10))
  91. elseif GetSpawnLocationID(NPC)==133774732 then
  92. MovementLoopAddLocation(NPC, 164.93, 1.38, 86.1, 2, math.random(5,10))
  93. MovementLoopAddLocation(NPC, 165.59, 1.37, 82.36, 2, math.random(5,10))
  94. MovementLoopAddLocation(NPC, 167.82, 1.37, 80.02, 2, math.random(5,10))
  95. MovementLoopAddLocation(NPC, 170.18, 1.36, 79.2, 2, math.random(5,10))
  96. MovementLoopAddLocation(NPC, 176.12, 1.34, 76.76, 2, math.random(5,10))
  97. MovementLoopAddLocation(NPC, 173.39, 1.35, 75.02, 2, math.random(5,10))
  98. MovementLoopAddLocation(NPC, 172.71, 1.35, 78.7, 2, math.random(5,10))
  99. MovementLoopAddLocation(NPC, 171.5, 1.35, 84.56, 2, math.random(5,10))
  100. MovementLoopAddLocation(NPC, 168.65, 1.36, 86.97, 2, math.random(5,10))
  101. MovementLoopAddLocation(NPC, 166.62, 1.37, 90.25, 2, math.random(5,10))
  102. MovementLoopAddLocation(NPC, 164.59, 1.38, 94.66, 2, math.random(5,10))
  103. MovementLoopAddLocation(NPC, 162.66, 1.38, 90.1, 2, math.random(5,10))
  104. MovementLoopAddLocation(NPC, 163.6, 1.38, 86.73, 2, math.random(5,10))
  105. MovementLoopAddLocation(NPC, 166.09, 1.37, 81.33, 2, math.random(5,10))
  106. MovementLoopAddLocation(NPC, 167.79, 1.37, 78.68, 2, math.random(5,10))
  107. MovementLoopAddLocation(NPC, 166.09, 1.37, 81.33, 2, math.random(5,10))
  108. MovementLoopAddLocation(NPC, 163.6, 1.38, 86.73, 2, math.random(5,10))
  109. MovementLoopAddLocation(NPC, 162.66, 1.38, 90.1, 2, math.random(5,10))
  110. MovementLoopAddLocation(NPC, 164.59, 1.38, 94.66, 2, math.random(5,10))
  111. MovementLoopAddLocation(NPC, 166.62, 1.37, 90.25, 2, math.random(5,10))
  112. MovementLoopAddLocation(NPC, 168.65, 1.36, 86.97, 2, math.random(5,10))
  113. MovementLoopAddLocation(NPC, 171.5, 1.35, 84.56, 2, math.random(5,10))
  114. MovementLoopAddLocation(NPC, 172.71, 1.35, 78.7, 2, math.random(5,10))
  115. MovementLoopAddLocation(NPC, 173.39, 1.35, 75.02, 2, math.random(5,10))
  116. MovementLoopAddLocation(NPC, 176.12, 1.34, 76.76, 2, math.random(5,10))
  117. MovementLoopAddLocation(NPC, 170.18, 1.36, 79.2, 2, math.random(5,10))
  118. MovementLoopAddLocation(NPC, 167.82, 1.37, 80.02, 2, math.random(5,10))
  119. MovementLoopAddLocation(NPC, 165.59, 1.37, 82.36, 2, math.random(5,10))
  120. MovementLoopAddLocation(NPC, 164.93, 1.38, 86.1, 2, math.random(5,10))
  121. elseif GetSpawnLocationID(NPC)==133774733 then
  122. MovementLoopAddLocation(NPC, 152.43, 1.42, 89.13, 2, math.random(5,10))
  123. MovementLoopAddLocation(NPC, 149.66, 1.43, 92.69, 2, math.random(5,10))
  124. MovementLoopAddLocation(NPC, 148.27, 1.43, 96.55, 2, math.random(5,10))
  125. MovementLoopAddLocation(NPC, 156.41, 1.41, 96.4, 2, math.random(5,10))
  126. MovementLoopAddLocation(NPC, 151.73, 1.42, 94, 2, math.random(5,10))
  127. MovementLoopAddLocation(NPC, 158.15, 1.4, 91.56, 2, math.random(5,10))
  128. MovementLoopAddLocation(NPC, 158.25, 1.4, 99.11, 2, math.random(5,10))
  129. MovementLoopAddLocation(NPC, 153.01, 1.42, 95.96, 2, math.random(5,10))
  130. MovementLoopAddLocation(NPC, 146.08, 1.44, 92.23, 2, math.random(5,10))
  131. MovementLoopAddLocation(NPC, 142.34, 1.46, 93.62, 2, math.random(5,10))
  132. MovementLoopAddLocation(NPC, 142.95, 1.45, 96.8, 2, math.random(5,10))
  133. MovementLoopAddLocation(NPC, 148.18, 1.43, 97.13, 2, math.random(5,10))
  134. MovementLoopAddLocation(NPC, 157.31, 1.4, 91.06, 2, math.random(5,10))
  135. MovementLoopAddLocation(NPC, 156.91, 1.41, 88.75, 2, math.random(5,10))
  136. MovementLoopAddLocation(NPC, 157.31, 1.4, 91.06, 2, math.random(5,10))
  137. MovementLoopAddLocation(NPC, 148.18, 1.43, 97.13, 2, math.random(5,10))
  138. MovementLoopAddLocation(NPC, 142.95, 1.45, 96.8, 2, math.random(5,10))
  139. MovementLoopAddLocation(NPC, 142.34, 1.46, 93.62, 2, math.random(5,10))
  140. MovementLoopAddLocation(NPC, 146.08, 1.44, 92.23, 2, math.random(5,10))
  141. MovementLoopAddLocation(NPC, 153.01, 1.42, 95.96, 2, math.random(5,10))
  142. MovementLoopAddLocation(NPC, 158.25, 1.4, 99.11, 2, math.random(5,10))
  143. MovementLoopAddLocation(NPC, 158.15, 1.4, 91.56, 2, math.random(5,10))
  144. MovementLoopAddLocation(NPC, 151.73, 1.42, 94, 2, math.random(5,10))
  145. MovementLoopAddLocation(NPC, 156.41, 1.41, 96.4, 2, math.random(5,10))
  146. MovementLoopAddLocation(NPC, 148.27, 1.43, 96.55, 2, math.random(5,10))
  147. MovementLoopAddLocation(NPC, 149.66, 1.43, 92.69, 2, math.random(5,10))
  148. MovementLoopAddLocation(NPC, 152.43, 1.42, 89.13, 2, math.random(5,10))
  149. elseif GetSpawnLocationID(NPC)==133774718 then
  150. MovementLoopAddLocation(NPC, 146.03, 1.45, 88.16, 2, math.random(5,10))
  151. MovementLoopAddLocation(NPC, 141.58, 1.46, 88.33, 2, math.random(5,10))
  152. MovementLoopAddLocation(NPC, 140.48, 1.47, 86.41, 2, math.random(5,10))
  153. MovementLoopAddLocation(NPC, 140.38, 1.47, 83.98, 2, math.random(5,10))
  154. MovementLoopAddLocation(NPC, 144.32, 1.45, 82.06, 2, math.random(5,10))
  155. MovementLoopAddLocation(NPC, 146.99, 1.44, 80.75, 2, math.random(5,10))
  156. MovementLoopAddLocation(NPC, 144.31, 1.45, 77.96, 2, math.random(5,10))
  157. MovementLoopAddLocation(NPC, 142.8, 1.46, 76.44, 2, math.random(5,10))
  158. MovementLoopAddLocation(NPC, 141.57, 1.46, 80.23, 2, math.random(5,10))
  159. MovementLoopAddLocation(NPC, 145.94, 1.45, 82.36, 2, math.random(5,10))
  160. MovementLoopAddLocation(NPC, 152.09, 1.43, 79.99, 2, math.random(5,10))
  161. MovementLoopAddLocation(NPC, 150, 1.43, 78.61, 2, math.random(5,10))
  162. MovementLoopAddLocation(NPC, 148.23, 1.44, 82.59, 2, math.random(5,10))
  163. MovementLoopAddLocation(NPC, 144.26, 1.45, 88.55, 2, math.random(5,10))
  164. MovementLoopAddLocation(NPC, 140.05, 1.47, 88.93, 2, math.random(5,10))
  165. MovementLoopAddLocation(NPC, 139.28, 1.47, 91.56, 2, math.random(5,10))
  166. MovementLoopAddLocation(NPC, 138.12, 1.47, 93.18, 2, math.random(5,10))
  167. MovementLoopAddLocation(NPC, 139.68, 1.47, 89.67, 2, math.random(5,10))
  168. MovementLoopAddLocation(NPC, 139.17, 1.47, 86.68, 2, math.random(5,10))
  169. MovementLoopAddLocation(NPC, 144.15, 1.45, 82.19, 2, math.random(5,10))
  170. MovementLoopAddLocation(NPC, 148.06, 1.44, 84.33, 2, math.random(5,10))
  171. MovementLoopAddLocation(NPC, 144.15, 1.45, 82.19, 2, math.random(5,10))
  172. MovementLoopAddLocation(NPC, 139.17, 1.47, 86.68, 2, math.random(5,10))
  173. MovementLoopAddLocation(NPC, 139.68, 1.47, 89.67, 2, math.random(5,10))
  174. MovementLoopAddLocation(NPC, 138.12, 1.47, 93.18, 2, math.random(5,10))
  175. MovementLoopAddLocation(NPC, 139.28, 1.47, 91.56, 2, math.random(5,10))
  176. MovementLoopAddLocation(NPC, 140.05, 1.47, 88.93, 2, math.random(5,10))
  177. MovementLoopAddLocation(NPC, 144.26, 1.45, 88.55, 2, math.random(5,10))
  178. MovementLoopAddLocation(NPC, 148.23, 1.44, 82.59, 2, math.random(5,10))
  179. MovementLoopAddLocation(NPC, 150, 1.43, 78.61, 2, math.random(5,10))
  180. MovementLoopAddLocation(NPC, 152.09, 1.43, 79.99, 2, math.random(5,10))
  181. MovementLoopAddLocation(NPC, 145.94, 1.45, 82.36, 2, math.random(5,10))
  182. MovementLoopAddLocation(NPC, 141.57, 1.46, 80.23, 2, math.random(5,10))
  183. MovementLoopAddLocation(NPC, 142.8, 1.46, 76.44, 2, math.random(5,10))
  184. MovementLoopAddLocation(NPC, 144.31, 1.45, 77.96, 2, math.random(5,10))
  185. MovementLoopAddLocation(NPC, 146.99, 1.44, 80.75, 2, math.random(5,10))
  186. MovementLoopAddLocation(NPC, 144.32, 1.45, 82.06, 2, math.random(5,10))
  187. MovementLoopAddLocation(NPC, 140.38, 1.47, 83.98, 2, math.random(5,10))
  188. MovementLoopAddLocation(NPC, 140.48, 1.47, 86.41, 2, math.random(5,10))
  189. MovementLoopAddLocation(NPC, 141.58, 1.46, 88.33, 2, math.random(5,10))
  190. MovementLoopAddLocation(NPC, 146.03, 1.45, 88.16, 2, math.random(5,10))
  191. elseif GetSpawnLocationID(NPC)==133774709 then
  192. MovementLoopAddLocation(NPC, 160.2, 1.39, 81.98, 2, math.random(5,10))
  193. MovementLoopAddLocation(NPC, 162.69, 1.39, 75.46, 2, math.random(5,10))
  194. MovementLoopAddLocation(NPC, 165.32, 1.38, 72.19, 2, math.random(5,10))
  195. MovementLoopAddLocation(NPC, 160.62, 1.4, 72.82, 2, math.random(5,10))
  196. MovementLoopAddLocation(NPC, 157.9, 1.4, 78.28, 2, math.random(5,10))
  197. MovementLoopAddLocation(NPC, 166.74, 1.37, 79.36, 2, math.random(5,10))
  198. MovementLoopAddLocation(NPC, 171.52, 1.35, 76.78, 2, math.random(5,10))
  199. MovementLoopAddLocation(NPC, 172.19, 1.35, 73.66, 2, math.random(5,10))
  200. MovementLoopAddLocation(NPC, 169.12, 1.36, 76.77, 2, math.random(5,10))
  201. MovementLoopAddLocation(NPC, 166.38, 1.37, 79.3, 2, math.random(5,10))
  202. MovementLoopAddLocation(NPC, 157.67, 1.4, 80.33, 2, math.random(5,10))
  203. MovementLoopAddLocation(NPC, 157.33, 1.41, 74.28, 2, math.random(5,10))
  204. MovementLoopAddLocation(NPC, 161.88, 1.39, 75.06, 2, math.random(5,10))
  205. MovementLoopAddLocation(NPC, 157.5, 1.41, 78.19, 2, math.random(5,10))
  206. MovementLoopAddLocation(NPC, 162.15, 1.39, 81.14, 2, math.random(5,10))
  207. MovementLoopAddLocation(NPC, 157.5, 1.41, 78.19, 2, math.random(5,10))
  208. MovementLoopAddLocation(NPC, 161.88, 1.39, 75.06, 2, math.random(5,10))
  209. MovementLoopAddLocation(NPC, 157.33, 1.41, 74.28, 2, math.random(5,10))
  210. MovementLoopAddLocation(NPC, 157.67, 1.4, 80.33, 2, math.random(5,10))
  211. MovementLoopAddLocation(NPC, 166.38, 1.37, 79.3, 2, math.random(5,10))
  212. MovementLoopAddLocation(NPC, 169.12, 1.36, 76.77, 2, math.random(5,10))
  213. MovementLoopAddLocation(NPC, 172.19, 1.35, 73.66, 2, math.random(5,10))
  214. MovementLoopAddLocation(NPC, 171.52, 1.35, 76.78, 2, math.random(5,10))
  215. MovementLoopAddLocation(NPC, 166.74, 1.37, 79.36, 2, math.random(5,10))
  216. MovementLoopAddLocation(NPC, 157.9, 1.4, 78.28, 2, math.random(5,10))
  217. MovementLoopAddLocation(NPC, 160.62, 1.4, 72.82, 2, math.random(5,10))
  218. MovementLoopAddLocation(NPC, 165.32, 1.38, 72.19, 2, math.random(5,10))
  219. MovementLoopAddLocation(NPC, 162.69, 1.39, 75.46, 2, math.random(5,10))
  220. MovementLoopAddLocation(NPC, 160.2, 1.39, 81.98, 2, math.random(5,10))
  221. elseif GetSpawnLocationID(NPC)==133774712 then
  222. MovementLoopAddLocation(NPC, 151.73, 1.43, 76.35, 2, math.random(5,10))
  223. MovementLoopAddLocation(NPC, 147.53, 1.44, 77.53, 2, math.random(5,10))
  224. MovementLoopAddLocation(NPC, 152.03, 1.43, 68.66, 2, math.random(5,10))
  225. MovementLoopAddLocation(NPC, 148.64, 1.44, 69.38, 2, math.random(5,10))
  226. MovementLoopAddLocation(NPC, 149.87, 1.43, 77.81, 2, math.random(5,10))
  227. MovementLoopAddLocation(NPC, 142.78, 1.46, 77, 2, math.random(5,10))
  228. MovementLoopAddLocation(NPC, 131.38, 1.5, 69.05, 2, math.random(5,10))
  229. MovementLoopAddLocation(NPC, 129.01, 1.57, 63.68, 2, math.random(5,10))
  230. MovementLoopAddLocation(NPC, 126.33, 1.52, 74.66, 2, math.random(5,10))
  231. MovementLoopAddLocation(NPC, 128.6, 1.52, 73.31, 2, math.random(5,10))
  232. MovementLoopAddLocation(NPC, 129.33, 1.52, 59.14, 2, math.random(5,10))
  233. MovementLoopAddLocation(NPC, 133.57, 1.15, 59.18, 2, math.random(5,10))
  234. MovementLoopAddLocation(NPC, 132.87, 1.33, 65.21, 2, math.random(5,10))
  235. MovementLoopAddLocation(NPC, 146.34, 1.45, 75.57, 2, math.random(5,10))
  236. MovementLoopAddLocation(NPC, 150.04, 1.43, 72.23, 2, math.random(5,10))
  237. MovementLoopAddLocation(NPC, 150.11, 1.43, 78.64, 2, math.random(5,10))
  238. MovementLoopAddLocation(NPC, 150.04, 1.43, 72.23, 2, math.random(5,10))
  239. MovementLoopAddLocation(NPC, 146.34, 1.45, 75.57, 2, math.random(5,10))
  240. MovementLoopAddLocation(NPC, 132.87, 1.33, 65.21, 2, math.random(5,10))
  241. MovementLoopAddLocation(NPC, 133.57, 1.15, 59.18, 2, math.random(5,10))
  242. MovementLoopAddLocation(NPC, 129.33, 1.52, 59.14, 2, math.random(5,10))
  243. MovementLoopAddLocation(NPC, 128.6, 1.52, 73.31, 2, math.random(5,10))
  244. MovementLoopAddLocation(NPC, 126.33, 1.52, 74.66, 2, math.random(5,10))
  245. MovementLoopAddLocation(NPC, 129.01, 1.57, 63.68, 2, math.random(5,10))
  246. MovementLoopAddLocation(NPC, 131.38, 1.5, 69.05, 2, math.random(5,10))
  247. MovementLoopAddLocation(NPC, 142.78, 1.46, 77, 2, math.random(5,10))
  248. MovementLoopAddLocation(NPC, 149.87, 1.43, 77.81, 2, math.random(5,10))
  249. MovementLoopAddLocation(NPC, 148.64, 1.44, 69.38, 2, math.random(5,10))
  250. MovementLoopAddLocation(NPC, 152.03, 1.43, 68.66, 2, math.random(5,10))
  251. MovementLoopAddLocation(NPC, 147.53, 1.44, 77.53, 2, math.random(5,10))
  252. MovementLoopAddLocation(NPC, 151.73, 1.43, 76.35, 2, math.random(5,10))
  253. elseif GetSpawnLocationID(NPC)==133774710 then
  254. MovementLoopAddLocation(NPC, 164.88, 1.38, 54.04, 2, math.random(5,10))
  255. MovementLoopAddLocation(NPC, 159.33, 1.4, 57.16, 2, math.random(5,10))
  256. MovementLoopAddLocation(NPC, 153.87, 1.42, 61.91, 2, math.random(5,10))
  257. MovementLoopAddLocation(NPC, 156.56, 1.41, 57.49, 2, math.random(5,10))
  258. MovementLoopAddLocation(NPC, 162.26, 1.39, 54.76, 2, math.random(5,10))
  259. MovementLoopAddLocation(NPC, 172.01, 1.36, 60.07, 2, math.random(5,10))
  260. MovementLoopAddLocation(NPC, 173.26, 1.35, 55.7, 2, math.random(5,10))
  261. MovementLoopAddLocation(NPC, 169.19, 1.37, 54.87, 2, math.random(5,10))
  262. MovementLoopAddLocation(NPC, 173.26, 1.35, 55.7, 2, math.random(5,10))
  263. MovementLoopAddLocation(NPC, 172.01, 1.36, 60.07, 2, math.random(5,10))
  264. MovementLoopAddLocation(NPC, 162.26, 1.39, 54.76, 2, math.random(5,10))
  265. MovementLoopAddLocation(NPC, 156.56, 1.41, 57.49, 2, math.random(5,10))
  266. MovementLoopAddLocation(NPC, 153.87, 1.42, 61.91, 2, math.random(5,10))
  267. MovementLoopAddLocation(NPC, 159.33, 1.4, 57.16, 2, math.random(5,10))
  268. MovementLoopAddLocation(NPC, 164.88, 1.38, 54.04, 2, math.random(5,10))
  269. elseif GetSpawnLocationID(NPC)==133774738 then
  270. MovementLoopAddLocation(NPC, 190.74, 1.29, 54.14, 2, math.random(5,10))
  271. MovementLoopAddLocation(NPC, 198.29, 1.26, 59.59, 2, math.random(5,10))
  272. MovementLoopAddLocation(NPC, 202.39, 1.24, 59.17, 2, math.random(5,10))
  273. MovementLoopAddLocation(NPC, 201.25, 1.26, 53.16, 2, math.random(5,10))
  274. MovementLoopAddLocation(NPC, 192.61, 1.28, 54.51, 2, math.random(5,10))
  275. MovementLoopAddLocation(NPC, 194.89, 1.27, 57, 2, math.random(5,10))
  276. MovementLoopAddLocation(NPC, 197.56, 1.26, 52.17, 2, math.random(5,10))
  277. MovementLoopAddLocation(NPC, 192.46, 1.28, 50.04, 2, math.random(5,10))
  278. MovementLoopAddLocation(NPC, 174.51, 1.35, 54.69, 2, math.random(5,10))
  279. MovementLoopAddLocation(NPC, 175.03, 1.35, 51.27, 2, math.random(5,10))
  280. MovementLoopAddLocation(NPC, 178.19, 1.33, 59.52, 2, math.random(5,10))
  281. MovementLoopAddLocation(NPC, 175.6, 1.34, 61.07, 2, math.random(5,10))
  282. MovementLoopAddLocation(NPC, 173.17, 1.35, 60.28, 2, math.random(5,10))
  283. MovementLoopAddLocation(NPC, 188.25, 1.3, 52.82, 2, math.random(5,10))
  284. MovementLoopAddLocation(NPC, 192.23, 1.28, 48.7, 2, math.random(5,10))
  285. MovementLoopAddLocation(NPC, 203.83, 1.26, 55.53, 2, math.random(5,10))
  286. MovementLoopAddLocation(NPC, 200.95, 1.25, 58.62, 2, math.random(5,10))
  287. MovementLoopAddLocation(NPC, 205.99, 1.23, 61.63, 2, math.random(5,10))
  288. MovementLoopAddLocation(NPC, 203.6, 1.24, 64.72, 2, math.random(5,10))
  289. MovementLoopAddLocation(NPC, 202.98, 1.24, 58.78, 2, math.random(5,10))
  290. MovementLoopAddLocation(NPC, 197.15, 1.26, 53.99, 2, math.random(5,10))
  291. MovementLoopAddLocation(NPC, 191.79, 1.28, 56.43, 2, math.random(5,10))
  292. MovementLoopAddLocation(NPC, 197.15, 1.26, 53.99, 2, math.random(5,10))
  293. MovementLoopAddLocation(NPC, 202.98, 1.24, 58.78, 2, math.random(5,10))
  294. MovementLoopAddLocation(NPC, 203.6, 1.24, 64.72, 2, math.random(5,10))
  295. MovementLoopAddLocation(NPC, 205.99, 1.23, 61.63, 2, math.random(5,10))
  296. MovementLoopAddLocation(NPC, 200.95, 1.25, 58.62, 2, math.random(5,10))
  297. MovementLoopAddLocation(NPC, 203.83, 1.26, 55.53, 2, math.random(5,10))
  298. MovementLoopAddLocation(NPC, 192.23, 1.28, 48.7, 2, math.random(5,10))
  299. MovementLoopAddLocation(NPC, 188.25, 1.3, 52.82, 2, math.random(5,10))
  300. MovementLoopAddLocation(NPC, 173.17, 1.35, 60.28, 2, math.random(5,10))
  301. MovementLoopAddLocation(NPC, 175.6, 1.34, 61.07, 2, math.random(5,10))
  302. MovementLoopAddLocation(NPC, 178.19, 1.33, 59.52, 2, math.random(5,10))
  303. MovementLoopAddLocation(NPC, 175.03, 1.35, 51.27, 2, math.random(5,10))
  304. MovementLoopAddLocation(NPC, 174.51, 1.35, 54.69, 2, math.random(5,10))
  305. MovementLoopAddLocation(NPC, 192.46, 1.28, 50.04, 2, math.random(5,10))
  306. MovementLoopAddLocation(NPC, 197.56, 1.26, 52.17, 2, math.random(5,10))
  307. MovementLoopAddLocation(NPC, 194.89, 1.27, 57, 2, math.random(5,10))
  308. MovementLoopAddLocation(NPC, 192.61, 1.28, 54.51, 2, math.random(5,10))
  309. MovementLoopAddLocation(NPC, 201.25, 1.26, 53.16, 2, math.random(5,10))
  310. MovementLoopAddLocation(NPC, 202.39, 1.24, 59.17, 2, math.random(5,10))
  311. MovementLoopAddLocation(NPC, 198.29, 1.26, 59.59, 2, math.random(5,10))
  312. MovementLoopAddLocation(NPC, 190.74, 1.29, 54.14, 2, math.random(5,10))
  313. elseif GetSpawnLocationID(NPC)==133774713 then
  314. MovementLoopAddLocation(NPC, 175.51, 1.34, 67.8, 2, math.random(5,10))
  315. MovementLoopAddLocation(NPC, 178.8, 1.33, 71.71, 2, math.random(5,10))
  316. MovementLoopAddLocation(NPC, 185, 1.31, 69.88, 2, math.random(5,10))
  317. MovementLoopAddLocation(NPC, 182.61, 1.32, 66.88, 2, math.random(5,10))
  318. MovementLoopAddLocation(NPC, 176.7, 1.34, 65.24, 2, math.random(5,10))
  319. MovementLoopAddLocation(NPC, 176.8, 1.34, 63.73, 2, math.random(5,10))
  320. MovementLoopAddLocation(NPC, 182.8, 1.31, 66.24, 2, math.random(5,10))
  321. MovementLoopAddLocation(NPC, 185.55, 1.3, 70.09, 2, math.random(5,10))
  322. MovementLoopAddLocation(NPC, 186.2, 1.3, 69.45, 2, math.random(5,10))
  323. MovementLoopAddLocation(NPC, 195.15, 1.27, 51.6, 2, math.random(5,10))
  324. MovementLoopAddLocation(NPC, 192.28, 1.28, 48.05, 2, math.random(5,10))
  325. MovementLoopAddLocation(NPC, 196.69, 1.27, 48.46, 2, math.random(5,10))
  326. MovementLoopAddLocation(NPC, 195.01, 1.27, 56.93, 2, math.random(5,10))
  327. MovementLoopAddLocation(NPC, 187.93, 1.3, 68.25, 2, math.random(5,10))
  328. MovementLoopAddLocation(NPC, 186.86, 1.3, 75.8, 2, math.random(5,10))
  329. MovementLoopAddLocation(NPC, 184.02, 1.31, 75.47, 2, math.random(5,10))
  330. MovementLoopAddLocation(NPC, 182.45, 1.32, 69.38, 2, math.random(5,10))
  331. MovementLoopAddLocation(NPC, 175.06, 1.34, 64.49, 2, math.random(5,10))
  332. MovementLoopAddLocation(NPC, 172.43, 1.35, 69.07, 2, math.random(5,10))
  333. MovementLoopAddLocation(NPC, 175.06, 1.34, 64.49, 2, math.random(5,10))
  334. MovementLoopAddLocation(NPC, 182.45, 1.32, 69.38, 2, math.random(5,10))
  335. MovementLoopAddLocation(NPC, 184.02, 1.31, 75.47, 2, math.random(5,10))
  336. MovementLoopAddLocation(NPC, 186.86, 1.3, 75.8, 2, math.random(5,10))
  337. MovementLoopAddLocation(NPC, 187.93, 1.3, 68.25, 2, math.random(5,10))
  338. MovementLoopAddLocation(NPC, 195.01, 1.27, 56.93, 2, math.random(5,10))
  339. MovementLoopAddLocation(NPC, 196.69, 1.27, 48.46, 2, math.random(5,10))
  340. MovementLoopAddLocation(NPC, 192.28, 1.28, 48.05, 2, math.random(5,10))
  341. MovementLoopAddLocation(NPC, 195.15, 1.27, 51.6, 2, math.random(5,10))
  342. MovementLoopAddLocation(NPC, 186.2, 1.3, 69.45, 2, math.random(5,10))
  343. MovementLoopAddLocation(NPC, 185.55, 1.3, 70.09, 2, math.random(5,10))
  344. MovementLoopAddLocation(NPC, 182.8, 1.31, 66.24, 2, math.random(5,10))
  345. MovementLoopAddLocation(NPC, 176.8, 1.34, 63.73, 2, math.random(5,10))
  346. MovementLoopAddLocation(NPC, 176.7, 1.34, 65.24, 2, math.random(5,10))
  347. MovementLoopAddLocation(NPC, 182.61, 1.32, 66.88, 2, math.random(5,10))
  348. MovementLoopAddLocation(NPC, 185, 1.31, 69.88, 2, math.random(5,10))
  349. MovementLoopAddLocation(NPC, 178.8, 1.33, 71.71, 2, math.random(5,10))
  350. MovementLoopAddLocation(NPC, 175.51, 1.34, 67.8, 2, math.random(5,10))
  351. elseif GetSpawnLocationID(NPC)==133774711 then
  352. MovementLoopAddLocation(NPC, 165.01, 1.38, 66.5, 2, math.random(5,10))
  353. MovementLoopAddLocation(NPC, 160.81, 1.4, 65.99, 2, math.random(5,10))
  354. MovementLoopAddLocation(NPC, 159.73, 1.4, 67.75, 2, math.random(5,10))
  355. MovementLoopAddLocation(NPC, 160.4, 1.4, 71.42, 2, math.random(5,10))
  356. MovementLoopAddLocation(NPC, 163.36, 1.39, 71.89, 2, math.random(5,10))
  357. MovementLoopAddLocation(NPC, 165.44, 1.38, 68.97, 2, math.random(5,10))
  358. MovementLoopAddLocation(NPC, 166.63, 1.37, 66.23, 2, math.random(5,10))
  359. MovementLoopAddLocation(NPC, 169.01, 1.37, 63.13, 2, math.random(5,10))
  360. MovementLoopAddLocation(NPC, 171.4, 1.36, 63.04, 2, math.random(5,10))
  361. MovementLoopAddLocation(NPC, 172.86, 1.35, 65.49, 2, math.random(5,10))
  362. MovementLoopAddLocation(NPC, 171.67, 1.36, 68.17, 2, math.random(5,10))
  363. MovementLoopAddLocation(NPC, 158.94, 1.4, 64.15, 2, math.random(5,10))
  364. MovementLoopAddLocation(NPC, 155.52, 1.42, 65.94, 2, math.random(5,10))
  365. MovementLoopAddLocation(NPC, 160.12, 1.4, 65.86, 2, math.random(5,10))
  366. MovementLoopAddLocation(NPC, 163.64, 1.39, 62.97, 2, math.random(5,10))
  367. MovementLoopAddLocation(NPC, 166.11, 1.38, 70, 2, math.random(5,10))
  368. MovementLoopAddLocation(NPC, 163.64, 1.39, 62.97, 2, math.random(5,10))
  369. MovementLoopAddLocation(NPC, 160.12, 1.4, 65.86, 2, math.random(5,10))
  370. MovementLoopAddLocation(NPC, 155.52, 1.42, 65.94, 2, math.random(5,10))
  371. MovementLoopAddLocation(NPC, 158.94, 1.4, 64.15, 2, math.random(5,10))
  372. MovementLoopAddLocation(NPC, 171.67, 1.36, 68.17, 2, math.random(5,10))
  373. MovementLoopAddLocation(NPC, 172.86, 1.35, 65.49, 2, math.random(5,10))
  374. MovementLoopAddLocation(NPC, 171.4, 1.36, 63.04, 2, math.random(5,10))
  375. MovementLoopAddLocation(NPC, 169.01, 1.37, 63.13, 2, math.random(5,10))
  376. MovementLoopAddLocation(NPC, 166.63, 1.37, 66.23, 2, math.random(5,10))
  377. MovementLoopAddLocation(NPC, 165.44, 1.38, 68.97, 2, math.random(5,10))
  378. MovementLoopAddLocation(NPC, 163.36, 1.39, 71.89, 2, math.random(5,10))
  379. MovementLoopAddLocation(NPC, 160.4, 1.4, 71.42, 2, math.random(5,10))
  380. MovementLoopAddLocation(NPC, 159.73, 1.4, 67.75, 2, math.random(5,10))
  381. MovementLoopAddLocation(NPC, 160.81, 1.4, 65.99, 2, math.random(5,10))
  382. MovementLoopAddLocation(NPC, 165.01, 1.38, 66.5, 2, math.random(5,10))
  383. end
  384. end
  385. --[[ local route = math.random(1,4)
  386. if route == 1 then
  387. RouteOne(NPC, Spawn)
  388. elseif route == 2 then
  389. RouteTwo(NPC, Spawn)
  390. elseif route == 3 then
  391. RouteThree(NPC, Spawn)
  392. elseif route == 4 then
  393. RouteFour(NPC, Spawn)
  394. end
  395. end
  396. function RouteOne(NPC, Spawn)
  397. local X = GetX(NPC)
  398. local Y = GetY(NPC)
  399. local Z = GetZ(NPC)
  400. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  401. MovementLoopAddLocation(NPC, X + 12, Y, Z, 2,math.random(5,10))
  402. MovementLoopAddLocation(NPC, X + 12, Y, Z + 4, 2, math.random(5,10))
  403. MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
  404. MovementLoopAddLocation(NPC, X + 5, Y, Z + 4, 2, math.random(5,10))
  405. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  406. end
  407. function RouteTwo(NPC, Spawn)
  408. local X = GetX(NPC)
  409. local Y = GetY(NPC)
  410. local Z = GetZ(NPC)
  411. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  412. MovementLoopAddLocation(NPC, X - 5, Y, Z, 2, math.random(5,10))
  413. MovementLoopAddLocation(NPC, X - 14, Y, Z - 4, 2, math.random(5,10))
  414. MovementLoopAddLocation(NPC, X - 12, Y, Z, 2, math.random(5,10))
  415. MovementLoopAddLocation(NPC, X - 12, Y, Z - 4, 2, math.random(5,10))
  416. MovementLoopAddLocation(NPC, X, Y, Z, 1, 0)
  417. end
  418. function RouteThree(NPC, Spawn)
  419. local X = GetX(NPC)
  420. local Y = GetY(NPC)
  421. local Z = GetZ(NPC)
  422. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  423. MovementLoopAddLocation(NPC, X + 12, Y, Z, 2, math.random(5,10))
  424. MovementLoopAddLocation(NPC, X + 5, Y, Z - 4, 2, math.random(5,10))
  425. MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10))
  426. MovementLoopAddLocation(NPC, X + 12, Y, Z - 4, 2, math.random(5,10))
  427. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  428. end
  429. function RouteFour(NPC, Spawn)
  430. local X = GetX(NPC)
  431. local Y = GetY(NPC)
  432. local Z = GetZ(NPC)
  433. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  434. MovementLoopAddLocation(NPC, X - 12, Y, Z, 2, math.random(5,10))
  435. MovementLoopAddLocation(NPC, X - 5, Y, Z + 4, 2, math.random(5,10))
  436. MovementLoopAddLocation(NPC, X - 14, Y, Z, 2, math.random(5,10))
  437. MovementLoopAddLocation(NPC, X - 12, Y, Z + 4, 2, math.random(5,10))
  438. MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
  439. end
  440. ]]--
  441. function respawn(NPC, Spawn)
  442. spawn(NPC)
  443. end