1
0
EQ2Emu/docs/lua_functions/GetOrigX.md

592 B
Raw Blame History

Function: GetOrigX(Spawn)

Description: Returns the original X coordinate of the specified spawns spawn point (where it was initially placed in the zone).

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

Returns: Float The X position of the spawns 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