9
3

agrovedeer.lua 28 KB

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