Ir para conteúdo
  • 0

Mega DarkxPoke


andrefelphes

Pergunta

7 respostass a esta questão

Posts Recomendados

  • 0
13 minutos atrás, joaopera disse:

Vou tentar te ajudar, não sou scripter, mais vou tentar posta o creaturescripts/spawn.lua

local shinysName = {
"Snorlax", "Blastoise", "Venusaur", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Gengar", "Krabby", "Tauros", 
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Meganium", "Alakazam", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode",
"Caterpie", "Metapod", "Charmander", "Charmeleon", "Clefairy", "Clefable", "Cloyster", "Dewgong", "Doduo", "Drowzee", "Dugtrio", "Exeggcute", "Exeggutor", "Gastly", "Geodude", "Gloom", "Golduck", "Graveler", "Haunter", "Jigglypuff",
"Koffing", "Licktung", "Machoke", "Machop", "Magnemite", "Mankey", "Meowth", "Nidoria", "Nidorino", "Pidgeotto", "Poliwag", "Poliwhirl", "Poliwrath", "Ponyta", "Psyduck", "Slowbro", "Slowpoke", "Spearow", 
"Staryu", "Victreebel", "Vulpix", "Wartortle", "Wigglytuff", "Starmie" ,"Pikachu" ,"Weepinbell" ,"Bulbasaur" ,"Chansey" ,"Cleffa" ,"Elekid" ,"Cloyster" ,"Shellder" ,"Seel" , "Dugtrio", "Ekans", "magikarp", "Farfetch'd",
"Ivysaur", "Kakuna", "Lickitung", "Rapidash", "Rhyhorn", "Sandshrew", "Sandslash", "Seaking", "Squirtle", "Onix", "Arbok", "Ninetales", "Absol", "Ludicolo", "Flygon", "Slaking", "Swellow", "Tropius", "Sceptile", "Zangoose", "Swampert", "Hariyama", "Mr. Mime",
"Dratini", "Dragonair", "Rhydon", "Umbreon", "Espeon", "Rhydon", "Stantler", "Ariados", "Slowking", "Skarmory", "Ursaring", "Scizor", "Lapras", "Wobbuffet", "Misdreavus", "Heracross", "Gyarados", "Kingdra", "Magneton", "Steelix", "Sudowoodo",
"Tyranitar", "Girafarig"}

function onSpawn(cid)
    if getCreatureName(cid) == "" or getCreatureName(cid) == nil then
       setPlayerStorageValue(cid, 510, getCreatureNick(cid))
    end
    
    
    
    --if isTwoGerenetion(doCorrectString(getCreatureName(cid))) then doRemoveCreature(cid) return false end
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "WildAttack")
    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "Matou")
    registerCreatureEvent(cid, "PokeWalk")
    registerCreatureEvent(cid, "StatsChange")
    
    if not ehMonstro(cid) then
        registerCreatureEvent(cid, "Target")
        registerCreatureEvent(cid, "Matou")
        registerCreatureEvent(cid, "SummonDeath")
        getPokeDistanceToTeleport(cid)
        setPokemonGhost(cid)
        if getCreatureName(cid):find("Shiny ") then
           setPlayerStorageValue(cid, storages.EhShiny, 1)
        end
    return true
    end
    
    addEvent(doShiny, 5, cid)
    addEvent(adjustWildPoke, 5, cid)
    setPokemonGhost(cid)
    doMarkedPos(cid, getThingPos(cid))
    
       if isPokePassive(cid) then
          setPokemonPassive(cid, true)
       end

return true
end

function doShiny(cid)
    if isCreature(cid) then
           if isSummon(cid) then return true end
           if isNpcSummon(cid) then return true end
            local chance = 0
            if isInArray(shinysName, doCorrectString(getCreatureName(cid))) then  --alterado v1.9 \/
               chance = 5   --1% chance  
            end    
            local sid = cid
            if math.random(1, 500) <= chance then  
              doSendMagicEffect(getThingPos(cid), 18)               
              local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
              if not pokes[name] then return true end
              doRemoveCreature(cid)
              --print(name .. ", " .. retireShinyName(name))
              local shi = doCreateMonsterNick(sid, name, retireShinyName(name), pos, false)          
           end  
    else 
                                                               
    return true
    end
end

Link para o comentário
Compartilhar em outros sites

  • 0

Vou dar uma ajuda aqui... ja que tem mts caras perguntando isso... e parece que ninguem deu resposta ate agr...

entao vamos la na pasta data/lib e procura por o arquivo pokemon moves.lua

abre o arquivo e procura a funcao

function checkChenceToMega(cid)

 

embaixo você vai achar essa linha

local name, chance = doCorrectString(getCreatureName(cid)), math.random(1, 100)

despois é so trocar o valor (1, 100) para o chance que você quiser, pode ir testando ate deixa ao seu gosto

uma demostraçao para quem ainda nao entendeu, tem que deixar essa linha desse jeito:

local name, chance = doCorrectString(getCreatureName(cid)), math.random(100, 200)

como vocês podem olhar mudou o valor de (1, 100) para (100, 200) e logo assim o chance deles virar megas ira disminuir.

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...