Slot/Raito for Multi/Slot Bot
 

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

Slot/Raito for Multi/Slot Bot

Started by Smulf, 02 February, 2005, 17:58:46

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Smulf

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
[Smulf]

??????Hawk??????

#1
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??????

Smulf

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.
[Smulf]

bastya_elvtars

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 ;)
Everything could have been anything else and it would have just as much meaning.

Smulf

K, well thx anyway
[Smulf]

SMF spam blocked by CleanTalk