Signup Now
Page 8 of 8 FirstFirst ... 678
Results 71 to 74 of 74
  1. #71
    Free User
    Join Date
    Jul 2016
    Posts
    1
    Reputation
    10
    Rep Power
    0
    Hello,
    For my needs i changed this script to fit my needs: To pass array of backpacks and deposit all items at once.
    Here is my script feel free to use
    Core Credits @Dehan
    In this script i also use my backpacks reseter - it works really well so also feel free to use. It was also core-changing from someone from here, if Ill found from where i got this I'll edit and add credits to author.

    Here is the code:
    PHP Code:
    -----------------------------------------------------------------------------------
    -- 
    Restarts backpacks passed in 'backpacks' parameter.
    -- 
    param backpacks: array of backpacks names from settings.
    -- @
    examplerestart_backpacks({'rare''stackable''gold''supplies'})

    function 
    restart_backpacks(backpacks)
        
    local main_backpack
        
        closewindows
    ()
        
    main_backpack openitem(0'back'wait(500,1000)
        
    resizewindows(0'0'wait(500,1000)

        for 
    indexbackpack in ipairs(backpacks) do
            
    openitem(getlootingdestination(backpack), main_backpacktruewait(500,1000)
            
    resizewindows(0string.format("%s"index)) wait(500,1000)
        
    end
    end

    -----------------------------------------------------------------------------------
    -- 
    Deposits loot items from backpacks passed in 'bp_destination_names' param.
    -- 
    param bp_destination_names: array of backpacks names from settings.
    -- 
    param stackableDepot Index for stackables - if not passed function will set 1 as default.
    -- 
    param non_stackableDepot Index for non stackables - if not passed function will set 2 as default.
    -- @
    exampledeposit_loot_items({'rare''stackable''another_backpack'}, 34)

    function 
    deposit_loot_items(bp_destination_namesstackablenon_stackable)
        
    local depot_id 22796
        local stackable 
    stackable or 1
        local non_stackable 
    non_stackable or 2
        local stackable_id 
    depot_id stackable
        local nonstackable_id 
    depot_id non_stackable

        local settings_backup 
    getsetting('Looting/OpenNextBP')

        -- If 
    OpenNextBP is on turn it off.
        
    setsetting('Looting/OpenNextBP''no'waitping()
        
    restart_backpacks(bp_destination_names)

        -- 
    Reach and open depot.
        while 
    windowcount("Depot Chest") == do
            
    opendepot(truewait(300)
            
    openitem(3502wait(500)
        
    end

        
    for _backpack in ipairs(bp_destination_names) do
            -- 
    Retrieve backpack object.
            
    backpack getlootingdestination(backpack)

            while 
    true do
                foreach 
    lootingitem item do 
                    -- 
    When found looting object in current backpack move it.
                    while 
    itemcount(item.idbackpack) > do
                        
    chosen_destination itemproperty(item.idITEM_STACKABLE) and stackable_id or nonstackable_id

                        
    -- Move items to chosen destination.
                        
    moveitemsonto(item.idchosen_destination1'depot chest'backpack100)
                    
    end
                end

                
    -- If found cascaded backpack inside open it.
                if (
    itemcount(backpackbackpack) > 0then
                    openitem
    (backpackbackpackfalse)
                    
    waitcontainer(backpackfalse)
                else
                    break
                
    end
            end
        end

        
    -- Revert Looting/OpenNextBP settings.
        
    setsetting('Looting/OpenNextBP'settings_backup)
    end 

  2. #72
    Free User diplu's Avatar
    Join Date
    Mar 2015
    Posts
    255
    Reputation
    104
    Rep Power
    20
    i cant make this work on Hexera's Rookgaard depots, can someone help me?
    Bought +440 RP using Dworak Midleman.
    Sold +470 RP using Dworak Midleman.

  3. #73
    Free User diplu's Avatar
    Join Date
    Mar 2015
    Posts
    255
    Reputation
    104
    Rep Power
    20
    hello?
    Bought +440 RP using Dworak Midleman.
    Sold +470 RP using Dworak Midleman.

  4. #74
    Free User NikitaArcher's Avatar
    Join Date
    Nov 2014
    Posts
    28
    Reputation
    17
    Rep Power
    0
    Hello!

    I apologize for reviving this post but really could not find a solution.

    I'm using WindBot for TibiaOT (obviously) and am finding it difficult to adapt this script.

    Basically, when the script tries to add an item in the depot box without having opened it, the game returns a message saying that the depot is full, something that does not happen if you open the depot box and insert new items.

    is it possible to adapt this script to move items to the open depot box ?!

    Sorry my bad inglish

 

 

Posting Permissions

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