Is it possible to make a Gameshark/AR/Codebreaker code that allows a rematch of Gym Leaders? If you need a .SAV for the point of Brock before battle, I'll give you that.
Announcement
Collapse
No announcement yet.
[REQUEST] Pokémon FireRed - Rematch Gym Leaders
Collapse
X
-
-
Alright, it's time I help out a little bit... this is a rematch script I've made for Brock with some quick studying in scripting... (I did have some help, of course; a la chrunch at Pokecommunity.)...
This tells the game, "Hey, the player's got Brock's Boulder Badge. Now, we can let the player rematch him as many times as desired as long as the Boulder Badge flag is cleared." Now, can a code be made out of this somehow, or am I still missing the point entirely/it's not that simple?Code:#org 0x816A593 '----------------------------------- checkflag FR_BADGE_1 if true jump 0x880077A ' Flag is set 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 loadpointer 0x16 0x28004 'Pointer not in ROM area 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 0x880077A '----------------------------------- settrainerflag 0x19E trainerbattle 0x1 0x19E 0x0 0x8800798 0x88007AC 0x8800790 end #org 0x8800790 '----------------------------------- msgbox 0x88007BC ' I can also say somet... release 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 0x8800798 = I will crush you!!! #org 0x88007AC = You crushed me[.] #org 0x88007BC = I can also say something after the battle #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.Last edited by Ixkli21; 09-14-2015, 07:24:26 PM.
Comment
-
If you use the no$gba emulator or even MESS (if you can configure it properly) you can put a breakpoint on that flag address and see what changes it and make alterations to the assembly. Is there a RAM address for the Flag?Spoiler Alert! Click to view...
THE BAD GUY!!!!!!
Comment
-
The RAM address for what flag, exactly? Some specification, please? You mean the flag that checks for the clearance of Badges? That's 0x2B. For the BoulderBadge, that's 0x820.
"checkflag FR_BADGE_1" = 2B (0x820)
"settrainerflag" = 62
"trainerbattle" = 5CLast edited by Ixkli21; 09-14-2015, 08:59:07 PM.
Comment
-
I am grateful that you have went through all of this trouble, MasterGrand and everyone else, but there's something you forgot to mention about your code... you can actually battle any trainer... but first, the code must be disabled before you talk to the trainer you want to fight, enabled after the message box, and then disabled while talking to that person and after fighting them so you won't be stuck in a loop.
Oh, and after the fight, the background music for the map usually muted.
Comment
-
That is right, I forgot itOriginally posted by Ixkli21 View PostI am grateful that you have went through all of this trouble, MasterGrand and everyone else, but there's something you forgot to mention about your code... you can actually battle any trainer... but first, the code must be disabled before you talk to the trainer you want to fight, enabled after the message box, and then disabled while talking to that person and after fighting them so you won't be stuck in a loop.
Oh, and after the fight, the background music for the map usually muted.
Let's be together !!
Comment
-
One more thing, your code only remembers the last trainer you fought, esp. event trainers like say Blue at Pokemon Tower or Gym Leaders. It doesn't take you to an exact trainer after talking to someone. Say: 0x19E is Brock's flag, but this code only remembers the last battle you have/looks for any trainer data in the person you talked to. Just thought I'd fill in some blanks for the curious.Originally posted by MasterGrand View PostThat is right, I forgot it
That, and I think there's one more missing piece that does exactly that: take you to that exact trainer flag.
A more accurate title for the code, IMO, is "Rematch Any Trainer".Last edited by Ixkli21; 09-15-2015, 04:31:35 PM.
Comment
-
I'm looking for the address that stores the hex of the last trainer that was fought, which is what this code relies on. Let's say you battled Gentleman Lamar on the S.S. Anne, right? His Trainer ID is 0x1E3. Now, what I'm looking for is an address that stores this Trainer ID... where would I find it?
Comment
-
I'm wrong, it was something in the WRAM... and this is the memory address for the trainer: 020386AE:XXXX. This uses the trainer index of the trainer you last fought. By default, this is 0000.Originally posted by MasterGrand View PostThat is right, I forgot it
Last edited by Ixkli21; 09-19-2015, 10:23:04 PM.
Comment
-
Pokemon Emerald
Can this be done for Pokemon Emerald, too, please?Originally posted by MasterGrand View PostAlways Challenge Brock Battle
Note: Anyone talk him/her you will Challenge Brock Battle
Raw Codes
03000EB9:4F
03000EBA:1A
03000EBB:08
Never mind, I found out how to do it.Last edited by Ixkli21; 04-23-2016, 05:31:25 AM.
Comment
Comment