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
FREE Shoot runes on creature (directly) according creature's health
#1
Shoot runes on creature (directly) according creature's health
local MIN_HEALTH = 80 -- Min. health pc to shoot runes. Only shoot runes if your characters hp% is higher than this value.
local Monsters = {
    { Name = 'Demon', HpMin = 0, HpMax = 100, Rune = 'heavy magic missile rune' }, -- Monster name, Hp min and max to shoot runes and which rune.
    { Name = 'Orc', HpMin = 20, HpMax = 100, Rune = 'heavy magic missile rune' }, -- On this case, it will only shoot runes when orc has hp% between 20 and 100%.
}

local attacked_creature = attacked()
if attacked_creature.id > 0 and hppc() >= MIN_HEALTH and cancast() then
    for _, monster in ipairs(Monsters) do
        if monster.Name:lower() == attacked_creature.name:lower() and attacked_creature.hppc >= monster.HpMin and attacked_creature.hppc <= monster.HpMax then
            useitemoncreature(monster.Rune, attacked_creature.id)
            wait(1000, 1300)
            break
        end
    end
end

keywords: use rune creature, shoot rune creature, check health and use rune, use rune monster, shoot rune monster

#2
return this error "20:13:30 - LUA Script -> HMM: 7: attempt to index global 'target' (a userdata value)"

#3
Hello.

Try again, i just fixed it.

#4
good night, I play 'dura' server and there the same creature can be normal, or it can come like a boss, I can configure it to shoot rune, only if the monster is stronger like a boss, for example if it takes time to die use it rune if it is an elite monster

#5
There is no such option, because there is no way to detect that it is a boss, unless there is some change such as speed difference, name, etc.
But it is possible to change the script to shoot runes only after attacking the same creature for some time.

I think this will work.
MinTimeAttacking = minimum time attacking the same creature to shoot runes in milliseconds. 0 = doesn't cares, shoot anyway.
local MIN_HEALTH = 80 -- Min. health pc to shoot runes. Only shoot runes if your characters hp% is higher than this value.
local Monsters = {
    { Name = 'Demon', HpMin = 0, HpMax = 100, Rune = 'heavy magic missile rune', MinTimeAttacking = 0 }, -- Monster name, Hp min and max to shoot runes and which rune.
    { Name = 'Orc', HpMin = 20, HpMax = 100, Rune = 'heavy magic missile rune', MinTimeAttacking = 6000 }, -- On this case, it will only shoot runes when orc has hp% between 20 and 100% and if you are already attacking that specific creature for at least 6000 ms (6 seconds).
    { Name = 'Rotworm', HpMin = 20, HpMax = 100, Rune = 'heavy magic missile rune', MinTimeAttacking = 0 }, -- On this case, it will only shoot runes when orc has hp% between 80 and 100%.
}


local attacked_creature = attacked()
if attacked_creature.id > 0 and (LAST_ATTACKED == nil or LAST_ATTACKED.id ~= attacked_creature.id) then
    LAST_ATTACKED = { id = attacked_creature.id, time = runningtimems() }
end

if attacked_creature.id > 0 and hppc() >= MIN_HEALTH and cancast() then
    for _, monster in ipairs(Monsters) do
        if monster.Name:lower() == attacked_creature.name:lower() and (monster.MinTimeAttacking == 0 or (LAST_ATTACKED ~= nil and ((runningtimems() -  LAST_ATTACKED.time) >= monster.MinTimeAttacking))) and attacked_creature.hppc >= monster.HpMin and attacked_creature.hppc <= monster.HpMax then
            useitemoncreature(monster.Rune, attacked_creature.id)
            wait(1000, 1300)
            break
        end
    end
end

#6
thank you very much I will test

do i have to put the name of each creature?

#7
Ofc, that's how the main script works. As you posted here, i just adapted the main script.

#8
thank you again, what is "ofc" ?

#9
No problem... ofc = of course xD

#10
it only plays the rune if it configures itself without the time in the case like this MinTimeAttacking = 0

if I put 1000 he doesn't play I wanted to leave it for 12 seconds attacking the same creature then he started playing hmm, in this case 12000



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016