scripting:reference:system_functions:miscfunctions
This is an old revision of the document!
Table of Contents
Misc other functions
System functions that don't fall into any other particular category
sysRealTime
Format | sysRealTime ( [Type] ) |
---|---|
Description | Returns details of the current real time (according to the server clock) |
Parameters | Type field specifying the date or time to fetch |
Returns | Depending on the type field: |
Year - returns the current year (e.g. 2014) | |
Month - returns the current month number (1 to 12) | |
Day - returns the current day number (1 to 31) | |
Hour - returns the current hour (0 to 23) | |
Minute - returns the current minute (0 to 59) | |
Second - returns the current second (0 to 59) | |
UnixTime - number of seconds passed since 1st Jan, 1970 |
Example:
Event( "UseItem", "Tea" ) { $hour = sysRealTime( "Hour" ) if ( $hour < 18 ) { *msg %PLAYER% Tea can only be used at tea-time (6pm - 8pm) } else if ( $hour >= 20 ) { *msg %PLAYER% Tea can only be used at tea-time (6pm - 8pm) } else { *notifylarge %PLAYER% Tea-time! } }
sysRaceIsActive
Format | sysRaceIsActive ( [Course_Num] ) |
---|---|
Description | Returns 1 if the specified race number is currently active ; this can include being in a pre-race setup stage or post-race results screen |
Parameters | Race Course number |
sysGetCrowFlagState
TBD
sysSetCrowFlagState
TBD
Battle game Functions
BattleSetPreludeTime
BattleSetNumRounds
BattleSetRoundTime
BattleSetRoundScore
BattleSendChallenge
Background model Functions
: Not sure what the state of these functions is atm - many of the use cases for this are covered by the entity system - needs investigation
sysAddLocalBackgroundModel
TBD
sysDeleteLocalBackgroundModel
TBD
sysDeleteAllLocalBackgroundModels
TBD
sysAddBackgroundModels
TBD
scripting/reference/system_functions/miscfunctions.1581013024.txt.gz · Last modified: 2020/02/06 12:17 by mit