Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CurrentEventsGetTimers

From RoR Wiki
Revision as of 19:41, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · LiveEvent functions
Version: WAR 1.4.8

Returns the two jump-cooldown timers of the Current Events window.

playerCooldown, cooldownLength = CurrentEventsGetTimers()

Arguments

None.

Returns

playerCooldown
number – The stock UI treats this as the player's remaining jump cooldown in seconds; 0 means the player can jump.
cooldownLength
number – The stock UI treats this as the length of the jump cooldown in seconds, and shows it in minutes.

Details

  • Both values are stored as single-precision floats and returned as numbers.
  • If the current-events data is not available, the function returns nothing.
  • The stock UI uses the same function, EA_Window_CurrentEvents.OnJumpTimerUpdated, to handle this function's result and the SystemData.Events.CURRENT_EVENTS_JUMP_TIMER_UPDATED event.

Errors

None.

Example

From default/ea_currenteventswindow/source/currenteventswindow.lua:

EA_Window_CurrentEvents.OnJumpTimerUpdated( CurrentEventsGetTimers() )
...
function EA_Window_CurrentEvents.OnJumpTimerUpdated( playerCurrentTimerSeconds, jumpCooldownTimerSeconds )
    m_playerCurJumpCooldownTimerSeconds = playerCurrentTimerSeconds
    m_jumpCooldownTimerHours = jumpCooldownTimerSeconds / TimeUtils.SECONDS_PER_HOUR    
    m_jumpCooldownTimerMinutes = jumpCooldownTimerSeconds / TimeUtils.SECONDS_PER_MINUTE
    
    local jumpDisabled = m_playerCurJumpCooldownTimerSeconds ~= 0 
    ...

See also