XenoBot Forums - Powered by vBulletin

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Request - Reconnect open bps all bps in main bp

  1. #1

    Join Date
    Jul 2013
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Request - Reconnect open bps all bps in main bp

    Once the reconect, would be cool having a script that actually opens all the backpacks/containers you have in the order of your main backpack.

  2. #2

    Join Date
    Mar 2013
    Posts
    54
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ive been looking for this too. OXtools is outdated and dont work for me.

    Like 1-2 years ago when i botted (just started again) then there were perfect lua scripts that reconnected once outlogged (server safe etc.) and opened bps. Now i cant find a single one on this forum.

  3. #3

    Join Date
    Feb 2014
    Posts
    117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    when i played i used this shit
    lua code:
    local LootBp1       = 'Orange Backpack'
    local LootBp2 = 'Purple Backpack'
    local StackBp = 'Green Backpack'
    local GoldBp = 'Grey Backpack'
    local numberOfBackpacks = 5

    Module('Alarm Containers', function(mod)
    if #Container.GetAll() < numberOfBackpacks and Self.isInPz() == false then
    alert()
    print('Containers fucked up, stopping to reset BPs')
    setWalkerEnabled(false)
    Targeting.Stop()
    Looter.Stop()
    Self.CloseContainers()
    Self.OpenMainBackpack(true):OpenChildren({GoldBp, true},{StackBp, false},{LootBp1, false},{LootBp2, false})
    wait(200, 500)
    setWalkerEnabled(true)
    Targeting.Start()
    Looter.Start()
    end
    mod:Delay(2000)
    end)

  4. #4
    Oscagi's Avatar
    Join Date
    Aug 2014
    Location
    Spain
    Posts
    237
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by slaweksor View Post
    when i played i used this shit
    lua code:
    local LootBp1       = 'Orange Backpack'
    local LootBp2 = 'Purple Backpack'
    local StackBp = 'Green Backpack'
    local GoldBp = 'Grey Backpack'
    local numberOfBackpacks = 5

    Module('Alarm Containers', function(mod)
    if #Container.GetAll() < numberOfBackpacks and Self.isInPz() == false then
    alert()
    print('Containers fucked up, stopping to reset BPs')
    setWalkerEnabled(false)
    Targeting.Stop()
    Looter.Stop()
    Self.CloseContainers()
    Self.OpenMainBackpack(true):OpenChildren({GoldBp, true},{StackBp, false},{LootBp1, false},{LootBp2, false})
    wait(200, 500)
    setWalkerEnabled(true)
    Targeting.Start()
    Looter.Start()
    end
    mod:Delay(2000)
    end)
    You can change:
    setWalkerEnabled(false)
    Targeting.Stop()
    Looter.Stop()

    For :

    Cavebot.Stop() / Cavebot.Start()

    More easy. :>


    REMEMBER TO SAY THANKS.

  5. #5
    mikjail's Avatar
    Join Date
    Jan 2016
    Location
    Venezuela
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Oscagi View Post
    You can change:
    setWalkerEnabled(false)
    Targeting.Stop()
    Looter.Stop()

    For :

    Cavebot.Stop() / Cavebot.Start()

    More easy. :>
    But it work?

  6. #6
    Zingron's Avatar
    Join Date
    Sep 2013
    Location
    United Kingdom
    Posts
    130
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Or you can use Walker.Delay()

    Code:
    -- Backpack Configuration:
    
    local MainBP      = "Jewelled Backpack"   --- Main Backpack (On your equipment slot)
    local LootBP      = "Fur Backpack"        --- Backpack for loot
    local SuppliesBP  = "Red Backpack"        --- Backpack for supplies
    local AmmoBP      = "Blue Backpack"       --- Backpack for ammunition
    
    local NumBackpacks = 4                    --- Number of total backpacks open
    
    
    Module.New('OpenContainers', function(BpMod)
        if #Container.GetAll() < NumBackpacks then
            Walker.Delay(6000)
            print("Opening Backpacks...")        
            Self.CloseContainers()
            Self.OpenMainBackpack(true):OpenChildren({LootBP, true},{SuppliesBP, true},{AmmoBP, true})
            wait(200, 500)
        end
        BpMod:Delay(1000)
    end)

  7. #7
    mikjail's Avatar
    Join Date
    Jan 2016
    Location
    Venezuela
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zingron View Post
    Or you can use Walker.Delay()

    Code:
    -- Backpack Configuration:
    
    local MainBP      = "Jewelled Backpack"   --- Main Backpack (On your equipment slot)
    local LootBP      = "Fur Backpack"        --- Backpack for loot
    local SuppliesBP  = "Red Backpack"        --- Backpack for supplies
    local AmmoBP      = "Blue Backpack"       --- Backpack for ammunition
    
    local NumBackpacks = 4                    --- Number of total backpacks open
    
    
    Module.New('OpenContainers', function(BpMod)
        if #Container.GetAll() < NumBackpacks then
            Walker.Delay(6000)
            print("Opening Backpacks...")        
            Self.CloseContainers()
            Self.OpenMainBackpack(true):OpenChildren({LootBP, true},{SuppliesBP, true},{AmmoBP, true})
            wait(200, 500)
        end
        BpMod:Delay(1000)
    end)
    What #Container.GetAll() means?

  8. #8
    Zingron's Avatar
    Join Date
    Sep 2013
    Location
    United Kingdom
    Posts
    130
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Container.GetAll()
    is a function that returns any containers you currently have open.

    #
    is a length operator in lua

    So when you put it all together as #Container.GetAll() it will return the number of backpacks you have open, it then compares this number to the variable NumBackpacks to see if the returned value is less than the value of NumBackpacks. If it is less then it will execute the code inside the if statement, thus opening all the backpacks.

  9. #9
    mikjail's Avatar
    Join Date
    Jan 2016
    Location
    Venezuela
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zingron View Post
    Container.GetAll()
    is a function that returns any containers you currently have open.

    #
    is a length operator in lua

    So when you put it all together as #Container.GetAll() it will return the number of backpacks you have open, it then compares this number to the variable NumBackpacks to see if the returned value is less than the value of NumBackpacks. If it is less then it will execute the code inside the if statement, thus opening all the backpacks.
    You are the men! but what if I have a labelName == ResetBps it will execute anyways even if I have this module? or can I just leave the module instead of having elseif for resseting the bps?

  10. #10
    mikjail's Avatar
    Join Date
    Jan 2016
    Location
    Venezuela
    Posts
    39
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Oh I got it, the labelName == ResetBps must bee in the code otherwise there will bee not free slot to put gold or loot if is the case.

    Sorry for that stupid question haha

Posting Permissions

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