592 B
592 B
Function: GetOrigX(Spawn)
Description: Returns the original X coordinate of the specified spawn’s spawn point (where it was initially placed in the zone).
Parameters:
spawn
(Spawn) - Spawn object representingspawn
.
Returns: Float – The X position of the spawn’s original location.
Example:
-- From SpawnScripts/OutpostOverlord/acliffdiverhawk.lua
function ReturnHome(NPC)
local x = GetOrigX(NPC)
local y = GetORigY(NPC)
local z = GetOrigZ(NPC)
if IsInCombat(NPC) == false then
MoveToLocation(NPC, x, y, z, 5)
end