--[[ Script Name : SpawnScripts/IsleRefuge1/agrovedeer.lua Script Author : LordPazuzu Script Date : 2022.09.05 07:09:57 Script Purpose : : --]] require "SpawnScripts/Generic/NPCModule" function spawn(NPC, Spawn) NPCModule(NPC, Spawn) SetInfoStructUInt(NPC, "friendly_target_npc", 1) Diseased(NPC) ChooseMovement(NPC) end function Diseased(NPC) choice= MakeRandomInt(1,2) if choice == 1 then CastSpell(NPC,993) SetTempVariable(NPC,"Update","false" ) else SetTempVariable(NPC,"Update","true" ) end end 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. if HasSpellEffect(NPC,993) then if SpellName == 'Minor Healing' or SpellName == 'Minor Arch Healing' or SpellName == 'Cure' or SpellName == 'Cure Noxious' then choice = MakeRandomInt(1,2) if choice ==1 then SendMessage(Spawn, "The grove deer bleats appreciatively as it appears healthier.") elseif choice ==2 then SendMessage(Spawn, "The grove deer's hooves stomp thankfully as its disease abates.") end CastSpell(NPC,993,1, NPC) SpawnSet(NPC,"visual_state",0) FaceTarget(NPC,Spawn) SetTempVariable(NPC,"Update","true" ) AddTimer(NPC,120000,"DiseaseReturn") end end end function DiseaseReturn(NPC) --Reset Disease CastSpell(NPC,993,1, NPC) SetTempVariable(NPC,"Update","false" ) end function death (NPC,Spawn) -- Gives Quest Update if on the scout quest 'Deer Hunt'. ONLY Healthy deer update. if GetQuestStep(Spawn,5737)==1 then if GetTempVariable(NPC, "Update") == "true" then -- if not HasSpellEffect(NPC,993) then AddStepProgress(Spawn,5737,1,1) SendMessage(Spawn, "You successfully harvest the grove deer.") else SendMessage(Spawn, "This deer's meat was diseased! A priest could have healed this disease away.") end end end function ChooseMovement(NPC) if GetSpawnLocationID(NPC)==133774734 then MovementLoopAddLocation(NPC, 184.21, 1.3, 90.95, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 185.05, 1.3, 94.3, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 181.7, 1.35, 98.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 177.85, 1.33, 99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.03, 1.37, 99.51, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.6, 1.34, 96.78, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.8, 1.33, 95.76, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 178.98, 1.32, 97.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176, 1.33, 94.95, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.27, 1.35, 94, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.03, 1.38, 99.98, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.22, 1.37, 100.47, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 174.96, 1.34, 95.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.92, 1.34, 89.92, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.87, 1.33, 87.9, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 183.13, 1.31, 84.96, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 184.59, 1.3, 86.69, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 183.13, 1.31, 84.96, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.87, 1.33, 87.9, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.92, 1.34, 89.92, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 174.96, 1.34, 95.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.22, 1.37, 100.47, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.03, 1.38, 99.98, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.27, 1.35, 94, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176, 1.33, 94.95, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 178.98, 1.32, 97.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.8, 1.33, 95.76, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.6, 1.34, 96.78, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.03, 1.37, 99.51, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 177.85, 1.33, 99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 181.7, 1.35, 98.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 185.05, 1.3, 94.3, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 184.21, 1.3, 90.95, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774732 then MovementLoopAddLocation(NPC, 164.93, 1.38, 86.1, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.59, 1.37, 82.36, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 167.82, 1.37, 80.02, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 170.18, 1.36, 79.2, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.12, 1.34, 76.76, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.39, 1.35, 75.02, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.71, 1.35, 78.7, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.5, 1.35, 84.56, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 168.65, 1.36, 86.97, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.62, 1.37, 90.25, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 164.59, 1.38, 94.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.66, 1.38, 90.1, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 163.6, 1.38, 86.73, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.09, 1.37, 81.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 167.79, 1.37, 78.68, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.09, 1.37, 81.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 163.6, 1.38, 86.73, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.66, 1.38, 90.1, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 164.59, 1.38, 94.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.62, 1.37, 90.25, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 168.65, 1.36, 86.97, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.5, 1.35, 84.56, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.71, 1.35, 78.7, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.39, 1.35, 75.02, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.12, 1.34, 76.76, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 170.18, 1.36, 79.2, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 167.82, 1.37, 80.02, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.59, 1.37, 82.36, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 164.93, 1.38, 86.1, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774733 then MovementLoopAddLocation(NPC, 152.43, 1.42, 89.13, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 149.66, 1.43, 92.69, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.27, 1.43, 96.55, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 156.41, 1.41, 96.4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 151.73, 1.42, 94, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 158.15, 1.4, 91.56, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 158.25, 1.4, 99.11, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 153.01, 1.42, 95.96, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.08, 1.44, 92.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.34, 1.46, 93.62, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.95, 1.45, 96.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.18, 1.43, 97.13, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.31, 1.4, 91.06, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 156.91, 1.41, 88.75, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.31, 1.4, 91.06, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.18, 1.43, 97.13, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.95, 1.45, 96.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.34, 1.46, 93.62, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.08, 1.44, 92.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 153.01, 1.42, 95.96, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 158.25, 1.4, 99.11, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 158.15, 1.4, 91.56, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 151.73, 1.42, 94, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 156.41, 1.41, 96.4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.27, 1.43, 96.55, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 149.66, 1.43, 92.69, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 152.43, 1.42, 89.13, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774718 then MovementLoopAddLocation(NPC, 146.03, 1.45, 88.16, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 141.58, 1.46, 88.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 140.48, 1.47, 86.41, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 140.38, 1.47, 83.98, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.32, 1.45, 82.06, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.99, 1.44, 80.75, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.31, 1.45, 77.96, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.8, 1.46, 76.44, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 141.57, 1.46, 80.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 145.94, 1.45, 82.36, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 152.09, 1.43, 79.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 150, 1.43, 78.61, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.23, 1.44, 82.59, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.26, 1.45, 88.55, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 140.05, 1.47, 88.93, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 139.28, 1.47, 91.56, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 138.12, 1.47, 93.18, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 139.68, 1.47, 89.67, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 139.17, 1.47, 86.68, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.15, 1.45, 82.19, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.06, 1.44, 84.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.15, 1.45, 82.19, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 139.17, 1.47, 86.68, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 139.68, 1.47, 89.67, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 138.12, 1.47, 93.18, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 139.28, 1.47, 91.56, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 140.05, 1.47, 88.93, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.26, 1.45, 88.55, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.23, 1.44, 82.59, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 150, 1.43, 78.61, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 152.09, 1.43, 79.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 145.94, 1.45, 82.36, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 141.57, 1.46, 80.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.8, 1.46, 76.44, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.31, 1.45, 77.96, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.99, 1.44, 80.75, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 144.32, 1.45, 82.06, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 140.38, 1.47, 83.98, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 140.48, 1.47, 86.41, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 141.58, 1.46, 88.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.03, 1.45, 88.16, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774709 then MovementLoopAddLocation(NPC, 160.2, 1.39, 81.98, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.69, 1.39, 75.46, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.32, 1.38, 72.19, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.62, 1.4, 72.82, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.9, 1.4, 78.28, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.74, 1.37, 79.36, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.52, 1.35, 76.78, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.19, 1.35, 73.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.12, 1.36, 76.77, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.38, 1.37, 79.3, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.67, 1.4, 80.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.33, 1.41, 74.28, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 161.88, 1.39, 75.06, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.5, 1.41, 78.19, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.15, 1.39, 81.14, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.5, 1.41, 78.19, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 161.88, 1.39, 75.06, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.33, 1.41, 74.28, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.67, 1.4, 80.33, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.38, 1.37, 79.3, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.12, 1.36, 76.77, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.19, 1.35, 73.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.52, 1.35, 76.78, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.74, 1.37, 79.36, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 157.9, 1.4, 78.28, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.62, 1.4, 72.82, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.32, 1.38, 72.19, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.69, 1.39, 75.46, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.2, 1.39, 81.98, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774712 then MovementLoopAddLocation(NPC, 151.73, 1.43, 76.35, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 147.53, 1.44, 77.53, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 152.03, 1.43, 68.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.64, 1.44, 69.38, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 149.87, 1.43, 77.81, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.78, 1.46, 77, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 131.38, 1.5, 69.05, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 129.01, 1.57, 63.68, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 126.33, 1.52, 74.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 128.6, 1.52, 73.31, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 129.33, 1.52, 59.14, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 133.57, 1.15, 59.18, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 132.87, 1.33, 65.21, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.34, 1.45, 75.57, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 150.04, 1.43, 72.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 150.11, 1.43, 78.64, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 150.04, 1.43, 72.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 146.34, 1.45, 75.57, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 132.87, 1.33, 65.21, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 133.57, 1.15, 59.18, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 129.33, 1.52, 59.14, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 128.6, 1.52, 73.31, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 126.33, 1.52, 74.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 129.01, 1.57, 63.68, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 131.38, 1.5, 69.05, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 142.78, 1.46, 77, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 149.87, 1.43, 77.81, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 148.64, 1.44, 69.38, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 152.03, 1.43, 68.66, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 147.53, 1.44, 77.53, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 151.73, 1.43, 76.35, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774710 then MovementLoopAddLocation(NPC, 164.88, 1.38, 54.04, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 159.33, 1.4, 57.16, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 153.87, 1.42, 61.91, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 156.56, 1.41, 57.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.26, 1.39, 54.76, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.01, 1.36, 60.07, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.26, 1.35, 55.7, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.19, 1.37, 54.87, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.26, 1.35, 55.7, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.01, 1.36, 60.07, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 162.26, 1.39, 54.76, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 156.56, 1.41, 57.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 153.87, 1.42, 61.91, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 159.33, 1.4, 57.16, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 164.88, 1.38, 54.04, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774738 then MovementLoopAddLocation(NPC, 190.74, 1.29, 54.14, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 198.29, 1.26, 59.59, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 202.39, 1.24, 59.17, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 201.25, 1.26, 53.16, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.61, 1.28, 54.51, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 194.89, 1.27, 57, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 197.56, 1.26, 52.17, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.46, 1.28, 50.04, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 174.51, 1.35, 54.69, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.03, 1.35, 51.27, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 178.19, 1.33, 59.52, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.6, 1.34, 61.07, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.17, 1.35, 60.28, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 188.25, 1.3, 52.82, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.23, 1.28, 48.7, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 203.83, 1.26, 55.53, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 200.95, 1.25, 58.62, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 205.99, 1.23, 61.63, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 203.6, 1.24, 64.72, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 202.98, 1.24, 58.78, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 197.15, 1.26, 53.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 191.79, 1.28, 56.43, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 197.15, 1.26, 53.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 202.98, 1.24, 58.78, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 203.6, 1.24, 64.72, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 205.99, 1.23, 61.63, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 200.95, 1.25, 58.62, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 203.83, 1.26, 55.53, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.23, 1.28, 48.7, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 188.25, 1.3, 52.82, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 173.17, 1.35, 60.28, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.6, 1.34, 61.07, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 178.19, 1.33, 59.52, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.03, 1.35, 51.27, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 174.51, 1.35, 54.69, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.46, 1.28, 50.04, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 197.56, 1.26, 52.17, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 194.89, 1.27, 57, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.61, 1.28, 54.51, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 201.25, 1.26, 53.16, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 202.39, 1.24, 59.17, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 198.29, 1.26, 59.59, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 190.74, 1.29, 54.14, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774713 then MovementLoopAddLocation(NPC, 175.51, 1.34, 67.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 178.8, 1.33, 71.71, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 185, 1.31, 69.88, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 182.61, 1.32, 66.88, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.7, 1.34, 65.24, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.8, 1.34, 63.73, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 182.8, 1.31, 66.24, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 185.55, 1.3, 70.09, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 186.2, 1.3, 69.45, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 195.15, 1.27, 51.6, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.28, 1.28, 48.05, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 196.69, 1.27, 48.46, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 195.01, 1.27, 56.93, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 187.93, 1.3, 68.25, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 186.86, 1.3, 75.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 184.02, 1.31, 75.47, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 182.45, 1.32, 69.38, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.06, 1.34, 64.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.43, 1.35, 69.07, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.06, 1.34, 64.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 182.45, 1.32, 69.38, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 184.02, 1.31, 75.47, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 186.86, 1.3, 75.8, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 187.93, 1.3, 68.25, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 195.01, 1.27, 56.93, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 196.69, 1.27, 48.46, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 192.28, 1.28, 48.05, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 195.15, 1.27, 51.6, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 186.2, 1.3, 69.45, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 185.55, 1.3, 70.09, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 182.8, 1.31, 66.24, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.8, 1.34, 63.73, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 176.7, 1.34, 65.24, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 182.61, 1.32, 66.88, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 185, 1.31, 69.88, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 178.8, 1.33, 71.71, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 175.51, 1.34, 67.8, 2, math.random(5,10)) elseif GetSpawnLocationID(NPC)==133774711 then MovementLoopAddLocation(NPC, 165.01, 1.38, 66.5, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.81, 1.4, 65.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 159.73, 1.4, 67.75, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.4, 1.4, 71.42, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 163.36, 1.39, 71.89, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.44, 1.38, 68.97, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.63, 1.37, 66.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.01, 1.37, 63.13, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.4, 1.36, 63.04, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.86, 1.35, 65.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.67, 1.36, 68.17, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 158.94, 1.4, 64.15, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 155.52, 1.42, 65.94, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.12, 1.4, 65.86, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 163.64, 1.39, 62.97, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.11, 1.38, 70, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 163.64, 1.39, 62.97, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.12, 1.4, 65.86, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 155.52, 1.42, 65.94, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 158.94, 1.4, 64.15, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.67, 1.36, 68.17, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 172.86, 1.35, 65.49, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 171.4, 1.36, 63.04, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 169.01, 1.37, 63.13, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 166.63, 1.37, 66.23, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.44, 1.38, 68.97, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 163.36, 1.39, 71.89, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.4, 1.4, 71.42, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 159.73, 1.4, 67.75, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 160.81, 1.4, 65.99, 2, math.random(5,10)) MovementLoopAddLocation(NPC, 165.01, 1.38, 66.5, 2, math.random(5,10)) end end --[[ local route = math.random(1,4) if route == 1 then RouteOne(NPC, Spawn) elseif route == 2 then RouteTwo(NPC, Spawn) elseif route == 3 then RouteThree(NPC, Spawn) elseif route == 4 then RouteFour(NPC, Spawn) end end function RouteOne(NPC, Spawn) local X = GetX(NPC) local Y = GetY(NPC) local Z = GetZ(NPC) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 12, Y, Z, 2,math.random(5,10)) MovementLoopAddLocation(NPC, X + 12, Y, Z + 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 5, Y, Z + 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) end function RouteTwo(NPC, Spawn) local X = GetX(NPC) local Y = GetY(NPC) local Z = GetZ(NPC) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 5, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 14, Y, Z - 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 12, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 12, Y, Z - 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X, Y, Z, 1, 0) end function RouteThree(NPC, Spawn) local X = GetX(NPC) local Y = GetY(NPC) local Z = GetZ(NPC) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 12, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 5, Y, Z - 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 14, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X + 12, Y, Z - 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) end function RouteFour(NPC, Spawn) local X = GetX(NPC) local Y = GetY(NPC) local Z = GetZ(NPC) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 12, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 5, Y, Z + 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 14, Y, Z, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X - 12, Y, Z + 4, 2, math.random(5,10)) MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10)) end ]]-- function respawn(NPC, Spawn) spawn(NPC) end