bordemstirs
Member
I know that there's a way to get KoL date, but if there were some way to get the System Time, or even just Minutes To Rollover without hitting the server each request, that would be awesome.
[COLOR=#808000]> ash (gametime_to_int())[/COLOR]
Returned: 62984091
[COLOR=olive]> ash (gametime_to_int() / (86400000 / 24))[/COLOR]
Returned: 17
[COLOR=#808000]> ash print((gametime_to_int() / (86400000 / 24)) + ":" + ((gametime_to_int() / (86400000 / 1440)) % 60))[/COLOR]
17:34
[COLOR=#808000]> ash print(23 - (gametime_to_int() / (86400000 / 24)) + ":" + (59 - (gametime_to_int() / (86400000 / 1440)) % 60))[/COLOR]
6:23
alias torollover => ashq print("You have " + (23 - (gametime_to_int() / (86400000 / 24))) + ":" + (59 - ((gametime_to_int() / (86400000 / 1440)) % 60)) + " left until rollover happens.")
> torollover
You have 6:17 left until rollover happens.
string tillrollover() {
buffer pg = visit_url("account.php");
matcher m = create_matcher("Currently (?:.+?)(\\d\\d\\\:\\d\\d:\\d\\d)", pg);
if (m.find())
return m.group(1);
return "";
}
print(tillrollover() + " until rollover");
I know that there's a way to get KoL date, but if there were some way to get the System Time, or even just Minutes To Rollover without hitting the server each request, that would be awesome.
I am using this (based on the timescape.ash file someone else posed earlier)