Thread: [Tutorial] HackMew's Knowledge
View Single Post
  #89    
Old July 30th, 2010 (10:23 PM).
IntrOutro IntrOutro is offline
     
    Join Date: Jul 2010
    Posts: 2
    Hi, how exactly the extended script looks like regarding to the Trainer ID + Secret ID in the 1st ASM Lesson? I just manage to get the Trainer ID to show up but not the Secret ID.

    I'll just recopy the script part from the 1st Lesson so anyone of you don't have to look back:
    Spoiler:
    Code:
    #dynamic 0x800000
    
    #org @start
    callasm YourOffset
    buffernumber 0x0 LASTRESULT
    msgbox @secret 0x2
    end
    
    #org @secret
    = Sshh! I'll tell you a secret[.]\nYour Secret ID is [buffer1]!


    and the ASM that I'm based on (Emerald):
    Spoiler:
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global lesson1
    
    main:
    	push {r0-r1, lr}
    	ldr r0, .PLAYER_DATA
    	ldr r0, [r0]
    	ldr r1, .VAR
    	ldrh r0, [r0, #0xA]
    	strh r0, [r1]
    	ldr r0, .PLAYER_DATA
    	ldr r0, [r0]
    	ldrh r0, [r0, #0xC]
    	strh r0, [r1, #0x2]
    	pop {r0-r1, pc}
    
    
    .align 2
    .PLAYER_DATA:
    	.word 0x03005D90
    .VAR:
    	.word 0x020275D6 + (0x800D * 2)


    And, do you set the [buffer1] twice in the strings area or split it to something like [buffer1] and [buffer2]?

    I really like to know how it's done because the extended script isn't covered in any of the tutorials (only the crucial asm part was covered in the end of 2nd ASM Lesson).
    Reply With Quote