Ir para conteúdo

Featured Replies

Postado

Galera eu queria fazer um pedido para algum de vocês que queira mim ajudar, se alguém poder modificar essa script aki que para ficar quase que nem o transformar, que ficasse quase assim

--[vocation id] = { levellooktype, efeitolevellooktype, efeito} e assim vai, se alguém poder mim ajudar agradeço muito mesmo

aki está a script, se alguém poder mim ajudar agradeço

Spoiler

local saga = {
[1] = {[1] = 180, [2] = 438, [3] = 182, effect = 10}, --[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

e aki está a tag

Spoiler

<talkaction words="!saga" event="script" value="saga.lua"/>

 

  • Respostas 14
  • Visualizações 774
  • Created
  • Última resposta

Top Posters In This Topic

Postado
Em 29/06/2016 at 14:03, Wase Wiss disse:

Galera eu queria fazer um pedido para algum de vocês que queira mim ajudar, se alguém poder modificar essa script aki que para ficar quase que nem o transformar, que ficasse quase assim

--[vocation id] = { levellooktype, efeitolevellooktype, efeito} e assim vai, se alguém poder mim ajudar agradeço muito mesmo

aki está a script, se alguém poder mim ajudar agradeço

  Ocultar conteúdo


local saga = {
[1] = {[1] = 180, [2] = 438, [3] = 182, effect = 10}, --[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

e aki está a tag

  Mostrar conteúdo oculto


<talkaction words="!saga" event="script" value="saga.lua"/>

 

 

Tipo assim:

 

local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
[9] = { 30, 10, 30, 32},
[10] = { 40, 11, 261, 32},
[11] = { 50, 15, 261, 33},
[12] = { 75, 15, 261, 33},
[13] = { 100, 15, 261, 33},
[14] = { 150, 15, 261, 33},
[15] = { 180, 15, 261, 33},
[16] = { 200, 15, 261, 33},
[17] = { 40, 15, 261, 33},
[18] = { 40, 15, 261, 33},
[19] = { 40, 15, 261, 33},
[20] = { 40, 15, 261, 33},
[21] = { 40, 15, 261, 33},
[22] = { 40, 15, 261, 33},
[23] = { 40, 15, 261, 33}
}
function onSay(cid, words, param, channel)
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

Script: Avuenja

Postado

@Wase Wiss

 

Veja se é isso que você quer:

 

local config = {
--[vocation id] = { level, looktype, efeito}
[1] = { 50, 261, 32},
[2] = { 50, 261, 32},
[3] = { 50, 261, 32},
[4] = { 50, 261, 32},
[5] = { 50, 261, 32},
[6] = { 50, 261, 32},
[7] = { 50, 261, 32},
[8] = { 50, 261, 32}
}
function onSay(cid, words, param, channel)
local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce Transformou!")
local outfit = {lookType = voc[2]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[3])
else 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce precisa estar no level " .. voc[1] .. " para transformar.")
end
end
return true
end

 

So mudar o level de cada vocação para transformar, sem mudar classe, storage nem nada.

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo