Postado Maio 17, 2017 8 anos Autor entendi, mais acho que se eu mexer nele pode dar problema em outro script que faca o uso do mesmo não ? olha só eu andei pesquisando e encontrei um outro script que funcione ate melhor do que esse meu ai, na verdade e do jeito que eu precisava. porem ele e em talkaction eu queria ele em spell, você poderia modifica-lo para spell para mim mano ? eu testei e ele funciona, porem tem um bug, quando o monster mais forte o Werewolf e sumonado ele vem CONTRA mim e não ao meu comando. Eu só queria que funcionasse como ta no script. de acordo com o level vem um Wolf mais forte. e se você puder incrementar para o monster vim com um speed maior igual da a life ai seria legal se puder ajudar. segue abaixo o post. Desculpe pela amolação. -- utevorex.lua local configs = { vocs = {3, 7}, -- vocações permitidas usar limite = 2, -- limite de summons m = { ["70-200"] = {monster = "Wolf", health = 1000, mana=500}, ["201-300"] = {monster = "War Wolf", health = 1000, mana=500}, ["301-400"] = {monster = "Werewolf", health = 1000, mana=500}, } } -- [dolevel-atéolevel] = {nome do monstros, vida dele, e mana usada pra sumonar} function onSay(cid, words) if isInArray(configs.vocs, getPlayerVocation(cid)) then local tsummon = getTable(cid) if tsummon ~= nil then if getPlayerMana(cid) < tsummon.mana then return doPlayerSendCancel(cid, "You dont have mana.") end if #getCreatureSummons(cid) == configs.limite then return doPlayerSendCancel(cid, "You have reached the limit of summons.") end sm = doSummonCreature(tsummon.monster, getThingPosition(cid)) doConvinceCreature(cid, sm) setCreatureMaxHealth(sm, tsummon.health) doCreatureAddHealth(sm, tsummon.health) doCreatureAddMana(cid, -tsummon.mana) else doPlayerSendCancel(cid, "You dont have level to use this spell.") end else doPlayerSendCancel(cid, "Your vocation can not use this spell.") end return true end function getTable(cid) for i, x in pairs(configs.m) do local tb = string.explode(i) if getPlayerLevel(cid) >= tonumber(tb[1]) and getPlayerLevel(cid) <= tonumber(tb[2]) then tab = x end end return tab end -- utevorex.lua local configs = { vocs = { 3 , 7 } , -- vocações permitidas usar limite = 2 , -- limite de summons m = { [ "70-200" ] = { monster = "Wolf" , health = 1000 , mana = 500 } , [ "201-300" ] = { monster = "War Wolf" , health = 1000 , mana = 500 } , [ "301-400" ] = { monster = "Werewolf" , health = 1000 , mana = 500 } , } } -- [dolevel-atéolevel] = {nome do monstros, vida dele, e mana usada pra sumonar} function onSay ( cid , words ) if isInArray ( configs . vocs , getPlayerVocation ( cid ) ) then local tsummon = getTable ( cid ) if tsummon ~= nil then if getPlayerMana ( cid ) < tsummon . mana then return doPlayerSendCancel ( cid , "You dont have mana." ) end if # getCreatureSummons ( cid ) == configs . limite then return doPlayerSendCancel ( cid , "You have reached the limit of summons." ) end sm = doSummonCreature ( tsummon . monster , getThingPosition ( cid ) ) doConvinceCreature ( cid , sm ) setCreatureMaxHealth ( sm , tsummon . health ) doCreatureAddHealth ( sm , tsummon . health ) doCreatureAddMana ( cid , - tsummon . mana ) else doPlayerSendCancel ( cid , "You dont have level to use this spell." ) end else doPlayerSendCancel ( cid , "Your vocation can not use this spell." ) end return true end function getTable ( cid ) for i , x in pairs ( configs . m ) do local tb = string . explode ( i ) if getPlayerLevel ( cid ) >= tonumber ( tb [ 1 ] ) and getPlayerLevel ( cid ) <= tonumber ( tb [ 2 ] ) then tab = x end end return tab end -- tag: <talkaction words="utevo rex" filter="word-spaced" event="script" value="utevorex.lua"/> Editado Maio 18, 2017 8 anos por brufds (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.