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
Attack highest HP monster [Train]
#1
Hey, I wonder if it's possible to create a 'reverse target health priority' function. Basically I train with two monsters and want to switch targets between them to always focus on the highest HP monster. By doing that, I can make them live longer and I buy time before other creatures respawn nearby, so my node -> lure function works with minimal character movement.
Reply

#2
Hello.

It's possible to make a script
Make sure your Targeting -> Targeting Priority -> Stick is the highest.
local Creatures = { 'Monk' } -- Creature names that you wanna stack.
local MaxDistance = 1 -- Max. distance to attack it. If monster distance is higher than this then it will not attack it.
local CheckReachble = false -- Check if monster is reachable.


local highHealthCreature = nil
local creatures = getcreatures('mfs')
for _, creature in ipairs(creatures) do
    if creature.dist <= MaxDistance and (CheckReachble == false or (CheckReachble and creature.isreachable)) and table.find(Creatures, creature.name) ~= nil and (highHealthCreature == nil or highHealthCreature.hppc < creature.hppc) then
        highHealthCreature = creature
    end
end

if highHealthCreature ~= nil then
    local attacked_creature = attacked()
    if attacked_creature.id ~= highHealthCreature.id then
        local targetingEnabled = targetingstatus()
        if targetingEnabled then
            setsettings('Targeting/Enabled', false)
        end
        attack(highHealthCreature.id)
        wait(300, 600)
        if targetingEnabled then
            setsettings('Targeting/Enabled', true)
        end
    end
end

This will not change targets while luring.
local Creatures = { 'Monk' } -- Creature names that you wanna stack.
local MaxDistance = 1 -- Max. distance to attack it. If monster distance is higher than this then it will not attack it.
local CheckReachble = false -- Check if monster is reachable.

if not isluring() then
    local highHealthCreature = nil
    local creatures = getcreatures('mfs')
    for _, creature in ipairs(creatures) do
        if creature.dist <= MaxDistance and (CheckReachble == false or (CheckReachble and creature.isreachable)) and table.find(Creatures, creature.name) ~= nil and (highHealthCreature == nil or highHealthCreature.hppc < creature.hppc) then
            highHealthCreature = creature
        end
    end

    if highHealthCreature ~= nil then
        local attacked_creature = attacked()
        if attacked_creature.id ~= highHealthCreature.id then
            local targetingEnabled = targetingstatus()
            if targetingEnabled then
                setsettings('Targeting/Enabled', false)
            end
            attack(highHealthCreature.id)
            wait(300, 600)
            if targetingEnabled then
                setsettings('Targeting/Enabled', true)
            end
        end
    end
end
Reply

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


Thanks Arkilys. You sure take your time to personally answer our questions. And you sure did a hell of a job developing the software in a functional and intuitive way. Congrats.
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Looks like something is off, it is turning on and off the attack on the same creature. Also, when it turns targeting off, my cavebot luring kicks in, making my char ping pong. This are my actual configs: 



|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: 2XViE39.png]" class="mycode_img" />
|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: 1z8Ylu9.png]" class="mycode_img" />
|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: eyiOj4N.png]" class="mycode_img" />
|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: buaNLpF.png]" class="mycode_img" />
Reply

#5
Hello.

My bad, it was my mistake. I setup to attack the current creature, which I just fixed.

Also, that added another script that will not change targeting while luring... Because I suppose that using MaxDistance = 1 will make change targets while luring, since dist 1 == around you. So once you step away, it would change target.

It does disables and enable Targeting to avoid targeting to change back to previous due to Targeting Priority.
Reply

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

Working like a charm. Thanks mate.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016