Tente Colocar assim.
-- { By DevilMoon , Kydrai } --
-- { Update By: Vodkart, Oneshot and DevilMoon } --
local config = {
monsterName = "Dragon", -- Nome do Monstro
maxSummon = 1, -- Max De Summona no caso ele so poder sumonar 1
storageHealth = 1000 -- Vida Max do Dragon
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local summon = getCreatureSummons(cid)
if(table.maxn(summon) < config.maxSummon) then
local p = doCreateMonster(config.monsterName, getThingPosition(cid))
doConvinceCreature(cid, p)
doCreatureSay(cid, "Go, ".. config.monsterName .."", TALKTYPE_SAY)
doCreatureAddHealth(p, -(getCreatureMaxHealth(p)-getPlayerStorageValue(cid, config.storageHealth)))
doSendMagicEffect(getThingPosition(cid), 10) -- efeito quando ele sumonara o monstro
else
for _, pid in pairs(summon) do
doRemoveCreature(pid)
setPlayerStorageValue(cid, config.storageHealth, getCreatureHealth(pid))
doCreatureSay(cid, "Back, ".. config.monsterName .."", TALKTYPE_SAY)
end
end
return TRUE
end
@Eduardo2000
Voce nao Merece os Creditos, Porque voce so Adicionou uma Funçao.
E Ainda esta dando + Problemas Do que a Original.