Postado Fevereiro 1, 2018 7 anos Faaala galera , hoje vou trazer pra vocês o sistema do Edo tensei do nto Ultimate , para saber como o sistema funciona , basta ir ao SITE do nto ultimate Crie um novo item com essa linha ; <item id="4856" article="an" name="edo pergaminho"> <attribute key="description" value="Neste pergaminho foi selado um [VAZIO]" /> <attribute key="weight" value="7000" /> </item> Agora vamos a spell para criar o pergaminho ; XML ; <instant name="Edo Tensei" words="edo tensen no jutsu" lvl="55" mana="770" prem="1" exhaustion="2000" needlearn="0" event="script" value="edopergaminho"> </instant> 2. Script ; local id = 4856 -- Id do edo pergaminho local count = 1 -- Quantos pergaminhos serão adiciondos ao usar o comando function onCastSpell(cid, var) doPlayerAddItem(cid, id, count) doPlayerSendTextMessage(cid, 18, "Voce recebeu um pergaminho EDO") end Agora , em ACTIONS, adicione essas 2 scripts Spoiler local voc = {1, 2} -- ID das vocações que poderão usar o Pergaminho. local corpse = {2806} local id = 2194 -- Id do edo pergaminho local edo = { ["[Edo Tensei] Madara"] = {hp = 50000, maxhp = 50000, corpse = 2806, chance = 100}, -- Nome do Edo, HP do Edo quando summoned, max hp do edo , corpo do edo, chance de falhar. } function onUse(cid, item, frompos, item2, topos) if(not(isInArray(voc, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 25, "Voce nao tem a vocacao nescessaria") end if(not(isInArray(corpse, item2.itemid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "voce precisa usar o pergaminho em um corpse") doSendMagicEffect(pos, CONST_ME_POFF) return true end local perga = doPlayerAddItem(cid, id, 1) for edo_tensei, v in pairs(edo) do if item2.itemid == v.corpse then if math.random(0,100) <= v.chance then doSendMagicEffect(topos, CONST_ME_POFF) doPlayerSendTextMessage(cid, 27, "".. edo_tensei .. " foi selado nesse pergaminho.") doRemoveItem(item.uid, 1) doRemoveItem(item2.uid, 1) doItemSetAttribute(perga, "namepet", edo_tensei) doItemSetAttribute(perga, "description", "Neste pergaminho foi selado um ".. edo_tensei ..".") doItemSetAttribute(perga, "lifepet", v.hp) doItemSetAttribute(perga, "maxlifepet", v.maxhp) else doPlayerSendTextMessage(cid, 27, "O pergaminho falhou") end end end return true end Spoiler local config = { percent = 15, --- Em % quanto de mana irá perder losehp = -1000, -- quanto de vida ira perder losemp = -1000 -- quanto de mana ira perder } local id = 2194 -- Id do outro pergaminho que conterá o summon local vocs = {1, 2} -- vocs que irão usar o edo tensei function onUse(cid, item, frompos, item2, topos) local health = tonumber(getItemAttribute(item.uid, "lifepet")) local mhp = tonumber(getItemAttribute(item.uid, "maxlifepet")) local lifedraw = math.ceil(getCreatureMaxHealth(cid) * (config.percent)/100) local msg0 = [[ Você ssó pode ter 0 summon(s), A seguinte tabela mostra os leveis e o respectivo número de summons que um player terá ao estar nele Level <~> [summons] ~->50[1] ~->150[2] ~->200[2] ~->350[3] ~->450[4] ]] local msg1 = [[ Você ssó pode ter 1 summon(s), A seguinte tabela mostra os leveis e o respectivo número de summons que um player terá ao estar nele Level <~> [summons] ~->50[1] ~->150[2] ~->200[2] ~->350[3] ~->450[4] ]] local msg2 = [[ Você ssó pode ter 2 summon(s), A seguinte tabela mostra os leveis e o respectivo número de summons que um player terá ao estar nele Level <~> [summons] ~->50[1] ~->150[2] ~->200[2] ~->350[3] ~->450[4] ]] local msg3 = [[ Você ssó pode ter 3 summon(s), A seguinte tabela mostra os leveis e o respectivo número de summons que um player terá ao estar nele Level <~> [summons] ~->50[1] ~->150[2] ~->200[2] ~->350[3] ~->450[4] ]] local msg4 = [[ Você ssó pode ter 4 summon(s), A seguinte tabela mostra os leveis e o respectivo número de summons que um player terá ao estar nele Level <~> [summons] ~->50[1] ~->150[2] ~->200[2] ~->350[3] ~->450[4] ]] if(not(isInArray(vocs, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 26, "Voce nao tem a vocacao certa") end if health <= 0 then return doPlayerSendCancel(cid, "Esse edo tensei esta morto.") end if #getCreatureSummons(cid) == 0 and getPlayerLevel(cid) <= 49 then doPlayerPopupFYI(cid, msg0) return true end if #getCreatureSummons(cid) == 1 and getPlayerLevel(cid) <= 149 then doPlayerPopupFYI(cid, msg1) return true end if #getCreatureSummons(cid) == 1 and getPlayerLevel(cid) <= 199 then doPlayerPopupFYI(cid, msg1) return true end if #getCreatureSummons(cid) == 2 and getPlayerLevel(cid) <= 349 then doPlayerPopupFYI(cid, msg2) return true end if #getCreatureSummons(cid) == 3 and getPlayerLevel(cid) <= 449 then doPlayerPopupFYI(cid, msg3) return true end if #getCreatureSummons(cid) == 4 and getPlayerLevel(cid) >= 450 then doPlayerPopupFYI(cid, msg4) return true end local pet_name = getItemAttribute(item.uid, "namepet") if item.itemid == id then if not getTilePzInfo(getPlayerPosition(cid)) then if #getCreatureSummons(cid) < 1 and getPlayerLevel(cid) > 49 or #getCreatureSummons(cid) < 2 and getPlayerLevel(cid) > 149 or #getCreatureSummons(cid) < 2 and getPlayerLevel(cid) > 199 or #getCreatureSummons(cid) < 3 and getPlayerLevel(cid) > 349 or #getCreatureSummons(cid) < 4 and getPlayerLevel(cid) > 449 then if isCreature(cid) then if getCreatureMaxHealth(cid) then local summon = doSummonCreature(pet_name, topos) doRemoveItem(item.uid, 1) doConvinceCreature(cid, summon) setCreatureMaxHealth(summon, mhp) doCreatureAddHealth(summon, mhp) doCreatureAddHealth(summon, health - mhp) doCreatureAddHealth(cid, config.losehp) doCreatureAddMana(cid, config.losemp) doSendMagicEffect(getCreaturePosition(summon), 2) doCreatureSay(cid, "EDO TENSEI!", 19) end else doPlayerSendCancel(cid,'Você não pode invocar uma criatura de uma zona protegida.') end end end end return true end Em seguida , adicione os XML <action itemid="4856" event="script" value="vai.lua"/> <action itemid="4856" event="script" value="pega.lua"/> Não se esqueça que são dois itens diferentes Não se esqueça de criar os monstros com os respectivos nomes ao Edo Tensei Créditos BananaFight LuckOake MaXwElldEn Gears PsyMcKenzie ManoTobira NtoUltimate PedroSTT -- Correção de bugs , magia do pergaminho edo e reestruturação dos códigos Editado Fevereiro 1, 2018 7 anos por PedroSTT (veja o histórico de edições)
Postado Fevereiro 1, 2018 7 anos Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP. Spoiler Congratulations, your content has been approved! Thank you for your contribution, we of Tibia King we are grateful. Your content will help many other users, you received +1 REP. https://github.com/Cjaker/ , _ , ( o o ) /'` ' `'\ ESTOU TE OBSERVANDO O_O |'''''''| |\\'''//| """
Postado Fevereiro 1, 2018 7 anos Autor 1 hora atrás, bismarkzika disse: @PedroSTT funciona em servidor 0.3.6 versão 8.54 ? Sim , funciona em todas as versões 0.X.
Postado Fevereiro 1, 2018 7 anos Ocorreu um erro no meu servidor 0.3.6 versão 8.54 Até aqui, tudo bem.. Ao usar o Edo Pergaminho no corpse, aparece um novo pergaminho na bag, porem tambem vazio, ( OBS: O pergaminho usado para tentar capturar tambem nao desapareceu) Erro da Distro: OBS: Criei o monstro [Edo Tensei] Madara, bem simplezinho , porém nao adicionei nenhum script nele, precisava por algo? [Edo Tensei] Madara.LUA <?xml version="1.0" encoding="UTF-8"?> <monster name="[Edo Tensei] Madara" nameDescription="[Edo Tensei] Madara" race="blood" experience="000" speed="250" manacost="0"> <health now="792" max="792"/> <look type="1190" head="0" body="94" legs="79" feet="79" corpse="0"/> <targetchange interval="5000" chance="8"/> <strategy attack="90" defense="20"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="1"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="65"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="3000" min="-30" max="-30"/> </attacks> <defenses armor="80" defense="80"> <defense name="healing" interval="4000" chance="40" min="300" max="300"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="4000" chance="40" speedchange="450" duration="8000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element physicalPercent="20"/> <element icePercent="10"/> <element holyPercent="-15"/> <element deathPercent="35"/> </elements> <immunities> <immunity poison="1"/> <immunity lifedrain="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <script> <event name="critical"/> </script> </monster> Editado Fevereiro 1, 2018 7 anos por Hokograma (veja o histórico de edições) Projeto Nto Myth " Eu to disposto a lutar e que se foda todo mundo que duvida que eu vou tocar o terror na porra toda! "
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.