SosFirexd 0 Postado Junho 21, 2015 Share Postado Junho 21, 2015 Eae galera estava precisando de um sistema que evolui os pokes normais para megas tipo o sistema da pxg. Obrigado. Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/ Compartilhar em outros sites More sharing options...
Lordbaxx 291 Postado Junho 21, 2015 Share Postado Junho 21, 2015 Bom uso! elseif spell == "Mega Evolution" then local megas = { ["Alakazam"] = {mega="Mega Alakazam", effect=18, outfit=1187}, ["Gengar"] = {mega="Mega Gengar", effect=18, outfit=1188}, ["Blastoise"] = {mega="Mega Blastoise", effect=18, outfit=1192}, ["Scizor"] = {mega="Mega Scizor", effect=18, outfit=1197}, ["Charizard"] = {mega="Mega Charizard", effect=18, outfit=1194}, ["Venusaur"] = {mega="Mega Venusaur", effect=18, outfit=1196}, ["Tyranitar"] = {mega="Mega Tyranitar", effect=18, outfit=1191}, ["Ampharos"] = {mega="Mega Ampharos", effect=18, outfit=1190}, ["Blaziken"] = {mega="Mega Blaziken", effect=18, outfit=1189}, ["Slowbro"] = {mega="Mega Slowbro", effect=18, outfit=1186}, ["Aerodactyl"] = {mega="Mega Aerodactyl", effect=18, outfit=1185}, ["Glalie"] = {mega="Mega Glalie", effect=18, outfit=1184}, ["Shiny Charizard"] = {mega="Mega Charizard X", effect=18, outfit=1193}, } if isSummon(cid) then sid = getCreatureMaster(cid) pos = getThingPos(cid) if getPlayerSlotItem(sid, 8).itemid == 0 then print(getPlayerSlotItem(sid, 8).itemid) return false end if megas[getCreatureName(cid)] then eff, name, outfit = megas[getCreatureName(cid)].effect, megas[getCreatureName(cid)].mega, megas[getCreatureName(cid)].outfit end if not isPlayer(sid) then return false end if getItemAttribute(getPlayerSlotItem(sid, 8).uid, "mega") then doItemEraseAttribute(getPlayerSlotItem(sid, 8).uid, "mega") else doItemSetAttribute(getPlayerSlotItem(sid, 8).uid, "mega", 1) 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 Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657263 Compartilhar em outros sites More sharing options...
Luga03 332 Postado Junho 21, 2015 Share Postado Junho 21, 2015 Bom uso! elseif spell == "Mega Evolution" then local megas = { ["Alakazam"] = {mega="Mega Alakazam", effect=18, outfit=1187}, ["Gengar"] = {mega="Mega Gengar", effect=18, outfit=1188}, ["Blastoise"] = {mega="Mega Blastoise", effect=18, outfit=1192}, ["Scizor"] = {mega="Mega Scizor", effect=18, outfit=1197}, ["Charizard"] = {mega="Mega Charizard", effect=18, outfit=1194}, ["Venusaur"] = {mega="Mega Venusaur", effect=18, outfit=1196}, ["Tyranitar"] = {mega="Mega Tyranitar", effect=18, outfit=1191}, ["Ampharos"] = {mega="Mega Ampharos", effect=18, outfit=1190}, ["Blaziken"] = {mega="Mega Blaziken", effect=18, outfit=1189}, ["Slowbro"] = {mega="Mega Slowbro", effect=18, outfit=1186}, ["Aerodactyl"] = {mega="Mega Aerodactyl", effect=18, outfit=1185}, ["Glalie"] = {mega="Mega Glalie", effect=18, outfit=1184}, ["Shiny Charizard"] = {mega="Mega Charizard X", effect=18, outfit=1193}, } if isSummon(cid) then sid = getCreatureMaster(cid) pos = getThingPos(cid) if getPlayerSlotItem(sid, 8).itemid == 0 then print(getPlayerSlotItem(sid, 8).itemid) return false end if megas[getCreatureName(cid)] then eff, name, outfit = megas[getCreatureName(cid)].effect, megas[getCreatureName(cid)].mega, megas[getCreatureName(cid)].outfit end if not isPlayer(sid) then return false end if getItemAttribute(getPlayerSlotItem(sid, 8).uid, "mega") then doItemEraseAttribute(getPlayerSlotItem(sid, 8).uid, "mega") else doItemSetAttribute(getPlayerSlotItem(sid, 8).uid, "mega", 1) 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 ele troca apenas a outfit ou muda a força do poke tbm? Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657264 Compartilhar em outros sites More sharing options...
Lordbaxx 291 Postado Junho 22, 2015 Share Postado Junho 22, 2015 Vai mudar tudo tipo um blastoise tem a tabela um mega blastoise tem que ter na tabela também. A script vai pegar "força, attack, habilidade" da tabela de balanceamento Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657300 Compartilhar em outros sites More sharing options...
Luga03 332 Postado Junho 22, 2015 Share Postado Junho 22, 2015 tendi, eu testei e funcionou! mas e para ele voltar ao normal, como é que fica?? ele volta sósinho por tempo?? se sim, por quanto tempo? Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657334 Compartilhar em outros sites More sharing options...
Wend ll 268 Postado Junho 22, 2015 Share Postado Junho 22, 2015 tendi, eu testei e funcionou! mas e para ele voltar ao normal, como é que fica?? ele volta sósinho por tempo?? se sim, por quanto tempo? Não volta ao normal, ele vai ficar como mega mesmo Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657391 Compartilhar em outros sites More sharing options...
Lordbaxx 291 Postado Junho 22, 2015 Share Postado Junho 22, 2015 (editado) Ele volta ao normal quando você dá goback amigo Ele copia os attr do pokemon exemplo Blastoise +50 ao transformar mantém o Boost e multiplica com os attr do mega blastoise! Editado Junho 22, 2015 por Lordbaxx Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657398 Compartilhar em outros sites More sharing options...
Wend ll 268 Postado Junho 22, 2015 Share Postado Junho 22, 2015 Fiz uma spell dessa a um tempo local evolutions = { --["Pokemon_name"] = "Evolution_name", ["Dark Abra"] = "Light Abra", } function onCastSpell(cid, var) if #getCreatureSummons(cid) > 0 then local poke = getCreatureSummons(cid)[1] if evolutions[getCreatureName(poke)] then local position, lookDir, pokeName = getThingPos(poke), getCreatureLookDirection(poke), getCreatureName(poke) doPlayerSendTextMessage(cid, 27, "Your "..pokeName.." transformed into a "..evolutions[pokeName].."!") doRemoveCreature(poke) doSummonMonster(cid, evolutions[pokeName]) local newPoke = getCreatureSummons(cid)[1] doTeleportThing(newPoke, position) doCreatureSetLookDir(newPoke, lookDir) adjustStatus(newPoke, getPlayerSlotItem(cid, 8).uid, true, false) else return doPlayerSendCancel(cid, "This pokemon can't transform.") end else return doPlayerSendCancel(cid, "You do not have summons.") end if useKpdoDlls then doUpdateMoves(cid) local posi = getThingPosWithDebug(newPoke, position) posi.x = posi.x+1 posi.y = posi.y+1 doSendMagicEffect(posi, 250) end return true end Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657401 Compartilhar em outros sites More sharing options...
Lordbaxx 291 Postado Junho 22, 2015 Share Postado Junho 22, 2015 (editado) Ah eu ia esquecendo para ele "destransformar" quando dar goback coloque isso em goback.lua if getItemAttribute(item.uid, "mega") then doItemEraseAttribute(item.uid, "mega") doReturnMega(item.uid) end Editado Junho 22, 2015 por Lordbaxx Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657402 Compartilhar em outros sites More sharing options...
Luga03 332 Postado Junho 22, 2015 Share Postado Junho 22, 2015 Ah eu ia esquecendo para ele "destransformar" quando dar goback coloque isso em goback.lua if getItemAttribute(item.uid, "mega") then doItemEraseAttribute(item.uid, "mega") doReturnMega(item.uid) end Man isto também seria bom, mas também seria legal coloca para caso o player resolver ficar com ele por um tempo, tipo ele fica transformado por 2 min, ai dps disto ele se destransoforma sósinho! Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1657446 Compartilhar em outros sites More sharing options...
Bruno 536 Postado Julho 14, 2015 Share Postado Julho 14, 2015 O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe. Link para o comentário https://xtibia.com/forum/topic/234957-pedido-sistema-de-evolu%C3%A7%C3%A3o-de-megas/#findComment-1660145 Compartilhar em outros sites More sharing options...
Posts Recomendados