XSE Tutorial #2: Giving Pokemon
Let me clear, the first 10-15 tutorials will be he basics. Then the rest are tutorials that you might not understand without knowing the basics. So I suggest you go through this series by ORDER.
The full script
Here is the full script:
#dynamic 0x80000
#org @givepokemon
lock
faceplayer
checkflag 0x1200
if 0x1 goto @done
msgbox @question 0x5
compare LASTRESULT 0x1
compare LASTRESULT 0x1
if 0x1 goto @giveit
msgbox @nothanks 0x6
release
end
#org @done
msgbox @checkup 0x6
release
end
#org @giveit
msgbox @thanks 0x6
givepokemon 0xB5 0x32 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @received 0x6
waitfanfare
setflag 0x1200
msgbox @thankssequel 0x6
release
end
#org @question = Hey trainer!\pYou want an Ampharos?\nIt's Level 50! #org @nothanks = Alright fine! You won't\nmake it in the trainer\lworld anyway! #org @thanks = Good! Here! #org @thankssequel = I hope you become the /n strongest trainer! #org @recieved = \v\h01 got a mon! #org @checkup = Keep it.
As you can see, it's long. But don't fear, you'll get it in no time. We will go to the important ones only.
setflag 0x1200
msgbox @thankssequel 0x6
release
end
#org @question = Hey trainer!\pYou want an Ampharos?\nIt's Level 50! #org @nothanks = Alright fine! You won't\nmake it in the trainer\lworld anyway! #org @thanks = Good! Here! #org @thankssequel = I hope you become the /n strongest trainer! #org @recieved = \v\h01 got a mon! #org @checkup = Keep it.
As you can see, it's long. But don't fear, you'll get it in no time. We will go to the important ones only.
checkflag 0x1200
It is very hard to explain the checkflag, but use this checkflag to prevent glitches.
The if conditions and the msgboxes
The if is a condition for yes or no. if 0x0 is NO and if 0x1 is yes.
Thus why the msgbox is 0x5.
And just like the msgbox, the set dynamic offsets in the IF (@done and @giveit) is a jump to the scripts.
Compare LASTRESULT will be hard to explain, so it won't be here.
givepokemon 0xB5 x32 0x0 0x0 0x0 0x0
This is the information of the given pokemon. Your only problem is that the moveset is default.
Anyway, the needed numbers are converted to hex.
There are 6 0xs in total.
Here is the order of the 0xs:
Thus ending our tutorial.
There are 6 0xs in total.
Here is the order of the 0xs:
- Pokemon #
- Pokemon level
- Item #
- Filer (just make it 0x0)
- Filer (just make it 0x0)
- Filer (just make it 0x0)
fanfare 0x13E
This certain fanfare contains the Sappy Song that will play once the player receives the pokemon.
Some stuff
My Youtube Channel: VidyMc 1st One
I am currently makng a rom hack called Pokemon Holocaust. If you want to help construct the beta, comment your ideas here.
Comments
Post a Comment