Hi guys, could it be done like this... So a Slot/HubRaito was implanted. Then a user has to have minimun 1 slot open pr. hub...
Request for NightLitch or one of the other great programmers:D
-----------------------------------------------------------
-- Multi Share/Slot Bot v.3
-- By: NightLitch 2003
-----------------------------------------------------------
kb = 1024
mb = kb*kb
gb = kb*kb*kb
tb = kb*kb*kb*kb
-----------------------------------------------------------
-- All Share values are in GB
-- Need to Set correct Level/Profile
-- on those levels that are nil.
-----------------------------------------------------------
-- Start of Editable Data --
BotName = "OP_ProfileShare"
-- Regular Users --
UsrLvl = -1
USR = {
MinShare = 30,
MaxShare = 1000000,
MinSlots = 2,
MaxSlots = 1000,
}
-- Owner --
OwnerLvl = 0
Owner = {
MinShare = 0,
MaxShare = 1000000,
MinSlots = 0,
MaxSlots = 1000,
}
-- Admin --
AdminLvl = 1
Admin = {
MinShare = 0,
MaxShare = 1000000,
MinSlots = 0,
MaxSlots = 1000,
}
-- Pro_OP --
Pro_OPLvl = 2
Pro_OP = {
MinShare = 0,
MaxShare = 1000000,
MinSlots = 0,
MaxSlots = 1000,
}
-- Nor_OP User --
Nor_OPLvl = 5
Nor_OP = {
MinShare = 0,
MaxShare = 1000000,
MinSlots = 0,
MaxSlots = 1000,
}
-- VIP User --
VIPLvl = 4
VIP = {
MinShare = 0,
MaxShare = 1000000,
MinSlots = 0,
MaxSlots = 1000,
}
-- Reg User --
REGLvl = 3
REG = {
MinShare = 10,
MaxShare = 1000000,
MinSlots = 1,
MaxSlots = 1000,
}
-- End of Editable Data --
-------------------------------------------------------------
function Main()
frmHub:RegBot(BotName)
end
-------------------------------------------------------------
function DataArrival(curUser,data)
if (strsub(data,1,7) == "$MyINFO") then
local _,_, Slots = strfind(data,".*S:(%d+)")
-- Owner Check Slots ----------------------------------------
if curUser.iProfile == OwnerLvl then
CheckSlots(curUser,Owner.MinSlots,Owner.MaxSlots,Slots)
-- Regular User Check Slots ---------------------------------
elseif curUser.iProfile == UsrLvl then
CheckSlots(curUser,USR.MinSlots,USR.MaxSlots,Slots)
-- Admin Check Slots ----------------------------------------
elseif curUser.iProfile == AdminLvl then
CheckSlots(curUser,Admin.MinSlots,Admin.MaxSlots,Slots)
-- Pro_OP Check Slots ---------------------------------------
elseif curUser.iProfile == Pro_OPLvl then
CheckSlots(curUser,Pro_OP.MinSlots,Pro_OP.MaxSlots,Slots)
-- Nor_OP Check Slots ---------------------------------------
elseif curUser.iProfile == Nor_OPLvl then
CheckSlots(curUser,Nor_OP.MinSlots,Nor_OP.MaxSlots,Slots)
-- VIP User Check Slots -------------------------------------
elseif curUser.iProfile == VIPLvl then
CheckSlots(curUser,VIP.MinSlots,VIP.MaxSlots,Slots)
-- Reg User Check Slots -------------------------------------
elseif curUser.iProfile == REGLvl then
CheckSlots(curUser,REG.MinSlots,REG.MaxSlots,Slots)
end
-------------------------------------------------------------
CheckShare(curUser,data)
-------------------------------------------------------------
end
end
-------------------------------------------------------------
function CheckSlots(curUser,mnSlots,mxSlots,Slots)
if Slots==nil then
curUser:SendData(BotName,"Don't hide your tag...")
curUser:Disconnect()
elseif (tonumber(Slots) < mnSlots) then
curUser:SendData(BotName,"You have only "..Slots.." slot(s) open... You should have at least "..mnSlots.." slot(s) open. ")
curUser:Disconnect()
elseif (tonumber(Slots) > mxSlots) then
curUser:SendData(BotName,"You should have at most "..Slots.." slots open... Maximum of slots is "..mxSlots..". ")
curUser:Disconnect()
end
end
---------------------------------------------------------------------------------------------------------
function CheckShare(curUser,data)
s,e, vShare = strfind(data,"$+(%d+)$+|+")
if vShare ~= nil then
-- Owner Check Share ------------------------------------------------------------------------------------
if curUser.iProfile == OwnerLvl then
if (tonumber(vShare) < Owner.MinShare * gb) then
curUser:SendData(BotName,"As the Owner you should have nothing in your share:D Welcome Owner have a good stay:P")
curUser:Disconnect()
end
-- Regular User Check Share ----------------------------------------------------------------------------------
elseif curUser.iProfile == UsrLvl then
if (tonumber(vShare) < USR.MinShare * gb) then
curUser:SendData(BotName,"You should have at least "..REG.MinShare.." GB in your share.")
curUser:Disconnect()
end
-- Admin Check Share ------------------------------------------------------------------------------------
elseif curUser.iProfile == AdminLvl then
if (tonumber(vShare) < Admin.MinShare * gb) then
curUser:SendData(BotName,"As the Admin you should have at least "..Admin.MinShare.." GB in your share.")
curUser:Disconnect()
end
-- Pro_OP Check Share -----------------------------------------------------------------------------------
elseif curUser.iProfile == Pro_OPLvl then
if (tonumber(vShare) < Pro_OP.MinShare * gb) then
curUser:SendData(BotName,"As a Pro_OP you should have at least "..Pro_OP.MinShare.." GB in your share.")
curUser:Disconnect()
end
-- Nor_OP Check Share ------------------------------------------------------------------------------------
elseif curUser.iProfile == Nor_OPLvl then
if (tonumber(vShare) < Nor_OP.MinShare * gb) then
curUser:SendData(BotName,"As a Nor_OP you should have at least "..Nor_OP.MinShare.." GB in your share.")
curUser:Disconnect()
end
-- VIP User Check Share ----------------------------------------------------------------------------------
elseif curUser.iProfile == VIPLvl then
if (tonumber(vShare) < VIP.MinShare * gb) then
curUser:SendData(BotName,"As a VIP you should have at least "..VIP.MinShare.." GB in your share.")
curUser:Disconnect()
end
-- Reg User Check Share ----------------------------------------------------------------------------------
elseif curUser.iProfile == REGLvl then
if (tonumber(vShare) < REG.MinShare * gb) then
curUser:SendData(BotName,"As a REG you should have at least "..REG.MinShare.." GB in your share.")
curUser:Disconnect()
end
end
end
end
(http://www.hawks-world.com/temp/XN.gif) Hi
Quotebut Ptokax already has a built in option for slot ratio, see Rules & Bots page
I may Be wrong but i dont think Ptokax TD sees the 0/0/0 hub format...
ive not used the inbuilt options for so long now ..
??????Hawk??????
QuoteIf thats not what you want, did you want a ratio per user level or share or both?
I just wanted so I could set the Slot/HubRatio for every single profile.
I cannot write this atm, but an advise for anyone: the 0 hubs tags (eg 0/0/0 or similar) must be banned in order to avoid division by zero - atleast me & zinden had many crashes due to that fake tag.
Also the DCGUI tag has to be considered:
or something similar ;)
K, well thx anyway