View Full Version : New Alarm Option: Alarm if "Exura Gran Mas Res" on screen
Danny_
03-13-2013, 03:22 PM
New Alarm Option: Alarm if "Exura Gran Mas Res" on screen
Well just as the title says, more or less, guess it doesn't need an explanation. Just another alarm option that will notify us if someone is trying to heal our monsters.
/Regards
Danny_
Hendy
03-13-2013, 03:29 PM
local target = Creature.New(Self.TargetID())
local tHealth = target:HealthPercent()
while (true) do
if (not target:isTarget()) then --update our target, it has changed
target = Creature.New(Self.TargetID())
tHealth = target:HealthPercent()
end
if (target:isValid() and target:isVisible()) then --lets make sure it's still here
if (target:HealthPercent() > tHealth + 7) then --its gained 7% of its health, must be being healed
alert()
end
tHealth = target:HealthPercent()
end
wait(500)
end
credits to darkstar
Note: adjust the line #9 with: target:HealthPercent() > tHealth + 7
change the 7 up or down to adjust the alarm sensitivity. Less then 5% can cause a lot of false positives.
kubax36
03-16-2013, 12:39 AM
is there any way to put names of monsters which should not alarm if they are healed?
Hendy
03-16-2013, 12:42 AM
is there any way to put names of monsters which should not alarm if they are healed?
Well, it only alarms a targeted creature
kubax36
03-16-2013, 01:47 AM
so there is no way to check name? ;/
Danny_
04-01-2013, 08:39 PM
Thanks man! I didn't c it until now haha :D <3
Syntax
04-02-2013, 05:05 PM
so there is no way to check name? ;/
Something like this should work:
local target = Creature.New(Self.TargetID())
local tHealth = target:HealthPercent()
local ignoreList = {"Badger", "Badger", "Mushroom", "Snaaaaake"}
while (true) do
if (not target:isTarget()) then --update our target, it has changed
target = Creature.New(Self.TargetID())
tHealth = target:HealthPercent()
end
if (target:isValid() and target:isVisible()) then --lets make sure it's still here
if (target:HealthPercent() > tHealth + 7 and) then --its gained 7% of its health, must be being healed
if not (table.contains(ignoreList, target:Name())) then --its not in the ignore list
alert()
end
end
tHealth = target:HealthPercent()
end
wait(500)
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.