The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script what does copyvar 0x8012 0x8013 do? (https://www.pokecommunity.com/showthread.php?t=385837)

tkim December 19th, 2016 11:21 AM

what does copyvar 0x8012 0x8013 do?
 
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.

BluRose December 19th, 2016 1:18 PM

takes the value of var 0x8013 and puts it into var 0x8012

edit: unless if you mean like what purpose it serves rip

tkim December 19th, 2016 2:40 PM

Quote:

Originally Posted by BluRose (Post 9523250)
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.


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


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.