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 Cast spells according creature's health
#1
Hello.

This script will cast the specific spell according to the monster you are killing and its health. So you can setup multiple spells for same monster according its health.
Targeting can do the same and it's better because it has more conditions, but i decided to create this simple script to show you guys you can do the same using LUA Scripts.

local MIN_HEALTH = 80 -- Min. health pc to cast spells. Only cast spells if your characters hp% is higher than this value.
local Monsters = {
    { Name = 'Orc Warrior', HpMin = 1, HpMax = 100, Spell = 'exori flam' }, -- Monster name, Hp min and max to cast spell and which spell.
    { Name = 'Orc', HpMin = 20, HpMax = 100, Spell = 'exori flam' }, -- On this case, it will only cast spells 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
            cast(monster.Spell)
            wait(1000, 1300)
            break
        end
    end
end


Alternatively, if you don't care about creatures health then you can use the script below:
local MIN_HEALTH = 80 -- Min. health pc to cast spells. Only cast spells if your characters hp% is higher than this value.
local Monsters = {
    { Name = 'Orc Warrior', Spell = 'exori flam' }, -- Monster name and which spell to cast.
    { Name = 'Orc', Spell = 'exori flam' }, -- On this case, it will cast exori flam on a Orc.
}

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() then
            cast(monster.Spell)
            wait(1000, 1300)
            break
        end
    end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016