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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FREE [v0.2] Check for rune and Open next backpack or Alert
#1
Hello.

This script will check if there are RUNES on specific backpack's and...
1. IF OPEN_BACKPACK is ENABLED... If there are no specific rune and there are a container, it will open this container. I recommend to disable "OPEN_BACKPACK" (set "OPEN_BACKPACK" as false) while using "Healer/Settings/Open next BP for more supply" or "Targeting/Settings/Open next BP for more runes".
2. If there are less or equal to MinCount and there are no container, it will play a sound and flash the client.

I recommend you to use Backpack index instead of names, unless you use that specific backpack (e.g.: "golden backpack') for your runes backpacks only and all runes backpacks INSIDE are the same kind. So if you are using Golden Backpack for runes and gold coins OR not using same color for all runes backpacks, you must use index.

Index is zero-based and according the order that you opened the backpacks.

local Backpack = 'green backpack' -- specific container to check for runes.
local Rune = 'ultimate healing rune' -- rune to check.

local OPEN_BACKPACK = true -- open next backpack for more runes?

local PLAY_ALERT = true -- Play alert on MinCount?
local ALERT_COUNT = 2 -- Min. count to play alert.

--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]

if connected() then
    Rune = itemid(Rune)

    local Containers = getcontainers()

    for i = 1, #Containers do
        local cont = Containers[i]
        local ContainerSlot = -1
        local RunesCount = 0

        if (cont.name:lower() == Backpack:lower() or tostring(Backpack) == tostring(cont.index)) then
            for j = 1, #cont.items do
                local item = cont.items[j]
                if itemhasflags(item.id, 4) then
                    ContainerSlot = item.index
                elseif item.id == Rune then
                    RunesCount = RunesCount + item.count
                end
            end

            if OPEN_BACKPACK and RunesCount == 0 and ContainerSlot >= 0 then
                openitemslot(ContainerSlot, cont.index, false)
                wait(1000)
            elseif PLAY_ALERT and RunesCount <= ALERT_COUNT and ContainerSlot == -1 then
                playsound('default')
                flashclient()
                wait(800)            
            end
        end
    end
end

On old tibia, Mana fluid don't have its own id, it's a vial with purple fluid inside. The item id will be the id of a vial (2874), which will be the same with if you have an empty vial or vial with water for example. You can check what's the FLUID inside by checking the vial COUNT. So you should use the script below to check for fluids.

You can just move a vial of mana fluid to your BELT/ARROW slot and run this code on Bot's console:
print(belt())
It will print a message on console which will tell you the vial id, which will be 2874 and its count, which will be the fluid id. Example: { id = 2874, count = 2 }, so the fluid id inside that vial is 2.

If you have an empty vial, it will probably print like this: { id = 2874, count = 0 }.
If you have vial of water, probably like this: { id = 2874, count = 1 }

I believe that mana fluid uses ID 2.
local Backpack = 'green backpack' -- specific container to check for fluids.
local FLUID_ID = 2 -- fluid id to check.

local OPEN_BACKPACK = true -- open next backpack for more fluids?

local PLAY_ALERT = true -- Play alert on MinCount?
local ALERT_COUNT = 2 -- Min. count to play alert.

--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]

if connected() then
    local Containers = getcontainers()

    for i = 1, #Containers do
        local cont = Containers[i]
        local ContainerSlot = -1
        local Count = 0

        if (cont.name:lower() == Backpack:lower() or tostring(Backpack) == tostring(cont.index)) then
            for j = 1, #cont.items do
                local item = cont.items[j]
                if itemhasflags(item.id, 4) then
                    ContainerSlot = item.index
                elseif item.id == 2874 and item.count == FLUID_ID then
                    Count = Count + 1
                end
            end

            if OPEN_BACKPACK and Count == 0 and ContainerSlot >= 0 then
                openitemslot(ContainerSlot, cont.index, false)
                wait(1000)
            elseif PLAY_ALERT and Count <= ALERT_COUNT and ContainerSlot == -1 then
                playsound('default')
                flashclient()
                wait(800)            
            end
        end
    end
end
Reply

#2
Doesn't work me. Bot play sound even if I have opened bp of MF in purple backpack.


local Backpack = 'purple backpack' -- specific container to check for runes.
local Rune = 'vial of mana fluid' -- rune to check.

local OPEN_BACKPACK = false -- open next backpack for more runes?

local PLAY_ALERT = true -- Play alert on MinCount?
local ALERT_COUNT = 19 -- Min. count to play alert.
Reply

#3
Hello.

I already replied about this subject many times, but I will do it once again.

On old tibia, Mana fluid don't have its own id, it's a vial with purple fluid inside. The item id will be the id of a vial (2874), which will be the same with if you have an empty vial or vial with water for example. You can check what's the FLUID inside by checking the vial COUNT.

So the script above which works for runes would not works for mana fluids. I've applied some changes to make it work with mana fluids, you just need to make sure the FLUID_ID is correct.
You can just move a vial of mana fluid to your BELT/ARROW slot and run this code on Bot's console:
print(belt())
It will print a message on console which will tell you the vial id, which will be 2874 and its count, which will be the fluid id. Example: { id = 2874, count = 9 }, so the fluid id inside that vial is 9.

If you have an empty vial, it will probably print like this: { id = 2874, count = 0 }.
If you have vial of water, probably like this: { id = 2874, count = 1 }

I believe that mana fluid uses ID 9.
local Backpack = 'green backpack' -- specific container to check for fluids.
local FLUID_ID = 9 -- fluid id to check.

local OPEN_BACKPACK = true -- open next backpack for more fluids?

local PLAY_ALERT = true -- Play alert on MinCount?
local ALERT_COUNT = 2 -- Min. count to play alert.

--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]

if connected() then
    local Containers = getcontainers()

    for i = 1, #Containers do
        local cont = Containers[i]
        local ContainerSlot = -1
        local Count = 0

        if (cont.name:lower() == Backpack:lower() or tostring(Backpack) == tostring(cont.index)) then
            for j = 1, #cont.items do
                local item = cont.items[j]
                if itemhasflags(item.id, 4) then
                    ContainerSlot = item.index
                elseif item.id == 2874 and item.count == FLUID_ID then
                    Count = Count + 1
                end
            end

            if OPEN_BACKPACK and Count == 0 and ContainerSlot >= 0 then
                openitemslot(ContainerSlot, cont.index, false)
                wait(1000)
            elseif PLAY_ALERT and Count <= ALERT_COUNT and ContainerSlot == -1 then
                playsound('default')
                flashclient()
                wait(800)            
            end
        end
    end
end
Reply

#4
Thanks I'll try. Can u edit that with stop cavebot+ logout?

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

When mana fluid is in arrow slot.


It doesn't work for me anyway...
Reply

#5
The script above works perfectly fine for mana fluids, you just need to change Backpack variable to your backpack index or backpack name and FLUID_ID variable to 2.

For future references, requests should be posted on Requests section.
local Backpack = 'green backpack' -- specific container to check for fluids.
local FLUID_ID = 2 -- fluid id to check.

local OPEN_BACKPACK = true -- open next backpack for more fluids?

local PLAY_ALERT = true -- Play alert on MinCount?
local ALERT_COUNT = 2 -- Min. count to play alert.

--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]

if connected() then
    local Containers = getcontainers()

    for i = 1, #Containers do
        local cont = Containers[i]
        local ContainerSlot = -1
        local Count = 0

        if (cont.name:lower() == Backpack:lower() or tostring(Backpack) == tostring(cont.index)) then
            for j = 1, #cont.items do
                local item = cont.items[j]
                if itemhasflags(item.id, 4) then
                    ContainerSlot = item.index
                elseif item.id == 2874 and item.count == FLUID_ID then
                    Count = Count + 1
                end
            end

            if OPEN_BACKPACK and Count == 0 and ContainerSlot >= 0 then
                openitemslot(ContainerSlot, cont.index, false)
                wait(1000)
            elseif PLAY_ALERT and Count <= ALERT_COUNT and ContainerSlot == -1 then
                setsettings('Cavebot/Enabled', false)
                playsound('default')
                flashclient()
                logout()
                wait(800)            
            end
        end
    end
end
Reply

#6
I tried following what you said but I cant seem to make it work, I have all bps opened and I want for it to sound alarm if I have less than 10 manafluids.
05:08 You see a vial of manafluid.

I tried using all the names for it but it keeps sounding non stop.

Also it seems to stop the cavebot, is there a way for it just to sound alarm? How would it look like? Tyvm
Reply

#7
The first script doesn't stops the Cavebot.
Try "mana fluid".
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016