The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other How to return to Where the Script Left Off?

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 July 30th, 2015 (2:43 PM).
Sayuri's Avatar
Sayuri Sayuri is offline
人生忘れられた
 
Join Date: Jun 2015
Location: Boston, MA
Age: 24
Gender: Female
Nature: Lonely
Posts: 276
I'm using Fire Red as my base hack and I know this is probably an easy question, but how would I use return to continue executing the script where it left off? When I used it in this script, it just restarts the whole thing.

My script is as follows:
Spoiler:

#org 0x8023CE
lock
applymovement MOVE_PLAYER 0x88018FA
waitmovement 0x0
applymovement 0x8 0x8801903
waitmovement 0x0
msgbox 0x8801850 MSG_NORMAL '"[blue_fr][rival]: There you are,\n..."
applymovement 0x8 0x880190B
waitmovement 0x0
msgbox 0x88018AD MSG_NORMAL '"[blue_fr]PROF. OAK: Ahem."
applymovement 0x8 0x8801908
waitmovement 0x0
msgbox 0x88018C3 MSG_NORMAL '" red fr [player]: [.]\p[blue_fr][r..."
applymovement 0x8 0x880190B
msgbox 0x88024DF MSG_YESNO '"[blue_fr]PROF. OAK: [player].\n[ri..."
compare LASTRESULT 0x1
if 0x0 goto 0x8802589
compare LASTRESULT 0x1
if 0x1 goto 0x8802562
'Where I want the script to continue from
setvar 0x4095 0x1
release
end

'---------------
#org 0x802589
msgbox 0x8802593 MSG_NORMAL '"[blue_fr][rival]: What?! Stop joki..."
return

'---------------
#org 0x802562
msgbox 0x880256C MSG_NORMAL '"[blue_fr][rival]: Yeah, that's rig..."
return


'---------
' Strings
'---------
#org 0x801850
= [blue_fr][rival]: There you are,\nyou SLOWPOKE!\pWhat took you so long?\nI've been waiting forever!

#org 0x8018AD
= [blue_fr]PROF. OAK: Ahem.

#org 0x8018C3
= [blue_fr][rival]: Shh, the PROF. is about\nto speak!\p[red_fr][.]

#org 0x8024DF
= [blue_fr]PROF. OAK: [player].\n[rival].\pKnowing you two, you came\nhere today for only one\preason: to get a POKEMON.\nAm I correct in assuming that?

#org 0x802593
= [blue_fr][rival]: What?! Stop joking,\n[player]!\pOf course that's why!

#org 0x80256C
= [blue_fr][rival]: Yeah, that's right!

I wasn't sure if this would require its own thread or not, so, sorry if it didn't. Thanks in advance.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old July 30th, 2015 (3:07 PM).
esperance's Avatar
esperance esperance is offline
 
Join Date: Mar 2010
Location: OH
Age: 26
Gender: Male
Nature: Relaxed
Posts: 3,830
Change these lines:
Code:
compare LASTRESULT 0x1
if 0x0 goto 0x8802589
compare LASTRESULT 0x1
if 0x1 goto 0x8802562
To this:
Code:
compare LASTRESULT 0x1
if 0x0 call 0x8802589
compare LASTRESULT 0x1
if 0x1 call 0x8802562
The "goto" command is if you want to jump to a new offset and not remember where you were previously. The "call" command allows you to jump to a new offset and remember where you jumped from, so you can return to it with the "return" command (which you seem to have gotten already).
__________________
What are you so afraid of?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old July 30th, 2015 (4:02 PM).
Sayuri's Avatar
Sayuri Sayuri is offline
人生忘れられた
 
Join Date: Jun 2015
Location: Boston, MA
Age: 24
Gender: Female
Nature: Lonely
Posts: 276
Quote:
Originally Posted by Lost Heart View Post
Change these lines:
Code:
compare LASTRESULT 0x1
if 0x0 goto 0x8802589
compare LASTRESULT 0x1
if 0x1 goto 0x8802562
To this:
Code:
compare LASTRESULT 0x1
if 0x0 call 0x8802589
compare LASTRESULT 0x1
if 0x1 call 0x8802562
The "goto" command is if you want to jump to a new offset and not remember where you were previously. The "call" command allows you to jump to a new offset and remember where you jumped from, so you can return to it with the "return" command (which you seem to have gotten already).
Thank you, I got it working now.
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 2:26 AM.