client.last_activity_at and client.last_packet_at - time values?
Posted: Sat Aug 06, 2016 1:25 pm
Hello,
these members are new (to me) and while testing the the newest core I tried to read the values every minute. The character was inactive, client minimized, nothing from me (will be auto logged off after 10 minutes with our configuration).
Now - whats the 'POL Clock' ??
...
last_activity_at Integer POL clock when last activity has been made r/o
last_packet_at Integer POL clock when last packet has been received r/o
...
There is a POL Gametime (can be read with ReadGameClock(), increments every second). There is a MilliSecondClock (can be read with ReadMillisecondClock(), increments every millisecond). The values in both of the new variables are different and make not really sense to me.
Additionally the value of .last_packet_at makes not much sense, since it ever increments, even when the client is idle. It obviously also counts packets send _to_ the client, and there are many (weather, "You see..." messages, and so on). So what use is this value?
last_activity_at looks good in the way that it does not increment over time, when the client is idle. And if one does something (moving something in the backpack, talking,...) it increments itself (to a value near the value of .last_packet_at), so the values obviously make some sort of sense, but there is no comparison value, or is there a method to read the current POL clock? I expected both values to be in GameClock, but they aren't.
It seems sort of a 10 ms clock, since the last_packet_at value increments by approx. 6000 (a bit less, mostly around 5900) every minute, and the script which reads the values should run every minute. The script I used for testing runs in an endless loop with a sleep(60) inside. So I would _guess_ that the value in last_activity_at divided by 100 is the last activity in seconds. But which connection does it have to the _current_ POL clock? Can I read it somewhere?
I also tried polcore().uptime - there seems a connection, the POL clock seems to be counted from zero to uptime * 100, in 10ms steps, and rounded.
But the usability of the values is low, if they are undocumented - or did I overlook the definition of 'POL clock'? And I need a method to fetch the _current_ POL clock, to be able to determine a period (from last activity to now).
My intention is to use them for a feature, with the auto logout disabled. We want our players to be able to idle, but we need to switch off certain things and we want to change the name with a marker, so that others know the player is afk.
Again - what is the POL clock? I could experiment further but maybe the developer of this feature (Bodom from the Changelog) is present and would care to explain?
Thank you
OWHorus
these members are new (to me) and while testing the the newest core I tried to read the values every minute. The character was inactive, client minimized, nothing from me (will be auto logged off after 10 minutes with our configuration).
Now - whats the 'POL Clock' ??
...
last_activity_at Integer POL clock when last activity has been made r/o
last_packet_at Integer POL clock when last packet has been received r/o
...
There is a POL Gametime (can be read with ReadGameClock(), increments every second). There is a MilliSecondClock (can be read with ReadMillisecondClock(), increments every millisecond). The values in both of the new variables are different and make not really sense to me.
Additionally the value of .last_packet_at makes not much sense, since it ever increments, even when the client is idle. It obviously also counts packets send _to_ the client, and there are many (weather, "You see..." messages, and so on). So what use is this value?
last_activity_at looks good in the way that it does not increment over time, when the client is idle. And if one does something (moving something in the backpack, talking,...) it increments itself (to a value near the value of .last_packet_at), so the values obviously make some sort of sense, but there is no comparison value, or is there a method to read the current POL clock? I expected both values to be in GameClock, but they aren't.
It seems sort of a 10 ms clock, since the last_packet_at value increments by approx. 6000 (a bit less, mostly around 5900) every minute, and the script which reads the values should run every minute. The script I used for testing runs in an endless loop with a sleep(60) inside. So I would _guess_ that the value in last_activity_at divided by 100 is the last activity in seconds. But which connection does it have to the _current_ POL clock? Can I read it somewhere?
I also tried polcore().uptime - there seems a connection, the POL clock seems to be counted from zero to uptime * 100, in 10ms steps, and rounded.
But the usability of the values is low, if they are undocumented - or did I overlook the definition of 'POL clock'? And I need a method to fetch the _current_ POL clock, to be able to determine a period (from last activity to now).
My intention is to use them for a feature, with the auto logout disabled. We want our players to be able to idle, but we need to switch off certain things and we want to change the name with a marker, so that others know the player is afk.
Again - what is the POL clock? I could experiment further but maybe the developer of this feature (Bodom from the Changelog) is present and would care to explain?
Thank you
OWHorus