Mount Functions¶
gObjGetMountIndex(lpItem)¶
Returns the mount index from a specific item object.
- Parameters:
lpItem(GameItem): Mount item object.
- Returns:
integer— Mount index, or0if the item is not a mount.
GetMountIndex(lpObj)¶
Returns the mount index of the player's currently equipped mount.
- Parameters:
lpObj(GameObject): Player object.
- Returns:
integer— Mount index, or0if no mount equipped.
local mount = GetMountIndex(player)
if mount > 0 then
LogAdd(LOG_BLUE, "Riding mount index: " .. mount)
end
GetMountSlot(lpObj, index, checkValid, checkDur, checkPeriod)¶
Returns the mount slot with optional validation flags.
- Parameters:
lpObj(GameObject): Player object.index(integer): Mount slot index.checkValid(boolean): Validate mount item exists.checkDur(boolean): Check durability > 0.checkPeriod(boolean): Check expiration period.
- Returns:
integer— Mount slot value, or-1if validation fails.
MountDestroyMoveProc(lpObj)¶
Removes the mount when the player changes map (dismount on teleport).
- Parameters:
lpObj(GameObject): Player object.
- Returns:
void
Help