Dustfallen 2 Posted May 4, 2012 I'm just curious how the leaderboard gains it's data? I was actually surprised that I am not in the list. Do they reset with each update? Do they only take into account things that happened in one play session? Or on one server?Are only certain servers reporting?My current character has been alive now for I imagine well over 10 hours of playtime. But I can scroll way through the list down to 5 hours and not see myself there.EDIT: Just found myself in the kills section, and was able to click my character, it says alive for 2h 50m. So now I am even more curious exactly how the data is recorded, as I know i've been alive for hours longer than that. As a note the kills section is up to date, so found myself easily. Odd. Share this post Link to post Share on other sites
tajin 17 Posted May 4, 2012 It has been mentioned somewhere that the alive-times are a bit off.Aside from that it should be pretty obvious where it gets it's data from. Share this post Link to post Share on other sites
GigaHobo 0 Posted May 4, 2012 Where can I get my little code to find me easier? The search funtion doesn't work by name it appears. Share this post Link to post Share on other sites
Dustfallen 2 Posted May 4, 2012 It has been mentioned somewhere that the alive-times are a bit off.Aside from that it should be pretty obvious where it gets it's data from.I said how, not where, thanks. I understand that since everything is persistent that the where it comes from would be the saved character data. Mighty nice of you to be helpful and condescending in the same post.As to GigaHobo's question, it's easiest to do it by kills. You should know your zombie kill count and be able to track it through there. At least I've found. Share this post Link to post Share on other sites
chewgumtj@gmail.com 0 Posted May 4, 2012 One way would be to add the time when you die to a total time data field. Share this post Link to post Share on other sites
tajin 17 Posted May 4, 2012 I said how' date=' not where, thanks. I understand that since everything is persistent that the where it comes from would be the saved character data. Mighty nice of you to be helpful and condescending in the same post.[/quote']*shrug* Wasn't my intention, it's just that for this specific case it is both pretty much the same to me.The time thing seems more like a logic-error in the script, but thats hard to tell without more details.Personally I like to send timestamps along with databaseupdates whenever it is possible, not sure how it is done here though.Maybe the db does not have a timestamp for the last login, which would be a necessity for that kind of calculation.As simplified pseudocode:oncharcreate() { setlogintimestamp(); setplaytime(0);}onlogin() { setlogintimestamp();}onlogout(), ontimeout(), ondeath() { setplaytime( getplaytime() + currenttime() - getlogintime() );} Share this post Link to post Share on other sites
griffinz 2816 Posted May 4, 2012 SELECT playerName AS Character, playerKills as Kills FROM player ORDER BY playerKills ASCENDING LIMIT 10;or something? Share this post Link to post Share on other sites
Dustfallen 2 Posted May 4, 2012 So basically we're looking at markers then? A marker is created when logged on, then again when logged off, and this gives a value, which is then added to a global variable to get total time alive? Share this post Link to post Share on other sites
rocket 16567 Posted May 4, 2012 Thats the plan, I actually have checking in/out coded. But HIVE is under alot of pressure, until we release the .NET version (rather than the current C++ version), I am minimizing the calls especially read/writes. Share this post Link to post Share on other sites