Signup Now
Results 1 to 1 of 1
  1. #1
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23

    Function DepotBox - using [Dehan] DepotBox

    @Dehan

    Action Dehan --> https://forums.tibiawindbot.com/show...oxes-Depositer

    Credits continue to Dehan for doing this great deed. I just simplified it to be used in a cavebot action (if you put the function in the persistent cavebot action will be very simple).

    Function information:

    DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, DepositPlatinumCoins)
    Option DepositPlatinumCoins, default false (If you do not write in the DepositPlatinumCoins part or write false, the action will not deposit the platinum coins.)


    - Resume:
    DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, true) --Deposit platinum coins in depot box (stack)

    DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, false) --No deposit platinum coins in depot box

    DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack) --No deposit platinum coins in depot box


    --==Options 1 ==--
    --All in 1 action cavebot--


    1- create action cavebot then paste all action in action cavebot.
    Example in use, line 48 in action.

    getlootingdestination('Destination Name'), Looting > Seetings > Looting Destinations...
    example:
    -Destination Name: lootbp
    +
    Destination: green backpack
    =
    getlootingdestination('mainbp'), will move all items from the green backpack to the chosen depot boxes.


    function DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, DepositPlatinumCoins)
    local DepositPlatinumCoins = DepositPlatinumCoins or false
    lootingBp = NameLootBp
    nonstackableNumber = NumberDpItemsNoStack
    stackableNumber = NumberDpItemsStack

    --[[DO NOT EDIT BELOW THIS LINE]]--

    waitping()
    closewindows() wait(1500)
    while windowcount(lootingBp) == 0 do
    closewindows() wait(1000)
    openitem($back.id,'back') wait(1000)
    openitem(lootingBp,itemname($back.id),true) wait(1000)
    resizewindows()
    end
    while windowcount("Depot Chest") == 0 do
    opendepot(true)
    wait(300)
    openitem(3502)
    wait(500)
    end

    depotId = 22796
    stackableId = depotId + stackableNumber
    nonstackableId = depotId + nonstackableNumber

    while (true) do
    foreach lootingitem i do
    while itemcount(i.id, lootingBp) > 0 and (DepositPlatinumCoins or not DepositPlatinumCoins and i.id ~= 3035) do
    if itemproperty(i.id, 5) then
    moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
    else
    moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
    end
    end
    end
    if (itemcount(lootingBp, lootingBp) > 0) then
    openitem(lootingBp, lootingBp, false)
    waitcontainer(lootingBp, false)
    else
    break
    end
    wait(100)
    end
    end

    reachgrounditem("depot")
    DepotBox(getlootingdestination('lootbp'), 1, 2)


    --==Option 2==--
    --Function Persistent--


    1- Create a Persistent, any name.

    2- Paste in Persistent function.


    function DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, DepositPlatinumCoins)
    local DepositPlatinumCoins = DepositPlatinumCoins or false
    lootingBp = NameLootBp
    nonstackableNumber = NumberDpItemsNoStack
    stackableNumber = NumberDpItemsStack

    --[[DO NOT EDIT BELOW THIS LINE]]--

    waitping()
    closewindows() wait(1500)
    while windowcount(lootingBp) == 0 do
    closewindows() wait(1000)
    openitem($back.id,'back') wait(1000)
    openitem(lootingBp,itemname($back.id),true) wait(1000)
    resizewindows()
    end
    while windowcount("Depot Chest") == 0 do
    opendepot(true)
    wait(300)
    openitem(3502)
    wait(500)
    end

    depotId = 22796
    stackableId = depotId + stackableNumber
    nonstackableId = depotId + nonstackableNumber

    while (true) do
    foreach lootingitem i do
    while itemcount(i.id, lootingBp) > 0 and (DepositPlatinumCoins or not DepositPlatinumCoins and i.id ~= 3035) do
    if itemproperty(i.id, 5) then
    moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
    else
    moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
    end
    end
    end
    if (itemcount(lootingBp, lootingBp) > 0) then
    openitem(lootingBp, lootingBp, false)
    waitcontainer(lootingBp, false)
    else
    break
    end
    wait(100)
    end
    end



    3- Activate this persistent, changing to "yes".

    4- Your action cavebot.


    reachgrounditem("depot")
    DepotBox(getlootingdestination('lootbp'), 1, 2)

 

 

Posting Permissions

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