PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: -PT-B2S on 30 June, 2005, 15:43:22

Title: Real Profile Manager
Post by: -PT-B2S on 30 June, 2005, 15:43:22
Hello.

I'm trying to make a script that make diferent rules for each profile. This is an exemple of one of the profiles:

   
BotName = "aaa"    
     
minshare = 2    
minslot = 7    
maxslot = 20    
     
------
     
minshare = minshare*1024*1024*1024    
     
function NewUserConnected(oUser, Data)    
if oUser.iProfile == 3 then    
local msg = ""    
if minshare > oUser.iShareSize then      
msg = msg.." minimun share is "..minshare.." GB to enter."    
end    
if oUser.iSlots < minslot and oUser.iSlots > maxslot then    
msg = msg.." minimun slots is "..minslot.." slots and maximum is "..maxslot.." to enter."    
end    
if msg == "" then    
msg = msg.." you can enter!"    
end    
oUser.SendData(BotName, msg)    
end    
end    
 
 

This isn't giving me any error, but it seems that isn't working, cause i can enter it with 5 slots and i dont receive any message from the bot too.

In my ptokax i have this profiles in this order :
Master
Operator
Vip
Reg

I'm entering the hub to test the script with the profile REG, that is the number 3, right?

Thanks in advance,

Props