Hubs Top Leecher Script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Hubs Top Leecher Script

Started by catwo, 18 May, 2005, 19:32:03

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

catwo

Hi, anyone fancy writing a script that will check all users in hub for number of hubs the users are in and whoever is in most hubs the script displays something like the following in main chat?

Congratulations [XXX]Catwo you are the hubs top leecher you are in xx hubs with xx slots open!

To be checked and repeated every x minutes? Any help as always much appreciated. :D

Dessamator

hmmm sure simple to do, im on it, unless  somebody does it first :)
Ignorance is Bliss.

Dessamator

#2
--By Dessamator
--Top Leecher

min=30 -- time to wait b4 reporting top leecher

bot=frmHub:GetHubBotName() -- bots name
function Main()
SetTimer(60*1000*min)
StartTimer()
end

function OnTimer()
	local hubs=0
	for pos,user in frmHub:GetOnlineUsers() do
		if user.iHubs>hubs then
			temp="Congratulations "..user.sName.." you are the hubs top leecher you are in "..user.iHubs.." hubs with "..user.iSlots.." slots open!"
		hubs=user.iHubs
		end
	
	end
	SendToAll(bot,temp)
	temp=nil
	hubs=nil
end

Done !
Post edited
Ignorance is Bliss.

catwo

Thanks Dessamator, it seems to be just a random selection rather than picking the user in the most hubs?

Dessamator

QuoteOriginally posted by catwo
Thanks Dessamator, it seems to be just a random selection rather than picking the user in the most hubs?

nop, i edited the post, it was like that in the beginming, now it should work fine !, at least for me it does, :)
Ignorance is Bliss.

catwo

Awwww i get the following now lol
[21:42] Congratulations simon you are the hubs top leecher you are in 94 hubs with 1 slots open!
[21:42] Congratulations simon you are the hubs top leecher you are in 94 hubs with 1 slots open!
[21:42] Congratulations simon you are the hubs top leecher you are in 94 hubs with 1 slots open!
[21:42] Congratulations simon you are the hubs top leecher you are in 94 hubs with 1 slots open!
[21:42] Congratulations simon you are the hubs top leecher you are in 94 hubs with 1 slots open!
[21:42] Congratulations simon you are the hubs top leecher you are in 94 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!
[21:43] Congratulations simon you are the hubs top leecher you are in 93 hubs with 1 slots open!

Dessamator

lol, yah i forgot to remove that after debugging, post edited above , :)
Ignorance is Bliss.

catwo

Thanks Dessamator works a treat, once again thanks for your time and efforts its much appreciated. :D

Dessamator

QuoteOriginally posted by catwo
Thanks Dessamator works a treat, once again thanks for your time and efforts its much appreciated. :D
ur welcome :)
Ignorance is Bliss.

SMF spam blocked by CleanTalk