Binary ROM HackingNeed 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.
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
'---------
' 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.