123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- --[[
- Script Name : SpawnScripts/Classic_forest/aruinsskulker.lua
- Script Author : LordPazuzu
- Script Date : 2022.10.14 07:10:56
- Script Purpose :
- :
- --]]
- function spawn(NPC)
- AddTimer(NPC,math.random (2000,6000),"EmoteLoop")
-
- --ChooseMovement(NPC)
- end
- function ChooseMovement(NPC)
- 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 + 8, Y, Z, 2,math.random(5,10))
- MovementLoopAddLocation(NPC, X + 8, Y, Z + 4, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X + 10, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X + 8, 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 - 8, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X - 8, Y, Z - 4, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X - 10, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X - 8, Y, Z - 4,2, math.random(5,10))
- MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10))
- 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 + 8, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X + 8, Y, Z - 4, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X + 10, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X + 8, 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 - 8, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X - 8, Y, Z + 4, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X - 10, Y, Z, 2, math.random(5,10))
- MovementLoopAddLocation(NPC, X - 8, 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
- function hailed(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- end
- function EmoteLoop(NPC,Spawn)
- if IsInCombat(NPC) == false and HasMoved(NPC)==false then
- choice = MakeRandomInt(1,12)
- if choice == 1 then
- PlayFlavor(NPC, "", "", "treaten", 0, 0, Spawn, 0)
- elseif choice == 2 then
- PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn, 0)
- elseif choice == 3 then
- PlayFlavor(NPC, "", "", "frustrated", 0, 0, Spawn, 0)
- elseif choice == 4 then
- PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn, 0)
- elseif choice == 5 then
- PlayFlavor(NPC, "", "", "feint", 0, 0, Spawn, 0)
- elseif choice == 6 then
- PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn, 0)
- elseif choice == 7 then
- PlayFlavor(NPC, "", "", "taunt", 0, 0, Spawn, 0)
- elseif choice == 8 then
- PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn, 0)
- elseif choice == 9 then
- PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn, 0)
- elseif choice == 10 then
- PlayFlavor(NPC, "", "", "cackle", 0, 0, Spawn, 0)
- elseif choice == 11 then
- PlayFlavor(NPC, "", "", "doubletake", 0, 0, Spawn, 0)
- elseif choice == 12 then
- PlayFlavor(NPC, "", "", "tantrum_short", 0, 0, Spawn, 0)
- end
- AddTimer(NPC,MakeRandomInt(7000,9000),"EmoteLoop")
- else
- AddTimer(NPC,MakeRandomInt(10000,11000),"EmoteLoop")
- end
-
- end
|