SO
pedido

[Pedido] Sistema de Evolução de Megas

Por SosFirexd, 21 de jun. de 2015 em Archived

11
1.7k
SosFirexdS
21 de junho de 2015 às 16:49

Eae galera estava precisando de um sistema que evolui os pokes normais para megas tipo o sistema da pxg.

 

Obrigado.

LordbaxxL
21 de junho de 2015 às 16:58
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

Luga03L
21 de junho de 2015 às 17:12

 

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?

LordbaxxL
22 de junho de 2015 às 00:19

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

Luga03L
22 de junho de 2015 às 10:04

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?

Wend llW
22 de junho de 2015 às 15:27

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 happy.png

LordbaxxL
22 de junho de 2015 às 16:03

Ele volta ao normal quando você dá goback amigo :D

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 por Lordbaxx

Wend llW
22 de junho de 2015 às 16:11

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
LordbaxxL
22 de junho de 2015 às 16:18

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 por Lordbaxx

Luga03L
22 de junho de 2015 às 19:58

 

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!

1 mês depois...
BrunoB
14 de julho de 2015 às 17:38

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.