Postado Agosto 11, 2020 4 anos eu apaguei as vocações e deixei somente 6: naruto, sasuke, sakura, minato, obito e madara. dps disso deu esse erro. Citar <talkaction words="!saga" event="script" value="saga.lua"/> Citar local saga = { [1] = {[1] = 839, [2] = 840, [3] = 841, [4] = 92, [5] = 40, [6] = 677, [3] = 18, [7] = 686, [8] = 397, [9] = 752, [10] = 875, effect = 2}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação} [2] = {[1] = 2, [2] = 93, [3] = 5, [4] = 647, [5] = 646, [6] = 654, [7] = 663, [8] = 613, [9] = 873, effect = 2} [3] = {[1] = 174, [2] = 175, [3] = 171, [4] = 173, [5] = 172, [6] = 169, [7] = 170, effect = 2} [4] = {[1] = 728, [2] = 730, [3] = 731, [4] = 732, [5] = 733, [6] = 757, [7] = 582, effect = 2} [5] = {[1] = 477, [2] = 478, [3] = 479, [4] = 482, [5] = 484, [6] = 486, [7] = 655, [8] = 751, [9] = 694, effect = 2} [6] = {[1] = 715, [2] = 717, [3] = 719, [4] = 722, [5] = 723, [6] = 724, [7] = 726, effect = 2} } local level = 50 -- Limite para liberar uma saga nova function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") return true end if not saga[getPlayerVocation(cid)] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") return true end local t = string.explode(param, ",") if(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.") return true end if not (tonumber(t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") return true end if tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.") return true end if getPlayerLevel(cid) >= (tonumber(t[1])*level) then doSetCreatureOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}, -1) doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.") end return true end Citar <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="200" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Naruto" description="a Naruto" needpremium="0" gaincap="20" gainhp="350" gainmana="350" gainhpticks="1" gainhpamount="150" gainmanaticks="1" gainmanaamount="250" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="60" fromvoc="1"> <formula meleeDamage="2.0" distDamage="2.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="2.0" defense="2.0" magDefense="2.0" armor="2.0"/> <skill fist="2.0" club="2.0" sword="4.0" axe="2.0" distance="2.0" shielding="2.0" fishing="2.0" experience="2.0"/> </vocation> <vocation id="2" name="Sasuke" description="a Sasuke" needpremium="0" gaincap="20" gainhp="350" gainmana="350" gainhpticks="1" gainhpamount="150" gainmanaticks="1" gainmanaamount="250" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="60" fromvoc="2"> <formula meleeDamage="2.0" distDamage="2.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="2.0" defense="2.0" magDefense="2.0" armor="2.0"/> <skill fist="2.0" club="2.0" sword="4.0" axe="2.0" distance="2.0" shielding="2.0" fishing="2.0" experience="2.0"/> </vocation> <vocation id="3" name="Sakura" description="a Sakura" needpremium="0" gaincap="20" gainhp="350" gainmana="350" gainhpticks="1" gainhpamount="150" gainmanaticks="1" gainmanaamount="250" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="60" fromvoc="3"> <formula meleeDamage="2.0" distDamage="2.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="2.0" defense="2.0" magDefense="2.0" armor="2.0"/> <skill fist="2.0" club="2.0" sword="4.0" axe="2.0" distance="2.0" shielding="2.0" fishing="2.0" experience="2.0"/> </vocation> <vocation id="4" name="Minato" description="a Minato" needpremium="0" gaincap="20" gainhp="600" gainmana="350" gainhpticks="1" gainhpamount="150" gainmanaticks="1" gainmanaamount="250" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="60" fromvoc="4"> <formula meleeDamage="2.0" distDamage="2.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="2.0" defense="2.0" magDefense="2.0" armor="2.0"/> <skill fist="2.0" club="2.0" sword="4.0" axe="2.0" distance="2.0" shielding="2.0" fishing="2.0" experience="2.0"/> </vocation> <vocation id="5" name="Obito" description="a Obito" needpremium="0" gaincap="20" gainhp="600" gainmana="350" gainhpticks="1" gainhpamount="150" gainmanaticks="1" gainmanaamount="250" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="60" fromvoc="5"> <formula meleeDamage="2.0" distDamage="2.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="2.0" defense="2.0" magDefense="2.0" armor="2.0"/> <skill fist="2.0" club="2.0" sword="4.0" axe="2.0" distance="2.0" shielding="2.0" fishing="2.0" experience="2.0"/> </vocation> <vocation id="6" name="Madara" description="a Madara" needpremium="0" gaincap="20" gainhp="600" gainmana="350" gainhpticks="1" gainhpamount="150" gainmanaticks="1" gainmanaamount="250" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="60" fromvoc="6"> <formula meleeDamage="2.0" distDamage="2.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="2.0" defense="2.0" magDefense="2.0" armor="2.0"/> <skill fist="2.0" club="2.0" sword="4.0" axe="2.0" distance="2.0" shielding="2.0" fishing="2.0" experience="2.0"/> </vocation> </vocations> Citar local config = { --[vocation id] = { level, nova voc, looktype, efeito} -- Naruto -- [1] = { 8, 1, 839, 2}, -- Sasuke -- [2] = { 8, 2, 688, 2}, -- Sakura -- [3] = { 8, 3, 174, 2}, -- Minato -- [4] = { 8, 4, 728, 2}, -- Obito -- [5] = { 8, 5, 477, 2}, -- Madara -- [6] = { 8, 6, 715, 2}, } function onSay(cid, words, param, channel) local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} -- começo e final do mapa local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} -- começo e final do mapa local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} -- começo e final do mapa local from4,to4 = {x=985, y=598, z=7},{x=1044, y=652, z=7} -- começo e final do mapa local from5,to5 = {x=986, y=615, z=6},{x=1039, y=647, z=7} -- começo e final do mapa local from6,to6 = {x=990, y=616, z=5},{x=1040, y=647, z=5} -- começo e final do mapa if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) or isInRange(getCreaturePosition(cid), from4, to4) or isInRange(getCreaturePosition(cid), from5, to5) or isInRange(getCreaturePosition(cid), from6, to6) then doPlayerSendCancel(cid, "Você não pode se Transformar nesta área!") return true end if (getPlayerStorageValue(cid,112) > 0) then return doPlayerSendCancel(cid, "Voce Nao Pode Se Transforma,Voce Agora Virou Da Akatsuki") end local voc = config[getPlayerVocation(cid)] if voc then if getPlayerLevel(cid) >= voc[1] then doPlayerSetVocation(cid, voc[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!") local outfit = {lookType = voc[3]} doCreatureChangeOutfit(cid, outfit) doSendMagicEffect(getCreaturePosition(cid), voc[4]) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.") end else doPlayerSendCancel(cid, "Você não pode se Transformar!") end return true end sou comecei ontem com um projeto e sou novo, alguem me ajuda.
Postado Agosto 11, 2020 4 anos Solução @Bruce Pereira Tenta assim, troca as primeiras linha do script da saga por essas aqui local saga = { --[Vocation] = {[1] = Roupa, effect = Efeito da transformação} [1] = {[1] = 839, [2] = 840, [3] = 841, [4] = 92, [5] = 40, [6] = 677, [3] = 18, [7] = 686, [8] = 397, [9] = 752, [10] = 875, effect = 2}, [2] = {[1] = 2, [2] = 93, [3] = 5, [4] = 647, [5] = 646, [6] = 654, [7] = 663, [8] = 613, [9] = 873, effect = 2}, [3] = {[1] = 174, [2] = 175, [3] = 171, [4] = 173, [5] = 172, [6] = 169, [7] = 170, effect = 2}, [4] = {[1] = 728, [2] = 730, [3] = 731, [4] = 732, [5] = 733, [6] = 757, [7] = 582, effect = 2}, [5] = {[1] = 477, [2] = 478, [3] = 479, [4] = 482, [5] = 484, [6] = 486, [7] = 655, [8] = 751, [9] = 694, effect = 2}, [6] = {[1] = 715, [2] = 717, [3] = 719, [4] = 722, [5] = 723, [6] = 724, [7] = 726, effect = 2} }
Postado Agosto 11, 2020 4 anos Autor Em 11/08/2020 em 09:29, Belmont disse: @Bruce Pereira Tenta assim, troca as primeiras linha do script da saga por essas aqui local saga = { --[Vocation] = {[1] = Roupa, effect = Efeito da transformação} [1] = {[1] = 839, [2] = 840, [3] = 841, [4] = 92, [5] = 40, [6] = 677, [3] = 18, [7] = 686, [8] = 397, [9] = 752, [10] = 875, effect = 2}, [2] = {[1] = 2, [2] = 93, [3] = 5, [4] = 647, [5] = 646, [6] = 654, [7] = 663, [8] = 613, [9] = 873, effect = 2}, [3] = {[1] = 174, [2] = 175, [3] = 171, [4] = 173, [5] = 172, [6] = 169, [7] = 170, effect = 2}, [4] = {[1] = 728, [2] = 730, [3] = 731, [4] = 732, [5] = 733, [6] = 757, [7] = 582, effect = 2}, [5] = {[1] = 477, [2] = 478, [3] = 479, [4] = 482, [5] = 484, [6] = 486, [7] = 655, [8] = 751, [9] = 694, effect = 2}, [6] = {[1] = 715, [2] = 717, [3] = 719, [4] = 722, [5] = 723, [6] = 724, [7] = 726, effect = 2} } obrigado mano, funcinou! obrigado msm! Não sei da REP+ mais mano, vou pesquisar agr e te da REP+ vc me ajudou mt, vc merece! Editado Agosto 11, 2020 4 anos por Bruce Pereira explicar uma coisa a ele sobre Rep+ que eu nao sei usar (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.