Postado Dezembro 24, 2016 8 anos Autor Fiz essa versão diferente que pode ser útil pois onde você colocava o id da vocation você coloca o nome agora function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {"Minato", "Tobirama"} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601} if getDistanceBetween(aqui, toPosition) >= 8 then return doPlayerSendTextMessage(cid, 27, "Está muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras") elseif(not(isInArray(vocs, getPlayerVocationName(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, Você não pode usar a tecnica Deus Dragão.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(pos, 24) doSendMagicEffect(toPosition, 24) doCreatureSay(cid, "Shunshin", 19) return doSendDistanceShoot(pos, toPosition, 16) end return doPlayerSendCancel(cid, "Desculpe nao foi possivel.") end
Postado Dezembro 24, 2016 8 anos Vocês usam um sistema de transformar muito bugado e ultrapassado , vou disponibilizar o !saga system , que não tem a necessidade de criar 10 vocations pra cada 10 outfits . Ainda mais é facil de configurar e é bem rapido NA PASTA TALKACTIONS XML <talkaction words="!saga" event="script" value="saga.lua"/> SCRIPT Spoiler local saga = { --Sasuke--- [2] = {2,93,6,5,7,94,59,8,334,745,991,990,975,992,1065,1175}, -- [ID DA VOCATION] = { LOOKTYPES DE TODAS AS TRANSFORMAÇÕES SEPARADAS POR VIRGULAS} --Naruto--- [1] = {71, 66, 91, 18, 31,1192,1193, 92, 40, 49, 25, 179, 31, 291,1190, 302,1232,1233,1234} } local level = 5 -- Limite para liberar uma saga nova function onSay(cid, words, param, channel) if exhaustion.check(cid, 120) == TRUE then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getCreaturePosition(cid), 2) return TRUE end if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") exhaustion.set(cid, 120, 0.5) return true end if not saga[getPlayerVocation(cid)] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") exhaustion.set(cid, 120, 0.5) 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.") exhaustion.set(cid, 120, 0.5) 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.") exhaustion.set(cid, 120, 0.5) return true end if getPlayerLevel(cid) >= (tonumber(t[1])*level) then doCreatureChangeOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}) doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) exhaustion.set(cid, 120, 0.5) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.") end return true end Com isso , na vocations xml ficará 1 linha para cada vocation , exemplo : <vocation id="1" name="Naruto" description="a naruto" needpremium="0" gaincap="10" gainhp="25" gainmana="50" gainhpticks="12" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1"> <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="2" name="Sasuke" description="a sasuke" needpremium="0" gaincap="10" gainhp="25" gainmana="50" gainhpticks="12" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2"> <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> Com isso , a script facilita sua vida até mesmo nessa script que o dono do topico disponibilizou , assim tu não precisa escrever 1 , 2 ,3 4 ,5 até o 300 , quebrando muito o galho Editado Dezembro 24, 2016 8 anos por PedroSTT (veja o histórico de edições)
Postado Dezembro 24, 2016 8 anos 15 horas atrás, ManoTobira disse: Fiz essa versão diferente que pode ser útil pois onde você colocava o id da vocation você coloca o nome agora function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {"Minato", "Tobirama"} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601} if getDistanceBetween(aqui, toPosition) >= 8 then return doPlayerSendTextMessage(cid, 27, "Está muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras") elseif(not(isInArray(vocs, getPlayerVocationName(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, Você não pode usar a tecnica Deus Dragão.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(pos, 24) doSendMagicEffect(toPosition, 24) doCreatureSay(cid, "Shunshin", 19) return doSendDistanceShoot(pos, toPosition, 16) end return doPlayerSendCancel(cid, "Desculpe nao foi possivel.") end hahaha nao funfo do mesmo jeito , deve ser o ot q ta bugado cara mas vlw mesmo pela ajuda q vceis estao dando , modifiquei meu server sem erro nenhum vendo as coisa pelo tk , só a sunshin q deu ruin msm
Postado Março 21, 2019 6 anos eu estava com o mesmo erro do usuário acima /\. mas consegui arrumar mudando o script para essa maneira aqui Citar function onUse(cid, item, fromPosition, itemEx, toPosition) local from,to = {x=979, y=921, z=5},{x=1006, y=930, z=7} local from1,to1 = {x=1134, y=1176, z=5},{x=1149, y=1186, z=7} local from2,to2 = {x=657, y=1139, z=7},{x=695, y=1156, z=7} local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {2712, 1030, 1029, 1025, 1026, 1027, 1229, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 9181, 9119, 9124, 9118, 1050, 1049, 1056, 1055, 1058, 1057} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601, 8424, 2854} if getDistanceBetween(aqui, toPosition) >= 11 then return doPlayerSendCancel(cid, "Está muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendCancel(cid, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "Não pode usar a Shunsin Kunai em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "Não pode usar a Shunshin Kunai em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendCancel(cid, "Você não pode se teleportar para água") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "Você não pode se teleportar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendCancel(cid, "Você não pode se teleportar em pedras") elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, sua vocacao ainda não pode usar essa tecnica.") elseif(isInArea(aqui, from, to) or isInArea(aqui, from1, to1) or isInArea(aqui, from2, to2)) then return doPlayerSendCancel(cid, "Você não pode usar a Shunshin Kunai aqui.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(fromPosition, 14) doSendMagicEffect(toPosition, 14) doCreatureSay(cid, "Shunshin Kunai", 19) return doSendDistanceShoot(fromPosition, toPosition, 35) end return doPlayerSendCancel(cid, "Desculpe não foi possível teleportar.") end não sei se posso revivero tópico dando a solução que encontrei pra isso, mas sei que assim como eu, muitas pessoas vieram aqui para tentar dar uma solução para esse erro e que não conseguiram bem, ta ai como eu fiz espero que de certo
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.