Ir para conteúdo

Featured Replies

Postado

Hello guys , help me please

quero colocar exaust no Transformar

deve ser bem fácil mais eu não sei fazer script 

intão da uma ajuda ae

 

  • Script :
Spoiler

local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
-- Naruto --
[1] = { 25, 2, 84, 239},
[2] = { 50, 3, 85, 222},
[3] = { 75, 4, 86, 222},
[4] = { 100, 5, 87, 251},
[5] = { 150, 6, 88, 222},
[6] = { 200, 7, 89, 251},
[7] = { 250, 8, 90, 222},
[8] = { 300, 9, 91, 233},
-- Sasuke --
[15] = { 25, 16, 31, 17},
[16] = { 50, 17, 40, 17},
[17] = { 75, 18, 66, 15},
[18] = { 100, 19, 49, 66},
[19] = { 150, 20, 71, 17},
[20] = { 200, 21, 92, 111},
[21] = { 250, 22, 397, 228},
[22] = { 300, 23, 607, 245},
-- Sakura --
[30] = { 25, 31, 3, 14},
[31] = { 50, 32, 18, 14},
[32] = { 75, 33, 17, 14},
[33] = { 100, 34, 19, 14},
[34] = { 150, 35, 20, 14},
[35] = { 200, 36, 21, 14},
[36] = { 250, 37, 22, 14},
[37] = { 300, 38, 23, 14},
-- Neji --
[45] = { 25, 46, 68, 14},
[46] = { 50, 47, 69, 14},
[47] = { 75, 48, 70, 14},
[48] = { 100, 49, 72, 14},
[49] = { 150, 50, 73, 14},
[50] = { 200, 51, 74, 14},
[51] = { 250, 52, 75, 14},
[52] = { 300, 53, 76, 14},
-- Rock Lee --
[60] = { 50, 61, 114, 14},
[61] = { 100, 62, 114, 14},
[62] = { 150, 63, 144, 14},
[63] = { 200, 64, 144, 14},
[64] = { 250, 65, 144, 14},
[65] = { 300, 66, 144, 14},
[66] = { 400, 67, 144, 14},
[67] = { 500, 68, 144, 14},
[68] = { 600, 69, 144, 14},
-- Ten Ten --
[75] = { 50, 76, 134, 14},
[76] = { 100, 77, 134, 14},
[77] = { 150, 78, 134, 14},
[78] = { 200, 79, 134, 14},
[79] = { 250, 80, 134, 14},
[80] = { 300, 81, 134, 14},
[81] = { 400, 82, 134, 14},
[82] = { 500, 83, 134, 14},
[83] = { 600, 84, 134, 14},
-- Shino --
[90] = { 50, 91, 150, 14},
[91] = { 100, 92, 150, 14},
[92] = { 150, 93, 150, 14},
[93] = { 200, 94, 150, 14},
[94] = { 250, 95, 150, 14},
[95] = { 300, 96, 150, 14},
[96] = { 400, 97, 150, 14},
[97] = { 500, 98, 150, 14},
[98] = { 600, 99, 150, 14},
-- Kiba --
[105] = { 50, 106, 169, 14},
[106] = { 100, 107, 169, 14},
[107] = { 150, 108, 169, 14},
[108] = { 200, 109, 169, 14},
[109] = { 250, 110, 169, 14},
[110] = { 300, 111, 169, 14},
[111] = { 400, 112, 169, 14},
[112] = { 500, 113, 169, 14},
[113] = { 600, 114, 169, 14},
-- Hinata --
[120] = { 50, 121, 196, 14},
[121] = { 100, 122, 196, 14},
[122] = { 150, 123, 196, 14},
[123] = { 200, 124, 196, 14},
[124] = { 250, 125, 196, 14},
[125] = { 300, 126, 196, 14},
[126] = { 400, 127, 196, 14},
[127] = { 500, 128, 196, 14},
[128] = { 600, 129, 196, 14},
}
function onSay(cid, words, param, channel)
local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} -- começo e final do mapa
local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} -- começo e final do mapa
local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} -- começo e final do mapa
local from4,to4 = {x=985, y=598, z=7},{x=1044, y=652, z=7} -- começo e final do mapa
local from5,to5 = {x=986, y=615, z=6},{x=1039, y=647, z=7} -- começo e final do mapa
local from6,to6 = {x=990, y=616, z=5},{x=1040, y=647, z=5} -- começo e final do mapa
if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) or isInRange(getCreaturePosition(cid), from4, to4) or isInRange(getCreaturePosition(cid), from5, to5) or isInRange(getCreaturePosition(cid), from6, to6) then
doPlayerSendCancel(cid, "Você não pode se Transformar nesta área!") return true
end

if (getPlayerStorageValue(cid,112) > 0) then
return doPlayerSendCancel(cid, "Voce Nao Pode Se Transforma,Voce Agora Virou Da Akatsuki")
end
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)
if getPlayerVocation(cid) == 21 or getPlayerVocation(cid) == 22 then
doSendMagicEffect({x=getCreaturePosition(cid).x + 1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}, voc[4])
else
doSendMagicEffect(getCreaturePosition(cid), voc[4])
end
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

 

Obs: Isso não é uma spell e sim uma talkaction

Editado por miliandro (veja o histórico de edições)

Postado

local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
-- Naruto --
[1] = { 25, 2, 84, 239},
[2] = { 50, 3, 85, 222},
[3] = { 75, 4, 86, 222},
[4] = { 100, 5, 87, 251},
[5] = { 150, 6, 88, 222},
[6] = { 200, 7, 89, 251},
[7] = { 250, 8, 90, 222},
[8] = { 300, 9, 91, 233},
-- Sasuke --
[15] = { 25, 16, 31, 17},
[16] = { 50, 17, 40, 17},
[17] = { 75, 18, 66, 15},
[18] = { 100, 19, 49, 66},
[19] = { 150, 20, 71, 17},
[20] = { 200, 21, 92, 111},
[21] = { 250, 22, 397, 228},
[22] = { 300, 23, 607, 245},
-- Sakura --
[30] = { 25, 31, 3, 14},
[31] = { 50, 32, 18, 14},
[32] = { 75, 33, 17, 14},
[33] = { 100, 34, 19, 14},
[34] = { 150, 35, 20, 14},
[35] = { 200, 36, 21, 14},
[36] = { 250, 37, 22, 14},
[37] = { 300, 38, 23, 14},
-- Neji --
[45] = { 25, 46, 68, 14},
[46] = { 50, 47, 69, 14},
[47] = { 75, 48, 70, 14},
[48] = { 100, 49, 72, 14},
[49] = { 150, 50, 73, 14},
[50] = { 200, 51, 74, 14},
[51] = { 250, 52, 75, 14},
[52] = { 300, 53, 76, 14},
-- Rock Lee --
[60] = { 50, 61, 114, 14},
[61] = { 100, 62, 114, 14},
[62] = { 150, 63, 144, 14},
[63] = { 200, 64, 144, 14},
[64] = { 250, 65, 144, 14},
[65] = { 300, 66, 144, 14},
[66] = { 400, 67, 144, 14},
[67] = { 500, 68, 144, 14},
[68] = { 600, 69, 144, 14},
-- Ten Ten --
[75] = { 50, 76, 134, 14},
[76] = { 100, 77, 134, 14},
[77] = { 150, 78, 134, 14},
[78] = { 200, 79, 134, 14},
[79] = { 250, 80, 134, 14},
[80] = { 300, 81, 134, 14},
[81] = { 400, 82, 134, 14},
[82] = { 500, 83, 134, 14},
[83] = { 600, 84, 134, 14},
-- Shino --
[90] = { 50, 91, 150, 14},
[91] = { 100, 92, 150, 14},
[92] = { 150, 93, 150, 14},
[93] = { 200, 94, 150, 14},
[94] = { 250, 95, 150, 14},
[95] = { 300, 96, 150, 14},
[96] = { 400, 97, 150, 14},
[97] = { 500, 98, 150, 14},
[98] = { 600, 99, 150, 14},
-- Kiba --
[105] = { 50, 106, 169, 14},
[106] = { 100, 107, 169, 14},
[107] = { 150, 108, 169, 14},
[108] = { 200, 109, 169, 14},
[109] = { 250, 110, 169, 14},
[110] = { 300, 111, 169, 14},
[111] = { 400, 112, 169, 14},
[112] = { 500, 113, 169, 14},
[113] = { 600, 114, 169, 14},
-- Hinata --
[120] = { 50, 121, 196, 14},
[121] = { 100, 122, 196, 14},
[122] = { 150, 123, 196, 14},
[123] = { 200, 124, 196, 14},
[124] = { 250, 125, 196, 14},
[125] = { 300, 126, 196, 14},
[126] = { 400, 127, 196, 14},
[127] = { 500, 128, 196, 14},
[128] = { 600, 129, 196, 14},
}
function onSay(cid, words, param, channel)

local exha = 1 -- TEMPO EM SEGUNDOS
local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} -- começo e final do mapa
local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} -- começo e final do mapa
local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} -- começo e final do mapa
local from4,to4 = {x=985, y=598, z=7},{x=1044, y=652, z=7} -- começo e final do mapa
local from5,to5 = {x=986, y=615, z=6},{x=1039, y=647, z=7} -- começo e final do mapa
local from6,to6 = {x=990, y=616, z=5},{x=1040, y=647, z=5} -- começo e final do mapa
if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) or isInRange(getCreaturePosition(cid), from4, to4) or isInRange(getCreaturePosition(cid), from5, to5) or isInRange(getCreaturePosition(cid), from6, to6) then
doPlayerSendCancel(cid, "Você não pode se Transformar nesta área!") return true
end

if exhaustion.check(cid, 7320) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true
doPlayerSendCancel(cid, "Você não pode usar rápido demais.") return true
end

if (getPlayerStorageValue(cid,112) > 0) then
return doPlayerSendCancel(cid, "Voce Nao Pode Se Transforma,Voce Agora Virou Da Akatsuki")
end
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)
if getPlayerVocation(cid) == 21 or getPlayerVocation(cid) == 22 then
doSendMagicEffect({x=getCreaturePosition(cid).x + 1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}, voc[4])
else
doSendMagicEffect(getCreaturePosition(cid), voc[4])
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.")

end

else

exhaustion.set(cid, 7320, exha)
end
else
doPlayerSendCancel(cid, "Você não pode se Transformar!")
end
return true
end

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