12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- --[[
- Script Name : SpawnScripts/Antonica/aCaltorsisClericRoam.lua
- Script Author : LordPazuzu
- Script Date : 2023.02.02 09:02:38
- Script Purpose :
- :
- --]]
- dofile("SpawnScripts/Generic/MonsterCallouts/BaseGhost1.lua")
- require "SpawnScripts/Generic/NPCModule"
- function spawn(NPC, Spawn)
- NPCModule(NPC, Spawn)
- RandomMovement(NPC, Spawn, 35, -35, 2, 8, 15)
- end
- function Appearance(NPC)
- if GetGender(NPC)==2 then
- SpawnSet(NPC,"model_type",2851)
- else
- SpawnSet(NPC,"model_type",2852)
- end
- 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, 0)
- MovementLoopAddLocation(NPC, X + 35, Y, Z, 2,0)
- MovementLoopAddLocation(NPC, X , Y, Z + 35, 2, 5)
- MovementLoopAddLocation(NPC, X + 10, Y, Z -35, 2, 0)
- MovementLoopAddLocation(NPC, X + 25, Y, Z + 4, 2, 0)
- MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
- end
- function RouteTwo(NPC, Spawn)
- local X = GetX(NPC)
- local Y = GetY(NPC)
- local Z = GetZ(NPC)
- MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
- MovementLoopAddLocation(NPC, X - 35, Y, Z, 2, 0)
- MovementLoopAddLocation(NPC, X, Y, Z - 25, 2, 5)
- MovementLoopAddLocation(NPC, X - 35, Y, Z -25, 2, 0)
- MovementLoopAddLocation(NPC, X , Y, Z - 4, 2, 0)
- MovementLoopAddLocation(NPC, X, Y, Z, 1, 0, "ChooseMovement")
- end
- function RouteThree(NPC, Spawn)
- local X = GetX(NPC)
- local Y = GetY(NPC)
- local Z = GetZ(NPC)
- MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
- MovementLoopAddLocation(NPC, X + 35, Y, Z, 2, 0)
- MovementLoopAddLocation(NPC, X -35, Y, Z - 4, 2, 5)
- MovementLoopAddLocation(NPC, X + 10, Y, Z -35, 2, 0)
- MovementLoopAddLocation(NPC, X + 25, Y, Z - 25, 2, 0)
- MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
- end
- function RouteFour(NPC, Spawn)
- local X = GetX(NPC)
- local Y = GetY(NPC)
- local Z = GetZ(NPC)
- MovementLoopAddLocation(NPC, X, Y, Z, 2, 0)
- MovementLoopAddLocation(NPC, X - 25, Y, Z -25, 2, 0)
- MovementLoopAddLocation(NPC, X - 35, Y, Z + 10, 2, 5)
- MovementLoopAddLocation(NPC, X + 35, Y, Z, 2, 0)
- MovementLoopAddLocation(NPC, X - 35, Y, Z + 25, 2, 0)
- MovementLoopAddLocation(NPC, X, Y, Z, 2, math.random(5,10), "ChooseMovement")
- end
- function respawn(NPC, Spawn)
- spawn(NPC)
- end
- function hailed(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- end
|