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
LootBag Script Not Working
#1
Happy new year everyone!

I am using the script > "Drop loot inside a container (backpack,bag, etc.)" can be found here 
|Only Registered members can see download links. | Click here to buy subscription or here to register.


He works just fine until the lootbag is full, the bot don't open the next bp inside of the lootbag. 

Someone can help me to fix that? Thank you in advance
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />


The Action Code:




local ItemsDrop = { 'plate armor', 'Small Stone' } -- Items that you wanna drop inside the container.
local BackpackLoot = 'Beach Backpack' -- Backpack that you are carrying to keep loots, it will drop FROM this backpack.
local DropBagPosition = { X = 32785, Y = 32514, Z = 7 } -- Container's location that you wanna open and drop items inside.

--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ CREDITS TO ARKILYS --]]
--[[ DON'T EDIT BELOW THIS LINE --]]

local startWindowsCount = windowcount()
local currentWindowsCount = -1

for i = 0, 5 do
    openitem(0, ground(DropBagPosition.X, DropBagPosition.Y, DropBagPosition.Z), true)
    wait(1000, 1200)

    currentWindowsCount = windowcount()
    if currentWindowsCount > startWindowsCount then
        break
    end
end

if currentWindowsCount > startWindowsCount then

    table.id(ItemsDrop)

    local bagIndex = currentWindowsCount - 1
    local bagContainer = getcontainer(bagIndex)

    if tempOpenNextContainer == nil then
        function tempOpenNextContainer(bagContainer)
            if bagContainer ~= nil and bagContainer.maxslots > 0 then
                while bagContainer.maxslots == bagContainer.usedslots and bagContainer.maxslots > 0 do
                    local foundContainer = false
                    for _, bagItem in ipairs(bagContainer.items) do
                        if itemhasflags(bagItem.id, 4) then
                            foundContainer = true
                            openitem(bagItem.id, bagContainer.index)
                            wait(1200, 1500)
                            bagContainer = getcontainer(bagContainer.index)
                            break
                        end
                    end
                    if foundContainer == false then
                        break
                    end
                end
            end

            return bagContainer
        end
    end

    bagContainer = tempOpenNextContainer(bagContainer)
    if bagContainer ~= nil and bagContainer.maxslots ~= nil then
        emptyLeft = bagContainer.maxslots - bagContainer.usedslots
        if emptyLeft > 0 then
            for _, item in ipairs(ItemsDrop) do
                while itemcount(item, BackpackLoot) > 0 do
                    if emptyLeft == 0 then
                        bagContainer = tempOpenNextContainer(getcontainer(bagContainer.index))
                        if bagContainer ~= nil and bagContainer.maxslots ~= nil then
                            emptyLeft = bagContainer.maxslots - bagContainer.usedslots
                            if emptyLeft == 0 then
                                break
                            end
                        end
                    end
                    moveitems(item, bagContainer.index, BackpackLoot, 100)
                    wait(300)
                    emptyLeft = emptyLeft - 1
                end
            end
        end
    end
end
Reply

#2
Hey, I am having the same issues, any clue on how to fix it?

Thanks!
Reply

#3
Hello.

I just tested and it worked perfectly fine for me. I tried with empty bag, it moved items and opened the next bag inside it. I also tried directly with a full bag, it opened the bag and opened the next bag looking for empty slots.
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Im using a "Beach Backpack" and it's only opening the backpacks (it keeps opening the next bps if they're full) and once it arrives to the backpack with available slots it does nothing else.
Reply

#5
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Tried this script but it keeps moving items from BACKPACKLOOT to another random backpack on my character, not the backpacks inside the bag on the ground. PS: i setup BACKPACKLOOT as purple backpack and the bagloot has camouflage backpack inside. Any reason that it doesn't recognize the camouflage backpack inside??
Reply

#6
Is it possible to use the item ids instead of itemnames?
I tried with the itemids but doesnt work
Reply

#7
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Yes, it's possible. The script actually tries to convert item name to id using function itemid on table.id(ItemsDrop).
Reply

#8
|Only Registered members can see download links. | Click here to buy subscription or here to register.

I tried using the Item id's for items out of the library and as tester aswell the crossbow's id but it didnt move any of them
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Sad" title="Sad" class="smilie smilie_8" />
or should I change ItemDrop to table.id(ItemsDrop)?
Im not that good yet im sorry
Reply

#9
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Hello.

Even if the code above works, this thread is almost 3 years old and about getting help with a script that was posted here:
|Only Registered members can see download links. | Click here to buy subscription or here to register.

So try using the code from link above.

No, you don't need to change that, because table.id(ItemsDrop) is already on code (line #24~).
"local ItemsDrop = " creates a variable with items that you wanna drop, you can use item names or ids (ids is actually better).
"table.id(ItemsDrop)" just gets any item name on that list and tries to get its id. As Bot don't know all items names then it's possible that some fail, that's why using IDs instead names is better.
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Smile" title="Smile" class="smilie smilie_1" />
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016