- 5,256
- Posts
- 17
- Years
- Age 27
- Leicester, UK
- Seen Mar 31, 2025
Edits in bold.
Okay, so it's best to just put 0x800000 at the beginning of scripts and let XSE give you the offset. This is a person event, I assume, so I've added in a lock and faceplayer. It would probably be best to show the Pokémon before the player has chosen to help influence them/remind them what Pokémon it is, etc.
If you're using the most recent version of XSE, then the boxset command is useless - just add 0x5, 0x2, 0x6, whatever after "msgbox @string1". As it's 0x5, you need to check whether the player said yes or no, so that's what the compare line is for - 0x1 means the player chose yes, 0x0 means the player chose no. The next line then sends the script to @give if the player did choose yes.
When using fanfares, it's probably best to use the format I've addded in, and finally, I've added a release end as it's needed.
All you need to do now is load your ROM in XSE, paste the script in, hit the blue gears (compile) button, copy the offset given for @start, and paste it in the Script offset input box of the person event you want the script to be assigned to, and hit save.
Hope I've helped.
Code:
#dynamic 0x[B]800000[/B]
#org @start
checkflag 0x828
if 0x1 goto @end
[B]lock
faceplayer[/B]
[B]showpokepic 0xE4 0x10 0x3[/B]
msgbox @poke [B]0x5[/B]
[B]compare LASTRESULT 0x1[/B]
if 0x1 goto @give
hidepokepic
release
end
#org @end
[B]release[/B]
end
#org @give
hidepokepic
givepokemon 0xE4 0x6 0x0 0x0 0x0 0x0
fanfare 0x13E
[B]preparemsg @given[/B]
[B]waitmsg[/B]
waitfanfare
setflag 0x828
[B]release
end[/B]
#org @poke
= Would you like HOUNDOUR, the\nDARK and FIRE-type POKéMON?
#org @given
= [B][PLAYER][/B] recieved HOUNDOUR!
If you're using the most recent version of XSE, then the boxset command is useless - just add 0x5, 0x2, 0x6, whatever after "msgbox @string1". As it's 0x5, you need to check whether the player said yes or no, so that's what the compare line is for - 0x1 means the player chose yes, 0x0 means the player chose no. The next line then sends the script to @give if the player did choose yes.
When using fanfares, it's probably best to use the format I've addded in, and finally, I've added a release end as it's needed.
All you need to do now is load your ROM in XSE, paste the script in, hit the blue gears (compile) button, copy the offset given for @start, and paste it in the Script offset input box of the person event you want the script to be assigned to, and hit save.
Hope I've helped.