Signup Now
Results 1 to 2 of 2
  1. #1
    Free User
    Join Date
    Jun 2015
    Posts
    8
    Reputation
    10
    Rep Power
    0

    Reconnect and Reload Gargoyle Trainer

    Hello! Here where I live my internet keeps disconnecting. I tried using Raphael's Relogger & BP opener, but it does not work, it starts to attack the Gargoyles and the trainer seems not to work anymore.

    All I needed was a script that, once my internet goes out, keeps trying to reconnect to the character x. Then, when logged, opened the backpack and reset the Gargoyle Training script.

    Looking forward for some answers

  2. #2
    Free User xinxs's Avatar
    Join Date
    Sep 2014
    Posts
    50
    Reputation
    18
    Rep Power
    20
    Quote Originally Posted by Dohaeris View Post
    Hello! Here where I live my internet keeps disconnecting. I tried using Raphael's Relogger & BP opener, but it does not work, it starts to attack the Gargoyles and the trainer seems not to work anymore.

    All I needed was a script that, once my internet goes out, keeps trying to reconnect to the character x. Then, when logged, opened the backpack and reset the Gargoyle Training script.

    Looking forward for some answers
    man you can try this, reconnect by flanesito, edited by me to your request:
    init start
    local name = 'Character Name' --The name must have written as exactly as the char name.
    local account = 'accountnumber'
    local password = 'password'
    --------------------------------------------------------------------------------- DO NOT EDIT THE CODE BELOW
    -- local SCRIPT_VERSION = "2.3.1"
    -- If ReopenBps is set to true then it'll try to reopen the visible backpacks on the main backpack
    -- setting it to false will just ignore your bps after you are logged in

    local ReopenBps = true

    -- If IgnoreServerSave is set to false it'll wait to relog if server save is occurring
    -- setting it to true will try to relog even on server saving time

    local IgnoreServerSave = false

    -- [[ ONLY EDIT SPECIAL CHECKS IF YOU KNOW WHAT YOU'RE DOING ]]--

    -- special checks are the checks it'll do after you login
    -- for example: if you are skulled, inside temple, etc ...

    local SpecialChecks = {
    {
    function()
    return isontemple()
    end,
    function()
    return printerrorf("Safe Reconnect: [%q] Client closed. Reason: Character was inside a temple.", $name) and closebot()
    end
    },
    {
    function()
    return ($self.skull == SKULL_RED or $self.skull == SKULL_BLACK) and $pzone
    end,
    function()
    return printerrorf("Safe Reconnect: [%q] Client closed. Reason: Character was red/black skulled inside a protection zone.", $name) and closebot()
    end
    },
    {
    function()
    return $stamina <= 14*60 and $pzone
    end,
    function()
    return printerrorf("Safe Reconnect: [%q] Client closed. Reason: Character had less/equal than 14 hours of stamina and inside a protection zone.", $name) and closebot()
    end
    },
    }

    -- DO NOT EDIT BELOW --
    local reconState = 1

    if $curscript.type ~= 'persistent' then
    reconState = -1
    printerror('Reconnect should be placed at Scripter/Persistents.\nChange this setting to run it properly.')
    end

    local openFunc = function()
    local lifeTime = $timems
    local reopenLogin = get('Looting/OpenBPsAtLogin')

    set('Looting/OpenBPsAtLogin', 'no')
    reopenwindows('small')

    while $openingbps do
    wait(100)

    if $timems - lifeTime >= 10000 and not $pzone then

    set('Looting/OpenBPsAtLogin', reopenLogin)
    return false
    end
    end

    set('Looting/OpenBPsAtLogin', reopenLogin)
    return true
    end

    local randTimeSS = math.random(100, 700)

    init end

    auto(1000)

    if (not $connected) and (IgnoreServerSave or (sstime() >= 600 + randTimeSS and sstime() <= 85800 - randTimeSS)) and reconState == 1 then

    setsetting('Persistent/Scripts/NameOfScript/Enabled', 'no') ----change NameOfScript to your persistent gargoyle trainer name
    set('Targeting/Enabled', 'no')
    set('Cavebot/Enabled', 'no')
    focusclient()
    connect(account, password, name)
    wait (1000,2000)
    --reconnect($worldvisible) -- <------------------------------------------------------- Temporary not working!

    randTimeSS = math.random(100, 700)

    if $connected then
    setsetting('Persistent/Scripts/NameOfScript/Enabled', 'yes') ----change NameOfScript again
    pausewalking(10000)
    else
    return
    end

    if ReopenBps then
    local clientMin = $minimized

    if clientMin and not $addons.enabled then
    -- if windaddons is enabled then we don't need to restore the window
    -- but if it's not, the bp opener will get stuck and alert you anytime
    -- se we restore the window to make sure it'll open and you won't die
    restoreclient() waitping()
    end

    local reopenSuccess = openFunc()

    if not reopenSuccess then
    -- this will only happen if you took more than 10 seconds to open bps
    -- if this happened probably you have another script trying to open it
    -- or any other thing blocking it from opening, if so we should start
    -- cavebot and targeting again to make sure you won't die, because after
    -- 10 seconds the monsters will surround you and start attacking
    printerrorf("Safe Reconnect: [%q] It took too long to open the backpacks, they could be already opened but for safety reasons you were alerted.", $name)
    pausewalking(0)
    set('Targeting/Enabled', 'yes')
    set('Cavebot/Enabled', 'yes')

    -- alert in this case
    for _ = 1, 10 do
    beep()
    wait(1000)
    end
    end

    if clientMin and not $minimized then
    minimizeclient()
    end
    end

    for _, callback in ipairs(SpecialChecks) do
    -- here we check for the given special checks like
    -- is on temple, low stamina, skulled, and logout
    -- if something happened
    if callback[1]() then
    reconState = 0

    return callback[2] ~= nil and stopattack() and callback[2]()
    end
    end

    if not ($targeting and $cavebot) then
    set('Targeting/Enabled', 'yes')
    set('Cavebot/Enabled', 'yes')
    pausewalking(0)
    end
    end

    PS.:1- reconnect without login not working in this version (2.6.5 for 10.79)
    2- you need edit lines 86 and 97 of script
    Last edited by xinxs; 06-22-2015 at 09:37 PM.
    if you like, REP+

 

 

Posting Permissions

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