Bom galera, tenho uma skill que se chama " Iron Defense ", porém ela só está no Steelix, preciso por ela em outros pokémons, mas o fato é que não consigo por as outras looktypes dos pokémons que faltam no script ;-; (Metang, Metagross).
[PEDIDO] Spell "Iron Defense"

UP
Coloque isso em Pokemon moves.lua
if spell == "Iron Defense" then if getSubName(cid, target) == "Metang" then doSetCreatureOutfit(cid, {lookType = 1762}, -1) elseif getSubName(cid, target) == "Metagross" then doSetCreatureOutfit(cid, {lookType = 1402}, -1) elseif getSubName(cid, target) == "Shiny Metagross" then doSetCreatureOutfit(cid, {lookType = 22}, -1)end
só configurar o nome do poke e o id da looktype
3 minutos atrás, samlecter disse:Coloque isso em Pokemon moves.lua
if spell == "Iron Defense" then if getSubName(cid, target) == "Metang" then doSetCreatureOutfit(cid, {lookType = 1762}, -1) elseif getSubName(cid, target) == "Metagross" then doSetCreatureOutfit(cid, {lookType = 1402}, -1) elseif getSubName(cid, target) == "Shiny Metagross" then doSetCreatureOutfit(cid, {lookType = 22}, -1)end
só configurar o nome do poke e o id da looktype
eu devo substituir oq ja tem?
que no caso é o do steelix, ou só adicionar no final?
3 horas atrás, samlecter disse:Coloque isso em Pokemon moves.lua
if spell == "Iron Defense" then if getSubName(cid, target) == "Metang" then doSetCreatureOutfit(cid, {lookType = 1762}, -1) elseif getSubName(cid, target) == "Metagross" then doSetCreatureOutfit(cid, {lookType = 1402}, -1) elseif getSubName(cid, target) == "Shiny Metagross" then doSetCreatureOutfit(cid, {lookType = 22}, -1)end
só configurar o nome do poke e o id da looktype
no caso do DxP ta assim no pokemon moves:
elseif isInArray({"Psychic Sight", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, spell) then
local ret = {}
ret.id = cid
ret.cd = 10
ret.eff = 0
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
e no newstatussyst fica assim:
elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, buff) then
doSetCreatureOutfit(cid, {lookType = outImune[buff]}, -1)
setPlayerStorageValue(cid, 9658783, 1)
setPlayerStorageValue(cid, 625877, outImune[buff]) --alterado v1.6
local outImune = {
["Camouflage"] = 2087,
["Acid Armor"] = 1453,
["Iron Defense"] = 1401,
["Minimize"] = 1455,
["Future Sight"] = 1446,
["Psychic Sight"] = 1536,
["Heal Bell"] = 946,
}
poderia me falar como colocar?
6 horas atrás, Josegvb disse:
no caso do DxP ta assim no pokemon moves:
elseif isInArray({"Psychic Sight", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, spell) then
local ret = {}
ret.id = cid
ret.cd = 10
ret.eff = 0
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
e no newstatussyst fica assim:
elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, buff) then
doSetCreatureOutfit(cid, {lookType = outImune[buff]}, -1)
setPlayerStorageValue(cid, 9658783, 1)
setPlayerStorageValue(cid, 625877, outImune[buff]) --alterado v1.6
local outImune = {
["Camouflage"] = 2087,
["Acid Armor"] = 1453,
["Iron Defense"] = 1401,
["Minimize"] = 1455,
["Future Sight"] = 1446,
["Psychic Sight"] = 1536,
["Heal Bell"] = 946,
}
poderia me falar como colocar?
UP
@Josegvb, @soyjho Ok, então esqueçam o que falei antes, não precisa alterar nada em pokemon moves.
Em newStatusSyst.lua troque:
local outImune = {
["Camouflage"] = 2087,
["Acid Armor"] = 1453,
["Iron Defense"] = 1401,
["Minimize"] = 1455,
["Future Sight"] = 1446,
["Psychic Sight"] = 1536,
["Heal Bell"] = 946,
}
Por:
local outImune = {
["Camouflage"] = 2087,
["Acid Armor"] = 1453,
["Iron Defense"] = 1401, -- Steelix
["Minimize"] = 1455,
["Future Sight"] = 1446,
["Psychic Sight"] = 1536,
["Heal Bell"] = 946,
}
local outImune2 = { -- Metang
["Iron Defense"] = 1402, -- LookType
}
local outImune3 = { -- Metagross
["Iron Defense"] = 22,
}
local outImune4 = { -- Shiny Metagross
["Iron Defense"] = 1762,
}
Depois, Troque:
elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, buff) then
doSetCreatureOutfit(cid, {lookType = outImune[buff]}, -1)
setPlayerStorageValue(cid, 9658783, 1)
setPlayerStorageValue(cid, 625877, outImune[buff]) --alterado v1.6
Por:
elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Iron Defense2", "Minimize"}, buff) then
if getCreatureName(cid) == "Metang" then
doSetCreatureOutfit(cid, {lookType = outImune2[buff]}, -1) -- 2 = Metang
elseif getCreatureName(cid) == "Metagross" then
doSetCreatureOutfit(cid, {lookType = outImune3[buff]}, -1) -- 3 = Metagross
elseif getCreatureName(cid) == "Shiny Metagross" then
doSetCreatureOutfit(cid, {lookType = outImune4[buff]}, -1) -- 4 = Shiny Metagross
else
doSetCreatureOutfit(cid, {lookType = outImune[buff]}, -1) -- Default = Steelix
end
setPlayerStorageValue(cid, 9658783, 1)
setPlayerStorageValue(cid, 625877, outImune[buff])
Pra adicionar mais, só seguir o modelo, os comentários estão auto-explicativos.
OBS: Tem forma mais simples, mas tô sem tempo, é que eu já tinha feito isso na época do pokexlin aushusuas
eu já iria optar por tabelas em vez de ifs
["Iron Defense"] = {[14] = 1401,[34] = 50,[67] = 28,[163] = 136,},
nome spell --> [14] locktype do pokemon --> 1401 locktype novo
local outImune = {["Camouflage"] = {[22] = 2087,[43] = 2087,},["Acid Armor"] = {[9] = 1453,[27] = 1453,},["Iron Defense"] = {[14] = 1401,[34] = 50,[67] = 28,[163] = 136,},["Minimize"] = {[397] = 1455,},["Future Sight"] = {[36] = 1446,[530] = 52,[110] = 111},}["Psychic Sight"] = {[365] = 1536},}["Heal Bell"] = {[365] = 946},}elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, buff) then doSetCreatureOutfit(cid, {lookType = outImune[buff][getCreatureOutfit(cid).lookType]}, -1) setPlayerStorageValue(cid, 9658783, 1) setPlayerStorageValue(cid, 625877, outImune[buff]) --alterado v1.6
53 minutos atrás, nociam disse:eu já iria optar por tabelas em vez de ifs
["Iron Defense"] = {[14] = 1401,[34] = 50,[67] = 28,[163] = 136,},
nome spell --> [14] locktype do pokemon --> 1401 locktype novo
local outImune = {["Camouflage"] = {[22] = 2087,[43] = 2087,},["Acid Armor"] = {[9] = 1453,[27] = 1453,},["Iron Defense"] = {[14] = 1401,[34] = 50,[67] = 28,[163] = 136,},["Minimize"] = {[397] = 1455,},["Future Sight"] = {[36] = 1446,[530] = 52,[110] = 111},}["Psychic Sight"] = {[365] = 1536},}["Heal Bell"] = {[365] = 946},}elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, buff) then doSetCreatureOutfit(cid, {lookType = outImune[buff][getCreatureOutfit(cid).lookType]}, -1) setPlayerStorageValue(cid, 9658783, 1) setPlayerStorageValue(cid, 625877, outImune[buff]) --alterado v1.6
funfando! mt obg ^^
5 horas atrás, nociam disse:eu já iria optar por tabelas em vez de ifs
["Iron Defense"] = {[14] = 1401,[34] = 50,[67] = 28,[163] = 136,},
nome spell --> [14] locktype do pokemon --> 1401 locktype novo
local outImune = {["Camouflage"] = {[22] = 2087,[43] = 2087,},["Acid Armor"] = {[9] = 1453,[27] = 1453,},["Iron Defense"] = {[14] = 1401,[34] = 50,[67] = 28,[163] = 136,},["Minimize"] = {[397] = 1455,},["Future Sight"] = {[36] = 1446,[530] = 52,[110] = 111},}["Psychic Sight"] = {[365] = 1536},}["Heal Bell"] = {[365] = 946},}elseif isInArray({"Psychic Sight", "Heal Bell", "Future Sight", "Camouflage", "Acid Armor", "Iron Defense", "Minimize"}, buff) then doSetCreatureOutfit(cid, {lookType = outImune[buff][getCreatureOutfit(cid).lookType]}, -1) setPlayerStorageValue(cid, 9658783, 1) setPlayerStorageValue(cid, 625877, outImune[buff]) --alterado v1.6
o meu esta dando o seguinte erro
esta é a linha 72: ["Heal Bell"] = {[946] = 946},
1 minuto atrás, soyjho disse:
ele tive uns pequenos erros nos }
coloca assim
local outImune = {["Camouflage"] = {[22] = 2087,[43] = 2087,},["Acid Armor"] = {[9] = 1453,[27] = 1453,},["Iron Defense"] = {[911] = 1401,[1763] = 1825,[1762] = 1828,[163] = 136,},["Minimize"] = {[397] = 1455,},["Future Sight"] = {[36] = 1446,[530] = 52,[110] = 111,},["Psychic Sight"] = {[365] = 1536,},["Heal Bell"] = {[365] = 946,},}
pode cre essas duas linhas tira isso do final }
["Future Sight"] = {[36] = 1446,[530] = 52,[110] = 111},}
["Psychic Sight"] = {[365] = 1536},}
ficando assim
["Future Sight"] = {[36] = 1446,[530] = 52,[110] = 111},
["Psychic Sight"] = {[365] = 1536},