Results 1 to 2 of 2

Thread: Bug, help please

  1. #1
    iBot User
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Bug, help please

    HTML Code:
    --###### AMULETS DEPOT BP ######-----
    if itemcount(AmuletDepotBP,BagName) > 0 then
    while windowcount(AmuletDepotBP) < 1 do
    openitem(AmuletDepotBP, BagName, true)
    wait(1000,2000)
    end
    end
    
    
    while (AmuletAmount - Self.ItemCount(AmuletstoUse, MiscBPname) > 0) and (Self.ItemCount(AmuletDepotBP, AmuletDepotBP) > 0 or Self.ItemCount(AmuletstoUse, AmuletDepotBP) > 0) do
    if (getcontainer(MiscBPname).maxslots - getcontainer(MiscBPname).usedslots > 0) then
        Self.MoveItemsUpTo(AmuletstoUse, AmuletAmount , MiscBPname, AmuletDepotBP)
        System.Wait(1000, 1200)
    end
        
        if (Self.ItemCount(AmuletstoUse, AmuletDepotBP) == 0 and Self.ItemCount(AmuletDepotBP, AmuletDepotBP) > 0) then
            Self.OpenContainer(AmuletDepotBP, AmuletDepotBP, false)
            System.Wait(1000, 1200)
        end
    end
    I use this code for get Garlic Necklaces from a Backpack in my depot but i get this error

    Code:
    16:29 : LUA:DoAction:Cavebot:w063:: - LuaInterface.LuaScriptException: ...andré\downloads\ibot v2_4_1\ibot\library\sirmate.lua:714: bad argument #1 to 'ipairs' (table expected, got nil)
    I used this script sometime ago without problems. I've Sirmate Library.

  2. #2
    Focus Group MoS's Avatar
    Join Date
    Feb 2012
    Posts
    832
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    63 Post(s)
    Reputation
    77
    Rep Power
    6
    Lua Code:
    local item = 3097 -- Name or ID
        local location = SuppBP -- WHERE TO MOVE ON YOU
        local DepoLocation = RingDPBP -- NAME OF BACPACK IN DEPOT
        local WantedAmount = 7 -- AMNMOUNT OF WANTED ITEM
     
    -- REMEBER TO HAVE OPENNEXTBP = FALSE IN IBOT CAVEBOT SETTINGS    
     
        local Amount = WantedAmount - (itemcount(item, location) + weaponamount)
        while windowcount(SuppBP) == 0 do
            closewindows()
            wait(1000)
            openitem(MainBP, 'back')
            wait(500, 1000)
            resizewindows()
            wait(500, 1000)
            openitem(SuppBP, MainBP, true)
            wait(500, 1000)
            resizewindows()
        end
     
        if (windowcount(RingDPBP) == 0) then
                reachgrounditem("depot")
                while (windowcount("Locker") ==0) do
                       openitem("depot")
                       wait(700,900)
                end
     
                while (windowcount("Depot Chest") == 0) do
                    openitem(3502, "locker")
                    wait(800,1000)
                end
     
            while (windowcount(RingDPBP) == 0) do
                openitem(RingDPBP, "Depot Chest", true)
                wait(1800,2000)
            end
        end
        if Amount == 0 then
            return
        else
            while Amount > 0 do
                if itemcount(item, DepoLocation) == 0 then
                    openitem(DepoLocation, DepoLocation, false)
                    wait(1000)
                end
                if Amount <= 0 then
                    return
                else
                    while Amount > 0 and (itemcount(item, DepoLocation) > 0)  do
                        moveitems(item, location, Amount)
                        wait(300)
                        Amount = WantedAmount - (itemcount(item, location) + weaponamount)
                    end
                    if Amount == 0 then
                        return
                    end
                    if itemcount(DepoLocation, DepoLocation) == 0 and itemcount(item, DepoLocation) == 0 then
                        return
                    end
                end
            end
        end


    I use this action for dwarven rings... you can try it if you want, since I don't know what's wrong with your action hahaha

    Credits to Eli
    Ajudei você? ...............+REP
    -----------------------------------------
    Did I help you? ..........+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
  •