PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: [NL]Pur on 27 January, 2004, 14:52:51

Title: USER stats script teaser ;)
Post by: [NL]Pur on 27 January, 2004, 14:52:51
well i got basicilly the script working,
but i really like too know how it goes on bigger hubs first
like 400 users.
Here's looks like

Top Ten since last login Hub uptime: 1 hours 30 minutes
 _____________________________________________________________________________
/  
<1.> [NL]Pinkie64bit
100.00% 1 hours 30 minutes
<2.> [NL]Puru
100.00% 1 hours 30 minutes
<3.> [TGT][NL]Donna[eric]
100.00% 1 hours 30 minutes
<4.> [NL]..::]l[SilveR]l[::..
100.00% 1 hours 30 minutes
<5.> Drekbak
100.00% 1 hours 30 minutes
<6.> [adsl]ap.nl
66.67% 1 hours
<7.> susanne
66.67% 1 hours
<8.> semp
66.67% 1 hours
<9.> Bartbond008
33.33% 30 minutes
<10.> [NL]_Purmerend_2
33.33% 30 minutes
 _____________________________________________________________________________/


it can give

alltime stats    
alltime top 10,50 and 100
online stats
online top 10,50 and 100

plz some feedback on it, stuff i can add or summthing :)
Title:
Post by: plop on 27 January, 2004, 16:52:03
cool start, keep it going.

plop
Title:
Post by: [NL]Pur on 27 January, 2004, 17:07:36
for download
here (http://wiebren.wijbrands.com/scripts/uptimev1.rar)
Title:
Post by: plop on 27 January, 2004, 17:22:13
i wonder which clone talks the most in my hub. lol

plop
Title:
Post by: [NL]Pur on 27 January, 2004, 17:30:55
clone?
Title:
Post by: plop on 27 January, 2004, 17:35:10
(http://www.thegoldenangel.org/images/lua/cloning.jpg)
just 1 client here 2 work. lol

was working on some modifications of the kick/ban functions of a.i..
got a bit tired of unbanning myself that i made a few clones.

plop
Title:
Post by: [NL]Pur on 27 January, 2004, 17:37:19
plopper de plop

that are many plops :D
Title:
Post by: plop on 27 January, 2004, 17:56:02
QuoteOriginally posted by [NL]Pur
plopper de plop

that are many plops :D
and 2 plops who plop them plop eeehm out.

plop
Title:
Post by: c h i l l a on 27 January, 2004, 18:07:30
dunno.. but I think there is a function from RabidWombat and from Tezlo in there.

You have 2 table right, one is current one is the total time  right??

so you run through both each tick..
+ you also check on the second if the user is in the first table...

you know a script called hubtime??

well here the thing either have one table with all user in it, and count each one up, and using the GetItemByName()  function.

Or use 2 tables (current Hubtime), but only count one,
the current online time, and when a user disconnects add that time to, the main table. I think the most efficient, solution.

Or Plops way, store the Connection time, and on disconnect calculate the time between.
Also very good when you have a timer, that will like only calcutlate people who been online over 10 min or so.
Then I think its the best you can have actually.
hmm.. i think I see something here to update myself ;).

But more as a combination of both..  since I don't like the Julianday() function.. think its to high for me. (Although I'm stoned :D)
Title:
Post by: [NL]Pur on 27 January, 2004, 18:18:34
i used the functions
function Serialize(tTable,sTableName,hFile,sTab)   <-- i think this is rabids one


sorting i don't know ,        tezlo ?
function sorting(table)


i used getitembyname also
but since it's giving users online that aren't online
and is bugged like **$#(  i'm not using it.

futher of all i don't care about accurency of the script since i'm giving every one online each 15 min a point.

if they just login a 2 sec before i give point they may find themselves lucky.

the rest i've written from scratch with help of phatty and guibs :)

i'll add credits for the two functions i have used
anyone knows who wrote sorting ?


i had the script first with on disconnect a add but i found that the alltime stats we're a bit fake.

i don't recommend it too be run in a big hub
Title:
Post by: c h i l l a on 27 January, 2004, 19:42:24
nope I thaught this year thing was from tezlo.
but sorting no idea, looks like nomral code to my, I als use it, but in different ways.

well..  okey.

And GetItemByName returned nick online when they weren't.
Hu..  you must give an exsample please.
I only know GetItemByName work lowercase as upper as normal.

Well I thaught you wanted to optimes it, and if its only every 15 min. then why not. Only use one table?
Title:
Post by: [NL]Pur on 27 January, 2004, 20:03:16
strange thing is i didn't saw the hubtime script since today.

and the function that i wrote looks simular too his.
Title:
Post by: VidFamne on 27 January, 2004, 20:22:42
Look here (http://board.univ-angers.fr/thread.php?threadid=319&boardid=12&styleid=1&sid=78d3a6ec5bce960ea91c68ef32a22dd8)  to see if you could get some ideas. ;)
Title:
Post by: c h i l l a on 27 January, 2004, 20:41:42
the idea is the same I'd say, but your is different, totally, I think. Same aim but different handling / Style ;)
Title:
Post by: [NL]Pur on 28 January, 2004, 00:16:36
true,

tho i'm thinking of extending this one a little bit futher soon.