• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Random Egg Generator

Resource Random Egg Generator N/A

TechSkylander1518 submitted a new resource:

Random Egg Generator - Gives an egg that can hatch into any species in the game, allowing players to obtain all Pokemon

Quick, simple script that generates an egg that can hatch into any species in the PokeDex. (If you're needing the Galar mons, check out the Gen 8 Project)

Paste in a new script section above main:
Ruby:
RANDOMSTEPS = 10000

def pbGenerateRandEgg(text = "")
  return false if $Trainer.party_full?
  pool = []
  GameData::Species.each { |species| pool.push(species.id) if species.form == 0 }
  pkmn = pool[rand(0,pool.length)]
  pkmn =...

Read more about this resource...
 

tyssonpark

Novice
Member
Joined
Nov 13, 2021
Posts
23
Hi friend, i have this old script (from 2012) in this script is blocked evolved pokemon and legendary, we can use this in your script? (this old script dont work in essentials 19.1)

#===============================================================================
# * Random Egg Generator - by FL (Credits will be apreciated)
#===============================================================================
#
# This script is for Pokémon Essentials. It random generates an egg with all
# possible pokémon that can hatch from an eggs (excluding some species like
# Ditto, Mewtwo and Unown) with same probability.
#
#===============================================================================
#
# To this scripts works, put it above main and use in script command
# 'randomEggGenerator'. This only gives to player an egg if the player has
# a empty party slot. You can also calls the method with an array with the
# exceptions that cannot be random generated. Example:
# randomEggGenerator(PBSpecies::DRATINI,PBSpecies::LARVITAR) won't generates
# Dratini or Larvitar.
#
# This script also doesn't generate eggs for pokémon than can incense breed
# like Marill, but generate for pokémon than are incense babies like Azurill.
# If you wish to enable the both cases in eggs, both counting as different
# pokémon call the script using 'randomEggGenerator([],true)'.
#
#===============================================================================

def randomEggGenerator(exceptions=[],enableIncenseEvos=false)
# Phione and Manaphy are always exceptions
exceptions+=[PBSpecies::PHIONE,PBSpecies::MANAPHY]
if $Trainer.party.length>=6
Kernel.pbMessage(_INTL(
"I'm sorry, but it would seem that you can't carry any more Pokemon."))
else
species=0
while(species==0)
species=rand(PBSpecies.maxValue)+1
# Redo the loop if the species can't be in an egg, is an exceptions or
# is an evolution (only if enableIncenseEvos=false)
species=0 if (!pbHasEgg?(species) || exceptions.include?(species) ||
(!enableIncenseEvos && pbGetPreviousForm(species)!=species))
end
pbGenerateEgg(species)
Kernel.pbMessage(
_INTL("{1} received the Egg!\\se[itemlevel]\1",$Trainer.name))
end
end
 
Hi friend, i have this old script (from 2012) in this script is blocked evolved pokemon and legendary, we can use this in your script? (this old script dont work in essentials 19.1)
This was really more of a gag resource I made for people insisting that games should have every Pokemon in them- since the point was just to include every Pokemon, I didn't bother with any blacklist or anything. I linked to two other resources at the bottom that are made more for that purpose - ThatWelshOne_'s Random Pokemon Selector has both the features you're looking for.
 

tyssonpark

Novice
Member
Joined
Nov 13, 2021
Posts
23
This was really more of a gag resource I made for people insisting that games should have every Pokemon in them- since the point was just to include every Pokemon, I didn't bother with any blacklist or anything. I linked to two other resources at the bottom that are made more for that purpose - ThatWelshOne_'s Random Pokemon Selector has both the features you're looking for.
Ya, Im using both, your script and the random generator now. for diferents circunstances, unfortunaly i realy needs egg, but you two help me alot, TY so much
 

tyssonpark

Novice
Member
Joined
Nov 13, 2021
Posts
23
like this?

pkmn = pbGenerateEgg(
whiteList=nil,
blackList="suggested",
addList=nil,
base_only=true,
use_gen=nil)
 
like this?

pkmn = pbGenerateEgg(
whiteList=nil,
blackList="suggested",
addList=nil,
base_only=true,
use_gen=nil)
No. I told you to use pbChooseRandomPokemon, remember? You're not using it anywhere here. Look at Welsh's example-
1644999705834.png

pbChooseRandomPokemon gets the species, and then you use that variable in another script. pbGenerateEgg just needs the species, so you'd do

Ruby:
pkmn = pbChooseRandomPokemon
pbGenerateEgg(pkmn)
 

tyssonpark

Novice
Member
Joined
Nov 13, 2021
Posts
23
TY, this work, but still comming legendary pokemon.......................... i will comment in the post of the script for help :D ty so much bro

1645027698617.png
 
Back
Top