nociam 90 Postado Junho 24, 2015 Share Postado Junho 24, 2015 (editado) ta funcionando. Editado Junho 24, 2015 por nociam Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657733 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Junho 24, 2015 Autor Share Postado Junho 24, 2015 (editado) @Fuuin Fake local NPCBattle = { ["Brock"] = {artig = "He is", cidbat = "Pewter"}, ["Misty"] = {artig = "She is", cidbat = "Cerulean"}, ["Blaine"] = {artig = "He is", cidbat = "Cinnabar"}, ["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado v1.9 \/ peguem tudo! ["Kira"] = {artig = "She is", cidbat = "Viridian"}, ["Koga"] = {artig = "He is", cidbat = "Fushcia"}, ["Erika"] = {artig = "She is", cidbat = "Celadon"}, ["Surge"] = {artig = "He is", cidbat = "Vermilion"}, } local shinys = { ["Shiny Abra"] = "Dark Abra", ["Shiny Onix"] = "Crystal Onix", ["Shiny Gyarados"] = "Red Gyarados", ["Shiny Charizard"] = "Elder Charizard", ["Shiny Venusaur"] = "Ancient Venusaur", ["Shiny Blastoise"] = "Ancient Blastoise", ["Shiny Farfetch'd"] = "Elite Farfetch'd", ["Shiny Hitmonlee"] = "Elite Hitmonlee", ["Shiny Himonchan"] = "Elite Hitmonchan", ["Shiny Snorlax"] = "Big Snorlax", } -- tabela adicionado ao configuration só procura por price = ..-- function onLook(cid, thing, position, lookDistance) local str = {} local iname = getItemInfo(thing.itemid) if not isCreature(thing.uid) then if not iname or not iname.name then return true end if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then --alterado aki local owner = getItemAttribute(thing.uid, "firstpoke") local pokename = getItemAttribute(thing.uid, "poke") unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") if shinys[pokename] then pokename = shinys[pokename] end local ballName = iname.name if getItemAttribute(thing.uid, 'ball') then ballName = getItemAttribute(thing.uid, 'ball').. " ball" end table.insert(str, "You see "..iname.article.." "..ballName..".") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end if lock and lock > 0 then table.insert(str, "\nIt will unlock in ".. os.date("%d/%m/%y %X", lock)..".") end table.insert(str, "\nContains "..getArticle(pokename).." "..pokename) if getItemAttribute(thing.uid, "nick") then table.insert(str, " ("..getItemAttribute(thing.uid, "nick")..")") end local boost = getItemAttribute(thing.uid, "boost") or 0 local extraInfo, megaStone = "", getItemAttribute(thing.uid, "megaStone") if megaStone then extraInfo = getItemNameById(megaStone) if pokename:find("Mega") then pokename = megaEvolutions[megaStone][1] end end if boost > 0 then table.insert(str, " +"..boost) end if prices[pokename] then table.insert(str, ". $Price: ".. prices[pokename].."") else table.insert(str, ". Price: unsellable") end table.insert(str, ".") if extraInfo ~= "" then table.insert(str, "\nIt's holding a(n) "..extraInfo..".") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then local name = iname.name name = string.gsub(name, "fainted ", "") name = string.gsub(name, "defeated ", "") name = doCorrectPokemonName(name) if shinys[name] then name = shinys[name] end name = "fainted "..name:lower() table.insert(str, "You see "..iname.article.." "..name..". ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end table.insert(str, "\n") if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ") table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ") table.insert(str, getItemAttribute(thing.uid, "attacker")..".") else table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") local pos = getThingPos(thing.uid) table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "unique") then local p = getThingPos(thing.uid) table.insert(str, "You see ") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") else table.insert(str, iname.article.." "..iname.name..".") end table.insert(str, " It's an unique item.\n"..iname.description) if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]") end sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false else return true end end local npcname = getCreatureName(thing.uid) if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if getPlayerStorageValue(thing.uid, 697548) ~= -1 then table.insert(str, getPlayerStorageValue(thing.uid, 697548)) local pos = getThingPos(thing.uid) if youAre[getPlayerGroupId(cid)] then table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs table.insert(str, "You see "..getCreatureName(thing.uid)..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if isPlayer(thing.uid) then --player doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false)) return false end if getCreatureName(thing.uid) == "Evolution" then return false end if not isSummon(thing.uid) then --monstros table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "It is male.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isSummon(thing.uid) and not isPlayer(thing.uid) then --summons local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0 if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".") if boostlevel > 0 then table.insert(str, "\nBoost level: +"..boostlevel..".") end table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".") end return false end return true end Editado Junho 24, 2015 por zipter98 Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657746 Compartilhar em outros sites More sharing options...
Lordbaxx 291 Postado Junho 24, 2015 Share Postado Junho 24, 2015 Funcionando perfeitamente, parabéns. @Zipter tem algum modo de falar com você privadamente? Abraço! Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657749 Compartilhar em outros sites More sharing options...
FlamesAdmin 261 Postado Junho 24, 2015 Share Postado Junho 24, 2015 Zipter, como eu faço para que o efeito saia em cima do poke(no meio dele) Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657753 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Junho 24, 2015 Autor Share Postado Junho 24, 2015 @Lordbaxx Uhum, manda PM. @FlamesAdmin Troque: doSendMagicEffect(getThingPos(cid), effect) por: doSendMagicEffect({x = getThingPos(cid).x + 1, y = getThingPos(cid).y + 1, z = getThingPos(cid).z}, effect) Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657758 Compartilhar em outros sites More sharing options...
Fuuin Fake 39 Postado Junho 24, 2015 Share Postado Junho 24, 2015 [24/06/2015 19:32:00] [Error - TalkAction Interface] [24/06/2015 19:32:00] data/talkactions/scripts/move1.lua:onSay [24/06/2015 19:32:00] Description: [24/06/2015 19:32:00] data/lib/newStatusSyst.lua:650: attempt to index field '?' (a nil value) [24/06/2015 19:32:00] stack traceback: [24/06/2015 19:32:00] data/lib/newStatusSyst.lua:650: in function 'doBuff2' [24/06/2015 19:32:00] data/lib/newStatusSyst.lua:683: in function 'doCondition2' [24/06/2015 19:32:00] data/lib/pokemon moves.lua:3203: in function 'docastspell' [24/06/2015 19:32:00] data/talkactions/scripts/move1.lua:200: in function <data/talkactions/scripts/move1.lua:20> Quer que eu coloque qual arquivo pra voce olhar? , eu usei a ancient fury do charizard normal , ou uso uma magia que criei nova da esse erro Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657760 Compartilhar em outros sites More sharing options...
FlamesAdmin 261 Postado Junho 24, 2015 Share Postado Junho 24, 2015 Coloque a outfit do Ancient Fury do Charizard em newStatusSys.lua local outFurys = { Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657761 Compartilhar em outros sites More sharing options...
Lordbaxx 291 Postado Junho 24, 2015 Share Postado Junho 24, 2015 @Lordbaxx Uhum, manda PM. @Tópic Só não irei utilizar esse porquê mesmo o meu tendo "menos" recursos, demorei pra conseguir rs' REP+ Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1657766 Compartilhar em outros sites More sharing options...
Luga03 332 Postado Junho 26, 2015 Share Postado Junho 26, 2015 Oi. Sistema escrito para PDA by Slicer, v1.9. Sua adaptação para outras bases, entretanto, pode ser bem simples. Para quem não conhece o sistema de mega evoluções, recomendo acessar este link. A diferença é que a pedra (mega stone) não ocupa o espaço de um Held Item tier Y (visto que não são todos os servidores que possuem Held Itens). data/lib: cooldown bar.lua: Troque o código da função getNewMoveTable(table, n) por este:function getNewMoveTable(table, n) if table == nil then return false end local moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9, table.move10, table.move11, table.move12} local returnValue = moves if n then returnValue = moves[n] end return returnValueendNo código da função doUpdateMoves(cid), troque o segundo: table.insert(ret, "n/n,") por: local mEvolveif not getCreatureName(summon):find("Mega") and getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") then if not isInArray(ret, "Mega Evolution,") then table.insert(ret, "Mega Evolution,") mEvolve = true endendif not mEvolve then table.insert(ret, "n/n,")end Depois, em pokemon moves.lua: Troque: min = getSpecialAttack(cid) * table.f * 0.1 --alterado v1.6 por: min = getSpecialAttack(cid) * (table and table.f or 0) * 0.1 --alterado v1.6 Código da spell: elseif spell == "Mega Evolution" then local effect = xxx --Efeito de mega evolução. if isSummon(cid) then local pid = getCreatureMaster(cid) if isPlayer(pid) then local ball = getPlayerSlotItem(pid, 8).uid if ball > 0 then local attr = getItemAttribute(ball, "megaStone") if attr and megaEvolutions[attr] then local oldPosition, oldLookdir = getThingPos(cid), getCreatureLookDir(cid) doItemSetAttribute(ball, "poke", megaEvolutions[attr][2]) doSendMagicEffect(getThingPos(cid), effect) doRemoveCreature(cid) doSummonMonster(pid, megaEvolutions[attr][2]) local newPoke = getCreatureSummons(pid)[1] doTeleportThing(newPoke, oldPosition, false) doCreatureSetLookDir(newPoke, oldLookdir) adjustStatus(newPoke, ball, true, false) if useKpdoDlls then addEvent(doUpdateMoves, 5, pid) end end end end end Depois, em configuration.lua: megaEvolutions = { --[itemid] = {"poke_name", "mega_evolution"}, [11638] = {"Charizard", "Mega Charizard X"}, [11639] = {"Charizard", "Mega Charizard Y"},} Agora, em data/actions/scripts, código da mega stone: function onUse(cid, item) local mEvolution, ball = megaEvolutions[item.itemid], getPlayerSlotItem(cid, 8).uid if not mEvolution then return doPlayerSendCancel(cid, "Sorry, this isn't a mega stone.") elseif ball < 1 then return doPlayerSendCancel(cid, "Put a pokeball in the pokeball slot.") elseif #getCreatureSummons(cid) > 0 then return doPlayerSendCancel(cid, "Return your pokemon.") elseif getItemAttribute(ball, "poke") ~= mEvolution[1] then return doPlayerSendCancel(cid, "Put a pokeball with a(n) "..mEvolution[1].." in the pokeball slot.") elseif getItemAttribute(ball, "megaStone") then return doPlayerSendCancel(cid, "Your pokemon is already holding a mega stone.") end doItemSetAttribute(ball, "megaStone", item.itemid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Now your "..getItemAttribute(ball, "poke").." is holding a(n) "..getItemNameById(item.itemid)..".") doRemoveItem(item.uid) return trueend Depois, em goback.lua: Abaixo de: if not pokes[pokemon] then return trueend coloque: if pokemon:find("Mega") then local normalPoke = megaEvolutions[getItemAttribute(item.uid, "megaStone")][1] if normalPoke then doItemSetAttribute(item.uid, "poke", normalPoke) pokemon = normalPoke end end Depois, em data/creaturescripts/scripts, look.lua: Abaixo de: local boost = getItemAttribute(thing.uid, "boost") or 0 coloque: local extraInfo, megaStone = "", getItemAttribute(thing.uid, "megaStone")if megaStone then extraInfo = getItemNameById(megaStone) if pokename:find("Mega") then pokename = megaEvolutions[megaStone][1] endend Depois, acima do primeiro: doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) coloque: if extraInfo ~= "" then table.insert(str, "\nIt's holding a(n) "..extraInfo..".")end Já em data/talkactions/scripts, move1.lua: Abaixo de: function doAlertReady(cid, id, movename, n, cd) coloque: if movename == "Mega Evolution" then return true end Troque: if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end por: if not move then local isMega = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") if not isMega or name:find("Mega") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local moveTable, index = getNewMoveTable(movestable[name]), 0 for i = 1, 12 do if not moveTable then index = i break end end if tonumber(it) ~= index then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local needCds = true --Coloque false se o pokémon puder mega evoluir mesmo com spells em cooldown. if needCds then for i = 1, 12 do if getCD(getPlayerSlotItem(cid, 8).uid, "move"..i) > 0 then return doPlayerSendCancel(cid, "To mega evolve, all the spells of your pokemon need to be ready.") end end end move = {name = "Mega Evolution", level = 0, cd = 0, dist = 1, target = 0, f = 0, t = "?"} end E troque: doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) por: local spellMessage = msgs[math.random(#msgs)]..""..move.name.."!"if move.name == "Mega Evolution" then spellMessage = "Mega Evolve!"enddoCreatureSay(cid, getPokeName(mypoke)..", "..spellMessage, TALKTYPE_SAY) Se quiser que o "Mega" não apareça no nome do pokémon, vá em data/lib, level system.lua: Acima de: if getItemAttribute(item, "nick") then nick = getItemAttribute(item, "nick")end coloque: if nick:find("Mega") then nick = nick:match("Mega (.*)") if not pokes[nick] then nick = nick:explode(" ")[1] end end E, caso o seu servidor possua pokémons evoluídos permanentemente na forma mega, em data/actions/scripts, goback.lua: Troque: if pokemon:find("Mega") then local normalPoke = megaEvolutions[getItemAttribute(item.uid, "megaStone")][1] if normalPoke then doItemSetAttribute(item.uid, "poke", normalPoke) pokemon = normalPoke end end por: if pokemon:find("Mega") then local normalPoke = megaEvolutions[getItemAttribute(item.uid, "megaStone")][1] if not normalPoke then local megaStone for itemid, table in pairs(megaEvolutions) do if table[2] == pokemon then megaStone = itemid break end end if not megaStone then return doPlayerSendTextMessage(cid, 27, "Your pokemon is bugged. Please, talk to the administrator.") end doItemSetAttribute(item.uid, "megaStone", megaStone) normalPoke = megaEvolutions[megaStone][1] end doItemSetAttribute(item.uid, "poke", normalPoke) pokemon = normalPoke endCaso queiram que cada mega evolução tenha um clan específico: Em move1.lua, acima de: move = {name = "Mega Evolution", level = 0, cd = 0, dist = 1, target = 0, f = 0, t = "?"}coloque: local megaEvoClans = { --[mega_stone_id] = "clan_name", [91912] = "Volcanic", [91913] = "Seavell", --etc,}if megaEvoClans[isMega] then if getPlayerClanName(cid) ~= megaEvoClans[isMega] then return doPlayerSendCancel(cid, "You can't mega evolve this pokemon.") endend Bem, é isso aí. Acho que não esqueci de nada. Até mais. Zipter98! Acabei de me deparar com um problema com o meu server com este sistema! quando eu adiciono a stone na pokeball e vou transformar ele na forma mega, ele da este erro: [26/06/2015 18:05:05] [Error - TalkAction Interface] [26/06/2015 18:05:05] data/talkactions/scripts/move1.lua:onSay [26/06/2015 18:05:05] Description: [26/06/2015 18:05:05] data/lib/pokemon moves.lua:180: attempt to index local 'table' (a nil value) [26/06/2015 18:05:05] stack traceback: [26/06/2015 18:05:05] data/lib/pokemon moves.lua:180: in function 'docastspell' [26/06/2015 18:05:05] data/talkactions/scripts/move1.lua:245: in function <data/talkactions/scripts/move1.lua:20> mas quando eu adiciono direto no configuration.lua, quando o poke não esta com a mega stone, o player fala "NOMEDOPOKE, Mega Evolve" algo assim, e não acontece nada! mas quando esta configurado no configuration.lua e esta com a mega stone no poke, ele se transforma 100%! Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658067 Compartilhar em outros sites More sharing options...
Taiger 286 Postado Junho 27, 2015 Share Postado Junho 27, 2015 @zipter Meu cooldown bar.lua tem o sistema do smeargle, tem como voce adaptar para mim? function doUpdateMoves(cid) if not isCreature(cid) then return true end local summon = getCreatureSummons(cid)[1] local ret = {} table.insert(ret, "12&,") if not summon then for a = 1, 12 do table.insert(ret, "n/n,") end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) return true end if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = getCreatureNameWithProtect(summon) == "Smeargle" and getSmeargleMoveTable(cid) or movestable[getCreatureNameWithProtect(summon)] end for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then table.insert(ret, (b.name:find("Sketch") and "Sketch" or b.name)..",") else table.insert(ret, "n/n,") end end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) end Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658112 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Junho 27, 2015 Autor Share Postado Junho 27, 2015 (editado) @Zet0N0Murmurouu Se possível, poste a linha 180 de pokemon moves.lua. PS: Você seguiu todos os passos corretamente, certo? @Taiger function doUpdateMoves(cid) if not isCreature(cid) then return true end local summon = getCreatureSummons(cid)[1] local ret = {} table.insert(ret, "12&,") if not summon then for a = 1, 12 do table.insert(ret, "n/n,") end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) return true end if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = getCreatureNameWithProtect(summon) == "Smeargle" and getSmeargleMoveTable(cid) or movestable[getCreatureNameWithProtect(summon)] end for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then table.insert(ret, (b.name:find("Sketch") and "Sketch" or b.name)..",") else local mEvolve if not getCreatureName(summon):find("Mega") and getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") then if not isInArray(ret, "Mega Evolution,") then table.insert(ret, "Mega Evolution,") mEvolve = true end end if not mEvolve then table.insert(ret, "n/n,") end end end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) end Editado Junho 27, 2015 por zipter98 Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658113 Compartilhar em outros sites More sharing options...
Taiger 286 Postado Junho 27, 2015 Share Postado Junho 27, 2015 (editado) Funcionou só que agora aparece uns erros na distro. [27/06/2015 00:39:32] Error trying to use move Mega Evolution, move not specified in the pokemon table. [27/06/2015 00:39:32] [Error - TalkAction Interface] [27/06/2015 00:39:32] data/talkactions/scripts/move1.lua:onSay [27/06/2015 00:39:32] Description: [27/06/2015 00:39:32] (luaGetCreatureStorage) Creature not found [27/06/2015 00:39:32] [Error - TalkAction Interface] [27/06/2015 00:39:32] data/talkactions/scripts/move1.lua:onSay [27/06/2015 00:39:32] Description: [27/06/2015 00:39:32] data/lib/pokemon moves.lua:192: attempt to compare number with boolean [27/06/2015 00:39:32] stack traceback: [27/06/2015 00:39:32] data/lib/pokemon moves.lua:192: in function 'docastspell' [27/06/2015 00:39:32] data/talkactions/scripts/move1.lua:253: in function <data/talkactions/scripts/move1.lua:22> E tipow, depois que ele se transforma em mega, ainda continua aparecendo o cd do mega evolution. Não esta destransformando no goback, ele buga e nao da para colocalo no slot de poke novamente. Editado Junho 27, 2015 por Taiger Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658117 Compartilhar em outros sites More sharing options...
Luga03 332 Postado Junho 27, 2015 Share Postado Junho 27, 2015 @Zet0N0Murmurouu Se possível, poste a linha 180 de pokemon moves.lua. PS: Você seguiu todos os passos corretamente, certo? @Taiger function doUpdateMoves(cid) if not isCreature(cid) then return true end local summon = getCreatureSummons(cid)[1] local ret = {} table.insert(ret, "12&,") if not summon then for a = 1, 12 do table.insert(ret, "n/n,") end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) return true end if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = getCreatureNameWithProtect(summon) == "Smeargle" and getSmeargleMoveTable(cid) or movestable[getCreatureNameWithProtect(summon)] end for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then table.insert(ret, (b.name:find("Sketch") and "Sketch" or b.name)..",") else local mEvolve if not getCreatureName(summon):find("Mega") and getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") then if not isInArray(ret, "Mega Evolution,") then table.insert(ret, "Mega Evolution,") mEvolve = true end end if not mEvolve then table.insert(ret, "n/n,") end end end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) end Man eu fiz e refiz este tutorial 2 vezes! linha 180: if table.t == "fighting" then --alterado v2.6 Funcionou só que agora aparece uns erros na distro. [27/06/2015 00:39:32] Error trying to use move Mega Evolution, move not specified in the pokemon table. [27/06/2015 00:39:32] [Error - TalkAction Interface] [27/06/2015 00:39:32] data/talkactions/scripts/move1.lua:onSay [27/06/2015 00:39:32] Description: [27/06/2015 00:39:32] (luaGetCreatureStorage) Creature not found [27/06/2015 00:39:32] [Error - TalkAction Interface] [27/06/2015 00:39:32] data/talkactions/scripts/move1.lua:onSay [27/06/2015 00:39:32] Description: [27/06/2015 00:39:32] data/lib/pokemon moves.lua:192: attempt to compare number with boolean [27/06/2015 00:39:32] stack traceback: [27/06/2015 00:39:32] data/lib/pokemon moves.lua:192: in function 'docastspell' [27/06/2015 00:39:32] data/talkactions/scripts/move1.lua:253: in function <data/talkactions/scripts/move1.lua:22> E tipow, depois que ele se transforma em mega, ainda continua aparecendo o cd do mega evolution. Não esta destransformando no goback, ele buga e nao da para colocalo no slot de poke novamente. acontece a msm coisa aq tbm! Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658118 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Junho 27, 2015 Autor Share Postado Junho 27, 2015 Quais bases vocês estão utilizando? Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658119 Compartilhar em outros sites More sharing options...
Taiger 286 Postado Junho 27, 2015 Share Postado Junho 27, 2015 (editado) Eu uso pda 1.9, só que tenho muitos sistemas adicionados ja. @edit o Problema do move nao sumir resolvi, mais ele buga o goback, se tiver transformado em mega e voltar ele e tirar do slot nao da mais para colocalo la, mais se nao tirar do slot e soltar ele umas 2 veses ele volta ao pokemon normal. Editado Junho 27, 2015 por Taiger Link para o comentário https://xtibia.com/forum/topic/235005-mega-evolution-system-pxg/page/2/#findComment-1658120 Compartilhar em outros sites More sharing options...
Posts Recomendados