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
if x uh logout
#1
I need script when uhs are below x turn off cavebot and logout

#2
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 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 RunesCount <= COUNT and ContainerSlot == -1 then
                setsettings('Cavebot/Enabled', false)
                while battlesigned() do
                    wait(1000)
                end
                logout()
                wait(800)            
            end
        end
    end
end

#3
Thanks alot

edit:
It doesnt work

#4
Please, refresh page, copy code and try it again. I just updated my post with a fix.

#5
Ok now its work fine thanks

#6
You could modify this action for when I have 50 bolt I logout

#7
You can that yourself, I believe you have enough knowledge to edit a single variable value from rune name to ammo name. hehe

#8
So basicly for that Script to work I need to do wpt "action" and write this down right?
Is is possible for bot to check how many UH he has without opening bps? and set it up for like less than 50 than xlog?

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

Hello.

No, you should use it on Persistents.
But I believe the code below would work better in an Action.
local Backpack = 'green backpack' -- specific container to check for runes.
local Rune = 'ultimate healing rune' -- rune to check.
local COUNT = 2 -- Count to disable cavebot and logout.

--[[ 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 RunesCount <= COUNT and ContainerSlot == -1 then
                while battlesigned() do
                    wait(1000)
                end
                logout()
                wait(800)
                if not connected() then
                    setsettings('Cavebot/Enabled', false)        
                end  
            end
        end
    end
end

Yes, it's possible but bit complex, because it would count from last green message (Using a vial...") that shows up, but it may not be accurate because this message only shows up when you use an item by hotkeys. So if you refill (manually or not) and walk back to place, it would still check that last green message before you refill.
|Only Registered members can see download links. | Click here to buy subscription or here to register.



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016