1
0
EQ2Emu/docs/lua_functions/GetCanGate.md
2025-05-20 08:50:00 -04:00

703 B

Function: GetCanGate(Spawn)

Description: Checks if the Spawn is allowed to use Gate spells in this zone or area.

Parameters:

  • Spawn: Spawn - The spawn to check if Gate is allowed.

Returns: None.

Example:

-- Example usage Spells/Commoner/CalltoHome.lua (spell to send player to their Bind with Gate)
function precast(Caster, Target)
    if GetBoundZoneID(Caster) == 0 then
        return false
    end

    if(GetCanGate(Caster) == 1)
    then
        return true   
    else
        SendMessage(Caster, "You cannot use Call to Home from this location.", "red")
        return false
    end

 return true
end

function cast(Caster, Target)
    Gate(Caster)    
end