jAvAcOlA
Banned
- 152
- Posts
- 16
- Years
- Seen Feb 22, 2015
This is my very first attempt at scripting, so I'm probably doing something stupid.
I'm scripting the Mew event from Emerald into Firered.
I compile this code to the Mew sprite:
As soon as I change to a different map, the script changes to this:
Anyone see anything I'm doing stupid? I thought it could be something in the script not existing in FR, but I don't see anything greater than 0xD5 except for 0xFE, which is supposedly in FR.
I'm scripting the Mew event from Emerald into Firered.
I compile this code to the Mew sprite:
Spoiler:
'---------------
#org 0x267DF2
lock
faceplayer
applymovement 0x1 0x8267DD4
waitmovement 0x0
setvar 0x8004 0x0
special 0x1F7
preparemsg 0x82C6DFF '"Myuu[.]"
checksound
cry 0x97 0x2
compare PLAYERFACING 0x2
if 0x1 call 0x8267EAF
compare PLAYERFACING 0x1
if 0x1 call 0x8267EBA
compare PLAYERFACING 0x3
if 0x1 call 0x8267EC5
compare PLAYERFACING 0x4
if 0x1 call 0x8267ED0
special 0x1FE
pause 0x28
waitcry
setvar 0x8004 0x97
setvar 0x8005 0x1E
setvar 0x8006 0x0
special 0x1E2
setflag 0x8C1
special 0x13A
waitstate
clearflag 0x8C1
special2 LASTRESULT 0xB7
compare LASTRESULT 0x1
if 0x1 goto 0x8267E96
compare LASTRESULT 0x4
if 0x1 goto 0x8267EA4
compare LASTRESULT 0x5
if 0x1 goto 0x8267EA4
compare LASTRESULT 0xA
if 0x1 goto 0x8267EA4
setflag 0x1CA
release
end
'---------------
#org 0x267EAF
applymovement 0x1 0x8267DD6
waitmovement 0x0
return
'---------------
#org 0x267EBA
applymovement 0x1 0x8267DDD
waitmovement 0x0
return
'---------------
#org 0x267EC5
applymovement 0x1 0x8267DE4
waitmovement 0x0
return
'---------------
#org 0x267ED0
applymovement 0x1 0x8267DEB
waitmovement 0x0
return
'---------------
#org 0x267E96
setflag 0x1C7
setvar 0x8004 0x97
goto 0x8273776
'---------------
#org 0x267EA4
setvar 0x8004 0x97
goto 0x8273776
'---------------
#org 0x273776
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x8273204 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end
'---------
' Strings
'---------
#org 0x2C6DFF
= Myuu[.]
#org 0x273204
= The [buffer1] flew away!
'-----------
' Movements
'-----------
#org 0x267DD4
#raw 0x55 'Show
#raw 0xFE 'End of Movements
#org 0x267DD6
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x1D 'Step on the Spot Down (Normal)
#raw 0x1D 'Step on the Spot Down (Normal)
#raw 0xFE 'End of Movements
#org 0x267DDD
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x1E 'Step on the Spot Up (Normal)
#raw 0x1E 'Step on the Spot Up (Normal)
#raw 0xFE 'End of Movements
#org 0x267DE4
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x20 'Step on the Spot Right (Normal)
#raw 0x20 'Step on the Spot Right (Normal)
#raw 0xFE 'End of Movements
#org 0x267DEB
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x1F 'Step on the Spot Left (Normal)
#raw 0x1F 'Step on the Spot Left (Normal)
#raw 0xFE 'End of Movements
#org 0x267DF2
lock
faceplayer
applymovement 0x1 0x8267DD4
waitmovement 0x0
setvar 0x8004 0x0
special 0x1F7
preparemsg 0x82C6DFF '"Myuu[.]"
checksound
cry 0x97 0x2
compare PLAYERFACING 0x2
if 0x1 call 0x8267EAF
compare PLAYERFACING 0x1
if 0x1 call 0x8267EBA
compare PLAYERFACING 0x3
if 0x1 call 0x8267EC5
compare PLAYERFACING 0x4
if 0x1 call 0x8267ED0
special 0x1FE
pause 0x28
waitcry
setvar 0x8004 0x97
setvar 0x8005 0x1E
setvar 0x8006 0x0
special 0x1E2
setflag 0x8C1
special 0x13A
waitstate
clearflag 0x8C1
special2 LASTRESULT 0xB7
compare LASTRESULT 0x1
if 0x1 goto 0x8267E96
compare LASTRESULT 0x4
if 0x1 goto 0x8267EA4
compare LASTRESULT 0x5
if 0x1 goto 0x8267EA4
compare LASTRESULT 0xA
if 0x1 goto 0x8267EA4
setflag 0x1CA
release
end
'---------------
#org 0x267EAF
applymovement 0x1 0x8267DD6
waitmovement 0x0
return
'---------------
#org 0x267EBA
applymovement 0x1 0x8267DDD
waitmovement 0x0
return
'---------------
#org 0x267EC5
applymovement 0x1 0x8267DE4
waitmovement 0x0
return
'---------------
#org 0x267ED0
applymovement 0x1 0x8267DEB
waitmovement 0x0
return
'---------------
#org 0x267E96
setflag 0x1C7
setvar 0x8004 0x97
goto 0x8273776
'---------------
#org 0x267EA4
setvar 0x8004 0x97
goto 0x8273776
'---------------
#org 0x273776
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x8273204 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end
'---------
' Strings
'---------
#org 0x2C6DFF
= Myuu[.]
#org 0x273204
= The [buffer1] flew away!
'-----------
' Movements
'-----------
#org 0x267DD4
#raw 0x55 'Show
#raw 0xFE 'End of Movements
#org 0x267DD6
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x1D 'Step on the Spot Down (Normal)
#raw 0x1D 'Step on the Spot Down (Normal)
#raw 0xFE 'End of Movements
#org 0x267DDD
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x1E 'Step on the Spot Up (Normal)
#raw 0x1E 'Step on the Spot Up (Normal)
#raw 0xFE 'End of Movements
#org 0x267DE4
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x20 'Step on the Spot Right (Normal)
#raw 0x20 'Step on the Spot Right (Normal)
#raw 0xFE 'End of Movements
#org 0x267DEB
#raw 0x40 'mov40
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x41 'mov41
#raw 0x1F 'Step on the Spot Left (Normal)
#raw 0x1F 'Step on the Spot Left (Normal)
#raw 0xFE 'End of Movements
As soon as I change to a different map, the script changes to this:
Spoiler:
'---------------
#org 0x309823
playsong 0x3334 0x34
playsong 0x694 0x98
if 0x31 goto 0x32333233
playsong 0x3332 0x32
playsong 0x3334 0x34
playsong 0x3332 0x32
playsong 0x3332 0x32
playsong 0x3332 0x30
if 0x30 call 0x30073007
if 0x30 call 0x3E073007
if 0x35 call 0x30333433
if 0x30 call 0x30075D07
if 0x3E call 0x34333507
playsong 0x3334 0x3F
if 0x30 call 0x5E073007
if 0x5F call 0x30073007
if 0x35 call 0x30333433
if 0x7F call 0x30073007
if 0x30 call 0x38074F07
if 0x38 call 0x38073807
if 0x38 call 0x35074607
playsong 0x3334 0x38
if 0x38 call 0x38076507
if 0x46 call 0x34333507
playsong 0x3334 0x47
if 0x38 call 0x66073807
if 0x67 call 0x38073807
if 0x35 call 0x38333433
if 0x87 call 0x38073807
if 0x38 call 0x35075607
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3334 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x34
playsong 0x3334 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x34
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x4E
playsong 0x3334 0x90
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x756 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x0
nop
comparefarbytetobyte 0x13000000 0x0
nop
nop
#org 0x309823
playsong 0x3334 0x34
playsong 0x694 0x98
if 0x31 goto 0x32333233
playsong 0x3332 0x32
playsong 0x3334 0x34
playsong 0x3332 0x32
playsong 0x3332 0x32
playsong 0x3332 0x30
if 0x30 call 0x30073007
if 0x30 call 0x3E073007
if 0x35 call 0x30333433
if 0x30 call 0x30075D07
if 0x3E call 0x34333507
playsong 0x3334 0x3F
if 0x30 call 0x5E073007
if 0x5F call 0x30073007
if 0x35 call 0x30333433
if 0x7F call 0x30073007
if 0x30 call 0x38074F07
if 0x38 call 0x38073807
if 0x38 call 0x35074607
playsong 0x3334 0x38
if 0x38 call 0x38076507
if 0x46 call 0x34333507
playsong 0x3334 0x47
if 0x38 call 0x66073807
if 0x67 call 0x38073807
if 0x35 call 0x38333433
if 0x87 call 0x38073807
if 0x38 call 0x35075607
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3334 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x34
playsong 0x3334 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x34
playsong 0x3335 0x35
playsong 0x3335 0x35
playsong 0x3335 0x4E
playsong 0x3334 0x90
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x756 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x34
playsong 0x3334 0x0
nop
comparefarbytetobyte 0x13000000 0x0
nop
nop
Anyone see anything I'm doing stupid? I thought it could be something in the script not existing in FR, but I don't see anything greater than 0xD5 except for 0xFE, which is supposedly in FR.