Top Leecher
 

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

Top Leecher

Started by Mozzilla?, 16 November, 2006, 12:35:36

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mozzilla?

Something added to the script from Dessamator

--By Dessamator
--Top Leecher

--	Added by Mozzilla™ - 16 November 2006
--		Choice as to which profile gets checked

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

bot = "TopLeecher" -- bots name

--	Set check on or off for a given profile [0 = don't check    1 = check]
cChecks = {
	[-1] = 1,	--Unregistered User
	[0] = 0,	--Master
	[1] = 0,	--Operator
	[2] = 1,	--VIP
	[3] = 1,	--Registered User
	[4] = 0,	--Moderator
	[5] = 0,	--NetFounder
	[6] = 0,	--Owner
}

function Main()
	SetTimer(60*1000*min)
	StartTimer()
end

function OnTimer()
	local hubs = 0
	for pos, user in pairs(frmHub:GetOnlineUsers()) do
		if cChecks[user.iProfile] == 1 then
			local prof = GetProfileName(user.iProfile) or "Unregistered User"
			if user.iHubs > hubs then
				temp="\r\n\r\nCongratulations "..prof.." "..user.sName..", you are the top leecher in "..frmHub:GetHubName()..".\r\n\tAt this very moment you are in "..user.iHubs.." hubs with "..user.iSlots.." slots open!"
				hubs = user.iHubs
			end
		end
	end
	SendToAll(bot,temp)
	temp, hubs= nil, nil
end

Dessamator

Interesting, I forgot i had even done that, but anyways  you can also remove this :
temp, hubs= nil, nil


and change this :
local hubs=0

to this:
local hubs,temp=0

Ignorance is Bliss.

Mozzilla?


SMF spam blocked by CleanTalk