aqui fera, leve e mana vc modifica la encima
local storage = 79845 --storage para o exhaustion
local tempo = 5 --em segundos
local monsters = {
[1] = {summons = {"rat", "dragon"}, maxSummons = 2, minLevel = 10, mana = 100},
[2] = {summons = {"rat", "dragon"}, maxSummons = 4, minLevel = 10, mana = 100},
[5] = {summons = {"rat", "dragon"}, maxSummons = 4, minLevel = 10, mana = 100},
[6] = {summons = {"rat", "dragon"}, maxSummons = 6, minLevel = 10, mana = 100}
}
function onSay(cid, words, param, channel)
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, 22, "You are exhausted.")
return true
end
--Player Status
local playerpos = getPlayerPosition(cid)
for k, v in pairs(monsters[getPlayerVocation(cid)].summons) do
if (param == v)then
if (monsters[getPlayerVocation(cid)]) and #getCreatureSummons(cid) >= monsters[getPlayerVocation(cid)].maxSummons then
return doPlayerSendCancel(cid, "Você já tem sumons demais.")
else
--Summon
if getPlayerLevel(cid) < monsters[getPlayerVocation(cid)].minLevel then
return doPlayerSendCancel(cid, "Level insuficiente.")
elseif getCreatureMana(cid) < monsters[getPlayerVocation(cid)].mana then
return doPlayerSendCancel(cid, "Level insuficiente.")
end
doConvinceCreature(cid, doCreateMonster(param, playerpos))
doPlayerAddMana(cid, -mana, false)
exhaustion.set(cid, storage, tempo)
doSendMagicEffect(playerpos, 2)
return true
end
else
doPlayerSendCancel(cid, "You can't summon this monster.")
end
end
return true
end