|
本帖最后由 jiangzhengwenjz 于 2015-12-11 16:12 编辑
(可谓是考前无聊时最后的消遣了)
老样子只有火红,预览:
在空位YYYYYY写入:- .thumb
- push {r4, lr}
- ldr r0, =0x300537C
- ldr r1, =0x80568E1
- str r1, [r0]
- ldr r0, =0x020370C0
- ldrh r1, [r0, #2]
- mov r2, #1
- ldrh r3, [r0, #0x10]
- ldr r4, =0x80cdda9
- bl bx_r4
- pop {r4, pc}
- bx_r4: bx r4
复制代码 在空位ZZZZZZ写入:- .thumb
- push {r4, lr}
- mov r4, #0
- loop:
- ldr r0, =0x02024284
- mov r1, #0x64
- mul r1, r4
- add r0, r0, r1
- mov r1, #0xb
- ldr r2, =0x803FBE9
- bl bx_r2
- ldr r1, =0x20370C0
- ldrh r2, [r1]
- cmp r0, r2
- beq have_pre
- add r4, #1
- cmp r4, #6
- bne loop
- no_pokemon:
- mov r4, #0xFF
- b back
- increment:
- add r4, #1
- cmp r4, #6
- beq no_pokemon
- b loop
- have_pre:
- ldr r0, =0x2024284
- mov r1, #0x64
- mul r1, r4
- add r0, r0, r1
- mov r1, #0x2d
- ldr r2, =0x803FBE9
- bl bx_r2
- ldr r1, =0x20370C0
- cmp r0, #1
- beq increment
- back:
- strh r4, [r1, #0x10]
- pop {r4, pc}
- bx_r2:
- bx r2
复制代码 在脚本中使用:- #org @start
- lock
- faceplayer
- setvar 0x8004 0x4 //进化前精灵种族编号(此处小火龙)
- setvar 0x8005 0x2 //进化后精灵种族编号(此处妙蛙草)
- callasm 0x8ZZZZZZ+1
- compare 0x800D 0xFF //检查0x8004中精灵是否在队伍中
- if1 1 @no_that_pokemon
- callasm 0x8YYYYYY+1 //未通过判定,执行进化
- waitstate
- //setweather 3 //只是例子,你可以在waitstate后继续执行脚本
- //doweather
- release
- end
- //---------------
- #org @no_that_pokemon //通过判定,即无该精灵或该精灵处于蛋状态
- msgbox @message_string 6 //"You don't have that pokemon. "
- release
- end
- //---------
- // Strings
- //---------
- #org @message_string
- = You don't have that pokemon.
复制代码 当然,这只会进化第一只该种族精灵,不过个人认为比较合理。若要多精灵就自己改下吧 |
|