Ir para conteúdo

Featured Replies

Postado

Olá eu gostaria que alguem pudesse botar essa script que está logo abaixo para !saga 1,2,3..., envez de transformar é como se fosse o !saga só que com todas as vocations não só 1.

Mostrar conteúdo oculto

 

  • Respostas 9
  • Visualizações 976
  • Created
  • Última resposta

Top Posters In This Topic

Postado
local saga = {
-- Naruto ---
[1] = {840,91,841,676,842,40,842,40,305,677,686,179,683,397,607,752,875}, -- [ID DA VOCATION] = { ID DAS OUTFITS EM ORDEM }
}


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

então mais eu queria adicionar + de 1 vocation entendeu?

  Em 17/02/2018 em 14:35, Sttorm disse:

local saga = {
-- Naruto ---
[1] = {840,91,841,676,842,40,842,40,305,677,686,179,683,397,607,752,875}, -- [ID DA VOCATION] = { ID DAS OUTFITS EM ORDEM }
}


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

 

eu queria adicionar + de 1 vocation

 

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