PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: [NL]Daddy-Bear? on 10 September, 2006, 20:21:22

Title: Daddys redict window V 1.1 for lua 5.1
Post by: [NL]Daddy-Bear? on 10 September, 2006, 20:21:22
So I hope a nice script.
You can help a friendly hub to grow.
And you wont lose your own pinger.
Just gif a upper and down limit, users will be redicted by entering your Hub.
Have Fun.
[NL]Daddy-Bear?

10 Sept 2006 by NL]Daddy-Bear?  Modification lua start now at in advance give up of the number of users in You hub.

-- *************************************************************************************
-- Redirect Array by nErBoS

-- LUA 5.0/5.1 version by jiten

-- CHANGELOG:

-- - Corrected by NightLitch
-- - Added: Endless amount of hubs by plop
-- - Changed: For setting user levels to be redirected by bastya_elvtars (nice crew in here)
-- - Changed: CheckUserLevel originally by Nathanos
-- - Changed: CheckUserLevel eliminated by plop
-- - Added: Table For Checked User In Redirect by 6Marilyn6Manson6   05/08/2006.
--
--
-- Rewrote version to Daddys redict window
-- By [NL]Daddy-Bear? on 21 augusts 2006
-- Mail by >>>>   http://dutchfunfactory.downfire.com/
-- Advantage you can help another hub to users but no los off the pinger. 
-- redict window lua have much pleasure using it.
-- 10 Sept 2006 by NL]Daddy-Bear?  Modification lua start now at in advance give up of the number of users in You hub.
-- ************************************************************************************* 
 
-- Which profile YOU want give a redict  1=yes 0=no 
 
RedProfiles = {  
[0] = 0, -- Master 
[1] = 0, -- Operator 
[2] = 0, -- VIP 
[3] = 0, -- Registered 
[4] = 0, -- Moderator 
[5] = 0, -- Netfounder
[6] = 0, -- Owner
[-1] = 1, -- Unregistered 

 
Bot = "daddys_window" 
 
function Main() 
frmHub:RegBot(Bot) 
end
   
-- ************************************************************************************** 
 
--       >>>>>>>>>> The border limits. <<<<<<<<<<< 
 
-- ************************************************************************************** 

redictbij = 50 -- above this number off Users in your Hub the lua will start redicting. 

-- redict window in now is 510 Mb to 3 Gb see below

onder = 0.51 -- everything above this value (is in GB) goes to the redict hub. 
boven = 3 -- everything under this value (is in GB) goes to the redict hub. 
 
-- the redict hub bla bla hub no-ip.org below chance it in the correct address of the hub to redict to. 
 
tHubs = { 
{ iShare = boven, sDomain = "de redict hub bla bla hub no-ip.org", sName = "\r\n\r\n        ******   Your share size is to small, the minimum share size is set to: 3  GB   ******\r\n\r\n                     take a look in ower Network type in main !network there is more!!\r\n\r\n"} 
}

-- **************************************************************************************
-- do not change below the this line!
-- **************************************************************************************
 
MyINFOArrival = function(user, data)
online = frmHub:GetUsersCount()
if redictbij < online and RedProfiles[user.iProfile] == 1 then   
local iShareSize = user.iShareSize 
if tonumber(iShareSize) then 
iShareSize = (tonumber(iShareSize)/(1024^3)) 
for i in ipairs(tHubs) do 
if iShareSize < tHubs[i].iShare and iShareSize > onder then 
user:Redirect(tHubs[i].sDomain, tHubs[i].sName); break 
end 
end 
end 
end 
end