Results 1 to 4 of 4

Thread: reachgrounditem not working?

  1. #1
    Normal User
    Join Date
    May 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5

    reachgrounditem not working?

    So, i got an action to deposit items, so i've tried both reachgrounditem("locker") and reachgrounditem("depot"), but the bot seems to just skip this action, since its not going to the locker...

  2. #2
    Normal User
    Join Date
    May 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    Here it is the entire action:
    local SpearToMove = SpearMax - weaponamount

    reachgrounditem("locker") wait(400, 800)
    openitem("locker") wait(1000)
    openitem("depot chest", "locker") wait(1000)
    openitem(SpearBP, "depot chest") wait(1000)
    moveitems(SpearType, SpearBP, "weapon", SpearToMove) wait(1000)
    closewindow(SpearBP), wait(1000)

    openitem("locker") wait(1000)
    openitem("depot chest", "locker") wait(1000)
    openitem(MainDPBP, "depot chest") wait(1000)

    local CONFIG = {
    LOOT_BACKPACK = MainDPBP,

    STACKABLE_BACKPACK = StackDPBP,
    STACKABLE_BACKPACK_AMOUNT = 2,

    NOT_STACKABLE_BACKPACK = LootDPBP,
    NOT_STACKABLE_BACKPACK_AMOUNT = 18,

    DEPOSIT_ITEMS = {"Cyclops Trophy", "Cyclops Toe"},
    }

    local NOT_STACKABLE_LAST_ON_TO, ITEM_INDEX = 0, 1

    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 > 0) then
    CONFIG.DEPOSIT_ITEMS[ITEM_INDEX], ITEM_INDEX = ITEM_ID, ITEM_INDEX + 1
    else
    table.remove(CONFIG.DEPOSIT_ITEMS, ITEM_INDEX)
    end
    elseif (type(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX]) == "number") then
    if (CONFIG.DEPOSIT_ITEMS[ITEM_INDEX] > 0) then
    ITEM_INDEX = ITEM_INDEX + 1
    else
    table.remove(CONFIG.DEPOSIT_ITEMS, ITEM_INDEX)
    end
    else
    table.remove(CONFIG.DEPOSIT_ITEMS, ITEM_INDEX)
    end
    end

    while (true) do
    for _, DEPOSIT_ITEM in ipairs(CONFIG.DEPOSIT_ITEMS) do
    if (itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK) > 0) then
    if (itemproperty(DEPOSIT_ITEM).isCumulative) then
    local STACKABLE_LAST_ON_TO = 0

    while (CONFIG.STACKABLE_BACKPACK_AMOUNT > STACKABLE_LAST_ON_TO) do
    local ITEM_COUNT_BEFORE = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)

    moveitemsonto(DEPOSIT_ITEM, "all", CONFIG.STACKABLE_BACKPACK, 100, STACKABLE_LAST_ON_TO) wait(500, 1000)

    local ITEM_COUNT_AFTER = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)

    if (ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER > 0) then
    STACKABLE_LAST_ON_TO = STACKABLE_LAST_ON_TO + 1
    elseif (ITEM_COUNT_AFTER == 0) then
    break
    end
    end
    else
    while (CONFIG.NOT_STACKABLE_BACKPACK_AMOUNT > NOT_STACKABLE_LAST_ON_TO) do
    local ITEM_COUNT_BEFORE = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)

    moveitemsonto(DEPOSIT_ITEM, "all", CONFIG.NOT_STACKABLE_BACKPACK, 100, NOT_STACKABLE_LAST_ON_TO) wait(500, 1000)

    local ITEM_COUNT_AFTER = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)

    if (ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER > 0) then
    NOT_STACKABLE_LAST_ON_TO = NOT_STACKABLE_LAST_ON_TO + 1
    elseif (ITEM_COUNT_AFTER == 0) then
    break
    end
    end
    end
    end
    end

    if (itemcount(CONFIG.LOOT_BACKPACK, CONFIG.LOOT_BACKPACK) > 0) then
    openitem(CONFIG.LOOT_BACKPACK, CONFIG.LOOT_BACKPACK, false) wait(2000, 3000)
    else
    break
    end

    wait(100)
    end

    closewindows()
    wait(500,1000)
    openitem(MainBP, "back")
    wait(500,1000)
    resizewindows()
    wait(500,1000)
    openitem(GoldBP, MainBP, true)
    wait(500,1000)
    resizewindows()
    wait(500,1000)
    openitem(LootBP, MainBP, true)
    wait(500,1000)
    resizewindows()

  3. #3
    Normal User Tswift's Avatar
    Join Date
    Aug 2012
    Location
    USA
    Posts
    114
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    13
    Rep Power
    5
    You need to divide it into three waypoints. First one would be

    Code:
    local SpearToMove = SpearMax - weaponamount
    
    reachgrounditem("locker") wait(400, 800)
    openitem("locker") wait(1000)
    openitem("depot chest", "locker") wait(1000)
    openitem(SpearBP, "depot chest") wait(1000)
    moveitems(SpearType, SpearBP, "weapon", SpearToMove) wait(1000)
    closewindow(SpearBP), wait(1000)
    
    openitem("locker") wait(1000)
    openitem("depot chest", "locker") wait(1000)
    openitem(MainDPBP, "depot chest") wait(1000)
    then Sirmate's by itself

    Code:
    local CONFIG = {
    LOOT_BACKPACK = MainDPBP,
    
    STACKABLE_BACKPACK = StackDPBP,
    STACKABLE_BACKPACK_AMOUNT = 2,
    
    NOT_STACKABLE_BACKPACK = LootDPBP,
    NOT_STACKABLE_BACKPACK_AMOUNT = 18,
    
    DEPOSIT_ITEMS = {"Cyclops Trophy", "Cyclops Toe"},
    }
    
    local NOT_STACKABLE_LAST_ON_TO, ITEM_INDEX = 0, 1
    
    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 > 0) then
    CONFIG.DEPOSIT_ITEMS[ITEM_INDEX], ITEM_INDEX = ITEM_ID, ITEM_INDEX + 1
    else
    table.remove(CONFIG.DEPOSIT_ITEMS, ITEM_INDEX)
    end
    elseif (type(CONFIG.DEPOSIT_ITEMS[ITEM_INDEX]) == "number") then
    if (CONFIG.DEPOSIT_ITEMS[ITEM_INDEX] > 0) then
    ITEM_INDEX = ITEM_INDEX + 1
    else
    table.remove(CONFIG.DEPOSIT_ITEMS, ITEM_INDEX)
    end
    else
    table.remove(CONFIG.DEPOSIT_ITEMS, ITEM_INDEX)
    end
    end
    
    while (true) do
    for _, DEPOSIT_ITEM in ipairs(CONFIG.DEPOSIT_ITEMS) do
    if (itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK) > 0) then
    if (itemproperty(DEPOSIT_ITEM).isCumulative) then
    local STACKABLE_LAST_ON_TO = 0
    
    while (CONFIG.STACKABLE_BACKPACK_AMOUNT > STACKABLE_LAST_ON_TO) do
    local ITEM_COUNT_BEFORE = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)
    
    moveitemsonto(DEPOSIT_ITEM, "all", CONFIG.STACKABLE_BACKPACK, 100, STACKABLE_LAST_ON_TO) wait(500, 1000)
    
    local ITEM_COUNT_AFTER = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)
    
    if (ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER > 0) then
    STACKABLE_LAST_ON_TO = STACKABLE_LAST_ON_TO + 1
    elseif (ITEM_COUNT_AFTER == 0) then
    break
    end
    end
    else
    while (CONFIG.NOT_STACKABLE_BACKPACK_AMOUNT > NOT_STACKABLE_LAST_ON_TO) do
    local ITEM_COUNT_BEFORE = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)
    
    moveitemsonto(DEPOSIT_ITEM, "all", CONFIG.NOT_STACKABLE_BACKPACK, 100, NOT_STACKABLE_LAST_ON_TO) wait(500, 1000)
    
    local ITEM_COUNT_AFTER = itemcount(DEPOSIT_ITEM, CONFIG.LOOT_BACKPACK)
    
    if (ITEM_COUNT_BEFORE == ITEM_COUNT_AFTER and ITEM_COUNT_AFTER > 0) then
    NOT_STACKABLE_LAST_ON_TO = NOT_STACKABLE_LAST_ON_TO + 1
    elseif (ITEM_COUNT_AFTER == 0) then
    break
    end
    end
    end
    end
    end
    
    if (itemcount(CONFIG.LOOT_BACKPACK, CONFIG.LOOT_BACKPACK) > 0) then
    openitem(CONFIG.LOOT_BACKPACK, CONFIG.LOOT_BACKPACK, false) wait(2000, 3000)
    else
    break
    end
    
        wait(100)
    end
    then

    Code:
    closewindows()
    wait(500,1000)
    openitem(MainBP, "back")
    wait(500,1000)
    resizewindows()
    wait(500,1000)
    openitem(GoldBP, MainBP, true)
    wait(500,1000)
    resizewindows()
    wait(500,1000)
    openitem(LootBP, MainBP, true)
    wait(500,1000)
    resizewindows()
    Last edited by Tswift; 09-15-2012 at 08:19 PM.

  4. #4
    Normal User
    Join Date
    May 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    Thx for the help, but it still not working... it just skip the first action
    Oh well fixed by moving the wait() for a separete line and changing to reachgrounditem("depot")
    Last edited by escequi12; 09-15-2012 at 09:32 PM.

Posting Permissions

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