TopHubbers 2.03 - LUA 5.1x [Strict][API 2]
 

TopHubbers 2.03 - LUA 5.1x [Strict][API 2]

Started by jiten, 23 December, 2007, 11:53:53

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jiten

--[[

	TopHubbers 2.03 - LUA 5.1x [Strict][API 2] by jiten
	???????????????????????????????????????????????????
	Based on: OnHub Time Logger 1.65 by chill and Robocop's layout

	Usage: !tophubbers; !tophubbers x-y; !hubtime <nick>; !myhubtime

	RECENT CHANGELOG:
	?????????????????
	Changed: Script converted to API 2 (11/24/2007)
	Fixed: Changed Serialize function (12/23/2007)

]]--

ExtreeM

hey jiten

Just have some suggestions for somthing to add in this nice script

could it show:

Monthly uptime

and daily/monthly/total uptime in the !tophubbers

and maybe the Top 10 worst tophubbers :D

would be nice if it was possible

just a little suggestion

deadlydevil316

hello,

Wish every1 a Happy and Prosperous New Year!

making some suggestions
can the ranks in this script be just 1 2 3... and so on instead of the present 1s
and can u please add there +rank to check rank of user like
+rank to show my rank and hubtime in 1 line and above it the hubtime of previous ranker and below the rank of next ranker
and
+rank username to the same as above for the given name

can the script also be such that the +hubtime to show my own hubtime to me

thanking you for help

ExtreeM

a little request from here, is it possbile to update the script so that the messages comes in the hub bot window instead of in mainchat, an true/false setting maybe??

speedX

Thanking You,

speedX


ExtreeM

hmm i have tested it about 1 month now and it doesnt show the correct uptime on all users i tryied to show tophubbers 1-200 seems that some of the many last tophubbers, the time wont count

Gnuff?

It works fine here, but anyway, if you are showing the 200 tophubbers, i won?t call it TOPhubbers anymore, just onlinetime for hubbers :)

You must use a shitload of memory to list that many
Gnuff

ExtreeM

gnuff it also works here, there was just an user that changed nick hehe, so his uptime is always the same *G* but actually the hub has been running for approx 14 days without reboot and runs fine :)

Gnuff?

Well, if he has changed his nick, then the old nick, will fall back in list, unless you are showing 200 users, with 10 users he should be gone from the list soon  :D
Gnuff

ExtreeM


Gnuff?

Quote from: ExtreeM on 27 February, 2008, 15:24:18
how do i reset the tophubbers??

Delete the 2 .tbl files in script folder relating to the script.

Not on top of the list, since you need to reset?  ;D
Gnuff

WitchHunter

Hi

I know one should not reply to old threads, but since the script is already attached here and my question is about this particular script I thought this would be worth trying. Im sorry if the correct way would have been to start a new thread instead.

Anyway... the script "TopHubbers 2.03 - LUA 5.1x [Strict][API 2]" seems, as far as I understand save the userdata to the .tbl-file only when a user exits the hub. We are using this script to maintain a certain minimum uptime in our hub and a few days ago there was a malfunction in the hub computer which caused an "all of a sudden" reboot, like pressing the Reset button. Because of this boot we lost 14 days of uptime data for those users who had not logged off during that time. Would it be possible to add a kind of timer to autosave the userdata even tho the user has not logged off, for instance once/day. That would be a good way to prevent datalosses in case of similar insidents, that happened to me.

Im very greatful for any help I can get. I do not yet know enough of scripting to be able to fix this on my own :)


speedX

#13
Maybe this will help you out.

Quote
   -- Set your interval time to save data(in Hours)
   iInterval = 24,
Thanking You,

speedX

WitchHunter

Thank you sooo much :)

The change you displayed in the example is what I expected to be done but the rest is still a little too difficult. This a good opportunity for me to find out what you changed and what you added. I really want to learn lua and I dont think it is too difficult, not even for me  ;D

Once again, thank you :)

merlin_xl54

#15
Hi,

Request if possible.

I would like to have a message returned with the command Show my stats: This is what the command returns now. Instead of the bot twice I would like to have a message like --> Hello usernick "message" where I could just open the script and put whatever I wanted there.

Say, Hello merlin_xl54, Remember to remain a VIP your daily AUT must be above 12 hours.

Is this possible?

TIA,

M

[10:19:29] <HubBot> <HubBot>

   ========================================
         Stats:
   --------------------------------------------------------------------------------
   - Nick: Usernick
   - Total uptime: 1 day(s), 4 hour(s), 13 minute(s)
   - Daily average uptime: 23 hour(s), 52 minute(s)
   - Current Rank: Jester



Edit: I replaced line 324 on my modified script - return "<"..tSettings.sBot.."> ".. sMsg
with - return "Here are the stats you requested for "..nick..", Remember to keep your AUT above 16 Hours"  ..sMsg

It seems to work for me does this seem to be correct? It returns the following.

Bot> Here are the stats you requested for merlin_xl54, Remember to keep your AUT above 16 Hours

   ========================================
         Stats:
   --------------------------------------------------------------------------------
   - Nick: merlin_xl54
   - Total uptime: 2 day(s), 15 hour(s), 5 minute(s)
   - Daily average uptime: 23 hour(s), 18 minute(s)
   - Current Rank: Jester

Living is easy with eyes closed.

merlin_xl54

Hi,

I use this script with the changes that have been made on this post. * Reply in PM and Save interval data time. My question is regarding the Average uptime AUT. When I call for top hubbers it displays all info including the Rank set in --Daily average uptime rank table. (I'll focus on 16 H), and Top Hubbers gives the Rank set to 16 H. But when I call for Show a Users stats the Daily AUT does not match and in most cases is less than the 16 H setting.

The Minimum AUT we're trying to maintain is the 16 H'rs. Is there a way to show the AUT in the tables for Show Top Hubbers and Show x-y? or fix the Rank now shown in the top Hubbers.

Am I misunderstanding the use for --Daily average uptime rank table. I thought if you set a Name for AUT of 16 H the rank in the top hubbers would show the Daily AUT assigned to that rank etc.

TIA,

M
Living is easy with eyes closed.

XTC

I get this when Im trying to upload: TopHubbers.lua:47: attempt to index global 'SetMan' (a nil value) 

WitchHunter

The hub should run before you start the script. The script cannot pull out the hub name from a hub not running.

?StIfFLEr??

can someone add reply in pm for this script.

merlin_xl54

#20
Quote from: ?StIfFLEr?? on 23 January, 2009, 05:09:56
can someone add reply in pm for this script.

This is the version I use. It has the save interval and it sends the stats in chat or PM. I also left your custom message and profiles intact.

M
Living is easy with eyes closed.

?StIfFLEr??

Friends i came across with a problem using this script.
when the hubtime crosses 1 month and some days after that the whole hubtime resets.
can anyone sort out this problem.

BIJ

#22
Hello Team,
I have problem too. I download and use this script "TopHubbers2.03A2modifiedPM.lua". When i reboot my PC, the Total Online time in TopHubbers is reset to 000 ...
I put this script in "scripts" folder in main PtokaX's folder. After i start PtokaX, the file "tOnliners.tbl" is creating in main PtokaX folder, not in "script" folder. Is that right?
Maybe i make somewhere mistake, please help me to resolve this problem.

Thanks in advance!

Best Regards

P.S
I was make some probe and i think that i find the problem. When PtokaX is not stoped correctly from Start/Stop button, for example Windows crash and auto reboot, the file tOnliners.tbl in main folder on PtokaX can't write properly and i lose any currently online time to this moment.
What you says about that?

merlin_xl54

I am not a scripter but have used this script for the past 7 months and have not lost any time. In the tSettings I use 24 and the scripts saves the data each day. I also changed the location of the fOnline to "scripts/tOnliners.tbl" That seems to keep it in the scripts folder for me. Hope that helps.

M
Living is easy with eyes closed.

CrazyGuy

Quote from: BIJ on 16 March, 2009, 12:00:25
P.S
I was make some probe and i think that i find the problem. When PtokaX is not stoped correctly from Start/Stop button, for example Windows crash and auto reboot, the file tOnliners.tbl in main folder on PtokaX can't write properly and i lose any currently online time to this moment.
What you says about that?

There is no fix for that. Settings are saved OnExit which is called when the script is properly stopped. A crash of your operating system will cause that function to be skipped (just like any other function). Compare it with a power outage, nothing will be saved.

SMF spam blocked by CleanTalk