Postado Abril 28, 2018 7 anos Olá, eu estava querendo saber se tem uma maneira de se transformar sem ter que criar mais de uma vocação para um personagem, mudar só a looktyype, eu tenho um sistema aqui, que muda a vocação também que é esse: local config = { --[vocation id] = { level, nova voc, looktype, efeito} [1] = { 25, 2, 111, 3}, [2] = { 50, 3, 112, 3}, [3] = { 100, 4, 113, 3}, [4] = { 125, 5, 114, 3}, [5] = { 150, 6, 115, 3}, [6] = { 200, 7, 116, 3}, [7] = { 250, 8, 117, 3}, [8] = { 300, 9, 118, 3}, [9] = { 400, 10, 120, 3}, [10] = { 450, 11, 124, 3}, [11] = { 500, 12, 126, 3}, [13] = { 25, 14, 146, 3}, [14] = { 50, 15, 147, 3}, [15] = { 100, 16, 148, 3}, [16] = { 150, 17, 149, 3}, [17] = { 200, 18, 150, 3}, [18] = { 250, 19, 151, 3}, [19] = { 300, 20, 152, 3}, [20] = { 350, 21, 153, 3}, [21] = { 400, 22, 154, 3}, [22] = { 450, 23, 155, 3}, [23] = { 500, 24, 156, 3}, [25] = { 50, 26, 97, 3}, [26] = { 100, 27, 98, 3}, [27] = { 150, 28, 99, 3}, [28] = { 200, 29, 100, 3}, [29] = { 250, 30, 102, 3}, [30] = { 300, 31, 103, 3}, [31] = { 400, 32, 104, 3}, [32] = { 450, 33, 106, 3}, [33] = { 500, 34, 156, 3}, [35] = { 25, 36, 139, 3}, [36] = { 50, 37, 140, 3}, [37] = { 75, 38, 141, 3}, [38] = { 125, 39, 142, 3}, [39] = { 150, 40, 137, 3}, [40] = { 200, 41, 138, 3}, [41] = { 250, 42, 130, 3}, [42] = { 300, 43, 131, 3}, [43] = { 350, 44, 135, 3}, [44] = { 400, 45, 136, 3}, [45] = { 450, 46, 133, 3}, [46] = { 500, 47, 144, 3}, [48] = { 25, 49, 20, 3}, [49] = { 50, 50, 21, 3}, [50] = { 100, 51, 22, 3}, [51] = { 150, 52, 23, 211}, [52] = { 200, 53, 24, 210}, [53] = { 250, 54, 25, 210}, [54] = { 300, 55, 26, 210}, [55] = { 350, 56, 28, 210}, [56] = { 400, 57, 27, 210}, [57] = { 500, 58, 29, 3} } 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 doPlayerSay(cid, "transformar") 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 Tem algum sistema que troque só a outfit?
Postado Abril 28, 2018 7 anos Dá uma olhada nesse aqui, acho que vai li ajudar https://tibiaking.com/forums/topic/43148-comando-saga/
Postado Abril 28, 2018 7 anos Autor local saga = { [1] = {[1] = 109, [2] = 111, [3] = 112, [4] = 113, [5] = 114, [6] = 115, [7] = 116, [8] = 117, [9] = 118, [10] = 120, [11] = 124, [12] = 126, effect = 3}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação} [2] = {[1] = 64, effect = 10} } 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 Teria como adicionar um limite de lvl para cada outfit? de cada personagem, exemplo lvl 100 vc só pode escolher outfit do lvl 100 pra baixo, algo assim tlgd? Editado Abril 28, 2018 7 anos por adolfbig (veja o histórico de edições)
Postado Abril 28, 2018 7 anos Esse script já tem restrição de level, a cada 50 levels vc pode usar uma outfit superior. Voc 1 no level 50 pode trocar para a saga 1, level 100 - saga 2... Editado Abril 28, 2018 7 anos por PostadorHunter (veja o histórico de edições) [center][url=http://bit.ly/denkorpg]
Postado Abril 28, 2018 7 anos Autor eu sei, mas tipo, é 50 pra todas, tem vocações que tem bem poucas outfits, aí a transformação acaba bem antes que as outras entende? queria que eu pudesse personalizar cada vocação pra cada uma ter um lvl diferente da outra tlgd?
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.