gente o smeargle pode copiar poder de outros pokes mas exemplo um poke tem o Bite no m1 e o outro tem o bite no m2 sendo assim o smeargle copia os 2 ficando com 2 bites
eu gostaria de um script mais ou menos o de abaixo que eu fiz de exemplo para verificar se o pokemon ja possui certos movimentos, eu fiz de 2 modos mas nenhum funcionou como quero.
gostaria de uma ajuda nisso, se o pokemon já possui o spell X apareça a mensagem dizendo que ele ja tem aquela spell, logico que eu vou modificar depois mas no geral quero que verifique se ele ja tem determinada spells
vou postar os scripts que fiz de base pois n funcionam ate porque esse getPokemonMove nem deve existir so coloquei pra dar uma ideia
SCRIPT 1
if isInArray (getPokemonMove(item2.uid)== "Bite") then
doPlayerSendCancel(cid,"seu pokemon ja possui este movimento)
return true
end
SCRIPT 2
local lockedcds = {"Psychic"}
local tocopy = item2.uid
if isInArray(lockedcds, movestable[getCreatureName(tocopy)].move1.name) then
doPlayerSendCancel(cid,"seu pokemon ja possui este movimento)
return true
end
so lembrando que tentei tirar parte do proprio smeargle para fazer esse script
SMEARGLE
local lockedpokes = {"Mew", "Mewtwo", "Unown Legion", "Entei", "Raikou", "Suicune", "Zapdos", "Moltres", "Articuno", "Rocket Team", "Unown", "Lugia", "Celebi", "Ho-oh", "Mew_", "Mewtwo_"}
if (isPlayer(cid) and #getCreatureSummons(cid) > 0 and getCreatureName(getCreatureSummons(cid)[1]) == "Smeargle" and getPlayerStorageValue(getCreatureSummons(cid)[1], 18554) > 0) or (isPlayer(cid) and #getCreatureSummons(cid) > 0 and getCreatureName(getCreatureSummons(cid)[1]) == "Shiny Smeargle" and getPlayerStorageValue(getCreatureSummons(cid)[1], 18554) > 0) then
if isMonster(item2.uid) and isInArray(lockedpokes, getCreatureName(item2.uid)) then
doPlayerSendTextMessage(cid, 20, "You can't copy this move.")
return true
end
local lockedcds = {"Divine Punishment", "Unown Rush", "Sing", "Unown Help", "Sleep Powder", "Volcano Burst", "Selfdestruct", "Protection", "Mysterious Power", "Power Wave", "Shredder Team", "Double Team", "Team Slice", "Ancient Fury", "Camouflage", "Future Sight", "Acid Armor", "Rollout", "Flame Wheel", "Elemental Hands", "Super Vines", "ExplodeAll", "Stampage", "Iron Defense", "Minimize", "Team Claw", ""}
for x=1, 8 do
table.insert(lockedcds, "Sketch "..x)
end
local canShiny = true
local smeargle = getCreatureSummons(cid)[1]
local shinysmeargle = getCreatureSummons(cid)[1]
local tocopy = item2.uid
local selfball = getPlayerSlotItem(cid, 8).uid
if (isShinyName(getCreatureName(item2.uid)) and canShiny) or not isShinyName(getCreatureName(item2.uid)) then
if (getPlayerStorageValue(smeargle, 18554)) or (getPlayerStorageValue(shinysmeargle, 18554))then
if (getPlayerStorageValue(smeargle, 18554) == 1 and movestable[getCreatureName(tocopy)].move1 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move1.name)) or (getPlayerStorageValue(shynysmeargle, 18554) == 1 and movestable[getCreatureName(tocopy)].move1 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move1.name)) then
if (not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move1.name)) or (not shinysmeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move1.name)) then
doItemSetAttribute(selfball, "skt1", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 2 and movestable[getCreatureName(tocopy)].move2 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move2.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move2.name) then
doItemSetAttribute(selfball, "skt2", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 3 and movestable[getCreatureName(tocopy)].move3 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move3.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move3.name) then
doItemSetAttribute(selfball, "skt3", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 4 and movestable[getCreatureName(tocopy)].move4 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move4.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move4.name) then
doItemSetAttribute(selfball, "skt4", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 5 and movestable[getCreatureName(tocopy)].move5 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move5.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move5.name) then
doItemSetAttribute(selfball, "skt5", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 6 and movestable[getCreatureName(tocopy)].move6 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move6.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move6.name) then
doItemSetAttribute(selfball, "skt6", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 7 and movestable[getCreatureName(tocopy)].move7 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move7.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move7.name) then
doItemSetAttribute(selfball, "skt7", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
elseif getPlayerStorageValue(smeargle, 18554) == 8 and movestable[getCreatureName(tocopy)].move8 and not isInArray(lockedcds, movestable[getCreatureName(tocopy)].move8.name) then
if not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)].move8.name) then
doItemSetAttribute(selfball, "skt8", getCreatureName(tocopy))
else
doPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")
end
end
setPlayerStorageValue(smeargle, 18554, -1)
setPlayerStorageValue(shinysmeargle, 18554, -1)
end
doUpdateMoves(cid)
return true
else
doPlayerSendTextMessage(cid, 20, "You can't copy moves of shinyes pokemons.")
end
end