Shoot runes on creature (directly) according creature's health
keywords: use rune creature, shoot rune creature, check health and use rune, use rune monster, shoot rune monster
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