Skip to content

Object Check Functions

gObjIsChangeSkin(aIndex)

Returns whether the player has an active skin transformation.

if gObjIsChangeSkin(aIndex) then
    LogAdd(LOG_BLUE, "Player is transformed.")
end

gObjCheckMaxMoney(aIndex, money)

Checks if adding money would exceed the maximum Zen limit.

if gObjCheckMaxMoney(aIndex, 1000000) then
    LogAdd(LOG_GREEN, "Can receive 1M zen.")
end

gObjCheckPersonalCode(aIndex, personalCode)

Validates the player's personal (numeric) code.

  • Returns: boolean
if gObjCheckPersonalCode(aIndex, "123456") then
    LogAdd(LOG_GREEN, "Personal code verified.")
end

gObjCheckResistance(lpObj, type)

Checks the object's resistance to a given damage/effect type.

local resist = gObjCheckResistance(player, 1)

gObjCheckTeleportArea(aIndex, map, x, y)

Checks if teleportation to the given location is allowed.

if gObjCheckTeleportArea(aIndex, 0, 130, 130) then
    LogAdd(LOG_GREEN, "Teleport allowed.")
end

gObjCheckMapTile(map, x, y, attr)

Checks map tile attributes at the given position.

gObjCheckMapTile(0, 130, 130, 4) -- Check safe-zone attribute

MapCheckAttr(mapNumber, x, y, attr)

Checks if a map tile has the specified attribute flag.

  • Returns: boolean
if MapCheckAttr(0, 130, 130, 1) then
    LogAdd(LOG_BLUE, "Tile is blocked (stand attribute).")
end

gObjCheckWarStatus(lpObj) / gObjCheckDuelStatus(lpObj)

Check if the player is in a guild war or duel.

if gObjCheckWarStatus(player) then
    LogAdd(LOG_RED, "Player is in a guild war.")
end

gObjCheckInterfaceBlockAccions(lpObj)

Checks if the player's interface is blocked (e.g., in trade, shop, etc.).

if gObjCheckInterfaceBlockAccions(player) then
    GCNoticeSend(player.Index, 1, "Close all windows first.")
end

gObjCheckTileArea(map, x, y, range)

Checks tile attributes in an area around the position.

gObjCheckTileArea(0, 130, 130, 3)

gObjCheckAttackArea(aIndex, bIndex, range)

Checks if attack is valid in the area between two objects.

gObjCheckAttackArea(player.Index, target.Index, 5)

gObjCheckAutoParty(aIndex)

Checks if the player has auto-party enabled.

if gObjCheckAutoParty(aIndex) then
    LogAdd(LOG_GREEN, "Auto-party is enabled.")
end