Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
depositer help
#1
i wanted to change the depositer so it works with multiple character loot backpacks open... example i have 4 "backpack" open all filled with battle shield but it wont move any... it only moves the battle shields from "backpack" to "green backpack" if i have exactly 1 "backpack" open.... is there a way for it to move the battle shields even when all 4 backpack open
Code:

local CHARACTER_LOOT_BP = 'backpack'

local DEPOSITER_LOOT_MAIN_BP = 'green backpack'
local DEPOSITER_LOOT_ITEMS_BP = 'green backpack'
local DEPOSITER_STACKED_BP = 'yellow parcel'

local ITEMS_LOOT = { 'battle shield', 'battle shield', 'dwarven shield' }
local ITEMS_STACKED = { 'bolt', 'hunting bolt' }



reachgrounditem('depot')
wait(500)
openitem('depot')
wait(1000)

if itemcount(DEPOSITER_LOOT_MAIN_BP, 'Locker') > 0 then

   local DEPOSITER_LOOT_WINCOUNT = windowcount(DEPOSITER_LOOT_MAIN_BP)

   openitem(DEPOSITER_LOOT_MAIN_BP, 'Locker')
   wait(1000)

   if windowcount(DEPOSITER_LOOT_MAIN_BP) > DEPOSITER_LOOT_WINCOUNT then

       if itemcount(DEPOSITER_LOOT_ITEMS_BP, DEPOSITER_LOOT_MAIN_BP) > 0 then

           clearlastonto()

           for i = 0, #ITEMS_LOOT do
               while itemcount(ITEMS_LOOT[i], CHARACTER_LOOT_BP) > 0 do
                   moveitemsonto(ITEMS_LOOT[i], DEPOSITER_LOOT_ITEMS_BP, getlastonto(), DEPOSITER_LOOT_MAIN_BP, CHARACTER_LOOT_BP, 100)
                   wait(500)
               end
           end

       end

       higherwindow(DEPOSITER_LOOT_MAIN_BP)
       wait(1000)

   end

end

if itemcount(DEPOSITER_STACKED_BP, 'Locker') > 0 then
   
   local DEPOSITER_STACKED_WINCOUNT = windowcount(DEPOSITER_STACKED_BP)

   openitem(DEPOSITER_STACKED_BP, 'Locker')
   wait(1000)

   if windowcount(DEPOSITER_STACKED_BP) > DEPOSITER_STACKED_WINCOUNT then

       stackitems(DEPOSITER_STACKED_BP, false)

       for i = 0, #ITEMS_STACKED do
           while itemcount(ITEMS_STACKED[i], CHARACTER_LOOT_BP) > 0 do

               moveitems(ITEMS_STACKED[i], DEPOSITER_STACKED_BP, CHARACTER_LOOT_BP, 100)
               wait(500)

           end
       end
       
   end

end
Reply

#2
I think it's a problem on moveitemsonto(), so you will need to use a table with container index instead of container name.

The container index is a number given based on order you open the backpacks. It starts from zero. If you have hard time to find out what's the index of each container, I recommend you to run this code, it will print on console the containers index, name and how many slots are being used. So you can leave the backpacks with different items count and run the code then you will know what's the index of each one.

local containers = getcontainers()
for _, cont in ipairs(containers) do
    print('[' .. cont.index .. '] ' .. cont.name .. ' -> used slots: ' .. cont.usedslots)
end
Example:
[0] blue backpack -> used slots: 1
[2] red backpack -> used slots: 6

Blue backpack index = 0
Red backpack index = 2.


local CHARACTER_LOOT_BP = { 0, 1, 2 } -- Backpack index.

local DEPOSITER_LOOT_MAIN_BP = 'green backpack'
local DEPOSITER_LOOT_ITEMS_BP = 'green backpack'
local DEPOSITER_STACKED_BP = 'yellow parcel'

local ITEMS_LOOT = { 'battle shield', 'battle shield', 'dwarven shield' }
local ITEMS_STACKED = { 'bolt', 'hunting bolt' }



reachgrounditem('depot')
wait(500)
openitem('depot')
wait(1000)

if itemcount(DEPOSITER_LOOT_MAIN_BP, 'Locker') > 0 then

   local DEPOSITER_LOOT_WINCOUNT = windowcount(DEPOSITER_LOOT_MAIN_BP)

   openitem(DEPOSITER_LOOT_MAIN_BP, 'Locker')
   wait(1000)

   if windowcount(DEPOSITER_LOOT_MAIN_BP) > DEPOSITER_LOOT_WINCOUNT then

       if itemcount(DEPOSITER_LOOT_ITEMS_BP, DEPOSITER_LOOT_MAIN_BP) > 0 then

           clearlastonto()

           for i = 0, #ITEMS_LOOT do
               for j = 0, #CHARACTER_LOOT_BP do
                  while itemcount(ITEMS_LOOT[i], CHARACTER_LOOT_BP[j]) > 0 do
                      moveitemsonto(ITEMS_LOOT[i], DEPOSITER_LOOT_ITEMS_BP, getlastonto(), DEPOSITER_LOOT_MAIN_BP, CHARACTER_LOOT_BP[j], 100)
                      wait(500)
                  end
               end
           end

       end

       higherwindow(DEPOSITER_LOOT_MAIN_BP)
       wait(1000)

   end

end

if itemcount(DEPOSITER_STACKED_BP, 'Locker') > 0 then
  
   local DEPOSITER_STACKED_WINCOUNT = windowcount(DEPOSITER_STACKED_BP)

   openitem(DEPOSITER_STACKED_BP, 'Locker')
   wait(1000)

   if windowcount(DEPOSITER_STACKED_BP) > DEPOSITER_STACKED_WINCOUNT then

       stackitems(DEPOSITER_STACKED_BP, false)

       for i = 0, #ITEMS_STACKED do
           for j = 0, #CHARACTER_LOOT_BP do
               while itemcount(ITEMS_STACKED[i], CHARACTER_LOOT_BP[j]) > 0 do

                  moveitems(ITEMS_STACKED[i], DEPOSITER_STACKED_BP, CHARACTER_LOOT_BP[j], 100)
                  wait(500)
               end
           end
       end
      
   end

end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016