Results 1 to 3 of 3

Thread: Skipping one waypoint with action

  1. #1
    iBot User
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    169
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    4

    Skipping one waypoint with action

    Hello!

    I've got such task to solve, iBot skips this waypoint, it doesn't even do the first line.
    PHP Code:
    wait(10002000)
    closewindows()
    wait(10002000)
    setsettings("Settings\\Cavebot\\Settings\\OpenNextBp","no")
    wait(10002000)

    while 
    windowcount() < do
    closewindows()
    wait(500,1000))
    openitem(Mainbp'back'
    wait(500,1000)
    minimizewindows('equip')
    wait(400,600)
    resizewindows()
    wait(500,1000)
    openitem(LootbpMainbptrue)
    wait(500,1000)
    end 
    Debug:
    PHP Code:
    14:54 LUA:DoAction:Cavebot: - LuaInterface.LuaScriptException: [string "chunk"]:17unexpected symbol near ')' 
    In another script I have the same code and everything is ok. What's the matter?

    Thanks in advance for any tip!


    OK!

    There was a twice ')' at one line. Now this action is OK, but in depositer it opens BP with loot. No debug. I'm a bit confused.
    Here is deposit script:
    PHP Code:
    reachgrounditem("depot")
    wait(1000,2000)
    openitem("depot")
    wait(700,900)
    openitem(3502"locker")
    wait(700,900)
    openitem(Maindpbp"depot chest")
    wait(700,900)


    local CONFIG = {
        
    LOOT_BACKPACK Lootbp,
        
        
    STACKABLE_BACKPACK Addondpbp,
        
    STACKABLE_BACKPACK_AMOUNT 2,
        
        
    NOT_STACKABLE_BACKPACK Lootdpbp,
        
    NOT_STACKABLE_BACKPACK_AMOUNT 18,
        
        
    DEPOSIT_ITEMS = {......},
    }

    local NOT_STACKABLE_LAST_ON_TOITEM_INDEX 01

    while (#CONFIG.DEPOSIT_ITEMS >= ITEM_INDEX) do
        
    if (type(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX]) == "string"then
            local ITEM_ID 
    itemid(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX])
            
            if (
    ITEM_ID 0then
                CONFIG
    .DEPOSIT_ITEMS[ITEM_INDEX], ITEM_INDEX ITEM_IDITEM_INDEX 1
            
    else
                
    table.remove(CONFIG.DEPOSIT_ITEMSITEM_INDEX)
            
    end
        
    elseif (type(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX]) == "number"then
            
    if (CONFIG.DEPOSIT_ITEMS[ITEM_INDEX] > 0then
                ITEM_INDEX 
    ITEM_INDEX 1
            
    else
                
    table.remove(CONFIG.DEPOSIT_ITEMSITEM_INDEX)
            
    end
        
    else
            
    table.remove(CONFIG.DEPOSIT_ITEMSITEM_INDEX)
        
    end
    end

    while (true) do
        for 
    _DEPOSIT_ITEM in ipairs(CONFIG.DEPOSIT_ITEMS) do
            if (
    itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK) > 0then
                
    if (itemproperty(DEPOSIT_ITEM).isCumulativethen
                    local STACKABLE_LAST_ON_TO 
    0
                    
                    
    while (CONFIG.STACKABLE_BACKPACK_AMOUNT STACKABLE_LAST_ON_TO) do
                        
    local ITEM_COUNT_BEFORE itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        
    moveitemsonto(DEPOSIT_ITEM"all"CONFIG.STACKABLE_BACKPACK100STACKABLE_LAST_ON_TOwait(5001000)
                        
                        
    local ITEM_COUNT_AFTER itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        if (
    ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER 0then
                            STACKABLE_LAST_ON_TO 
    STACKABLE_LAST_ON_TO 1
                        
    elseif (ITEM_COUNT_AFTER == 0then
                            
    break
                        
    end
                    end
                
    else
                    while (
    CONFIG.NOT_STACKABLE_BACKPACK_AMOUNT NOT_STACKABLE_LAST_ON_TO) do
                        
    local ITEM_COUNT_BEFORE itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        
    moveitemsonto(DEPOSIT_ITEM"all"CONFIG.NOT_STACKABLE_BACKPACK100NOT_STACKABLE_LAST_ON_TOwait(5001000)
                        
                        
    local ITEM_COUNT_AFTER itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        if (
    ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER 0then
                            NOT_STACKABLE_LAST_ON_TO 
    NOT_STACKABLE_LAST_ON_TO 1
                        
    elseif (ITEM_COUNT_AFTER == 0then
                            
    break
                        
    end
                    end
                end
            end
        end
        
        
    if (itemcount(CONFIG.LOOT_BACKPACKCONFIG.LOOT_BACKPACK) > 0then
            openitem
    (CONFIG.LOOT_BACKPACKCONFIG.LOOT_BACKPACKfalsewait(20003000)
        else
            break
        
    end
        
        wait
    (100)
    end


    setsettings
    ("Settings\\Cavebot\\Settings\\OpenNextBp""yes"
    Last edited by bombek92; 05-25-2013 at 10:06 AM.

  2. #2
    iBot User
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    169
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    4
    I've managed to lose one open space in lootdpbp by having 2addon+17items bp, but it is not a good solution.

    If anyone knows how to fix it, I will be greatfull.

  3. #3
    iBot User
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    169
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    4
    Another one problem to solve. - Ibot wasn't depositing stackable items up to today. Today it skipped all items. And it happened twice. What's going on?

    Debug note:

    PHP Code:
    14:42 LUA:DoAction:Cavebot: - LuaInterface.LuaScriptException: [string "chunk"]:2'<eof>' expected near 'end' 

    Code in script:

    PHP Code:
    -- Dp Depositer
    reachgrounditem("depot")          
    wait(1000,2000)
    openitem("depot")
    wait(700,900)
    openitem(3502"locker")
    wait(700,900)
    openitem(maindpbp"depot chest")
    wait(700,900)

    local CONFIG = {
        
    LOOT_BACKPACK lootbp,
        
        
    STACKABLE_BACKPACK stackdpbp,
        
    STACKABLE_BACKPACK_AMOUNT 4,
        
        
    NOT_STACKABLE_BACKPACK lootdpbp,
        
    NOT_STACKABLE_BACKPACK_AMOUNT 16,
        
        
    DEPOSIT_ITEMS = {...},
    }

    local NOT_STACKABLE_LAST_ON_TOITEM_INDEX 01

    while (#CONFIG.DEPOSIT_ITEMS >= ITEM_INDEX) do
        
    if (type(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX]) == "string"then
            local ITEM_ID 
    itemid(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX])
            
            if (
    ITEM_ID 0then
                CONFIG
    .DEPOSIT_ITEMS[ITEM_INDEX], ITEM_INDEX ITEM_IDITEM_INDEX 1
            
    else
                
    table.remove(CONFIG.DEPOSIT_ITEMSITEM_INDEX)
            
    end
        
    elseif (type(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX]) == "number"then
            
    if (CONFIG.DEPOSIT_ITEMS[ITEM_INDEX] > 0then
                ITEM_INDEX 
    ITEM_INDEX 1
            
    else
                
    table.remove(CONFIG.DEPOSIT_ITEMSITEM_INDEX)
            
    end
        
    else
            
    table.remove(CONFIG.DEPOSIT_ITEMSITEM_INDEX)
        
    end
    end

    while (true) do
        for 
    _DEPOSIT_ITEM in ipairs(CONFIG.DEPOSIT_ITEMS) do
            if (
    itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK) > 0then
                
    if (itemproperty(DEPOSIT_ITEM).isCumulativethen
                    local STACKABLE_LAST_ON_TO 
    0
                    
                    
    while (CONFIG.STACKABLE_BACKPACK_AMOUNT STACKABLE_LAST_ON_TO) do
                        
    local ITEM_COUNT_BEFORE itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        
    moveitemsonto(DEPOSIT_ITEM"all"CONFIG.STACKABLE_BACKPACK100STACKABLE_LAST_ON_TOwait(5001000)
                        
                        
    local ITEM_COUNT_AFTER itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        if (
    ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER 0then
                            STACKABLE_LAST_ON_TO 
    STACKABLE_LAST_ON_TO 1
                        
    elseif (ITEM_COUNT_AFTER == 0then
                            
    break
                        
    end
                    end
                
    else
                    while (
    CONFIG.NOT_STACKABLE_BACKPACK_AMOUNT NOT_STACKABLE_LAST_ON_TO) do
                        
    local ITEM_COUNT_BEFORE itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        
    moveitemsonto(DEPOSIT_ITEM"all"CONFIG.NOT_STACKABLE_BACKPACK100NOT_STACKABLE_LAST_ON_TOwait(5001000)
                        
                        
    local ITEM_COUNT_AFTER itemcount(DEPOSIT_ITEMCONFIG.LOOT_BACKPACK)
                        
                        if (
    ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER 0then
                            NOT_STACKABLE_LAST_ON_TO 
    NOT_STACKABLE_LAST_ON_TO 1
                        
    elseif (ITEM_COUNT_AFTER == 0then
                            
    break
                        
    end
                    end
                end
            end
        end
        
        
    if (itemcount(CONFIG.LOOT_BACKPACKCONFIG.LOOT_BACKPACK) > 0then
            openitem
    (CONFIG.LOOT_BACKPACKCONFIG.LOOT_BACKPACKfalsewait(20003000)
        else
            break
        
    end
        
        wait
    (100)
    end 
    "Do or do not. There is no try"
    Master Yoda

Posting Permissions

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