Aaaah vdd, confundi com uma da Mega Gardevoir
elseif spell == "Healing Wish" then
local min = (getCreatureMaxHealth(cid) * 50) / 100
local max = (getCreatureMaxHealth(cid) * 60) / 100
local function doHealArea(cid, min, max)
local amount = math.random(min, max)
if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then
amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid))
end
if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then
doCreatureAddHealth(cid, amount)
doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65)
end
end
local pos = getPosfromArea(cid, selfArea1)
local n = 0
doHealArea(cid, min, max)
while n < #pos do
n = n+1
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}
local pid = getThingFromPosWithProtect(thing)
doSendMagicEffect(pos[n], 13)
if isCreature(pid) then
if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then
if canAttackOther(cid, pid) == "Cant" then
doHealArea(pid, min, max)
end
elseif ehMonstro(cid) and ehMonstro(pid) then
doHealArea(pid, min, max)
end
end
end
if isSummon(cid) then
doCureBallStatus(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "all")
end
doCureStatus(cid, "all")
local uid = checkAreaUid(getThingPosWithDebug(cid), selfArea1, 1, 1)
for _,pid in pairs(uid) do
if isCreature(pid) then
if ehMonstro(cid) and ehMonstro(pid) and pid ~= cid then
doCureStatus(pid, "all")
elseif isSummon(cid) and ((isSummon(pid) and canAttackOther(cid, pid) == "Cant") or (isPlayer(pid) and canAttackOther(cid, pid) == "Cant")) and pid ~= cid then
if isSummon(pid) then
doCureBallStatus(getPlayerSlotItem(getCreatureMaster(pid), 8).uid, "all")
end
doCureStatus(pid, "all")
end
end
end