Can any brainbox help with a script that will check the number of hubs with the number of slots open and make sure that one extra slot is open compared to the number of hubs. i.e 4 hubs needs 5 slots open etc. I have set minslots to 2 with no maximum.
Maccy
Quick work before bedtime...
I think it's what you wanted... =)
-- SlotCheker
-- Made by Madman
-- Requested by [UK]Maccy-LPL
Bot = "SlotChecker"
function NewUserConnected(curUser)
if curUser.iHubs >= curUser.iSlots then -- If more hubs then slots, or hubs = slots
curUser:SendData(Bot, "You are in " ..curUser.iHubs.. " for that you need to open " ..(curUser.iHubs+1).. " slots") -- Tell user to open more slots
curUser:Disconnect() -- Disconnect
end
end
function MyINFOArrival(curUser, data)
if curUser.bConnected then -- If user connected
if not curUser.bOperator then -- If not op
if curUser.iHubs >= curUser.iSlots then -- If more hubs then slots, or hubs = slots
curUser:SendData(Bot, "You are in " ..curUser.iHubs.. " for that you need to open " ..(curUser.iHubs+1).. " slots")
curUser:Disconnect()
end
end
end
end
Many thanks Madman, thats exactly what I wanted. I did have a try myself but got caught by the variables in the attempt !
Much appreciated
np =)