FL

[Resolvido] [Help] Adicionar Excessão Em Magia

Por FlamesAdmin, 09 de jun. de 2015 em Resolvidos

resolvido
4
939
09 de junho de 2015 às 00:24

Alguem poderia adicionar uma excessão de quando estiver com outra magia carregando não poder usar essa:

 

 

 

elseif spell == "Morph" then
if isSummon(cid) then
sid = getCreatureMaster(cid)
lightEff = 132
lightOut = 1645
darkEff = 214
darkOut = 1257
-----------Rotoms
ghostEff = 214
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
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
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

Editado Junho 24 por FlamesAdmin

3 semanas depois...
zipter98Z
24 de junho de 2015 às 23:13
Melhor resposta

move1.lua:

Abaixo de:

if getPlayerStorageValue(mypoke, 3894) >= 1 then
    return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3
end
coloque:
if move.name == "Morph" then
    for i = 1, 12 do
        if getCD(getPlayerSlotItem(cid, 8).uid, "move"..i) > 0 then
            return doPlayerSendCancel(cid, "To use Morph, all the spells of your pokemon need to be ready.")
        end
    end
end

Editado Junho 24 por zipter98

24 de junho de 2015 às 23:33

Valeeeeu!

2 anos depois...
FrenviusF
29 de novembro de 2017 às 14:22
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.