Gametime to int
Revision as of 16:16, 9 July 2011 by imported>Theraze (Created page with "{{ #vardefine:name|gametime_to_int}}{{ #vardefine:return_type|int}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate}}| ...")
Function Syntax
int gametime_to_int()
Returns the current KoL game time using milliseconds since rollover.
Code Samples
This code will tell you how many MS it took to list the gCLI commands.
int starttime = gametime_to_int();
CLI_EXECUTE("help");
print("It took "+(gametime_to_int()-starttime)+" MS to list all gCLI commands.");
code2=
Code Samples
This code will tell you how many MS it has been since KoL's official rollover time.
print("It has been "+gametime_to_int()+" MS since the rollover began.");
| }}
code3=
Code Samples
This code will tell you long since KoL's official rollover time began without hitting the server.
print((gametime_to_int() / (86400000 / 24)) + ":" + ((gametime_to_int() / (86400000 / 1440)) % 60))
17:34print("It has been "+(gametime_to_int() / (86400000 / 24)) + ":" + ((gametime_to_int() / (86400000 / 1440)) % 60)+" since the rollover began.");
| }}
code4=
Code Samples
This code will tell you how many MS it has been since KoL's official rollover time.
print("You have "+(23 - (gametime_to_int() / (86400000 / 24)))+":"+(59 - ((gametime_to_int() / (86400000 / 1440)) % 60))+" left until rollover begins.")
| }}