Ir para conteúdo
  • 0

[Resolvido] Morph


FlamesAdmin

Pergunta

Fiz uma tag de outro pokemon pra usar o Morph copiando dessa tag:

if getCreatureName(cid) == "Shiny Abra" then
 eff, name, outfit = lightEff, "Light Abra", lightOut
 else
 eff, name, outfit = darkEff, "Shiny Abra", darkOut
 end

Só que está dando erro.

[10/06/2015 02:46:33] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:2659: unexpected symbol near '=='

[10/06/2015 02:46:33] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[10/06/2015 02:46:33] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:2659: unexpected symbol near '=='
[10/06/2015 02:46:33] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[10/06/2015 02:46:33] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:2659: unexpected symbol near '=='
[10/06/2015 02:46:33] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[10/06/2015 02:46:33] [Error - LuaScriptInterface::loadFile] data/actions/scripts/evolution.lua:48: '}' expected (to close '{' at line 3) near '['
[10/06/2015 02:46:33] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/evolution.lua)
[10/06/2015 02:46:33] data/actions/scripts/evolution.lua:48: '}' expected (to close '{' at line 3) near '['
[10/06/2015 02:46:33] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:2659: unexpected symbol near '=='
[10/06/2015 02:46:33] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[10/06/2015 02:46:34] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:2659: unexpected symbol near '=='
[10/06/2015 02:46:34] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[10/06/2015 02:46:34] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:2659: unexpected symbol near '=='
[10/06/2015 02:46:34] [Warning - LuaScriptInterface::initState] Cannot load data/lib/

Morph:

elseif spell == "Morph" then

if isSummon(cid) then
sid = getCreatureMaster(cid)

lightEff = 132
lightOut = 1645
darkEff = 214
darkOut = 1257
 -----------Rotoms
ghostEff = 180
ghostOut = 1730
waterEff = 21
waterOut = 1726
fireEff = 181
fireOut = 1725
grassEff = 8
grassOut = 1729
flyEff = 42
flyOut = 1727
iceEff = 41
iceOut = 1728
pos = getThingPos(cid)

 if getPlayerSlotItem(sid, 8).itemid == 0 then
 print(getPlayerSlotItem(sid, 8).itemid)
 return false
 end
 if getCreatureName(cid) == "Shiny Abra" then
 eff, name, outfit = lightEff, "Light Abra", lightOut
 else
 eff, name, outfit = darkEff, "Shiny Abra", darkOut
 end
if getCreatureName(cid) == "Ghost Rotom" then     --- ADICIONANDO ESSA PARTE \/
eff, name, outfit = waterEff, "Water Rotom", waterOut
else
eff, name, outfit = fireEff, "Fire Rotom", fireOut
else
eff, name, outfit = grassEff, "Grass Rotom", grassOut
else
eff, name, outfit = flyEff, "Flying Rotom", flyOut
else
eff, name, outfit = iceEff, "Ice Rotom", iceOut
else
eff, name, outfit = ghostEff, "Ghost Rotom", ghostOut
end             ---- ATÉ AQUI DA ERRO, QUANDO EU TIRO ELA, INICIA NORMALMENTE
 if not isPlayer(sid) then return false end
 if getItemAttribute(getPlayerSlotItem(sid, 8).uid, "ghostlight") then
  doItemEraseAttribute(getPlayerSlotItem(sid, 8).uid, "ghostlight")
 else
  doItemSetAttribute(getPlayerSlotItem(sid, 8).uid, "ghostlight", "yes")
 end
 doSendMagicEffect(getThingPosWithDebug(cid), eff)
 doSetCreatureOutfit(cid, {lookType = outfit}, -1)
 doItemSetAttribute(getPlayerSlotItem(sid, 8).uid, "poke", name)
 doRemoveCreature(cid)
 doSummonMonster(sid, name)
 doTeleportThing(getCreatureSummons(sid)[1], pos, false)
 adjustStatus(getCreatureSummons(sid)[1], getPlayerSlotItem(sid, 8).uid, true, false)
doUpdateMoves(sid)
end

Parte que eu quero colocar pro outro poke usar: O erro só acontece quando eu adiciono \/.
if getCreatureName(cid) == "Ghost Rotom" then
 eff, name, outfit = waterEff, "Water Rotom", waterOut
 else
 eff, name, outfit = fireEff, "Fire Rotom", fireOut
  else
 eff, name, outfit = grassEff, "Grass Rotom", grassOut
  else
 eff, name, outfit = flyEff, "Flying Rotom", flyOut
  else
 eff, name, outfit = iceEff, "Ice Rotom", iceOut
  else
 eff, name, outfit = ghostEff, "Ghost Rotom", ghostOut
 end

 

Rep+ pela ajuda.
Editado por FlamesAdmin
Link para o comentário
Compartilhar em outros sites

8 respostass a esta questão

Posts Recomendados

  • 0

 

 
local _TAB = {
["Shiny Abra"] = {eff = lightEff, name = "Light Abra", outfit = lightOut},
["Light Abra"] = {eff = darkEff, name = "Shiny Abra", outfit = darkOut},
["Ghost Rotom"] = {eff = waterEff, name = "Water Rotom", outfit = waterOut},
["Water Rotom"] = {eff = fireEff, name = "Fire Rotom", outfit = fireOut},
["Fire Rotom"] = {eff = grassEff, name = "Grass Rotom", outfit = grassOut},
["Grass Rotom"] = {eff = flyEff, name = "Flying Rotom", outfit = flyOut},
["Flying Rotom"] = {eff = iceEff, name = "Ice Rotom", outfit = iceOut},
["Ice Rotom"] = {eff = ghostEff, name = "Ghost Rotom", outfit = ghostOut}
}
 
local infos = _TAB[getCreatureName(cid)]
 
if infos then
eff, name, outfit = infos.eff, infos.name, infos.outfit
end
Link para o comentário
Compartilhar em outros sites

  • 0

Tenta Isto:

 

 

if getCreatureName(cid) = "Shiny Abra" then
eff, name, outfit = lightEff, "Light Abra", lightOut
else
eff, name, outfit = darkEff, "Shiny Abra", darkOut
end
Link para o comentário
Compartilhar em outros sites

  • 0

Não é bem isso que eu quero, do Dark Abra e Light está funcionando, quero que funcione com os Rotoms também, pois quando eu coloco a parte dos Rotoms ele da erro. Igual com Dark Abra

 

#Edit

Editei o tópico para melhor entender.

Editado por FlamesAdmin
Link para o comentário
Compartilhar em outros sites

  • 0

 

 
if getCreatureName(cid) == "Ghost Rotom" then
eff, name, outfit = ghostEff, "Ghost Rotom", ghostOut
elseif getCreatureName(cid) == "Fire Rotom" then
eff, name, outfit = fireEff, "Fire Rotom", fireOut
  elseif getCreatureName(cid) == "Grass Rotom" then
eff, name, outfit = grassEff, "Grass Rotom", grassOut
  elseif getCreatureName(cid) == "Flying Rotom" then
eff, name, outfit = flyEff, "Flying Rotom", flyOut
  elseif getCreatureName(cid) == "Ice Rotom" then
eff, name, outfit = iceEff, "Ice Rotom", iceOut
  else
eff, name, outfit = waterEff, "Water Rotom", waterOut
end
Editado por Skymagnum
Link para o comentário
Compartilhar em outros sites

  • 0

Bom, quando uso Morph no Shiny Abra, ele transforma no Water Rotom. E quando uso Morph com todas formas do Rotom, nada acontece, continua na mesma forma. Eu quero que o Morph funcione entre o Shiny Abra e Light Abra. E com os Rotoms a mesma coisa, Ghost muda pro Water, Water pro Fire, Fire pro Grass, Grass pro Flying, Flying pro Ice, Ice pro Water e Water pro Ghost.

Link para o comentário
Compartilhar em outros sites

  • 0
  • Administrador
A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...