Results 1 to 5 of 5

Thread: Need Help Making Depositer Work

  1. #1
    iBot User
    Join Date
    Feb 2015
    Posts
    6
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    40 Post(s)
    Reputation
    10
    Rep Power
    2

    Need Help Making Depositer Work

    Hello, guys.

    I'm trying to create my first script. But I can't make the depositer work. It goes to Depot, opens all BPs but doesn't deposit the itens. Debug has no error msgs.

    I'm trying to use this action:

    [xcode=lua]--depositing items
    setsettings("Settings\\Cavebot\\Settings\\OpenNextBp", "no")
    wait(200,400)
    reachgrounditem("depot")
    wait(1000, 1500)
    openitem("depot")
    wait(900, 1400)
    openitem(3502, "locker")
    wait(900, 1400)

    openitem(MainDP, 'Depot Chest')
    wait(900, 1400)

    local CONFIG = {
    LOOT_BACKPACK = LootBP,

    STACKABLE_BACKPACK = StackBP,
    STACKABLE_BACKPACK_AMOUNT = itemcount(StackBP),

    NOT_STACKABLE_BACKPACK = LootBP,
    NOT_STACKABLE_BACKPACK_AMOUNT = itemcount(LootBP),

    DEPOSIT_ITEMS = {5878},
    }

    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(120, 160)

    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(120, 160)

    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(1800, 2000)
    else
    break
    end

    wait(100, 200)
    end

    setsettings("Settings\\Cavebot\\Settings\\OpenNextBp", "yes")[/xcode]
    Last edited by Eli; 02-04-2015 at 07:27 AM.

  2. #2
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    389 Post(s)
    Reputation
    366
    Rep Power
    10
    @bmartinsds

    Try this one instead, not sure how much of sirmates stuff still works, because that looks like sirmates depositer

    http://www.tibiaibot.com/forum/showt...l=1#post437843

  3. #3
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Seems all ok with code, do you want just deposit item with ID: 5857?

    [xcode=lua]DEPOSIT_ITEMS = {"item1", "item2", "item3"}, -- try use string text to all items which you want to deposit[/xcode]

  4. #4
    iBot User
    Join Date
    Feb 2015
    Posts
    6
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    40 Post(s)
    Reputation
    10
    Rep Power
    2
    Quote Originally Posted by Drakke View Post
    @bmartinsds

    Try this one instead, not sure how much of sirmates stuff still works, because that looks like sirmates depositer

    http://www.tibiaibot.com/forum/showt...l=1#post437843
    Thank you @Drakke. I'll try this one when I finish Hunting. I noticed it doesn't have itens ID, only ID of GoldC and PlatC to not be deposited. So it'll deposit all stack and non stack itens on LOOT BP; is that right?

    Quote Originally Posted by Eli View Post
    Seems all ok with code, do you want just deposit item with ID: 5857?

    [xcode=lua]DEPOSIT_ITEMS = {"item1", "item2", "item3"}, -- try use string text to all items which you want to deposit[/xcode]

    Yes, @Eli. For this Script I would only like to deposit minotaur leathers. I tried using name, but it didn't worked, so I used ID to see if it would work then. Thank you for the attention. Got the code from one of your scripts ;]

    Oh... And I figured out how to change HUD. Thank you for having posted the code.

  5. #5
    iBot User
    Join Date
    Feb 2015
    Posts
    6
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    40 Post(s)
    Reputation
    10
    Rep Power
    2
    @Drakke
    Thank you, Drakke. Your script is working fine.

    @Eli
    Needed to chang Actions Code in order for your Code to work, Eli. But got it running too. Thanks, man ;]
    Last edited by bmartinsds; 02-04-2015 at 02:35 AM.

Posting Permissions

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