Postado Janeiro 29, 2015 11 anos Quando eu falo "Reverter" o personagem não reverte a outfit anterior, os effects saem mas não muda a outift!! Script: local config = { --[vocation id] = { level, nova voc, looktype, efeito} ---------- NARUTO ----------- [13] = { 500, 12, 54, 12}, [12] = { 400, 11, 494, 12}, [11] = { 350, 10, 291, 12}, [10] = { 300, 9, 179, 15}, [9] = { 250, 8, 25, 27}, [8] = { 200, 7, 49, 15}, [7] = { 150, 6, 40, 15}, [6] = { 125, 5, 92, 15}, [5] = { 100, 4, 31, 13}, [4] = { 75, 3, 18, 15}, [3] = { 50, 2, 91, 15}, [2] = { 25, 1, 71, 13},-- --------- SASUKE ----------- [27] = { 500, 26, 504, 261}, [26] = { 450, 25, 379, 261}, [25] = { 400, 24, 292, 261}, [24] = { 350, 23, 334, 27}, [23] = { 300, 22, 95, 263}, [22] = { 250, 21, 293, 13}, [21] = { 200, 20, 8, 263}, [20] = { 150, 19, 59, 263}, [19] = { 125, 18, 94, 263}, [18] = { 100, 17, 7, 13}, [17] = { 75, 16, 5, 263}, [16] = { 50, 15, 6, 263}, --------- SAKURA ----------- [42] = { 500, 41, 501, 13}, [41] = { 450, 40, 294, 27}, [40] = { 400, 39, 296, 27}, [39] = { 350, 38, 172, 13}, [38] = { 300, 37, 170, 27}, [37] = { 250, 36, 301, 13}, [36] = { 200, 35, 194, 13}, [35] = { 150, 34, 300, 27}, [34] = { 125, 33, 169, 13}, [33] = { 100, 32, 174, 13}, [32] = { 75, 31, 171, 13}, [31] = { 50, 30, 175, 13}, -------- ROCK LEE ----------- [57] = { 500, 56, 496, 73}, [56] = { 450, 55, 295, 73}, [55] = { 400, 54, 193, 73}, [54] = { 350, 53, 766, 73}, [53] = { 300, 52, 192, 73}, [52] = { 250, 51, 191, 73}, [51] = { 200, 50, 78, 73}, [50] = { 150, 49, 190, 73}, [49] = { 125, 48, 80, 73}, [48] = { 100, 47, 82, 73}, [47] = { 75, 46, 83, 73}, [46] = { 50, 45, 60, 73}, -------- KISAME ----------- [127] = { 500, 126, 692, 27}, [126] = { 400, 125, 556, 27}, [125] = { 300, 124, 555, 27}, [124] = { 250, 123, 554, 27}, [123] = { 200, 122, 553, 27}, [122] = { 150, 121, 551, 27}, [121] = { 125, 120, 691, 27}, [120] = { 100, 119, 690, 27}, [119] = { 75, 118, 689, 27}, [118] = { 50, 117, 688, 27}, -------- ITACHI ----------- [172] = { 500, 171, 511, 262}, [171] = { 450, 170, 472, 262}, [170] = { 400, 169, 298, 262}, [169] = { 350, 168, 322, 262}, [168] = { 300, 167, 297, 262}, [167] = { 250, 166, 100, 262}, [166] = { 200, 165, 283, 13}, [165] = { 150, 164, 282, 262}, [164] = { 125, 163, 99, 13}, [163] = { 100, 162, 98, 262}, [162] = { 75, 161, 284, 263}, [161] = { 50, 160, 97, 263}, --------- KILLER BEE ----------- [217] = { 500, 216, 350, 13}, [216] = { 450, 215, 740, 13}, [215] = { 400, 214, 739, 13}, [214] = { 350, 213, 717, 13}, [213] = { 300, 212, 738, 13}, [212] = { 250, 211, 737, 13}, [211] = { 200, 210, 736, 13}, [210] = { 150, 209, 735, 13}, [209] = { 125, 208, 734, 13}, [208] = { 100, 207, 733, 13}, [207] = { 75, 206, 732, 13}, [206] = { 50, 205, 729, 13}, [205] = { 25, 204, 714, 13}, -------- MADARA ----------- [262] = { 500, 261, 722, 13}, [261] = { 450, 260, 486, 13}, [260] = { 400, 259, 484, 13}, [259] = { 350, 258, 485, 13}, [258] = { 300, 257, 483, 13}, [257] = { 250, 256, 481, 13}, [256] = { 200, 255, 480, 13}, [255] = { 150, 254, 482, 13}, [254] = { 125, 253, 479, 13}, [253] = { 100, 252, 478, 13}, [252] = { 75, 251, 725, 13}, [251] = { 50, 250, 477, 13}, [250] = { 25, 249, 476, 13}, -------- MINATO ----------- [277] = { 500, 276, 709, 12}, [276] = { 450, 275, 708, 12}, [275] = { 400, 274, 707, 12}, [274] = { 350, 273, 599, 12}, [273] = { 300, 272, 598, 12}, [272] = { 250, 271, 596, 12}, [271] = { 200, 270, 565, 12}, [270] = { 150, 269, 564, 12}, [269] = { 125, 268, 563, 12}, [268] = { 100, 267, 562, 12}, [267] = { 75, 266, 561, 12}, [266] = { 50, 265, 560, 12}, [265] = { 25, 264, 559, 12}, -------- TOBIRAMA ----------- [304] = { 350, 303, 794, 27}, [303] = { 300, 302, 793, 27}, [302] = { 250, 301, 792, 27}, [301] = { 200, 300, 791, 27}, [300] = { 150, 299, 790, 27}, [299] = { 125, 298, 789, 27}, [298] = { 100, 297, 788, 27}, [297] = { 75, 296, 320, 27}, [296] = { 50, 295, 230, 27}, [295] = { 25, 294, 227, 27}, ---------- KANKURO ----------- [337] = { 500, 336, 666, 18}, [336] = { 450, 335, 662, 18}, [335] = { 400, 334, 625, 18}, [334] = { 350, 333, 637, 18}, [333] = { 300, 332, 548, 18}, [332] = { 250, 331, 624, 18}, [331] = { 200, 330, 623, 18}, [330] = { 150, 329, 602, 18}, [329] = { 125, 328, 603, 18}, [328] = { 100, 327, 600, 18}, [327] = { 75, 326, 621, 18}, [326] = { 50, 325, 620, 18}, [325] = { 25, 324, 619, 18}, ---------- ANBU ----------- [417] = { 500, 416, 273, 13}, [416] = { 450, 415, 163, 13}, [415] = { 400, 414, 159, 13}, [414] = { 350, 413, 148, 13}, [413] = { 300, 412, 148, 13}, [412] = { 250, 411, 147, 13}, [411] = { 200, 410, 147, 13}, [410] = { 150, 409, 463, 13}, [409] = { 125, 408, 463, 13}, [408] = { 100, 407, 16, 13}, [407] = { 75, 406, 16, 13}, [406] = { 50, 405, 123, 13}, [405] = { 25, 404, 123, 13} } 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 Reverter nesta área!") return true end doPlayerSay(cid, "Reverter") local voc = config[getPlayerVocation(cid)] if voc then if getPlayerLevel(cid) >= voc[1] then doPlayerSetVocation(cid, voc[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Reverteu!") local outfit = {lookType = voc[3]} local pos = getCreaturePosition(cid) doSendMagicEffect({x = pos.x, y = pos.y, z = pos.z}, voc[4]) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Não da pra Reverter Tente Relogar.") end else doPlayerSendCancel(cid, "Você não pode se Reverter!") end return true end Editado Janeiro 29, 2015 11 anos por Storm Night (veja o histórico de edições)
Postado Janeiro 29, 2015 11 anos Solução Boa noite, teste assim: local config = { --[vocation id] = { level, nova voc, looktype, efeito} ---------- NARUTO ----------- [13] = { 500, 12, 54, 12}, [12] = { 400, 11, 494, 12}, [11] = { 350, 10, 291, 12}, [10] = { 300, 9, 179, 15}, [9] = { 250, 8, 25, 27}, [8] = { 200, 7, 49, 15}, [7] = { 150, 6, 40, 15}, [6] = { 125, 5, 92, 15}, [5] = { 100, 4, 31, 13}, [4] = { 75, 3, 18, 15}, [3] = { 50, 2, 91, 15}, [2] = { 25, 1, 71, 13},-- --------- SASUKE ----------- [27] = { 500, 26, 504, 261}, [26] = { 450, 25, 379, 261}, [25] = { 400, 24, 292, 261}, [24] = { 350, 23, 334, 27}, [23] = { 300, 22, 95, 263}, [22] = { 250, 21, 293, 13}, [21] = { 200, 20, 8, 263}, [20] = { 150, 19, 59, 263}, [19] = { 125, 18, 94, 263}, [18] = { 100, 17, 7, 13}, [17] = { 75, 16, 5, 263}, [16] = { 50, 15, 6, 263}, --------- SAKURA ----------- [42] = { 500, 41, 501, 13}, [41] = { 450, 40, 294, 27}, [40] = { 400, 39, 296, 27}, [39] = { 350, 38, 172, 13}, [38] = { 300, 37, 170, 27}, [37] = { 250, 36, 301, 13}, [36] = { 200, 35, 194, 13}, [35] = { 150, 34, 300, 27}, [34] = { 125, 33, 169, 13}, [33] = { 100, 32, 174, 13}, [32] = { 75, 31, 171, 13}, [31] = { 50, 30, 175, 13}, -------- ROCK LEE ----------- [57] = { 500, 56, 496, 73}, [56] = { 450, 55, 295, 73}, [55] = { 400, 54, 193, 73}, [54] = { 350, 53, 766, 73}, [53] = { 300, 52, 192, 73}, [52] = { 250, 51, 191, 73}, [51] = { 200, 50, 78, 73}, [50] = { 150, 49, 190, 73}, [49] = { 125, 48, 80, 73}, [48] = { 100, 47, 82, 73}, [47] = { 75, 46, 83, 73}, [46] = { 50, 45, 60, 73}, -------- KISAME ----------- [127] = { 500, 126, 692, 27}, [126] = { 400, 125, 556, 27}, [125] = { 300, 124, 555, 27}, [124] = { 250, 123, 554, 27}, [123] = { 200, 122, 553, 27}, [122] = { 150, 121, 551, 27}, [121] = { 125, 120, 691, 27}, [120] = { 100, 119, 690, 27}, [119] = { 75, 118, 689, 27}, [118] = { 50, 117, 688, 27}, -------- ITACHI ----------- [172] = { 500, 171, 511, 262}, [171] = { 450, 170, 472, 262}, [170] = { 400, 169, 298, 262}, [169] = { 350, 168, 322, 262}, [168] = { 300, 167, 297, 262}, [167] = { 250, 166, 100, 262}, [166] = { 200, 165, 283, 13}, [165] = { 150, 164, 282, 262}, [164] = { 125, 163, 99, 13}, [163] = { 100, 162, 98, 262}, [162] = { 75, 161, 284, 263}, [161] = { 50, 160, 97, 263}, --------- KILLER BEE ----------- [217] = { 500, 216, 350, 13}, [216] = { 450, 215, 740, 13}, [215] = { 400, 214, 739, 13}, [214] = { 350, 213, 717, 13}, [213] = { 300, 212, 738, 13}, [212] = { 250, 211, 737, 13}, [211] = { 200, 210, 736, 13}, [210] = { 150, 209, 735, 13}, [209] = { 125, 208, 734, 13}, [208] = { 100, 207, 733, 13}, [207] = { 75, 206, 732, 13}, [206] = { 50, 205, 729, 13}, [205] = { 25, 204, 714, 13}, -------- MADARA ----------- [262] = { 500, 261, 722, 13}, [261] = { 450, 260, 486, 13}, [260] = { 400, 259, 484, 13}, [259] = { 350, 258, 485, 13}, [258] = { 300, 257, 483, 13}, [257] = { 250, 256, 481, 13}, [256] = { 200, 255, 480, 13}, [255] = { 150, 254, 482, 13}, [254] = { 125, 253, 479, 13}, [253] = { 100, 252, 478, 13}, [252] = { 75, 251, 725, 13}, [251] = { 50, 250, 477, 13}, [250] = { 25, 249, 476, 13}, -------- MINATO ----------- [277] = { 500, 276, 709, 12}, [276] = { 450, 275, 708, 12}, [275] = { 400, 274, 707, 12}, [274] = { 350, 273, 599, 12}, [273] = { 300, 272, 598, 12}, [272] = { 250, 271, 596, 12}, [271] = { 200, 270, 565, 12}, [270] = { 150, 269, 564, 12}, [269] = { 125, 268, 563, 12}, [268] = { 100, 267, 562, 12}, [267] = { 75, 266, 561, 12}, [266] = { 50, 265, 560, 12}, [265] = { 25, 264, 559, 12}, -------- TOBIRAMA ----------- [304] = { 350, 303, 794, 27}, [303] = { 300, 302, 793, 27}, [302] = { 250, 301, 792, 27}, [301] = { 200, 300, 791, 27}, [300] = { 150, 299, 790, 27}, [299] = { 125, 298, 789, 27}, [298] = { 100, 297, 788, 27}, [297] = { 75, 296, 320, 27}, [296] = { 50, 295, 230, 27}, [295] = { 25, 294, 227, 27}, ---------- KANKURO ----------- [337] = { 500, 336, 666, 18}, [336] = { 450, 335, 662, 18}, [335] = { 400, 334, 625, 18}, [334] = { 350, 333, 637, 18}, [333] = { 300, 332, 548, 18}, [332] = { 250, 331, 624, 18}, [331] = { 200, 330, 623, 18}, [330] = { 150, 329, 602, 18}, [329] = { 125, 328, 603, 18}, [328] = { 100, 327, 600, 18}, [327] = { 75, 326, 621, 18}, [326] = { 50, 325, 620, 18}, [325] = { 25, 324, 619, 18}, ---------- ANBU ----------- [417] = { 500, 416, 273, 13}, [416] = { 450, 415, 163, 13}, [415] = { 400, 414, 159, 13}, [414] = { 350, 413, 148, 13}, [413] = { 300, 412, 148, 13}, [412] = { 250, 411, 147, 13}, [411] = { 200, 410, 147, 13}, [410] = { 150, 409, 463, 13}, [409] = { 125, 408, 463, 13}, [408] = { 100, 407, 16, 13}, [407] = { 75, 406, 16, 13}, [406] = { 50, 405, 123, 13}, [405] = { 25, 404, 123, 13} } 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 Reverter nesta área!") return true end doPlayerSay(cid, "Reverter") local voc = config[getPlayerVocation(cid)] if voc then if getPlayerLevel(cid) >= voc[1] then doPlayerSetVocation(cid, voc[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Reverteu!") local outfit = {lookType = voc[3]} doSetCreatureOutfit(cid, outfit, -1) local pos = getCreaturePosition(cid) doSendMagicEffect({x = pos.x, y = pos.y, z = pos.z}, voc[4]) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Não da pra Reverter Tente Relogar.") end else doPlayerSendCancel(cid, "Você não pode se Reverter!") end return true end Boa sorte.
Postado Janeiro 29, 2015 11 anos Estava faltando a função de modificar o outfit. doSetCreatureOutfit(cid, outfit, -1) Só isso, tanto que já haviam até declarado e configurado o que a palavra outifit faria, só esqueceram de por esta tag acima. Que bom que resolveu. Boa sorte com seu projeto. Editado Janeiro 29, 2015 11 anos por Adriano SwaTT (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.