Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Closing channels when re-login
#1
Hello!

I would like to request a simple script that closes all conversation and server channel tabs (like advertising/teams, etc), only keeping the default channel.

Thanks!
Reply

#2
Hello.

Redownload and reinstall Mastercores OTBot:
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Then try this script:
local CHANNELS_TO_KEEP_OPEN = { 'Default' }


table.lower(CHANNELS_TO_KEEP_OPEN)

local flag = true
while flag do
    flag = false
    local visibleChannels = getvisiblechannels()
    for _, channel in ipairs(visibleChannels) do
        if table.find(CHANNELS_TO_KEEP_OPEN, channel:lower()) == nil then
            closechannel(channel, true)
            wait(200, 300)
            flag = true
            break
        end
    end
end
Reply

#3
Works like a charm! 

Thanks!


|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016