Re: Arbitrary code execution in Red/Blue using the "8F" item
Posted by: Couldntthinkofaname
Date: 2018-07-09 16:04:49
Hello all, I have two small programs I'd like to share that uses 8F.
They are essentially the Catch Them All and Alternative Catch Them All scripts, but they have been modified to produce a random pokemon each time.
Here they are:
Catch Them All (Randomised)
Item list:
* Any item
* 8F
TM40 x212
TM34 x89
TM08 x201
[b][u]ASM:[/u][/b]
ldh a,($D4) ;Loads random number into a
ld ($D059),a
ret
[size=12pt]Encounter random Pokemon or trainer[/size]
This code, when used , will encounter a completely random Pokemon or Trainer.
8f
Any Item xAny Qnty
Poke Ball x250
TM11 x255
TM34 x89
TM08 x201inc b ; Useless Filler
ld a,($ffd3) ; Put a random number into a
ld ($d059),a ; force encounter with a
ret ; "It's first grade, Spongebob"
Save your game before using there's a chance you'll encounter a ZZAZZ trainer or a game-crashing pokemon.
Enjoy!
lol