Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ new and improved
- @ note: check the box that makes the mon hold an item
- @ pokemon tiene que tener un objeto, no importa si tiene movimientos personalizados
- .align 2
- .thumb
- .thumb_func
- .equ address_to_insert, 0xXXXXXX @ cambia esto, no 08 o algo así
- .org 0x11596
- mov r0, #1 @ used to determine return address
- push {r0}
- ldr r0, .Address_2
- bx r0
- .align 2
- .Address_2: .word (0x08000001 | address_to_insert)
- .org 0x115f6
- mov r0, r1
- mov r6, r0
- b 0x11604
- .org 0x1162c
- mov r0, #0
- push {r0}
- ldr r0, .Method_Addr
- bx r0
- .align 2
- .Method_Addr: .word (0x08000001 | address_to_insert)
- .org 0x3dc70
- b 0x3dcd0
- .org address_to_insert
- LoadItem:
- add r5, #0x6
- add r0, r4, #0x0
- mov r1, #0xc
- add r2, r5, #0x0
- bl Insert_Element
- StartEVs:
- ldr r0, .VarEVs
- bl get_value_from_var
- mov r5, #0x1A
- push {r0}
- LoadEVs:
- mov r0, r4
- mov r1, r5
- mov r2, sp
- bl Insert_Element
- add r5, #1
- cmp r5, #0x1F+1
- bne LoadEVs
- StartIVs:
- pop {r0}
- ldr r0, .VarIVs
- bl get_value_from_var
- mov r5, #0x27
- push {r0}
- IVLoop:
- mov r0, r4
- mov r1, r5
- mov r2, sp
- bl Insert_Element
- add r5, r5, #0x1
- cmp r5, #0x2C+1
- bne IVLoop
- End:
- pop {r6}
- mov r0, r4
- bl Recalculate_Stats
- pop {r1}
- cmp r1, #0
- bne return_2
- ldr r1, .Return_Addr_1
- bx r1
- return_2:
- ldr r1, .Return_Addr_2
- bx r1
- Insert_Element:
- ldr r3, .Insert_Addr
- bx r3
- Recalculate_Stats:
- ldr r1, .Recalc_Addr
- bx r1
- get_value_from_var:
- ldr r2, .VarGet
- bx r2
- Mod:
- ldr r3, .Mod_Addr
- bx r3
- .align 2
- .Return_Addr_1: .word 0x08011639 @ item and custom moves
- .Return_Addr_2: .word 0x0801166D @ just holding an item
- .VarEVs: .word 0x000040XX @ change this
- .VarIVs: .word 0x000040XX @ change this
- .VarGet: .word 0x0806E569
- .Insert_Addr: .word 0x0804037d
- .Recalc_Addr: .word 0x0803e47d
- .Mod_Addr: .word 0x081e4685
Advertisement
Add Comment
Please, Sign In to add comment