Skip to content

get_totem_time_remains

The get_totem_time_remains function retrieves the remaining duration of a totem based on its icon ID. This function is useful for tracking the time left before a totem expires.

Parameters

  • iconID (number): The icon ID of the totem to check.

Returns

  • remaining_time (number): The remaining duration of the totem in seconds. Returns 0 if the totem is not found or has expired.

Example Usage in Lua

Here is an example of how to use the get_totem_time_remains function in Lua:

local api = ...

-- Function to print the remaining duration of a totem based on its icon ID
function PrintTotemTimeRemains(iconID)
    local remaining_time = api.get_totem_time_remains(iconID)
    print("Remaining time for totem with icon ID " .. iconID .. ": " .. remaining_time .. " seconds")
end

-- Example usage: Print the remaining duration of a totem with a specific icon ID
PrintTotemTimeRemains(136098)  -- Replace with the actual icon ID of the totem