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
cavebot vs dungeon instances
#1
Music 
Hi, i got question: how to make action in cavebot to make decision what node (start inst.1/2/ or 3) is closest and "jump" this node?
|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.loading="lazy" alt="[Image: nqgrCYI]" class="mycode_img" />
Reply

#2
Hello.

Something like this:
local OPTIONS = {
    { Label = 'start instantion 1', Location = { X = 32612, Y = 31958, Z = 11 } },
    { Label = 'start inst 2', Location = { X = 32611, Y = 31966, Z = 11 } },
    { Label = 'start inst 3', Location = { X = 32613, Y = 31934, Z = 11 } },
}

local closest = { dist = -1, label = nil }
for _, option in ipairs(OPTIONS) do
    local dist = proximity(option.Location.X, option.Location.Y, option.Location.Z)
    if closest.dist == -1 or dist < closest.dist then
        closest = { dist = dist, label = option.Label }
    end
end

if closest.label ~= nil then
    gotolabel(closest.label)
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016