PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: [NL]Daddy-Bear? on 27 August, 2006, 17:33:16

Title: Daddys redict window
Post by: [NL]Daddy-Bear? on 27 August, 2006, 17:33:16
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?  ;)

-- *************************************************************************************
-- 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. 
-- ************************************************************************************* 
 
-- 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. <<<<<<<<<<< 
 
-- ************************************************************************************** 
 
-- 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"} 

 
MyINFOArrival = function(user, data) 
if 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
Title: Re: Daddys redict window
Post by: bastya_elvtars on 27 August, 2006, 20:27:21
Cool. I cleaned this topic if you don't mind. ;)
Title: Re: Daddys redict window
Post by: [NL]scooby on 27 August, 2006, 23:38:26
Daddys redict window

Nice daddy verry good redirect lua !!!
Title: Re: Daddys redict window
Post by: jiten on 28 August, 2006, 10:17:33
Well, it could be 'his' first posted script, but, it's not really his.

The whole code is based on Redirect Array by nErBoS, which I modified later.

And also note that, all credits have been removed, as if it was really written from scratch [which wasn't].

So, [NL]Daddy-Bear? please maintain credits for every source you use.
Title: Re: Daddys redict window
Post by: bastya_elvtars on 28 August, 2006, 11:41:04
Quote from: Mutor on 27 August, 2006, 22:14:41
Now we just need clean that post. You have
leading [-] chars in the RedProfiles table.
As if script was copied from a private message.

These need be removed for script to load/function.

Fixed.
Title: Re: Daddys redict window
Post by: [NL]Daddy-Bear? on 28 August, 2006, 14:51:04
Oke jiten, sorry my error.
Have it changes and is now in my best off English.  ;)

Greetings daddy.
and tkxx all for reply)
Title: Re: Daddys redict window
Post by: jiten on 28 August, 2006, 20:24:58
Quote from: [NL]Daddy-Bear? on 28 August, 2006, 14:51:04
Oke jiten, sorry my error.
Have it changes and is now in my best off English.  ;)

It's all good, mate :)