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
Sell loot and Pick up items
#1
I need a scipt to get an item from the depot and go sell
Reply

#2
How do you organize your loot on depot? I need to know EXACTLY how it is to help you with as many details as possible.
For example:
1. You use a single backpack with 20 bps inside and the loot is inside those 20 bps.
2. You have a backpack with loot and another bp inside with more loot and another bp, etc.
3. You have moving loot to Locker or Depot chest directly.

I would love if you can make a .GIF or take screenshots showing that.

Notice that you will need to make Cavebot wpts to walk to the npc and to walk back to depot.
Reply

#3
Option 1.
I use a single backpack with 20 bps inside and the withdrawal within those 20 bps.
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#4
Hello.

The scripts will do the hard job, but you still must create waypoints to reach depot and reach the npc.
So your cavebot waypoints will look like this:
000 Stand -- reach depot
001 Action -- 1st script to pickup items.
002 Stand -- reach npc
003 Action -- 2nd script to sell loots.
So after all, it will reach depot again and pickup more loots.


This script will reach locker and get the items to your backpack.
Requirements: Always use different types of backpacks than you have on your character.
Example: If you are using red backpacks and yellow backpacks on your character for runes, loots, etc. then don't use it on depot to save loots or so.

How it works:
1. Script will reach locker and open it.
2. Then search for DEPOT_MAIN_BP inside Locker and open it.
3. Then open every DEPOT_LOOT_BP that is inside DEPOT_MAIN_BP and search for listed items.
The script will try to pickup as much items as possible, but it will stop if you don't have capacity to pickup items from a DEPOT_LOOT_BP or no more available slots on LOOT_BP.
It means if you don't have more capacity to pickup any item from the current DEPOT_LOOT_BP, it will stop.
You can use multiple
--[[
    Requirements:  Always use different types of backpacks than you have on your character.
    Example: If you are using red backpacks and yellow backpacks on your character for runes, loots, etc. then don't use it on depot to save loots or so.

    How it works:
        1. Script will reach locker and open it.
        2. Then search for DEPOT_MAIN_BP inside Locker and open it.
        3. Then open every DEPOT_LOOT_BP that is inside DEPOT_MAIN_BP and search for listed items.
        The script will try to pickup as much items as possible, but it will stop if you don't have capacity to pickup items from a DEPOT_LOOT_BP or no more available slots on LOOT_BP.
        It means if you don't have more capacity to pickup any item from the current DEPOT_LOOT_BP, it will stop.
        You can use multiple
]]

local LOOT_BP = 'red backpack' -- Backpack that your character holds which will be used to move loots to. You can use multiple backpacks of this same type to move more loots, you just need to leave all those backpacks open.
local DEPOT_MAIN_BP = 'purple backpack' -- Backpack saved on depot that holds 20 backpacks inside.
local DEPOT_LOOT_BP = 'purple backpack' -- Backpack used to save loot on depot, which is inside DEPOT_MAIN_BP.

-- You can use Item name or Id. The Weight is important, so the script can calculate and check if you still have capacity to get more loots.
local ITEMS_LOOT = {
    { Item = 'halberd', Weight = 90.0 },
    { Item = 'mace', Weight = 38.0 },
    { Item = 'golden sickle', Weight = 19.5 },
    { Item = 'katana', Weight = 31.0 },
    { Item = 'studded shield', Weight = 59.0 },
    { Item = 'legion helmet', Weight = 31.0 },
}

function getEmptySlotsCount(name_index)
    local loot_conts = getcontainers(name_index)
    local count = 0
    for _, cont in ipairs(loot_conts) do
        if cont.maxslots > 0 and cont.maxslots > cont.usedslots then
            count = count + (cont.maxslots - cont.usedslots)
        end
    end
    return count
end

for i = 1, 5 do
    reachgrounditem('locker')
    wait(800, 1200)

    openitem('locker')
    wait(800, 1200)

    if windowcount('Locker') > 0 then
        openitem(DEPOT_MAIN_BP, 'Locker')
        wait(800, 1200)

        local loot_bp_count = itemcount(DEPOT_LOOT_BP, DEPOT_MAIN_BP)
        local SLOTS_AVAILABLE = getEmptySlotsCount(LOOT_BP)
        for i = 0, (loot_bp_count - 1), 1 do
            openitem(DEPOT_LOOT_BP, DEPOT_MAIN_BP, false, i)
            wait(800, 1200)
            local CAP_ENOUGH = false
            for _, item in ipairs(ITEMS_LOOT) do
                while cap() >= item.Weight do
                    CAP_ENOUGH = true
                    if itemcount(item.Item, DEPOT_LOOT_BP) > 0 then
                        moveitems(item.Item, LOOT_BP, DEPOT_LOOT_BP, 100)
                        wait(400, 700)
                        SLOTS_AVAILABLE = SLOTS_AVAILABLE - 1
                        if SLOTS_AVAILABLE <= 0 then
                            SLOTS_AVAILABLE = getEmptySlotsCount(LOOT_BP)
                            if SLOTS_AVAILABLE <= 0 then
                                break
                            end
                        end
                    else
                        break
                    end
                end
                if SLOTS_AVAILABLE <= 0 then
                    break
                end
            end
            if CAP_ENOUGH == false or SLOTS_AVAILABLE <= 0 then
                break
            end

            higherwindow(DEPOT_LOOT_BP)
            wait(800, 1200)
        end

        break
    end
end

This script will talk to the npc and sell items. There are few variables that you must adjust.
local START_TALK_WHILE_PLAYERS = false -- Start talking to npc while players on screen. If you set as false, it will wait while there are players on screen.
local NPC_NAME = 'Sam' -- NPC name to check its distance and try reach it before starting conversation. Leave it empty if you dont wanna check that.

local LOOT_BP = 'backpack' -- Backpack that your character holds which will be used to move loots to.

-- You MUST use Item name ONLY. The Weight is NOT important here, so you can just copy the table from the script that pickup items from depot.
local ITEMS_LOOT = {
    { Item = 'halberd' },
    { Item = 'mace', Weight = 38.0 },
}



while START_TALK_WHILE_PLAYERS and paround() > 0 do
    wait(800, 1200)
end

while NPC_NAME ~= '' and findcreature(NPC_NAME) > 3 do
    reachcreature(NPC_NAME)
    wait(300, 500)
end

say('hi')
wait(800, 1200)

for _, item in ipairs(ITEMS_LOOT) do
    local loot_count = itemcount(item.Item, LOOT_BP)
    if loot_count > 0 then
        say('sell ' .. loot_count .. ' ' .. item.Item)
        wait(800, 1200)
        say('yes')
        wait(800, 1200)
    end
end
Reply

#5
have a problem with the script
take the loot from the depot, sells it a the npc and after it returns to the depot no longer takes the items.
i will send the video in private.
Reply

#6
|Only Registered members can see download links. | Click here to buy subscription or here to register.
I've updated my post with an attempt to fix it, try again.
Reply

#7
now it worked, thank you very much
Reply

#8
Isn't it possible to change this script to open a backpack inside the other? for example 1bp(19slot full) open next backpack inside and so on
Reply

#9
I have two questions;
1st I use a backpack inside the other, this script would not work, can you make one that works?
2nd is there a way to check if he sold all the loot, and pause the bot, or close it? If not, he keeps walking non-stop. thank you in advance, thanks!
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016