Ir para conteúdo

Featured Replies

  • 2 weeks later...
  • Respostas 11
  • Visualizações 637
  • Created
  • Última resposta

Top Posters In This Topic

Postado
local saga = {
    [1] = {[1] = [109, 50], effect = 10}
}

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
--transformação
if getPlayerLevel(cid) >= saga[getPlayerVocation(cid)][tonumber(t[1])][2] then
    doSetCreatureOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])][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 isso

[1] = {[1] = [109, 50], effect = 10}
aonde ta o 50 é o nvl

 

[center][url=http://bit.ly/denkorpg]B12fLFS.png

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo