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
hmmm sure simple to do, im on it, unless somebody does it first :)
--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
Thanks Dessamator, it seems to be just a random selection rather than picking the user in the most hubs?
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, :)
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!
lol, yah i forgot to remove that after debugging, post edited above , :)
Thanks Dessamator works a treat, once again thanks for your time and efforts its much appreciated. :D
QuoteOriginally posted by catwo
Thanks Dessamator works a treat, once again thanks for your time and efforts its much appreciated. :D
ur welcome :)