Postado Fevereiro 18, 2018 7 anos Em 18/02/2018 em 20:26, felippepsa disse: Não funcionou, ao dizer !saga, funcionava corretamente, dizia para colocar o número da saga, Porém se colocar o numero sai uma fala normal do player como se não existisse o comando! Mostrar conteúdo oculto local saga = { [1] = {[1] = 400, [2] = 401, [3] = 402, [4] = 403, [5] = 405, [6] = 404, [7] = 405, [8] = 406, [9] = 407, [10] = 408, [11] = 409, [12] = 410, [13] = 411, [14] = 412, [15] = 413, [16] = 398, effect = 228}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação} [2] = {[1] = 64, effect = 10} --TESTE } local level = 25 -- 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 doCreatureChangeOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[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 Host bom para hospedar seu jogo => https://shre.ink/OminiHost
Postado Fevereiro 19, 2018 7 anos Autor Em 18/02/2018 em 20:42, quemtuacha disse: Mostrar conteúdo oculto Mostrar conteúdo oculto local saga = { [1] = {[1] = 400, [2] = 401, [3] = 402, [4] = 403, [5] = 405, [6] = 404, [7] = 405, [8] = 406, [9] = 407, [10] = 408, [11] = 409, [12] = 410, [13] = 411, [14] = 412, [15] = 413, [16] = 398, effect = 228}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação} [2] = {[1] = 64, effect = 10} --TESTE } local level = 25 -- 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 doCreatureChangeOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[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 Agora diz 10:10 Voce nao pode trocar de saga. 10:10 Voce nao pode trocar de saga. 10:10 Voce nao pode trocar de saga. Eu mudei a script lá em cima pra arrumar um outro erro, vlw! Naruto Age of Darkness (Naruto World)
Postado Fevereiro 21, 2018 7 anos Solução -- <talkaction words="!saga; /saga; /transformar; !transformar" event="script" value="saga.lua"/> local saga = { [1] = {840,91,841,676,842,40,842,40,305,677,686,179,683,397,607,752,875}, -- [ID DA VOC] = { ID DAS NEWTYPES }, } 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), 3) 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
Postado Fevereiro 23, 2018 7 anos Autor Em 21/02/2018 em 13:30, Sttorm disse: -- <talkaction words="!saga; /saga; /transformar; !transformar" event="script" value="saga.lua"/> local saga = { [1] = {840,91,841,676,842,40,842,40,305,677,686,179,683,397,607,752,875}, -- [ID DA VOC] = { ID DAS NEWTYPES }, } 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), 3) 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 Deu certo, Mas agora o erro antigo voltou, tipo se usar !saga 1.2 o player fica invisivel! Naruto Age of Darkness (Naruto World)
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.