Ir para conteúdo
  • Cadastre-se

(Resolvido)!saga


Ir para solução Resolvido por Storm,

Posts Recomendados

Olá pessoal do tk, bom recentemente achei um script do xWhiteWolf de !saga, A talkaction saga transforma o player, ou seja eu transformo a cada 25 leveis dizendo !saga e o numero da transformação, porém percebi que esta talkaction não salva a transformação, quando o player desloga ele volta a transformação antiga! Eu queria que ficasse mesmo depois de deslogar e só mudar se o player utilizar a talkaction novamente!

A script é essa :

Edit: Descobri um outro erro na script mais já arrumei

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 = 208}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação}
[700] = {[1] = 419, [2] = 420, [3] = 421, [4] = 422, [5] = 423, [6] = 424, [7] = 425, [8] = 426, [9] = 427, [10] = 428, [11] = 436, [12] = 431, [13] = 430, [14] = 435, [15] = 433, effect = 238} --TESTE
}

local level = 25 -- Limite para liberar uma saga nova

function onSay(cid, words, param, channel)
if(param == '' or not tonumber(param)) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") return true
end
local voc = saga[getPlayerVocation(cid)]
if not voc then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") return true
end
if not voc[tonumber(param)] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.") return true
end
if getPlayerLevel(cid) < tonumber(param) * level then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(param) * level).." para usar essa saga.") return true
end
doSetCreatureOutfit(cid, {lookType = voc[tonumber(param)]}, -1)
doSendMagicEffect(getThingPos(cid), voc.effect)
doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!")
doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1)
return true
end

 

Editado por felippepsa (veja o histórico de edições)
post-91064-0-67675300-1423235828_thumb.p
 
 
 
 
Naruto Age of Darkness (Naruto World)
 
Link para o post
Compartilhar em outros sites

só tirar a script "transformar" do seu talkactions/transformar.

O rei de seu proprio destino é aquele que luta pela gloria do amanhã!
Discord : ZoR#9373


 

Link para o post
Compartilhar em outros sites
2 horas atrás, ZikaLord disse:

só tirar a script "transformar" do seu talkactions/transformar.

Eu já retirei ela antes, Mas não muda nada!

post-91064-0-67675300-1423235828_thumb.p
 
 
 
 
Naruto Age of Darkness (Naruto World)
 
Link para o post
Compartilhar em outros sites
4 horas atrás, felippepsa disse:

Olá pessoal do tk, bom recentemente achei um script do xWhiteWolf de !saga, A talkaction saga transforma o player, ou seja eu transformo a cada 25 leveis dizendo !saga e o numero da transformação, porém percebi que esta talkaction não salva a transformação, quando o player desloga ele volta a transformação antiga! Eu queria que ficasse mesmo depois de deslogar e só mudar se o player utilizar a talkaction novamente!

A script é essa :

 


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
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

Tenta trocar o doSetCreatureOutfit  por doCreatureChangeOutfit



 

 

 

 

Host bom para hospedar seu jogo => https://shre.ink/OminiHost

 

Link para o post
Compartilhar em outros sites
14 minutos atrás, quemtuacha 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!

post-91064-0-67675300-1423235828_thumb.p
 
 
 
 
Naruto Age of Darkness (Naruto World)
 
Link para o post
Compartilhar em outros sites
14 minutos atrás, 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!

Spoiler

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

 

Link para o post
Compartilhar em outros sites
16 horas atrás, quemtuacha disse:
  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!

post-91064-0-67675300-1423235828_thumb.p
 
 
 
 
Naruto Age of Darkness (Naruto World)
 
Link para o post
Compartilhar em outros sites
  • 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

 

Link para o post
Compartilhar em outros sites
Em 21/02/2018 em 10: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!

post-91064-0-67675300-1423235828_thumb.p
 
 
 
 
Naruto Age of Darkness (Naruto World)
 
Link para o post
Compartilhar em outros sites
1 hora atrás, felippepsa disse:

Deu certo, Mas agora o erro antigo voltou, tipo se usar !saga 1.2 o player fica invisivel!


Testo em meu próprio servidor , é problema de configuração seu. está 100%

Link para o post
Compartilhar em outros sites
7 horas atrás, Sttorm disse:


Testo em meu próprio servidor , é problema de configuração seu. está 100%

Ok, vou ver se consigo arrumar, O estranho é que antes estava normal!

Editado por felippepsa (veja o histórico de edições)
post-91064-0-67675300-1423235828_thumb.p
 
 
 
 
Naruto Age of Darkness (Naruto World)
 
Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo