@ewulmofo
PHP Code:
--[[
Auto Healer
Version 1.02
Created by Syntax
]]
local config = { --This Controls healing friendly players, it you want to add a friend just add in
WhiteList = {"Mountie", "Lalo Kita"},
healWhiteList = true, -- heal players specified in the whitelist
healParty = true, -- heal party members
healAlly = true, -- heal war allies
range = 4, -- max distance to heal players
mana = 140, -- minimum mana needed to cast
health = 60, -- % of friend's health to heal at
method = "exura sio" -- this is the only method currently, rune healing will be added later
}
local function sio(name)
if(Self.Mana() >= config.mana)then
Self.Say("exura sio \""..name)
sleep(math.random(200,600))
end
end
Module.New('CheckFriend', function(Mod) --This function checks your teammates health, if your friends health is below
for i = CREATURES_LOW, CREATURES_HIGH do --60% and your health is above 80% you will heal them.
local creature = Creature.GetFromIndex(i)
if (creature:isValid()) then
if (creature:isOnScreen() and creature:isVisible() and creature:isAlive()) then
local name = creature:Name()
if(creature:isWarAlly() and config.healAlly) or (creature:isPartyMember() and config.healParty) or (table.find(config.WhiteList, name, false) and config.healWhiteList)then
if(creature:DistanceFromSelf() <= config.range) and (creature:HealthPercent() <= config.health)then
if(config.method == "exura sio") then
sio(name)
end
end
end
end
end
end
sleep(math.random(100,300))
end)