View Single Post
  #3   Link to this post, but load the entire thread.  
Old July 29th, 2013 (3:24 PM).
Nickalooose Nickalooose is offline
    Join Date: Mar 2008
    Gender: Female
    Posts: 1,309
    For starters, changing the (species==0) to (species<=251), will never, ever, ever, ever, ever, get what you are looking for.

    Quick explanation on FL .'s script.

    def randomEggGenerator(exceptions=[],type=[],enableIncenseEvos=false)
      # Phione and Manaphy are always exceptions 
      exceptions+=[PBSpecies::PHIONE,PBSpecies::MANAPHY]  Is Pokémon you won't get within an egg.
      if $>=6
            "I'm sorry, but it would seem that you can't carry any more Pokemon.")) Means if you own 6 or more Pokémon in your team, you will NOT, get an egg.
        species=0 Will set species to equal 0, incase the script has run before I suppose.
        dexdata=pbOpenDexData Gets Pokémon info from pokemon.txt.
        while(species==0) (your guessed part to edit) means, for as long as species = 0, keep doing the next part.
          species=rand(PBSpecies.maxValue)+1 randoms what species will equal within your pokemon.txt.
          pbDexDataOffset(dexdata,species,8) will get the species name of the random'd Pokémon, i.e. Bulbasaur, Mew, Regirock, etc.
          type1=dexdata.fgetb Will recall that Pokémons type1.
          type2=dexdata.fgetb Will recall that Pokémons type2.
          # 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) || 
              (!type.empty? && !type.include?(type1) && !type.include?(type2)) ||
              (!enableIncenseEvos && pbGetPreviousForm(species)!=species))
        end Will set species to 0, if the random'd Pokémon equals any of these things...  Remember the while you wanted to edit...  Well it will replay from there.
        dexdata.close    Closes the use of pokemon.txt.
        pbGenerateEgg(species) Gives you your egg.
            _INTL("{1} received the Egg!\\se[itemlevel]\1",$
    end Shows message and ends generator.
    So yes, Harvey is correct, if you only have 251 Pokémon in your pokemon.txt, it will work nonetheless, if you have 9340 Pokémon in the pokemon.txt, then it will random up to 9340.

    Bottom line, don't edit that part you wanted to.
    Reply With Quote