The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script what does copyvar 0x8012 0x8013 do?

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 December 19th, 2016 (11:21 AM). Edited December 19th, 2016 by tkim.
tkim's Avatar
tkim tkim is offline
 
Join Date: May 2011
Posts: 232
I'm taking a look at the script where the man at Water Labrynth in Pokemon FireRed gives the player a togepi egg, and I was wondering what the command copyvar 0x8012 0x8013 here specifically does.
Spoiler:
'---------------
#org 0x16884E
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checkflag 0x2DA
if 0x1 goto 0x81688E3
checkflag 0x2DB
if 0x1 goto 0x816892C
msgbox 0x818A80D MSG_KEEPOPEN '"You travel all over the place,\ndo..."
special2 LASTRESULT 0xE6
compare LASTRESULT 0x6
if 0x1 goto 0x81688AC
msgbox 0x818A88F MSG_KEEPOPEN '"Ah, hmm[.]\nI see, I see[.]"
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x1688E3
bufferpokemon 0x1 0xAF
setvar 0x8004 0xAF
special2 LASTRESULT 0x1B4
compare LASTRESULT 0x1
if 0x1 goto 0x8168895
bufferpokemon 0x1 0xB0
setvar 0x8004 0xB0
special2 LASTRESULT 0x1B4
compare LASTRESULT 0x1
if 0x1 goto 0x8168895
msgbox 0x818A9C0 MSG_KEEPOPEN '"I received that EGG while I was\nt..."
release
end

'---------------
#org 0x16892C
goto 0x81688BA

'---------------
#org 0x1688AC
msgbox 0x818A8A6 MSG_KEEPOPEN '"Oh, impressive.\nYou treat your PO..."
goto 0x81688BA

'---------------
#org 0x168895
setvar 0x8004 0x1
setvar 0x8005 0x2
special 0x173
msgbox 0x818AA0C MSG_KEEPOPEN '"Oh, hello.\nThat's a cute [buffer2..."
release
end

'---------------
#org 0x1688BA
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x816891F
setflag 0x2DA
giveegg 0xAF
textcolor 0x3
fanfare 0x101
preparemsg 0x818A91F '"[player] received an EGG\nfrom the..."
waitfanfare
waitmsg
call 0x81A6675
goto 0x81688E3

'---------------
#org 0x16891F
setflag 0x2DB
msgbox 0x818A940 MSG_KEEPOPEN '"[.]Unfortunately, you don't have\n..."
release
end

'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return


'---------
' Strings
'---------
#org 0x18A80D
= You travel all over the place,\ndon't you?\pYou're not driving your POKéMON\ntoo harshly, are you?\pLet me take a look.\n[.] [.] [.] [.] [.] [.]

#org 0x18A88F
= Ah, hmm[.]\nI see, I see[.]

#org 0x18A9C0
= I received that EGG while I was\ntraveling.\pI'm glad I met someone like you.

#org 0x18A8A6
= Oh, impressive.\nYou treat your POKéMON right.\pI think you can be entrusted with\nthis.\pPlease, I'd like you to have this.

#org 0x18AA0C
= Oh, hello.\nThat's a cute [buffer2].\pSeeing it reminds me of a sweet \nlittle girl I met while traveling.\pShe was gently grooming POKéMON[.]\nShe was a little angel.\pThat little girl's name[.]\nI think it was DAISY.

#org 0x18A91F
= [player] received an EGG\nfrom the man!

#org 0x18A940
= [.]Unfortunately, you don't have\nspace for this in your party.\pYou'd better come back for it\nanother time.


Edit: The copyvar 0x8012 0x8013 in this script makes sure the man's text stays blue after receiving the egg from him.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old December 19th, 2016 (1:18 PM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
takes the value of var 0x8013 and puts it into var 0x8012

edit: unless if you mean like what purpose it serves rip
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old December 19th, 2016 (2:40 PM).
tkim's Avatar
tkim tkim is offline
 
Join Date: May 2011
Posts: 232
Quote:
Originally Posted by BluRose View Post
takes the value of var 0x8013 and puts it into var 0x8012

edit: unless if you mean like what purpose it serves rip
yeah I meant its purpose but I figured it out. The man's message stays blue after receiving the egg with that command.
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
Thread Tools

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:14 AM.