#dynamic 0x800000 <- Where XSE will find free-space to insert your script.
#org @start <- Starts the script.
lock <- Locks the player to the NPC.
faceplayer <- The NPC will face the player.
msgbox @question 0x5 <- Makes a textbox with a yes/no multichoice box appear. It makes the text on the "@question" appear.
compare LASTRESULT 0x1 <- Checks if you choose "YES" as your answer.
if 0x1 goto @yes <- If it is true that you chose "YES" then the script will continue or go to the pointer "@yes"
compare LASTRESULT 0x0 <- Checks if you choose "NO" as your answer.
if 0x1 goto @no <- If it is true that you chose "NO" then the script will contninue or go to the pointer "@no"
end
#org @yes <- Pointer "@yes" serves as a bookmark of this part of the script.
msgbox @great 0x6 <- Makes a normal textbox to appear that will close after you click when the text is finished. It makes the text at the pointer "@great" appear.
trainerbattle 0x3 0x(Trainer ID) 0x0 @win <- Makes a battle to start with a trainer, replace "(Trainer ID)" with the Trainers ID no. (You can edit Trainers using A-Trainer), 0x3 is the trainer battle type and there are many types of it which is explained in my tutorial
here. And the pointer "@win" refers to the text to be displayed when you defeat your opponent.
msgbox @after 0x6 <- Makes a normal textbox to appear that will close after you click when the text is finished. It makes the text at the pointer "after" appear.
giveegg 0x1 <- Gives a Bulbasaur Egg.
givepokemon 0x19 0x5 0x0 0x0 0x0 0x0 <- This gives you a Level 5 Pikachu.
giveitem 0x4 0x5 0x0 <- Now this one gives you 5 Poké Balls and displays a script at the end that you received the item that you gave to the player.
msgbox @takecare 0x6 <- Makes a normal textbox to appear that will close after you click when the text is finished. It makes the text at the pointer "takecare" appear.
applymovement 0x(Person Event No.) @move <- This is a movement command and replace "(Person Event No.)" with the Person Event No. of the OW you want to move. (You can view that in Advance Map.) And the pointer "@move" refers to the movement that is going to be done.
waitmovement 0x0 <- Waits for the movements to finish.
sound 0x9 <- Makes a door sound, since you want the person bearing this script to disappear in the house by goignout.
hidesprite 0x(Person Event No.) <- Hides the sprite of the OW that has the Person Event No. it uses.
setflag 0x200 <- Sets the flag 200, put it in the Person ID so the OW will dissappear forever!
release <- Releases the player, this is needed to be in the end of the scripts if you put a "lock" command at your script.
end <- Ends the script.
#org @no
msgbox @ok 0x6 <- Makes a normal textbox to appear that will close after you click when the text is finished. It makes the text at the pointer "ok" appear.
release <- Releases the player, this is needed to be in the end of the scripts if you put a "lock" command at your script.
end <- Ends the script.
#org @question
= Hey \v\h01!\pWould you like to have a battle\nwith me? <- The text to be displayed in pointer "@question".
#org @great
= Great!\pI won't hold back though! <- The text to be displayed in pointer "@great".
#org @win
= What?!\pHow could I lose? <- The text to be displayed in pointer "@win".
#org @after
= Pretty nice battle \v\h01!\pIt was so much fun, even though I\nlost.\pI'll win next time anyways!\pOh, and here are some things from\nme to you.\pA Bulbasaur EGG, Pikachu, and 5\nPoké Balls! <- The text to be displayed in pointer "@after".
#org @takecare
= Take care of them \v\h01 ok?\pWell, I'll be going now, I'll be\nseing you later. <- The text to be displayed in pointer "@takecare".
#org @ok
= Ok, come back if you change your\nmind. <- The text to be displayed in pointer "@ok".
#org @move <- The movements to be done in pointer "@move". #raw 0x10 = One Step Down. You can view the full list of the movements in my tutorial.
#raw 0x10 <- One Step Down.
#raw 0x10 <- One Step Down.
#raw 0x10 <- One Step Down.
#raw 0x10 <- One Step Down.
#raw 0x10 <- One Step Down.
#raw 0x10 <- One Step Down.
#raw 0xFE <- Ends the movement.