SphereCommunity
Regarding Time Online - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Regarding Time Online (/Thread-Regarding-Time-Online)

Pages: 1 2 3


RE: Regarding Time Online - Rattlehead - 08-15-2013 08:30 AM

well, it seemed to me, he only wanted to know if they were in game for a full hour at a time, if they were on for 15 minutes, logged off, then their hour was to start over, not continue on until they have reached an hour, so i was under the assumption, they log off, time starts over.

and since the timers running on each player is also very light-weight, even more so than yours is, then i cant grasp how you are conceiving that a heavier timer running globally and firing on each character every few minutes could be less resource consuming at all.

honestly i dont like either idea very much, i would rather find a way a trigger could fire the function to add to the tag then do away with timers all together, but i cant come up with one that would be reliable enuff so that players wont log off thinking they were on for an hour, and nvr tripped the trigger to add to the tag.


RE: Regarding Time Online - Mordaunt - 08-15-2013 09:07 AM

I'd go with the f_onserver_timer set the interval to 1 minute to write to ctags on online players.
Yes it's a little heavier, but I often have f_onserver_timer set to that for other stuff anyway, and honestly how many players do you have online at once on a server nowadays anyway?


RE: Regarding Time Online - Rattlehead - 08-15-2013 12:40 PM

ON=@Logout
src.f_hoursonline

[function f_hoursonline]
src.TAG.OnlineHours += <eval <ACCOUNT.LASTCONNECTTIME>/60> // per courja Wink
return <eval <src.tag.OnlineHours>>

assuming this works of course, the function will return their total connected hours when called right?
he could then use this in his calls in his scripts @logoff or whatnot, no need for timers, totally pretty much corjas first idea Tongue