I'm using Advance Map and XSE to change some of the scripts in Emerald.
After you beat your rival the first time and return to Prof. Birch's lab he lets you nickname your starter and your rival gives you Pokeballs.
I've checked all the script tiles and all the map scripts but none of them seem to contain the code relating to that whole event.
I did find one script inside the Lab's Header tab that looks like this:
'---------------
#org 0x1F9CA1
call 0x8271ED7
call 0x82720AD
compare 0x40D3 0x6
if 0x4 goto 0x81F9CF7
compare 0x40D3 0x4
if 0x4 goto 0x81F9CF3
compare 0x40D3 0x3
if 0x1 goto 0x81F9CCD
end
'---------------
#org 0x271ED7
checkgender
compare LASTRESULT 0x0
if 0x1 goto 0x8271EEF
compare LASTRESULT 0x1
if 0x1 goto 0x8271EF5
end
'---------------
#org 0x2720AD
compare 0x4085 0x0
if 0x1 goto 0x827374E
checkflag 0x864
if 0x1 goto 0x827211A
compare 0x4049 0x0
if 0x1 call 0x827211A
compare 0x4049 0x1
if 0x1 call 0x827211A
compare 0x4049 0x2
if 0x1 call 0x8272127
compare 0x4049 0x3
if 0x1 call 0x8272127
compare 0x4049 0x4
if 0x1 call 0x8272134
compare 0x4049 0x5
if 0x1 call 0x8272134
compare 0x4049 0x6
if 0x1 call 0x827211A
compare 0x4049 0x7
if 0x1 call 0x827211A
return
'---------------
#org 0x1F9CF7
setmapfooter 0x1B0
spritebehave 0x3 0x3
movesprite2 0x3 0x5 0xA
end
'---------------
#org 0x1F9CF3
setmapfooter 0x1B0
end
'---------------
#org 0x1F9CCD
special2 LASTRESULT 0x151
compare LASTRESULT 0x1
if 0x1 goto 0x81F9CE9
spritebehave 0x3 0x3
movesprite2 0x3 0x5 0xA
end
'---------------
#org 0x271EEF
setvar 0x4010 0x69
return
'---------------
#org 0x271EF5
setvar 0x4010 0x64
return
'---------------
#org 0x27374E
return
'---------------
#org 0x27211A
clearflag 0x2D1
clearflag 0x380
setflag 0x381
setflag 0x382
return
'---------------
#org 0x272127
clearflag 0x381
setflag 0x2D1
setflag 0x380
setflag 0x382
return
'---------------
#org 0x272134
clearflag 0x382
setflag 0x381
setflag 0x2D1
setflag 0x380
return
'---------------
#org 0x1F9CE9
setvar 0x40D3 0x4
goto 0x81F9CF3
It's called when entering the map so I imagine it has something to do with it, but it doesn't seem to contain any applymovements that force the player to move up when entering the building.
Am I missing something? Also is there any other way to find scripts with like a search function or something?
After you beat your rival the first time and return to Prof. Birch's lab he lets you nickname your starter and your rival gives you Pokeballs.
I've checked all the script tiles and all the map scripts but none of them seem to contain the code relating to that whole event.
I did find one script inside the Lab's Header tab that looks like this:
Spoiler:
'---------------
#org 0x1F9CA1
call 0x8271ED7
call 0x82720AD
compare 0x40D3 0x6
if 0x4 goto 0x81F9CF7
compare 0x40D3 0x4
if 0x4 goto 0x81F9CF3
compare 0x40D3 0x3
if 0x1 goto 0x81F9CCD
end
'---------------
#org 0x271ED7
checkgender
compare LASTRESULT 0x0
if 0x1 goto 0x8271EEF
compare LASTRESULT 0x1
if 0x1 goto 0x8271EF5
end
'---------------
#org 0x2720AD
compare 0x4085 0x0
if 0x1 goto 0x827374E
checkflag 0x864
if 0x1 goto 0x827211A
compare 0x4049 0x0
if 0x1 call 0x827211A
compare 0x4049 0x1
if 0x1 call 0x827211A
compare 0x4049 0x2
if 0x1 call 0x8272127
compare 0x4049 0x3
if 0x1 call 0x8272127
compare 0x4049 0x4
if 0x1 call 0x8272134
compare 0x4049 0x5
if 0x1 call 0x8272134
compare 0x4049 0x6
if 0x1 call 0x827211A
compare 0x4049 0x7
if 0x1 call 0x827211A
return
'---------------
#org 0x1F9CF7
setmapfooter 0x1B0
spritebehave 0x3 0x3
movesprite2 0x3 0x5 0xA
end
'---------------
#org 0x1F9CF3
setmapfooter 0x1B0
end
'---------------
#org 0x1F9CCD
special2 LASTRESULT 0x151
compare LASTRESULT 0x1
if 0x1 goto 0x81F9CE9
spritebehave 0x3 0x3
movesprite2 0x3 0x5 0xA
end
'---------------
#org 0x271EEF
setvar 0x4010 0x69
return
'---------------
#org 0x271EF5
setvar 0x4010 0x64
return
'---------------
#org 0x27374E
return
'---------------
#org 0x27211A
clearflag 0x2D1
clearflag 0x380
setflag 0x381
setflag 0x382
return
'---------------
#org 0x272127
clearflag 0x381
setflag 0x2D1
setflag 0x380
setflag 0x382
return
'---------------
#org 0x272134
clearflag 0x382
setflag 0x381
setflag 0x2D1
setflag 0x380
return
'---------------
#org 0x1F9CE9
setvar 0x40D3 0x4
goto 0x81F9CF3
It's called when entering the map so I imagine it has something to do with it, but it doesn't seem to contain any applymovements that force the player to move up when entering the building.
Am I missing something? Also is there any other way to find scripts with like a search function or something?