- 38
- Posts
- 12
- Years
- Seen Aug 16, 2021
If I wanted to rematch Gym Leaders and Trainers in Pokemon FireRed after defeating them, what would I need to do? For example, let's say I wanted to rematch Brock immediately after beating him, and all it took was talking to him again after beating him... what would I need to get rid of in his script?
Code:
#org 0x816A593
'-----------------------------------
setvar 0x8004 0x2
setvar 0x8005 0x2
special FAME_CHECKER_NEW
trainerbattle 0x1 0x19E 0x0 0x8190CD4 0x8190E4F 0x816A5C5
checkflag 0x254
if false jump 0x816A5F3 ' Flag is unset
msgbox 0x819110F ' There are all kinds ...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end
#org 0x816A5C5
'-----------------------------------
setvar 0x8004 0x2
setvar 0x8005 0x1
special FAME_CHECKER
setflag 0x4B0
setflag FR_BADGE_1
setvar 0x406C 0x1
setflag 0x2E
clearflag 0x92
setvar 0x8008 0x1
call 0x81A6B18
jump 0x816A5F3
#org 0x81A6B18
'-----------------------------------
copyvar 0x8000 0x8008
compare 0x8000 0x1
if == jump 0x81A6B76 ' Equal To
compare 0x8000 0x2
if == jump 0x81A6B7A ' Equal To
compare 0x8000 0x3
if == jump 0x81A6B81 ' Equal To
compare 0x8000 0x4
if == jump 0x81A6B8B ' Equal To
compare 0x8000 0x5
if == jump 0x81A6BA1 ' Equal To
compare 0x8000 0x6
if == jump 0x81A6BB4 ' Equal To
compare 0x8000 0x7
if == jump 0x81A6BCA ' Equal To
compare 0x8000 0x8
if == jump 0x81A6BE0 ' Equal To
end
#org 0x81A6B76
'-----------------------------------
cleartrainerflag 0x8E
return
#org 0x816A5F3
'-----------------------------------
msgbox 0x8190FC1 ' Wait!\nTake this wit...
callstd MSG_NOCLOSE ' Non-closing message
checkitemspaceinbag TM39 1
compare LASTRESULT 0x0
if == jump 0x816A634 ' Equal To
additem TM39 1
msgbox 0x8190FDB ' \v\h01 received TM39...
copyvarifnotzero 0x8000 TM39
copyvarifnotzero 0x8001 0x1
copyvarifnotzero 0x8002 0x101
callstd MSG_ITEM ' Shows a message, then... 'Player put the yyy in the zzz!'
setflag 0x254
msgbox 0x8190FF8 ' A TM, Technical Mach...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end
#org 0x816A634
'-----------------------------------
msgbox 0x81911CE ' You don't have room ...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end
#org 0x81A6B7A
'-----------------------------------
cleartrainerflag 0x96
cleartrainerflag 0xEA
return
#org 0x81A6B81
'-----------------------------------
cleartrainerflag 0x8D
cleartrainerflag 0xDC
cleartrainerflag 0x1A7
return
#org 0x81A6B8B
'-----------------------------------
cleartrainerflag 0x84
cleartrainerflag 0x85
cleartrainerflag 0xA0
cleartrainerflag 0x109
cleartrainerflag 0x10A
cleartrainerflag 0x10B
cleartrainerflag 0x192
return
#org 0x81A6BA1
'-----------------------------------
cleartrainerflag 0x126
cleartrainerflag 0x127
cleartrainerflag 0x120
cleartrainerflag 0x121
cleartrainerflag 0x124
cleartrainerflag 0x125
return
#org 0x81A6BB4
'-----------------------------------
cleartrainerflag 0x118
cleartrainerflag 0x119
cleartrainerflag 0x11A
cleartrainerflag 0x11B
cleartrainerflag 0x1CE
cleartrainerflag 0x1CF
cleartrainerflag 0x1D0
return
#org 0x81A6BCA
'-----------------------------------
cleartrainerflag 0xB1
cleartrainerflag 0xB2
cleartrainerflag 0xB3
cleartrainerflag 0xB4
cleartrainerflag 0xD5
cleartrainerflag 0xD6
cleartrainerflag 0xD7
return
#org 0x81A6BE0
'-----------------------------------
cleartrainerflag 0x128
cleartrainerflag 0x129
cleartrainerflag 0x142
cleartrainerflag 0x143
cleartrainerflag 0x144
cleartrainerflag 0x188
cleartrainerflag 0x190
cleartrainerflag 0x191
return
#org 0x8190CD4
= So, you're here. I'm BROCK.\nI'm PEWTER's GYM LEADER.\pMy rock-hard willpower is evident\neven in my POK\eMON.\pMy POK\eMON are all rock hard, and\nhave true-grit determination.\pThat's right - my POK\eMON are all\nthe ROCK type!\pFuhaha! You're going to challenge\nme knowing that you'll lose?\pThat's the TRAINER's honor that\ncompels you to challenge me.\pFine, then!\nShow me your best!\c\h0B\h56\h01
#org 0x8190E4F
= I took you for granted, and so\nI lost.\pAs proof of your victory, I confer\non you this[.]the official POK\eMON\lLEAGUE BOULDERBADGE.\p\c\h06\h02\v\h01 received the BOULDERBADGE\nfrom BROCK!\c\h17\c\h0B\h04\h01\c\h08\n\c\h08\h56\c\h18\p\c\h06\h04Just having the BOULDERBADGE makes\nyour POK\eMON more powerful.\pIt also enables the use of the\nmove FLASH outside of battle.\pOf course, a POK\eMON must know the\nmove FLASH to use it.
#org 0x819110F
= There are all kinds of TRAINERS in\nthis huge world of ours.\pYou appear to be very gifted as a\nPOK\eMON TRAINER.\pSo let me make a suggestion.\pGo to the GYM in CERULEAN and test\nyour abilities.
#org 0x8190FC1
= Wait!\nTake this with you.
#org 0x8190FDB
= \v\h01 received TM39\nfrom BROCK.
#org 0x8190FF8
= A TM, Technical Machine, contains a\ntechnique for POK\eMON.\pUsing a TM teaches the move it\ncontains to a POK\eMON.\pA TM is good for only one use.\pSo, when you use one, pick the\nPOK\eMON carefully.\pAnyways[.]\nTM39 contains ROCK TOMB.\pIt hurls boulders at the foe and\nlowers its SPEED.
#org 0x81911CE
= You don't have room for this.