Page 1 of 8 123 ... LastLast
Results 1 to 10 of 71

Thread: Deposit Items action!

  1. #1
    Normal User sirmate's Avatar
    Join Date
    Mar 2012
    Location
    Poland
    Posts
    176
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    105
    Rep Power
    6

    Deposit Items action!

    Sah (LadyBUg) asked me to release my own deposit items actions after many people seems to have problems with that part of the script. So here it is. Remember to configure it well before use. You don't need to group items by stackable property. That action will deal with that part by itself. Test and report any future bugs

    Lua Code:
    local CONFIG = {
        LOOT_BACKPACK = "jewelled backpack",
     
        STACKABLE_BACKPACK = "green backpack",
        STACKABLE_BACKPACK_AMOUNT = 2,
     
        NOT_STACKABLE_BACKPACK = "grey backpack",
        NOT_STACKABLE_BACKPACK_AMOUNT = 18,
     
        DEPOSIT_ITEMS = {"great health potion", "fish fin", "necklace of the deep", "deepling staff"},
    }
     
    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
    Last edited by GabrielTOTS; 11-02-2013 at 10:17 PM.
    (๏̯͡๏ )

  2. #2
    Focus Group bofing's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    664
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    52 Post(s)
    Reputation
    95
    Rep Power
    6
    pro gonna try it right now

  3. #3
    Normal User jesusz0r's Avatar
    Join Date
    Jun 2012
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    17
    Rep Power
    5
    Work like a charm!
    I highly recommend this depositer.

    Thanks sirmate! <3

  4. #4
    Normal User
    Join Date
    Aug 2012
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    You are a god, Sirmate

  5. #5
    iBot User
    Join Date
    Jul 2012
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Either im retarded or im very noob or maybe both. But don't I need to put any item ids to deposit or how is this one working?

  6. #6
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    Quote Originally Posted by Edling View Post
    Either im retarded or im very noob or maybe both. But don't I need to put any item ids to deposit or how is this one working?
    Ofc you need to add those items! You just need to put it into 1 'category' and it will tell if it is stackable or not.

    PHP Code:
    DEPOSIT_ITEMS = {"great health potion""fish fin""necklace of the deep""deepling staff"}, 

  7. #7
    Normal User tickit's Avatar
    Join Date
    Sep 2012
    Location
    Sweden
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    This is some hardcore piece of deposit action!

  8. #8
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    work fine but the problem is if u hunt in some respaw with more than one char and in depot have wrong backpack it will crash, not?
    The action work, I helped you, so thank doing:
    Rep +
    A action funcionou, eu ajudei vc, então agradeça fazendo:
    Rep +
    Its to increase my reputation as helper.

  9. #9
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    Won't crash but it won't deposit your loot!


    Always make sure you have correct bps

  10. #10
    Normal User
    Join Date
    May 2012
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    83
    Rep Power
    6
    I use this action insteed of the old one I got in my script?




    Rep + if you like my project or if I helped you.
    The best scripters and great customers service
    Social-Scripts

Posting Permissions

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