• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Let Rockruff change form via Sun, Dusk or Moon Stone (pbCheckEvolution)

  • 5
    Posts
    5
    Years
    • Seen Jan 17, 2024
    So somehow, I have broken the evolution scripts, so now, pbCheckEvolution is undefined, so none of my evolutions work. Here is the code that is messed up somehow.

    Code:
    ef pbCheckEvolution(pokemon,item=0)
      if item==0
        return pbCheckEvolutionEx(pokemon){|pokemon,evonib,level,poke|
          next pbMiniCheckEvolution(pokemon,evonib,level,poke)
          }
        end
      else
        return pbCheckEvolutionEx(pokemon){|pokemon,evonib,level,poke|
          next pbMiniCheckEvolutionItem(pokemon,evonib,level,poke,item)
          }
        end
      end
    end

    Please help me fix this.
     
    So somehow, I have broken the evolution scripts, so now, pbCheckEvolution is undefined, so none of my evolutions work. Here is the code that is messed up somehow.

    Code:
    ef pbCheckEvolution(pokemon,item=0)
      if item==0
        return pbCheckEvolutionEx(pokemon){|pokemon,evonib,level,poke|
          next pbMiniCheckEvolution(pokemon,evonib,level,poke)
          }
        end
      else
        return pbCheckEvolutionEx(pokemon){|pokemon,evonib,level,poke|
          next pbMiniCheckEvolutionItem(pokemon,evonib,level,poke,item)
          }
        end
      end
    end

    Please help me fix this.

    There's my code:
    Spoiler:

    Seems that you deleted some "d" of def and added 2 "end" after the "}".
     
    When I copy the code into the script and attempt to run it, I get a syntax error for the last line. I'm thinking it may be a result of something earlier in the script, but I'm not sure. Would I be able to see the rest of the code for the Pokemon_Evolution section, so I can fix mine?
     
    Last edited:
    Ok, a bit more context may be needed. I've been trying to get Rockruff to be able to evolve into one of its forms using a Sun, Dusk or Moon stone. Here is the code I have for that section.
    Code:
    when PBEvolution::Item
        if level==item
          if isConst?(pokemon.species,PBSpecies,:ROCKRUFF) && $ItemData[item][ITEMID]==16 
            pokemon.form=1       
          end
          if isConst?(pokemon.species,PBSpecies,:ROCKRUFF) && $ItemData[item][ITEMID]==18 
            pokemon.form=2       
          end
          return poke
    But in the process of eventually getting to this, which I'm not even sure if it works, I have somehow broken something which prevents pbCheckEvolution from being defined, which breaks evolution stones. I cannot find the original code for the Pokemon_Evolutions section of the script anywhere online, so I need somebody to help me out and send it to me. Thank you in advance
     
    @OkayTokay, I've moved your thread over to the Pokémon Essentials section because the Scripts section is for posting threads that share new resources, whereas Essentials is for new help threads. :)

    Oh ok. I wasn't sure where to put it myself.
     
    Ok, a bit more context may be needed. I've been trying to get Rockruff to be able to evolve into one of its forms using a Sun, Dusk or Moon stone. Here is the code I have for that section.
    Code:
    when PBEvolution::Item
        if level==item
          if isConst?(pokemon.species,PBSpecies,:ROCKRUFF) && $ItemData[item][ITEMID]==16 
            pokemon.form=1       
          end
          if isConst?(pokemon.species,PBSpecies,:ROCKRUFF) && $ItemData[item][ITEMID]==18 
            pokemon.form=2       
          end
          return poke
    But in the process of eventually getting to this, which I'm not even sure if it works, I have somehow broken something which prevents pbCheckEvolution from being defined, which breaks evolution stones. I cannot find the original code for the Pokemon_Evolutions section of the script anywhere online, so I need somebody to help me out and send it to me. Thank you in advance

    Well, I have a Pokémon Essentials v17.2 without any modification, so it's original. Here it's the original code:

    Spoiler:

    I hope it helps.
     
    Ok, a bit more context may be needed. I've been trying to get Rockruff to be able to evolve into one of its forms using a Sun, Dusk or Moon stone. Here is the code I have for that section.
    Code:
    when PBEvolution::Item
        if level==item
          if isConst?(pokemon.species,PBSpecies,:ROCKRUFF) && $ItemData[item][ITEMID]==16 
            pokemon.form=1       
          end
          if isConst?(pokemon.species,PBSpecies,:ROCKRUFF) && $ItemData[item][ITEMID]==18 
            pokemon.form=2       
          end
          return poke
    But in the process of eventually getting to this, which I'm not even sure if it works, I have somehow broken something which prevents pbCheckEvolution from being defined, which breaks evolution stones. I cannot find the original code for the Pokemon_Evolutions section of the script anywhere online, so I need somebody to help me out and send it to me. Thank you in advance

    Your code is missing an end after the return.
     
    Back
    Top