• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Script] Prof.Oak battles in seperate building with third not chosen Pokemon

  • 15
    Posts
    3
    Years
    • Seen Jun 9, 2024
    Hello,😄
    I have an Idea I would like to implement, but I have don't know how and where to implement it.
    I would like to implement 2 Prof.Oak trainers battles (in a separate building).
    For the FIRST one I would like him to appear(Build an extra House for him)
    after receiving the Pokedex and then dissapear after the Battle, and he should have the 3 not chosen Pokemon for his Team.
    For the SECOND Battle I would want him to appear after becoming one becomes the League Champion, and
    once again dissapear after Battle and have the 3 not chosen Pokemon on his Team.
    It would also be nice to know how to make the 3 Pokeball in his Lab dissapear after the first battle with him.
    I know this is a lot, but I would really like to implement this in my ROM Hack.

    Any Help is appreciated.👍
     
  • 120
    Posts
    5
    Years
    • Seen Nov 2, 2023
    This is as simple as using hidesprite and setflag commands. If you want to make 2 Oak battles, you'd open up the preffered trainer editor and make 2 seperate teams for professor Oak. Below, I'll write a script in which a trainer (in this case the professor) is battled and then disappears. But I'll first make the player choose between 2 pokeballs and based on their choice the professor will have the other Pokemon (First script).

    #dynamic 0x800000
    #org @start
    lock

    msgbox @ChoseBulbasaur 0x5
    compare lastresult 0x1
    if 0x1 call @Bulbasaur

    msgbox @ChoseSquirtle 0x5
    compare lastresult 0x1
    if 0x1 call @Squirtle

    msgbox @NotYet 0x6

    release
    end

    '------------------------------

    #org @Bulbasaur
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0 '------------ This gives us a level 5 Bulbasaur with no items
    hidesprite 0x1 '------------ If the pokeball's person event number is 1
    setflag 0x201 '------------ If you put 201 as pokeball's person ID number (we set a flag so that the pokeball disappears forever and that professor
    return knows which pokemon we took so that he could chose the opposite pokemon)

    #org @Squirtle
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0 '------------ This gives us a level 5 Squirtle with no items
    hidesprite 0x2 '------------ If the pokeball's person event number is 2
    setflag 0x202 '------------ If you put 202 as pokeball's person ID number
    return

    '-----------------------------


    #org @ChoseBulbasaur
    = Take Bulbasaur?

    #org @ChoseSquirtle?
    = Take Squirtle?

    #org @NotYet
    = I should think more about\nthis...

    '-----------------------------

    #dynamic 0x800000
    #org @start

    checkflag 0x201 '------------- (Oak checks if we took Bulbasaur)
    compare lastresult 0x1
    if 0x1 goto @BulbasaurBattle

    checkflag 0x202 '------------- (Oak checks if we took Squirtle)
    compare lastresult 0x1
    if 0x1 goto @SquirtleBattle
    '--------------- If we still haven't picked the starter Pokemon, Oak just says Hi.
    lock
    faceplayer
    msgbox @hello 0x6
    release
    end

    '-------------------------

    #org @BulbasaurBattle
    lock
    faceplayer
    msgbox @t1 0x6
    trainerbattle 0x0 0x1 0x0 @challenge @defeat '----------- This initiates a trainer battle, 0x1 is the ID of a trainer you can find in a pokemon trainer editor
    '----------- tool, and for the trainer with the ID of 0x1, make his sprite be the professor and his team
    '----------- consist of only Bulbasaur, for the ID of 0x2, make the team be Squirtle only.

    hidesprite 0x1 '-------------- this command hides the professor, 0x1 is the person event number in Advance Map
    setflag 0x210 '-------------- this command permanently hides the professor. Safe values are from 0x200 to 0x2ff (if I recall correctly) and you write this
    release box in Advance Map in the person ID
    end

    '-------------------------

    #org @SquirtleBattle
    lock
    faceplayer
    msgbox @t1 0x6
    trainerbattle 0x0 0x2 0x0 @challenge @defeat
    hidesprite 0x1
    setflag 0x210
    release
    end

    '------------------------

    #org @t1
    = Hi there, [player]

    #org @challenge
    = Can you defeat me with\nthe Pokemon you just chose?

    #org @defeat
    = Impressive indeed.

    #org @hello
    = Hello [player], are you\nready to choose a Pokemon?

    '-----------------------

    This was a rather long post, but hopefully some things should be more clear now.
     
  • 15
    Posts
    3
    Years
    • Seen Jun 9, 2024
    Thanks for the Help.
    I really appreciate it.
    I wish you a wonderful Day.
    And Thanks man.👍
     
    Back
    Top