MinShare-Script
 

MinShare-Script

Started by Tw?sT?d-d?v, 23 February, 2008, 14:40:35

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tw?sT?d-d?v

Script update . .
fixed some typos
added slot check too

-- Min-Share/sLOT Script
-- By Tw?sT?d-d?v?l    21/2/08
-- [] = Profile , {} = Minshare .
-- If setting minshare to KB,MB,GB or TB remember to change the message from set amount :)
-- Here is byte table (has best i can find)
-- 1024 = KB
-- 1048576 = MB
-- 1073741824 = GB
-- 1099511627776 = TB 
-- Added redirect addy 
-- Added Slot-Checking too
-------------------------------------------------------------
Bot = "Min-Share-Check"
Hub = "dchub://test.no-ip.org"  
Bytes = 1073741824        
Share = {
	 [0] = {0},   -- Master
	 [1] = {0},   -- Operator
	 [2] = {0},   -- VIP
	 [3] = {5},   -- Registered
	 [-1] = {7},  -- Unreg
}
Slots = {
         [0] = {0},   -- Master
	 [1] = {0},   -- Operator
	 [2] = {0},   -- VIP
	 [3] = {0},   -- Registered
	 [-1] = {3},  -- Unreg
}
--------------------------------------------------------------

function MyINFOArrival(user,data)
	Core.GetUserAllData(user) 
	if Share[user.iProfile] then
		local minShare = Share[user.iProfile][1]*Bytes
		local minNr = Share[user.iProfile][1]
		if user.iShareSize < minShare then
			Core.SendToNick(user.sNick,"<"..Bot.."> Sorry you have not meet the hubs  "..minNr.." GB Minimal share!!\n"..
                                                   "\t                    <"..Bot.."> Get more share or go here "..Hub.."")
			Core.Disconnect(user)
	        end
                if Slots[user.iProfile] then
		local minSlots = Slots[user.iProfile][1]
		local minNr = Slots[user.iProfile][1]
		if user.iSlots < minSlots then
			Core.SendToNick(user.sNick,"<"..Bot.."> Sorry you have not got enough slots open , you need  "..minNr.." !!\n"..
                                                   "\t                    <"..Bot.."> Open more slots or go here "..Hub.."")
			Core.Disconnect(user)
	                end
                end
        end
end

P_pan

thats a cool script....
maybe a RCmenu would be cool!

thnx m8

SMF spam blocked by CleanTalk