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
abuot lua
#1
hello everyone i need help with something


i need a lua that turn of cavebot if a monster is close to ladder


like this

if dragon close to ladder like 3 square meter turn off cavebot if dragon longer from ladder them turn on cavebot

and something like this

if maroundfloor(1, 0, 1) then
setsettings ('Cavebot/Enabled', false)  
else
setsettings ('Cavebot/Enabled', true)
wait(500)
end
Reply

#2
Hello.

You will need to specify what's the ladder's location and which monster specifically.

I didn't tested this code, so if it doesn't works that will be a good start for you
local Ladder = { X = 12345, Y = 12345, Z = 7 }
local Monster = 'Dragon'

local creatures = getcreatures('m')

local creaturesCount = #creatures

local UPDATE = false

for i = 1, creaturesCount do
    local creature = creatures[i]
    if creature.posz == Ladder.Z and creature.name == Monster and math.abs(creature.posx - Ladder.X) <= 1 and math.abs(creature.posy - Ladder.Y) <= 1 then
        UPDATE = true
        break
    end
end

if UPDATE then
    if getsettings('Cavebot/Enabled') == false then
        setsettings('Cavebot/Enabled', true)
        wait(1000)
    end
else
    if getsettings('Cavebot/Enabled') then
        setsettings('Cavebot/Enabled', false)
        wait(1000)
    end
end
Reply

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

Right now it's doing the opposite of what I want. What I'm requesting is that when the dragon is xxx(far) squares from the stair, turn cavebot & targeting on. When dragon is xx(close) turn off cavebot & targeting.
Reply

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

Hello.

You just had to invert setsettings().

local Ladder = { X = 12345, Y = 12345, Z = 7 }
local Monster = 'Dragon'

local creatures = getcreatures('m')

local creaturesCount = #creatures

local UPDATE = false

for i = 1, creaturesCount do
    local creature = creatures[i]
    if creature.posz == Ladder.Z and creature.name == Monster and math.abs(creature.posx - Ladder.X) <= 1 and math.abs(creature.posy - Ladder.Y) <= 1 then
        UPDATE = true
        break
    end
end

if UPDATE then
    if getsettings('Cavebot/Enabled') then
        setsettings('Cavebot/Enabled', false)
    end
    if getsettings('Targeting/Enabled') then
        setsettings('Targeting/Enabled', false)
    end
    wait(1000)
else
    if getsettings('Cavebot/Enabled') == false then
        setsettings('Cavebot/Enabled', true)
    end
    if getsettings('Targeting/Enabled') == false then
        setsettings('Targeting/Enabled', true)
    end
    wait(1000)
end
Reply

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

ty for support
|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