The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Prof.Oak battles in seperate building with third not chosen Pokemon

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old October 27th, 2020 (6:53 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
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.👍
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old October 29th, 2020 (10:36 AM).
mcferaligatr's Avatar
mcferaligatr mcferaligatr is offline
 
Join Date: Nov 2018
Posts: 120
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.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old October 31st, 2020 (4:39 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Thanks for the Help.
I really appreciate it.
I wish you a wonderful Day.
And Thanks man.👍
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:16 AM.