The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Hide Trainer Sprite after Battle and YES/NO Battle script HELP

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 25th, 2020 (11:40 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Hello,😄
I am new to Rom Hacking and need some help with scripting.
Anyone know how to script that a Trainer sprite dissapears after Battle and saying something?
Also how to script a Yes or No Trainer Battle?
Any help would be appreciated.

(This is my first thread ever created so pls point out if I did anything wrong)
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old October 25th, 2020 (2:46 PM). Edited October 25th, 2020 by mcferaligatr.
mcferaligatr's Avatar
mcferaligatr mcferaligatr is offline
 
Join Date: Nov 2018
Posts: 120
To create a yes/no battle script you could use something like this:

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @Talk 0x5 '----------------- A type 0x5 message box is a Yes/No one, and here we are asked if we want to battle.
compare lastresult 0x1 '----------------- Comparing if we chose yes or no.
if 0x1 goto @Battle '----------------- If we chose yes go to battle, else, say that we can't.
msgbox @CantBattle 0x6
release
end

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

#org @Battle '----------------- The script goes here if we say yes
trainerbattle 0x0 0x1 0x0 @Challenge @Defeat
hidesprite 0x1 '----------------- hidesprite is used to hide person events, and if your person event number is one, you write 0x1, if it's two, you'll
setflag 0x205 '----------------- use 0x2 and so on. Setflag is used to permanently hide the NPC from the map, and you need to associate a
release '----------------- number to it, and here I used flag 0x205. You can use a safe flag value from 0x200 to 0x2FF and you'll have to
end '----------------- place this number in the person ID box in Advance Map.

'----------------- Below is the code for all the text that's displayed with message boxes.

#org @Talk
= Hi there!, do you perhaps want to\nbattle?

#org @CantBattle
= Ok, I guess you don't want to.

#org @Challenge
= Okay, let's go!

#org @Defeat
= Wow, you defeated me?

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

I used ('-----------------) to write comments in the code, and it is not necessary for the code to work.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old October 26th, 2020 (8:55 AM). Edited October 26th, 2020 by AJaxs.
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Thanks, you have helped me a lot with this.
Much appreciated :D
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.