Results 1 to 1 of 1

Thread: Help with my reconnect

  1. #1
    Normal User
    Join Date
    Sep 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5

    Help with my reconnect

    Not sure if bug or something but I just cant make this work propertly

    PHP Code:
    local templeNpcNames = {"Alia""Tyrias""Brewster""Rahkem""Kasmir""Amanda""Isimov""Yberius""Maealil""Quentin""Lynda""Lorietta""Prezil""Kjesse""Asralius"}
    local templePositionRange 7
    local serversavetime 
    = {from '5:50'to '6:25'}
    serversavetime = {from tosec(serversavetime.from), to tosec(serversavetime.to)}
    local curtime tosec(time())
    if 
    connected == false and (curtime serversavetime.from or curtime serversavetime.tothen
        setsettings
    ("Settings\\Cavebot\\Settings\\OpenNextBp","no")
        
    wait(100,300)
        
    setcavebot("off")
        
    wait(100,300)
        
    settargeting("off")
        
    wait(100,300)
        
    setlooting("off")
        
    wait(100,300)
        if(
    days()%4==0then
            connect
    ("xxx""xxx""xxx")
        
    end
        
    if(days()%4==1then
            connect
    ("xxx""xxx""xxx")
        
    end
        
    if(days()%4==2then
            connect
    ("xxx""xxx""xxx")
        
    end
        
    if(days()%4==3then
            connect
    ("xxx""xxx""xxx")
        
    end
        wait
    (4000,7000)
        
    updateworld()
        if (
    connectedthen
            
    if ((pzone == true) and (maround(10falseunpack(templeNpcNames)) >= 1) or (pzone == true) and (islocationxyz(32787312767templePositionRange)) or (pzone == true) and (islocationxyz(32595327446templePositionRange)) or (pzone == true) and (islocationxyz(33213324541templePositionRange)) or (pzone == true) and (islocationxyz(32213311337templePositionRange)) or (pzone == true) and (islocationxyz(330043149011templePositionRange)) or (pzone == true) and (islocationxyz(326493192511templePositionRange)) or (pzone == true) and (islocationxyz(33217318148templePositionRange)) or (pzone == true) and (islocationxyz(32317328267templePositionRange)) or (pzone == true) and (islocationxyz(33194328538templePositionRange)) or  (pzone == true) and (islocationxyz(32369322417templePositionRange)) or  (pzone == true) and (islocationxyz(32360317827templePositionRange)) or  (pzone == true) and (islocationxyz(32957320767templePositionRange)) or  (pzone == true) and (islocationxyz(32732316347templePositionRange))  or (pzone == true) and (islocationxyz(33447313239,  templePositionRange))) then 
                wait
    (1500)
                
    closetibia()
                
    wait(1500)
            
    end  
            
    if (posz==6then
                gotolabel
    ("w076")
            else
                
    gotolabel("w000")
            
    end
            wait
    (2000,3000)
            
    pausewalking(30000)
            
    wait(100,300)

            
    closewindows()
            
    wait(1000,1500)
            
    openitem("brown backpack""back")
            
    wait(1000,1500)
            
    openitem("blue backpack""backpack"false)
            
    wait(1000,1500)
            
    resizewindows()
            
    wait(1000,1500)
            
    openitem("brown backpack""back")
            
    wait(1000,1500)
            
    openitem("red backpack""backpack"false)
            
    wait(1000,1500)
            
    resizewindows()
            
    wait(1000,1500)
            
    openitem("brown backpack""back")
            
    wait(1000,1500)
            
    resizewindows()

            
    setcavebot("on")
            
    wait(100,300)
            
    settargeting("on")
            
    wait(100,300)
            
    setlooting("on")
        
    end
            wait
    (4000,7000)
        
    updateworld()
        if ((
    connected) and (windowcount("blue backpack") == or windowcount("red backpack") == 0)) then
            
    if ((pzone == true) and (maround(10falseunpack(templeNpcNames)) >= 1) or (pzone == true) and (islocationxyz(32787312767templePositionRange)) or (pzone == true) and (islocationxyz(32595327446templePositionRange)) or (pzone == true) and (islocationxyz(33213324541templePositionRange)) or (pzone == true) and (islocationxyz(32213311337templePositionRange)) or (pzone == true) and (islocationxyz(330043149011templePositionRange)) or (pzone == true) and (islocationxyz(326493192511templePositionRange)) or (pzone == true) and (islocationxyz(33217318148templePositionRange)) or (pzone == true) and (islocationxyz(32317328267templePositionRange)) or (pzone == true) and (islocationxyz(33194328538templePositionRange)) or  (pzone == true) and (islocationxyz(32369322417templePositionRange)) or  (pzone == true) and (islocationxyz(32360317827templePositionRange)) or  (pzone == true) and (islocationxyz(32957320767templePositionRange)) or  (pzone == true) and (islocationxyz(32732316347templePositionRange))  or (pzone == true) and (islocationxyz(33447313239,  templePositionRange))) then 
                wait
    (1500)
                
    closetibia()
                
    wait(1500)
            
    end  
            
    if (posz==6then
                gotolabel
    ("w076")
            else
                
    gotolabel("w000")
            
    end
            wait
    (2000,3000)
            
    pausewalking(30000)
            
    wait(100,300)

            
    closewindows()
            
    wait(1000,1500)
            
    openitem("brown backpack""back")
            
    wait(1000,1500)
            
    openitem("blue backpack""backpack"false)
            
    wait(1000,1500)
            
    resizewindows()
            
    wait(1000,1500)
            
    openitem("brown backpack""back")
            
    wait(1000,1500)
            
    openitem("red backpack""backpack"false)
            
    wait(1000,1500)
            
    resizewindows()
            
    wait(1000,1500)
            
    openitem("brown backpack""back")
            
    wait(1000,1500)
            
    resizewindows()

            
    setcavebot("on")
            
    wait(100,300)
            
    settargeting("on")
            
    wait(100,300)
            
    setlooting("on")
        
    end
        setsettings
    ("Settings\\Cavebot\\Settings\\OpenNextBp","yes")
        
    wait(100,300)
        
    settargeting("on")
        
    wait(100,300)
        
    setlooting("on")
    end 
    It works smooth sometimes, but sometimes won't, I cant find any problem on the script and my cavebot always get off when d/c

    What i've noticed, shit will bug if new MOTD or if I by any chance get a random kick with the "connection lost" msg

    I can't use reconnect() function cause purpose is logging a diff char every SS

    Thank in advance
    Last edited by Toatoaa; 02-20-2013 at 09:09 PM. Reason: change of title

Posting Permissions

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