GameRules
GameRules API
GetServerGameState(): Enum.GameState
Enum.GameState
Returns the current server game state.
GetGameState(): Enum.GameState
Enum.GameState
Returns the current game state.
GetGameMode(): Enum.GameMode
Enum.GameMode
Returns the current game mode.
GetPreGameStartTime(): number
number
Returns pregame duration or 0 if now is pregame time.
GetGameStartTime(): number
number
Returns game start time duration or 0 if game is not start yet.
GetGameEndTime(): number
number
Returns game end time or 0 if game is not end yet.
GetGameLoadTime(): number
number
No idea what this function does. Returns 0 in all cases what I've tested.
GetGameTime(): number
number
Returns the current game time. Starts counting from pregame state.
Example
IsPaused(): boolean
boolean
Returns true
if game is paused.
IsTemporaryDay(): boolean
boolean
Returns true
if it's temporary day.
IsTemporaryNight(): boolean
boolean
Returns true
if it's temporary night.
IsNightstalkerNight(): boolean
boolean
Returns true
if it's nightstalker's night.
GetMatchID(): integer
integer
Returns current match id.
GetLobbyID(): integer
integer
Returns current lobby id.
GetGoodGlyphCD(): number
number
Returns game time when next radiant glyph will be available.
GetBadGlyphCD(): number
number
Returns game time when next dire glyph will be available.
GetGoodScanCD(): number
number
Returns game time when next radiant scan will be available.
GetBadScanCD(): number
number
Returns game time when next dire scan will be available.
GetGoodScanCharges(): integer
integer
Returns current radiant scan charges.
GetGoodScanCharges(): integer
integer
Returns current dire scan charges.
GetStockCount(item_id: integer
): integer
integer
): integer
item_id
integer
Returns amount of remaining items in shop by item id.
Example
IsInBanPhase(): boolean
boolean
Returns true
if game is in ban phase.
GetStateTransitionTime(): number
number
Returns time remaining between state changes.
Last updated