Re: Arbitrary code execution in Gold/Silver UE using the Coin Case
Posted by: ISSOtm
Date: 2017-11-14 18:47:37
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
Regarding the old code, even by doing your trick for Pokémon with hex ID lower than $7F, some Pokémon cannot be caught because we don't have access to the character.
Any x Any
Any x 03 INC BC
Full Restore x 01 LD C, 01
Paralyz Heal x 13 DEC C; DEC C
Energypowder x 03 LD A, C; INC BC
TM42 x 24 LD [18d6], A
TM23 x 03 INC BC
TM10 x Any RET
Any x Any
Any x 03 INC BC
PP-Up x {item} LD A, {item}
TM42 x 23 LD [17d6], A
TM23 x 03 INC BC
TM10 x Any RET
Any x Any
Any x 62 LD A, 0a
Burn Heal x 234 LD [1201], A
Potion x 01
Full Restore x 01 LD C, 01
Paralyz Heal x 121 DEC C; LD A, C
TM42 x 01 LD [0140], A
Max Ether x 03 INC BC
X-Accuracy x 60 LD HL, 3cd9
TM26 x 17 LD DE, 55a8
Red Apricorn x 168
Brightpowder x 06 INC BC; LD B, 01
Master Ball x 14 LD C, 10
Hyper Potion x 26 LD A, [DE]
Protein x 50 DEC DE; LD [HLD], A
Paralyz Heal x 32 DEC C; JR NZ, fa
HM08 x 27 DEC DE
Poké Ball x 32 DEC B; JR NZ, f4
HM02 x 01 LD BC, ...
Any x Any
Great Ball x 35 INC B; INC HL
TM41 x Any JP [HL]
Copy content of Mail 1-4 to box names (and a few bytes after) and execute it
format: keep/deposit code
TM01 62/193 ld a, 0a
TM02 10/245
TM03 234/21 ld [0000], a
TM04 0/255
TM05 0/255
TM06 175/80 xor a
TM07 234/21 ld [0040], a
TM08 0/255
TM09 64/191
TM10 1/254 ld bc, f0a8 (Mail Data End; before start of Message 5)
TM11 240/15
TM12 168/87
TM13 33/222 ld hl, 3ef9 (a bit after box names)
TM14 62/192
TM15 249/6
TM16 22/233 ld d, 04
TM17 4/251
TM18 205/50 call 97f5 (.copymail)
TM19 151/104
TM20 245/10
TM21 21/234 dec d
TM22 32/223 jr nz, fa (TM18)
TM23 250/5
TM24 35/220 inc hl
TM25 233/22 jp [hl]
TM26 30/225 ld e, 0e | .copymail -> d597
TM27 14/241
TM28 11/244 dec bc
TM29 29/226 dec e
TM30 32/223 jr nz, fc (TM28)
TM31 252/3
TM32 205/50 call a5f5 (.copyline)
TM33 165/90
TM34 245/10
TM35 11/244 dec bc
TM36 205/50 call a5f5 (.copyline)
TM37 165/90
TM38 245/10
TM39 201/54 ret
TM40 30/225 ld e, 10 | .copyline -> d5a5
TM41 16/239
TM42 10/245 ld a, [bc]
TM43 50/205 ld [hld], a
TM44 11/244 dec bc
TM45 29/226 dec e
TM46 32/223 jr nz, fa (TM42)
TM47 250/5
TM48 201/54 ret
p0¥é2
Any x Any
Any x 195
TM45 x 206
1) A p 0 z'v 1 5 5 XOR A; OR b9; SUB f7; EI; EI; LD D, B | A->ce
2) é'r 2'vPk é'm 2 LD [d3f8], A; SUB e1; LD [d2f8], A; LD D, B | A->ed
3)'m ^ ^ JP NC, {edce}
Hey, I have a question I have a code from a video for getting to level 98 with bag items:
- [Any Item] x[Any Amount]
- [Any Item] x[Any Amount]
- Super Potion x14
- Ultra Ball x26
- X Accuracy x53
- TM27 x1
- Awakening x[Any Amount]
- Escape Rope x34
- Repel x20
- Paralyz Heal x32
- HM07
- [Any Item] x[Any Amount]
- Fresh Water x73
- Full Restore x49
- TM12 x1
- Spell Tag x1
- [Any Item] x[Any Amount]
- Poke Ball x46
- HM03 x1
- X Speed x1
- Full Heal x18
- Flower Main x51
- TM06 x1
- [Any Item] x[Any Amount]
- TM41 x[Any Amount]
Or level 99 with:
- [Any Item] x[Any Amount]
- [Any Item] x[Any Amount]
- Super Potion x14
- Ultra Ball x26
- X Accuracy x53
- TM27 x1
- Awakening x[Any Amount]
- Escape Rope x34
- Repel x20
- Paralyz Heal x32
- HM07
- [Any Item] x[Any Amount]
- Fresh Water x73
- Full Restore x99
- Spell Tag x1
- [Any Item] x[Any Amount]
- Poke Ball x46
- HM03 x1
- X Speed x1
- Full Heal x18
- Flower Main x51
- TM06 x1
- [Any Item] x[Any Amount]
- TM41 x[Any Amount]
The problem is, I can't use these on Unown, due to the code changing DVs as well, and that what the Unown shapes are based off, so how do I modify these code to get to level 98/99 without changing DVs so my Unown remain the same letters, and I can level up them all?
Hi. :)
I'm unsure how to modify it as the parts that modify the other addresses seem to take up a significant portion of the code.
I have this though for the Sleep Talk as move 1 Quagsire holding a Protein:
(ANY ITEM) x(ANY)
(ANY ITEM) x(ANY)
X Accuracy x73
TM27 x1
(ANY ITEM) x(ANY)
Great Ball x62
Wht Apricorn x1
(ANY ITEM) x(ANY)
Leaf Stone x1
(ANY ITEM) x(ANY)
Great Ball x38
TM22 x1
(ANY ITEM) x(ANY)
Great Ball x46
Lovely Mail x1
(ANY ITEM) x(ANY)
Poké Ball x5
Poké Ball x62
X Accuracy x5
Super Rod x1
(ANY ITEM) x(ANY)
Poké Ball x9
Poké Ball x46
HM03 x1
X Speed x1
Full Heal x18
Flower Mail x51
TM06 x1
(ANY ITEM) x(ANY)
TM41 x1
This code will set your first Pokémon's level to 97 and replace item 1 with Rare Candies, and do nothing else.
Raw bytes in case anybody wants them:
@D61B:
21 49 DA 01 01 01 04 3E 61 01 01 01 22 01 01 01 04 26 D5 01 01 01 04 2E B8 01 01 01 05 05 05 3E 21 05 3D 01 01 01 05 77 05 2E F5 01 34 01 26 12 9E 33 C5 01 01 01 E9
Hope this helps!
Hey, in this, the great balls and pokeballs, are in multiple spots, how do I get them there?