PDA

View Full Version : light heal, medium heal and heavy heal!



hikoj
07-01-2012, 02:04 AM
pls add light heal, medium heal and heavy heal to xenobot
mages really need it :(

Y2Quake
07-01-2012, 02:59 AM
this has been suggested b4-

Luls
07-01-2012, 03:41 AM
Make a lua script for it

hikoj
07-01-2012, 07:45 PM
i tried a lua script, but it's so slow

Luls
07-01-2012, 09:54 PM
I haven't tested it yet.

What do you use for Zugurosh? Or do you just use the default hi/lo?

hikoj
07-04-2012, 08:31 PM
Then you're doing it wrong.

Try:

local config = {
--High health
spellhi_spell = "exura",
spellhi_low = 80, spellhi_high = 90,

--Middle health
spellmid_spell = "exura gran",
spellmid_low = 70, spellmid_high = 80,

--Low health
spelllow_spell = "exura vita",
spelllow_high = 70
}

Self.HealthPercent = function()
return math.abs(Self.Health()/(Self.MaxHealth()*0.01))
end

while (true) do
if (Self.HealthPercent() < config.spellhi_high and Self.HealthPercent() > config.spellhi_low and Self.CanCastSpell(config.spellhi_spell)) then
Self.Say(config.spellhi_spell)
elseif (Self.HealthPercent() < config.spellmid_high and Self.HealthPercent() > config.spellmid_low and Self.CanCastSpell(config.spellmid_spell)) then
Self.Say(config.spellmid_spell)
elseif (Self.HealthPercent() < config.spelllow_high and Self.HealthPercent() > 0 and Self.CanCastSpell(config.spelllow_spell)) then
Self.Say(config.spelllow_spell)
end
wait(100, 200)
end


Note that you have to use health percent NOT health points.
I haven't tested it yet.

it's very slow bro, i almost died :(