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







info
Grupo: Visconde
Registrado: 26/08/10
Posts: 431
Reputação: +60
Gênero: Masculino
Char no Tibia: Gabriel Rookgaardian
Estou com um script (Talkaction) feito por Daniehcv, deste fórum. Ele consiste no seguinte: Permite que vocações summonem quantidades diferentes de monstros.
Está funcionando perfeitamente, o único problema é que summona todos os monstros que eu por, no mesmo level e com usando a mesma quantidade de mana. Queria que alguém ajeitasse isso pra mim, pondo mais ou menos uma tabela onde ficaria o nome dos monstros com seu level e quantidade de mana pra conjuração.
Ex:
{bear, wolf, polar bear: levelmin=20, mana=100},
{dragon, giant spider, orc warlord: levelmin=80, mana 700}
E se possível, transformar em magia.
Se alguém puder ajudar, agradeço.
Segue o script:
local mana = 50 --custo de mana local storage = 79845 --storage para o exhaustion local tempo = 5 --em segundos local monsters = { [1] = {summons = {"rat", "dragon"}, maxSummons = 2, minLevel = 10}, [2] = {summons = {"rat", "dragon"}, maxSummons = 4, minLevel = 10}, [5] = {summons = {"rat", "dragon"}, maxSummons = 4, minLevel = 10}, [6] = {summons = {"rat", "dragon"}, maxSummons = 6, minLevel = 10} } 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.") else doConvinceCreature(cid, doCreateMonster(param, playerpos)) doPlayerAddMana(cid, -mana, false) exhaustion.set(cid, storage, tempo) doSendMagicEffect(playerpos, 2) end return true end else doPlayerSendCancel(cid, "You can't summon this monster.") end end return true endup