PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: Dreams on 21 January, 2010, 14:11:41

Title: Monthly Uptime / DelReg Script
Post by: Dreams on 21 January, 2010, 14:11:41
Im adding a request now when im understanding what the TopHubbers Script is for.
If anyone has or can make this script, i say thanks! :)
Somethings taken from the TopHubbers Script and some new.

Mothly Uptime > Show Top "..tSettings.iMax.." Hubbers
                    > Show Top X-Y Hubbers
                    > Show A Users Stats
                    > Show My Stats

Warns the user by his/her total time in PM.
That in the end of the month, if a user havent filled the criteria of (ex: 25h) they get DelReg.

If the rules are set to Minimum 25h/month, i dont want the users who cant fullfill that to be on the hub.
Only the ones who contacts crew to get there Accounts locked (cause of a situation making them not beeing online) should have the abillity to have there Accounts left but not able to download before activating it again.
Title: Re: Monthly Uptime / DelReg Script
Post by: Mr.T on 08 February, 2010, 16:56:13
can somebody make a script like that please :)
Title: Re: Monthly Uptime / DelReg Script
Post by: Dreams on 16 April, 2010, 23:31:17
Or is there someone who can make a monthly uptime script, that reports to OpsChat in the end of the month wish users havent fullfilled the criteria of ex. 25h a month?
Title: Re: Monthly Uptime / DelReg Script
Post by: CrazyGuy on 17 April, 2010, 17:45:03
Quote from: Mutor on 16 April, 2010, 23:52:55
No, there is no one that talented around here.

lol  ;D
Title: Re: Monthly Uptime / DelReg Script
Post by: TZB on 17 April, 2010, 19:17:21
i can name few But for starters the two people who posted before me are the people you are actually looking for.The best two options available.
Title: Re: Monthly Uptime / DelReg Script
Post by: Dreams on 18 April, 2010, 00:46:56
Yeah, i tought so,, i know they are good =) but mybe it cant be done, or they dont have the time to do this =) and i belive i have to accept that, but it would be pretty nice with a script like this.
Title: Re: Monthly Uptime / DelReg Script
Post by: CrazyGuy on 18 April, 2010, 00:50:35
Quote from: Dreams on 18 April, 2010, 00:46:56
Yeah, i tought so,, i know they are good =) but mybe it cant be done, or they dont have the time to do this =) and i belive i have to accept that, but it would be pretty nice with a script like this.

There are many other talented scripters as well. Mutor and I may be the most verbally present ones but that doesn't make us the only ones  ;)
Personally I currently don't have time to fullfill your request, but I can tell you that of course it can be done.
And it's not that difficult either.
Maybe it's an idea to look into one of the scripting tutorials and try and make it yourself ? It could be a fun learning project  :)

A few pointers on what you need
- A table storing data for each user
- A setting for min required uptime per month
- Each time a registered user comes online, you store the current date and time
- Each time a registered user goes offline, you substract the login date/time from the logout date/time to get the uptime
- A timer which is called each month that compares every registered users uptime with the minimum required uptime
- Note that it could happen a user is online when the timer fires. Then the latest sessions uptime isn't registered yet so it will have to be added
- Reset all stats to 0 after the timer is finished
Title: Re: Monthly Uptime / DelReg Script
Post by: Dreams on 18 April, 2010, 14:51:46
Hmm, i will have a look at it, but i dont belive i can fix this myself =). But thanks for the tips.