Olá pessoas, to aqui para pedir uma ajuda PARA ADICIONAR ALGUMAS COISAS num script de summon por level, exemplo: Eu sou x level, uso o summon e sumono x monstro.
Porém o script é muito simples; se o player não tem o level necessário não envia a msg avisando isso a ele, não tem exausted também. Como eu sou totalmente leigo vim pedir uma ajudinha de vocês.
Segue o script:
local config = {
maxSummons = 4, --Limite de summons.
summons = {
[250] = "Cell jr", --[level] = "summon",
[50] = "Dragon",
[75] = "Dragon Lord",
[100] = "Demon",
},
}
function onCastSpell(cid)
if #getCreatureSummons(cid) < config.maxSummons then
local summon
for level, summonName in pairs(config.summons) do
if getPlayerLevel(cid) >= level then
summon = summonName
end
end
if summon then
doConvinceCreature(cid, doSummonCreature(summon, getThingPos(cid)))
doCreatureSay(getCreatureSummons(cid)[#getCreatureSummons(cid)], "Cheguei", TALKTYPE_ORANGE_1)
end
else
doSendMagicEffect(getThingPos(cid), 12)
doPlayerSendTextMessage(cid, 19, "Voce so pode invocar "..config.maxSummons.." summons.")
end
return true
end