blurose

[fr] trainer mons with evs and ivs by a var each

Sep 20th, 2020 (edited)
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 1.79 KB | None | 0 0
  1. @ new and improved
  2. @ note:  check the box that makes the mon hold an item
  3. @ pokemon tiene que tener un objeto, no importa si tiene movimientos personalizados
  4.  
  5. .align 2
  6. .thumb
  7. .thumb_func
  8.  
  9. .equ address_to_insert, 0xXXXXXX @ cambia esto, no 08 o algo así
  10.  
  11. .org 0x11596
  12. mov r0, #1 @ used to determine return address
  13. push {r0}
  14. ldr r0, .Address_2
  15. bx r0
  16.  
  17. .align 2
  18.  
  19. .Address_2: .word (0x08000001 | address_to_insert)
  20.  
  21. .org 0x115f6
  22. mov r0, r1
  23. mov r6, r0
  24. b 0x11604
  25.  
  26. .org 0x1162c
  27. mov r0, #0
  28. push {r0}
  29. ldr r0, .Method_Addr
  30. bx r0
  31.  
  32. .align 2
  33.  
  34. .Method_Addr: .word (0x08000001 | address_to_insert)
  35.  
  36. .org 0x3dc70
  37. b 0x3dcd0
  38.  
  39.  
  40. .org address_to_insert
  41.  
  42. LoadItem:
  43. add r5, #0x6
  44. add r0, r4, #0x0
  45. mov r1, #0xc
  46. add r2, r5, #0x0
  47. bl Insert_Element
  48.  
  49. StartEVs:
  50. ldr r0, .VarEVs
  51. bl get_value_from_var
  52. mov r5, #0x1A
  53. push {r0}
  54.  
  55. LoadEVs:
  56. mov r0, r4
  57. mov r1, r5
  58. mov r2, sp
  59. bl Insert_Element
  60. add r5, #1
  61. cmp r5, #0x1F+1
  62. bne LoadEVs
  63.  
  64. StartIVs:
  65. pop {r0}
  66. ldr r0, .VarIVs
  67. bl get_value_from_var
  68. mov r5, #0x27
  69. push {r0}
  70.  
  71. IVLoop:
  72. mov r0, r4
  73. mov r1, r5
  74. mov r2, sp
  75. bl Insert_Element
  76. add r5, r5, #0x1
  77. cmp r5, #0x2C+1
  78. bne IVLoop
  79.  
  80. End:
  81. pop {r6}
  82. mov r0, r4
  83. bl Recalculate_Stats
  84. pop {r1}
  85. cmp r1, #0
  86. bne return_2
  87. ldr r1, .Return_Addr_1
  88. bx r1
  89.  
  90. return_2:
  91. ldr r1, .Return_Addr_2
  92. bx r1
  93.  
  94. Insert_Element:
  95. ldr r3, .Insert_Addr
  96. bx r3
  97.  
  98. Recalculate_Stats:
  99. ldr r1, .Recalc_Addr
  100. bx r1
  101.  
  102. get_value_from_var:
  103. ldr r2, .VarGet
  104. bx r2
  105.  
  106. Mod:
  107. ldr r3, .Mod_Addr
  108. bx r3
  109.  
  110. .align 2
  111. .Return_Addr_1: .word 0x08011639 @ item and custom moves
  112. .Return_Addr_2: .word 0x0801166D @ just holding an item
  113. .VarEVs: .word 0x000040XX @ change this
  114. .VarIVs: .word 0x000040XX @ change this
  115. .VarGet: .word 0x0806E569
  116. .Insert_Addr: .word 0x0804037d
  117. .Recalc_Addr: .word 0x0803e47d
  118. .Mod_Addr: .word 0x081e4685
  119.  
Advertisement
Add Comment
Please, Sign In to add comment