123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458 |
- --[[
- 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
|