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
Random Relogging
#1
Hello

I am cavebotting on Realesta and on their Who Is Online list, you can see the amount of hours someone has been online.
To stay off radar, I want to relog my bot every x hours.

Thus, I need a script which will Disable my cavebot - then, lose PZ and logout.
Then, reconnect after x amount of minutes, fully open my main BP and Enable the cavebot again.


I made the following script, but it has multiple issues.
1. It doesn't enable cavebot after reconnect (I reconnect via 'tools')
2. It check the runningtime of the bot itself (I think) and not my 'online time'

if runningtime() >= 3600000 then
setsettings('Cavebot/Enabled', false)

while battlesigned() do
     wait(1000)
end
logout()
end

Would love some help
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />

#2
Hello.

runningtime() returns for how long Bot is running IN SECONDS, not for how long you are online, but you can use it to calculate for how long you are online.
You can use resetrunningtime() to reset this timer.

Test this script with low values to make sure it's working.
local MAX_TIME_ONLINE = 3600 -- In seconds.

if connected() then
    LAST_CONNECT_TIME = LAST_CONNECT_TIME or runningtime()
    if (runningtime() - LAST_CONNECT_TIME) >= MAX_TIME_ONLINE then
        setsettings('Cavebot/Enabled', false)
        while battlesigned() do
            wait(1000)
        end
        logout()
        wait(1000)
        setsettings('Cavebot/Enabled', true)
    end
else
    LAST_CONNECT_TIME = nil
end

#3
Thank you so much bro
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />
I truly appreciate how much effort you put in satisfying the community.

Code is working

#4
Next request regarding this:

Everytime you connect to Realesta, Golden Account players have to say "!light" to turn on the small light.
Now, when I reconnect I am botting in complete darknkess, which is quite obvious. Perhaps it's possible to always write !light on login, or more complex - to check if there is light surrounding me and else say !light?

#5
Hello.

It's currently not possible to check light, but i will add a function to return your current light value on next release.

I've improve the script to say "!light", it might work.
local MAX_TIME_ONLINE = 3600 -- In seconds.

if connected() then
    SET_LIGHT = SET_LIGHT or false
    LAST_CONNECT_TIME = LAST_CONNECT_TIME or runningtime()
    if (runningtime() - LAST_CONNECT_TIME) >= MAX_TIME_ONLINE then
        setsettings('Cavebot/Enabled', false)
        while battlesigned() do
            wait(1000)
        end
        logout()
        wait(1000)
        setsettings('Cavebot/Enabled', true)
    else
        if SET_LIGHT then
            wait(1000, 2000)
            say('!light')
            SET_LIGHT = false
        end
    end
else
    LAST_CONNECT_TIME = nil
    SET_LIGHT = true
end



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016