Boom o bug é o seguinte, quando o pokemon mega evolui ele altera seus status de attack e defense, não se altera os demais nem mesmo seus tipos
Por Exemplo
Scptile = Grass
Mega Sceptile = Grass / Dragon
Charizard = Fire / Flying
Mega Charizard Y = Fire / Flying
Mega Charizard X = Fire / Dragon
não se muda os tipos do mega o sceptile n se torna dragão e o mega zard x tbm n, acontece com os outros tambem, que tem um segundo tipo, basicamente o que acontece é que o pokemon não tem ajuste de status e tipo
O Codigo Usado da transformação em mega
é o mesmo do DXP, esse codigo fica no "Pokemon Moves"
Spoiler
function isMega(cid)
if getPlayerStorageValue(cid, storages.isMega) ~= -1 then
return true
end
return false
end
function doTransformMega(cid)
local name = doCorrectString(getCreatureName(cid))
local wildMult = 1.0
local megaID = ""
if isSummon(cid) then
local master = getCreatureMaster(cid)
if getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID") and getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID") ~= "" then
megaID = getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID")
end
else
megaID = getPlayerStorageValue(cid, storages.isMegaID)
end
local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
if megasConf[megaName] then
setPlayerStorageValue(cid, storages.isMega, megaName)
if isSummon(cid) then
local master = getCreatureMaster(cid)
doUpdateMoves(master)
wildMult = 0.5
setPlayerStorageValue(cid, storages.isMegaID, megaID)
end
if wildMult == 1.8 then
local life = megasConf[megaName].wildVity * math.random(4000, 4500) -- 4000, 4500
local lifeNow = getCreatureMaxHealth(cid) - getCreatureHealth(cid)
setCreatureMaxHealth(cid, life) -- perfeita formula, os pokemons "ruins" só precisam de ajustes no pokemonStatus, tabela vitality.
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddHealth(cid, -lifeNow)
end
if isInArray({"Charizard", "Blaziken", "Ampharos"}, name) then
doPantinOutfit(cid, 0, megaName)
else
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1)
checkOutfitMega(cid, megaName)
end
end
end
function checkChenceToMega(cid)
local name, chance = doCorrectString(getCreatureName(cid)), math.random(0.1, 100.9)
local megaID = ""
if name == "Charizard" then
megaID = math.random(1, 100) < 51 and "Y" or "X"
end
local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
if megasConf[megaName] and not isMega(cid) then
if megasConf[megaName].wildChance >= chance then
setPlayerStorageValue(cid, storages.isMegaID, megaID)
doTransformMega(cid)
end
end
end
function getMegaID(cid)
return getPlayerStorageValue(cid, storages.isMegaID) ~= -1 and getPlayerStorageValue(cid, storages.isMegaID) or ""
end
function checkOutfitMega(cid, megaName)
if not isCreature(cid) or not isMega(cid) then return true end
local name = doCorrectString(getCreatureName(cid))
if not megasConf[megaName] then return true end
if getCreatureOutfit(cid).lookType ~= megasConf[megaName].out then
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1)
end
addEvent(checkOutfitMega, 50, cid)
end
function doPantinOutfit(cid, times, megaName)
if not isCreature(cid) or not isMega(cid) then return true end
if getCreatureOutfit(cid).lookType == 1875 or getCreatureOutfit(cid).lookType == 2 then return true end
local name = doCorrectString(getCreatureName(cid))
if not megasConf[megaName] then return true end
local outfitIndex = 1
if times <= 100 then
outfitIndex = 1
elseif times > 100 and times <= 200 then
outfitIndex = 2
elseif times > 200 and times <= 300 then
outfitIndex = 3
end
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out[outfitIndex]}, -1)
times = times + 50
if times > 300 then
times = 0
end
addEvent(doPantinOutfit, 50, cid, times, megaName)
end
Espero que possam me ajudar, logo postarei uma base que modifiquei e balanceei com muita dedicação!
Pergunta
IOWeenI 0
Boom o bug é o seguinte, quando o pokemon mega evolui ele altera seus status de attack e defense, não se altera os demais nem mesmo seus tipos
Por Exemplo
Scptile = Grass
Mega Sceptile = Grass / Dragon
Charizard = Fire / Flying
Mega Charizard Y = Fire / Flying
Mega Charizard X = Fire / Dragon
não se muda os tipos do mega o sceptile n se torna dragão e o mega zard x tbm n, acontece com os outros tambem, que tem um segundo tipo, basicamente o que acontece é que o pokemon não tem ajuste de status e tipo
O Codigo Usado da transformação em mega
é o mesmo do DXP, esse codigo fica no "Pokemon Moves"
function isMega(cid)
if getPlayerStorageValue(cid, storages.isMega) ~= -1 then
return true
end
return false
end
function doTransformMega(cid)
local name = doCorrectString(getCreatureName(cid))
local wildMult = 1.0
local megaID = ""
if isSummon(cid) then
local master = getCreatureMaster(cid)
if getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID") and getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID") ~= "" then
megaID = getItemAttribute(getPlayerSlotItem(master, 8).uid, "megaID")
end
else
megaID = getPlayerStorageValue(cid, storages.isMegaID)
end
local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
if megasConf[megaName] then
setPlayerStorageValue(cid, storages.isMega, megaName)
doRegainSpeed(cid) --alterado!
local pos = getThingPos(cid)
pos.x = pos.x + 1
pos.y = pos.y +1
doSendMagicEffect(pos, 287)
if isSummon(cid) then
local master = getCreatureMaster(cid)
doUpdateMoves(master)
wildMult = 0.5
setPlayerStorageValue(cid, storages.isMegaID, megaID)
end
setPlayerStorageValue(cid, 1001, megasConf[megaName].offense * wildMult)
setPlayerStorageValue(cid, 1002, megasConf[megaName].defense * wildMult)
setPlayerStorageValue(cid, 1003, megasConf[megaName].agility)
setPlayerStorageValue(cid, 1005, megasConf[megaName].specialattack * wildMult)
if wildMult == 1.8 then
local life = megasConf[megaName].wildVity * math.random(4000, 4500) -- 4000, 4500
local lifeNow = getCreatureMaxHealth(cid) - getCreatureHealth(cid)
setCreatureMaxHealth(cid, life) -- perfeita formula, os pokemons "ruins" só precisam de ajustes no pokemonStatus, tabela vitality.
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddHealth(cid, -lifeNow)
end
if isInArray({"Charizard", "Blaziken", "Ampharos"}, name) then
doPantinOutfit(cid, 0, megaName)
else
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1)
checkOutfitMega(cid, megaName)
end
end
end
function checkChenceToMega(cid)
local name, chance = doCorrectString(getCreatureName(cid)), math.random(0.1, 100.9)
local megaID = ""
if name == "Charizard" then
megaID = math.random(1, 100) < 51 and "Y" or "X"
end
local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "")
if megasConf[megaName] and not isMega(cid) then
if megasConf[megaName].wildChance >= chance then
setPlayerStorageValue(cid, storages.isMegaID, megaID)
doTransformMega(cid)
end
end
end
function getMegaID(cid)
return getPlayerStorageValue(cid, storages.isMegaID) ~= -1 and getPlayerStorageValue(cid, storages.isMegaID) or ""
end
function checkOutfitMega(cid, megaName)
if not isCreature(cid) or not isMega(cid) then return true end
local name = doCorrectString(getCreatureName(cid))
if not megasConf[megaName] then return true end
if getCreatureOutfit(cid).lookType ~= megasConf[megaName].out then
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1)
end
addEvent(checkOutfitMega, 50, cid)
end
function doPantinOutfit(cid, times, megaName)
if not isCreature(cid) or not isMega(cid) then return true end
if getCreatureOutfit(cid).lookType == 1875 or getCreatureOutfit(cid).lookType == 2 then return true end
local name = doCorrectString(getCreatureName(cid))
if not megasConf[megaName] then return true end
local outfitIndex = 1
if times <= 100 then
outfitIndex = 1
elseif times > 100 and times <= 200 then
outfitIndex = 2
elseif times > 200 and times <= 300 then
outfitIndex = 3
end
doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out[outfitIndex]}, -1)
times = times + 50
if times > 300 then
times = 0
end
addEvent(doPantinOutfit, 50, cid, times, megaName)
end
Espero que possam me ajudar, logo postarei uma base que modifiquei e balanceei com muita dedicação!
Link para o comentário
https://xtibia.com/forum/topic/253688-bug-na-mega-evolu%C3%A7%C3%A3o/Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados