Author Id: 25004 Author Name: Andrea Post Content: Hello everyone :) [SPOILER] .thumb .align 2 push {r0-r3,lr} ldr r2, .8002 /*variabile 8002*/ ldrh r2,[r2] cmp r2, #0x0 /*control var 8002 if it's 0*/ beq parte2 b loop parte2: ldr r0, .8000 /*variabile 8000*/ ldrh r0,[r0] ldr r1,.100 /*interval byte between pokemon team*/ mul r1,r0 ldr r0, .pokemon_data /*offset state*/ add r0, r0, r1 ldr r1, .8001 /*save state*/ strb r1,[r0] b fine loop: ldr r2, .8002 /*variabile 8002*/ ldrh r2,[r2] ldr r3,.100 /*interval byte between pokemon team*/ mul r3,r2 ldr r0, .pokemon_data /*offset state*/ add r0, r0, r3 ldr r1, .8001 /*save state*/ strb r1,[r0] sub r2, r2, #0x80 /*tolgo 80*/ sub r2, r2, #0x80 /*tolgo 80*/ cmp r2, #0x0 /*controllo che la var 8002 non sia 0*/ beq fine b loop fine: pop {r0-r3,pc} .align 2 .pokemon_data: .word 0x030043B0 .8000: .word 0x0202e8c4 .8001: .word 0x0202e8c6 .8002: .word 0x0202e8c8 .100: .word 0x00000100 [/SPOILER] weel this is the new routine ^^" i explain you every single part: [QUOTE]ldr r2, .8002 ldrh r2,[r2] cmp r2, #0x0 beq parte2 b loop[/QUOTE] load var 8002, if the val of var 8002 it's 0 then go to part2 :) else go to loop because var 8002 decides how many pokemon change status :) [QUOTE]parte2: ldr r0, .8000 ldrh r0,[r0] ldr r1,.100 mul r1,r0 ldr r0, .pokemon_data add r0, r0, r1 ldr r1, .8001 strb r1,[r0] b fine[/QUOTE] this part of routine used to infect single pokemon in the team with setting var 8000 for the pokemon place in the team and var 8001 the state :) [QUOTE]ldr r2, .8002 /*variabile 8002*/ ldrh r2,[r2] ldr r3,.100 /*interval byte between pokemon team*/ mul r3,r2 ldr r0, .pokemon_data /*offset state*/ add r0, r0, r3 ldr r1, .8001 /*save state*/ strb r1,[r0][/QUOTE] same thing with part of routine on top :) [QUOTE]sub r2, r2, #0x80 sub r2, r2, #0x80 cmp r2, #0x0 beq fine b loop[/QUOTE] this is important part of routine :) so the var 8002 it's stored in the r2 and we setting with: number of pokemon *100 the comand sub subtract 100 (80+80) to var 8002 and avery loop infect a pokemon :) [QUOTE]fine: pop {r0-r3,pc}[/QUOTE] end of routine x'D example of script: to infect one pokemon: setvar 0x8000 0x4 /fourth pokemon in the team setvar 0x8001 0x80 /poisong state callasm 0x700001 to infect 3 pokemon of your team: setvar 0x8002 0x300 /3 pokemon*100 setvar 0x8001 0x10 /burn state callasm 0x700001 if you have problem write in the comment :) bye