Random Pokemon, Eggs & Items through Events

KingCharizard

C++ Developer Extraordinaire
  • 1,229
    Posts
    15
    Years
    Welcome to king charizard's Video Tutorial.​

    Below is a video on how to make an NPC give the player random eggs, pokemon, items and even make your NPC's say more...​


    For some reason I cant embed the video can anyone tell me why I cant.

    -Scripts for Random Eggs-

    Conditional Branch: Variable [050: Random Egg] == 0
    Conditional Branch: Script: $Trainer.party.length>=6 <- Checks to see if you have 6 pokemon
    Text: You have no room to store the Egg...
    Else
    Script: Kernel.pbGenerateEgg(001,5)
    Text: Received a Pokémon Egg.
    Branch End

    Else

    Branch End


    -Scripts to add random pokemon-

    Conditional Branch: Variable [050: Random Pokemon] == 0
    Conditional Branch: Script: $Trainer.party.length>=6 <- Checks to see if you have 6 pokemon
    Text: You have no room to store the pokemon...
    Else
    Script: pbAddPokemon(001,5)
    Text: Received a Pokémon.
    Branch End


    Else

    Branch End

    -Scripts to add random items-

    Conditional Branch: Variable [050: Random Item] == 0
    Conditional Branch: Script: $PokemonBag.pbStoreItem(::PBItems::POTION)
    Text: The item was added
    Else
    Text: The item couldn't be added
    Branch End

    Else

    Branch End
    _____________________________________________
    Green = Scripts
    Blue = Built in events
    Black = Text of your choosing

    Search the PBS txt file called pokemon for the pokemon ID# you want.
    Search the PBS txt file called item for the item name you want.
    Also read the notes on how to add more items & pokemon.

    If you follow the video perfect you shouldn't have any problems!
    If you are having problems feel free to PM me!

    Dont PM me saying i did everything you said in your video and it still doesn't work cause you didn't do everything i've said if you did it would work. Try to show me where u think the problem is or send me the error's you were prompted with.



     
    Last edited:
    Good tutorial! Now I can make an Event in my new game with a random egg.

    Is there a way so that the egg will be random from a set? Such as a random egg that could only be Dialga, Palkia or Giratina?

    If that is you speaking the the video, your voice is awesome!
     
    Good tutorial! Now I can make an Event in my new game with a random egg.

    Is there a way so that the egg will be random from a set? Such as a random egg that could only be Dialga, Palkia or Giratina?

    If that is you speaking the the video, your voice is awesome!
    You can do that without anything mentioned in this tutorial. Rather than have that first conditional branch involving variable 50, replace it with "rnd(2)". This will randomly generate one of the numbers 0, 1 or 2. Make a conditional branch which looks at what this number is, and generate a different specific egg depending on the number.
     
    You can do that without anything mentioned in this tutorial. Rather than have that first conditional branch involving variable 50, replace it with "rnd(2)". This will randomly generate one of the numbers 0, 1 or 2. Make a conditional branch which looks at what this number is, and generate a different specific egg depending on the number.

    Yeah, I just made this a very basic tutorial... Its not ment to be anything other than working & simple.
     
    Help me please,
    i've it but wont work
    how to let him give your first pokemon?
    (numbr:147)
    can u help?
     
    Nice tutorial. Too bad I already knew this... XD
     
    KingCharizard, where did you get the Kimono Girl sprite?
     
    Back
    Top