Results 1 to 6 of 6

Thread: Auto-logout at 3:30 (Action0), Disable Action0 at 3:35, Auto-login at 4:40

  1. #1
    Normal User
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Question Auto-logout at 3:30 (Action0), Disable Action0 at 3:35, Auto-login at 4:40

    Welcome. Damn, maybe I'm asking for too much, but It's always a hope.
    So.. My problem is my internet is dc'ing each night for 1min which causes deads and waste of money for me from 3:50 to 4:20 (depends on idk what).
    So I want to make a several scripts to relog.

    What I've actually found out:
    This script is turning my cavebot off and safely logging out but.. It's 22:52 right now, I'm setting it up for 03:30:00 and I'm getting logged out instantly. That's because script is "watching" at 03:30:00 that already passed today at morning. And I want it to "watch" at 03:30:00 that's going to be tonight. That's what I figured out by myself.
    Let's name it Action0 :

    local time2 = time()
    local time3 = "03:30:00"
    if time2 > time3 then
    setcavebot("no")
    wait(5000,10000)
    if not battlesigned then
    logout()
    end
    end
    Because script is turned on all time, even if I'll make a script to login at 4:40, It will login and disconnect, because Action0 is still turned on.
    So now we have to turn Action0 script OFF after it logouts safely or at 3:35 for example (option number 1 is easier I guess).
    I've made something like this (lets name it Action1):

    local time2 = time()
    local time3 = "03:35:00"
    if time2 > time3 then
    setsettings("Settings\\Action\\List\\Action0\\Enabled","no")
    end
    end
    But it doesn't work. I don't know why, but prolly because I'm logged out and disconnected (no idea if I'm right).
    Next step is Login and open bps + turn cavebot on at 4:40 (auto-reconnect script would be better, but my internet never dcs at day, so it shouldnt be a problem). No idea how to do this, tried to do smth like this:
    local time2 = time()
    local time3 = "03:35:00"
    if time2 > time3 then
    -- BLAKW RECONNECT SCRIPT --
    end
    end
    But it didn't work also.

    Taking advantage of the opportunity I would like to ask two more questions:
    First one:
    My EK is slot 1 in my character list.
    My RP is slot 2 in my character list.
    I'm using BLAKW reconnect script.
    Script is working brilliant on my EK which is slot 1, but it doesnt work on my RP which is slot 2. It looks like -> I logout from RP, for a 1-2 secs my RP name in char list is highlighted, but after those 1-2secs highlight changes to my EK (slot 1 in char list) and nothing happens, script is getting stuck. Any ideas why is this happening?
    Second one:
    How Auto Login function works in iBot? Actually I'm not talking about "script", I'm talking about function that you can find at Options -> Auto Login. I tought the problem of not working relog script at my RP was that I had this function turned on, but when I turned it off, nothing happened, still same problem exist. Also I guess it doesn't matters if it's on or off for BLAKW script, right?

    Sorry for taking your time people, If something is unclear - just write a question I'll answer as soon as possible. For now I'm stucked with nothing, so I'm not able to bot all-night (nah, I can't wake up at 4:30 to login, hard work waiting tommorow).

    Thank you very much in advance for any replies regarding this topic.

    Best regards,
    Jacob.
    Last edited by muchens; 10-25-2013 at 05:55 PM.

  2. #2
    Normal User Y4rR0's Avatar
    Join Date
    May 2012
    Location
    Warsaw, Poland
    Posts
    596
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    87
    Rep Power
    6
    @logging out action, how about using something like this?
    Code:
    local time3 = "03:30:00"
    local time4 = "03:35:00"
    if (time() >  time3) and (time() < time4) then
        setcavebot("no")
        wait(5000, 10000)
        if (not battlesigned) then
            logout()
        end
    end
    so it will logout only between time3 and time 4\

    @Auto login, its auto logging to ibot network (when you are turning on ibot). If u uncheck this, u will have to write mail and password everytime u turn it on.
    Last edited by Y4rR0; 10-25-2013 at 06:18 PM.

  3. #3
    Normal User
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Agreed, your script should fix my logout action problem.
    Thanks for answer about auto login fuction too. Now my mind is clear abot that .
    Now I have to think how to solve rest of probs.

    Best regards, Jacob.
    I wish you all good night tho.

    Posted from Samsung Galaxy S III.
    QA Engineer since 2010.
    Retired from Tibia since 2010 to 2013.

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9

    local TIME = {
    FROM = tosec("03:25"),
    TO = tosec("03:35"),
    CURRENT = tosec(time()),
    }

    if (TIME.CURRENT >= TIME.FROM and TIME.CURRENT <= TIME.TO) then
    while battlesigned do
    wait(1000)
    updateworld()
    end
    logout()
    end

  5. #5
    Normal User
    Join Date
    Dec 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3
    I was searching how to disable actions and I found your topic.

    I realized that your code to disable action have a little bug, you forget a letter 's' at Actions. I don't know if you fixed it, so I posted here.
    setsettings("Settings\\Actions\\List\\Action0\\Enabled","no")

    Thanks you

  6. #6
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    if you want to be offline between 3:30 and 4:40 why don't you just to it as simple as that?:

    Code:
    local time1 = "03:30:00"
    local time2 = "04:40:00"
    if time() >=  time1 and time() < time2 then
        setcavebot("no")
        wait(5000, 10000)
        if connected not battlesigned then
            logout()
        end
    else
    	--[[ any reconnect action eg. mine]]
        setcavebot("no")
        settargeting("no")
        setlooting("no")
        
        while not connected do 
            reconnect()
            wait(2000, 4000)
            updateworld()
        end
        
        local TEMPLE_NPCS = {"Maealil", "Alia", "Isimov", "Quentin", "Yberius", "Rahkem", "Kasmir", "Amanda", "Prezil", "Tyrias", "Brewster", "Kjesse", "Lorietta"}
    
        for _, v in ipairs(TEMPLE_NPCS) do
            if maround(7, false, v) > 0 then
                closetibia()
            end
        end
    
        setsettings("Settings\\CaveBot\\Settings\\OpenNextBp", "no")
        while windowcount(MainBP) ~= 1 or windowcount(LootBP) ~= 1 or windowcount(GoldBP) ~= 1 or windowcount() ~= 3 do
            closewindows()
            wait(400, 600)
    
            openitem(MainBP, 'back')
            wait(400, 600)
            resizewindow(MainBP, 0)
    
            openitem(LootBP, MainBP, true)
            wait(400, 600)
            resizewindow(LootBP, 0)
            
            openitem(GoldBP, MainBP, true)
            wait(400, 600)
    
            resizewindows()
        end
        setsettings("Settings\\CaveBot\\Settings\\OpenNextBp", "yes")
        setcavebot("yes")
        settargeting("yes")
        setlooting("yes")
    end
    about your second char, you could try using insted of reconnect() this function that specifies character:
    connect("AccName", "AccPass", "CharName")
    Last edited by walukasz; 02-10-2014 at 07:20 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •