Thread: [Tutorial] HackMew's Knowledge
View Single Post
Old June 19th, 2009 (10:32 AM).
Full Metal's Avatar
Full Metal Full Metal is offline
C(++) Developer.
  • Silver Tier
Join Date: Jan 2008
Location: In my mind.
Age: 22
Gender: Male
Nature: Timid
Posts: 806
Hey hackmew I tried to add the trainer id into the asm as well....
it is A instead of C right?
I did something wrong though the script freezes before the guy even faces player
which is weird cuz i called the asm after faceplayer, then called buffernumber 0x1 LASTRESULT (for the secret id) and buffernumber 0x2 (for the trainerid)
the music keeps playing so i think it's my problems with asm.
well anwyays here's my attempt for FireRed.

.align 2
.global lesson1

push {r0-r1, lr}
ldr r0, .PLAYER_DATA
ldr r0, [r0]
ldr r1, .VAR
ldrh r0, [r0, #0xC]
strh r0, [r1]
pop {pc}
push {lr}
ldr r0, .PLAYER_DATA
ldr r0, [r0]
ldr r1, .VAR2
ldrh r0, [r0, #0xA]
strh r0, [r1]
pop {r0-r1, pc}

.align 3
.word 0x02024EA4
.word 0x0201E8C2 + (0x800D * 2)
.word 0x0201E8C2 + (0x8001 * 2)

i haven't tried debugging it just yet....

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote