someone from tk 6D
February 29th, 2012, 10:26 AM
Hi,im someone from TK 6D and i'm here with a XSE tutorial. Please give me some constructive comments and dont be afraid to criticize me.P.S. If you liked my tutorial, you could apply for my new project,pokemon darknos soul.As this tutorial only works with XSE v1.1.1,only use that version of XSE.Onwards!
THE BASICS OF SCRIPTING
in this part of scripting,well learn the basics.click the spoiler to find out more......
okay, a basic text script. this makes a person talk. ill show you a sample,then i'll explain the commands.
CODE:
#dynamic 0x(offset)
#org @start
lock
faceplayer
msgbox @text 0x6
release
end
#org @start
=Hi!/nim TOM DICKHARRY.
EXPLANATION OF COMMANDS::::::
Okay, looks a bit intimidating,but it,s pretty easy.
#dynamic:the starting line of a script.ALL scripts start with this line.
0x(offset):the 0x.... is also compulsory. the offset is basically a number that you put into a script to get unused space in the rom. how to get the offset?
HOW TO GET THE OFFSET:
In XSE, go to tools, then HEX VIEWER. scroll down until you see a whole row of 0000 0000 0000..... yeah,like that. then, on the right side of the 0s, you will see 0x(some random number) remember the number after the 0x...... and copy it.
Now, go back to XSE and in the 0x......... replace the........ with the number in the hex viewer. NOTE: YOU CANT USE EACH NUMBER TWICE.
EXPLANATION OF COMMANDS CONT:
#org @start: also compulsory. @start is a pointer. pointers can be @(whatever word you like.) NOTE: pointers cannot have any spaces, so these wont work : @ hi i suck,@ hi i rock,@ pikachu !
while these will work:@sert @qwerty,@zxcvbnm.
lock:locks the player in place so that he cant move when talked to.
XTRA: a new variation,, LOCKALL locks EVERYONE in place. if you use lockall,releaseall also has to be used.
msgbox @text 0x6: msgbox is basically to call out the text box. textbox 0x6 is a normal textbox. a pointer always follows after msgbox command.
faceplayer: makes the player face the person when being talked to.
release: releases the player.
XTRA: a new variation, RELEASEALL relezases everyone. only use this if lockall was used before.
/n: makes the text move to another line...
end: ends the script.
easy right? now that we know text messages, lets move on to the next section! [/SPOILER ]!!!!!!
Now, youve finished learning text scripts,now lets move on to .....
YES/NO SCRIPTS!
[SPOILER ] alright, the yes or no scripts! these scripts give you a result based on your YES/No answer. i won't explain the commands you already know,just the new ones......
CODE:
#dynamic 0x(offset)
#org @start
lock
faceplayer
msgbox @yesno 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end
#org @yesno
(equal symbol)yes or no????
#org @yes
msgbox @yipee 0x6
release
end
#org @no
msgbox @bad 0x6
release
end
#org @yipee
(equal symbol)you said yes!
#org @bad
(equal symbol)you said no.
.............................................................
EXPLANATION......
quite a lot to cover here people!
boxtyype:0x5 : this boxtype is basically the command to call out the small yes or no option box.
if 0x1/0x0 goto @yes/@no: if is a very powerful command. it gives the script two possibilities. if you press yes,what will happen, and if you press no, what will happen. 0x0 is NO and 0x1 is yes goto is just a command.
thats all for YES or NO scripts. the nest section tells you about flags.[/SPOILER ]
Okay, you've made it this far, scripter apprentice. now for flags. check it out
FLAGS[SPOILER ]
......................................................................................................................................................
Flags are pretty basic. it's just a way of cheacking events in the game.
CODE:(CREDITs GO TO SHINY QUAGSIRE)
#dynamic 0x(offset)
#org @start
lock
faceplayer
checkflag 0x860(for emerald)/0x828(for FR/LG)
if 0x1 goto @talked
setflag 0x860/0x828
msgbox @msg 0x2
release
end
#org @talked
msgbox @talkd 0x2
release
end
#org @msg
givepokemon 0x1 0xD 0x1 0x0 0x0 0x0
#org @talkd
= You already talked to me !
EXPLANATION
allright people, calm down. i know this script has the long awaited givepokemon command but later......okay? sheesh!
............................................................................
setflag: this command basically checks a flag.
flag 0x828/0x860:this flag basically opens the pokemon menu.there are many more flags that do many more things. check it out!
FLAGS FOR FR/LG:
0x820 - First Badge
0x821 - Second Badge
0x822 - Third Badge
0x823 - Fourth Badge
0x824 - Fifth Badge
0x825 - Sixth Badge
0x826 - Seventh Badge
0x827 - Eighth Badge
0x828 - Pokemon Menu
0x829- Pokedex Menu
0x82F - Running Shoes
EMERALD
0x860 Pokemon Menu
0x861 Pokedex Menu
0x862 Pokenav menu
EXPLANATION OF COMMANDS CONT.
checkflag:checks the flag later
setflag:sets a flag
another command,not in this script, is the command clearflag i'll explain it below.
....................................................................................................................................................
clearflag:clears a flag after you have set it. only use it after you have used the commmand SETFLAG.[/SPOILER ]now we are moving on to the 2 much awaited commands.....GIVEPOKEMON and......GIVEITEM. onwards!!!!!!!
GIVEPOKEMON AND GIVEITEM[SPOILER ] okay, givepokemon command shall be explained forst,followed by the giveitem command.
............................................................................................................
GIVEPOKEMON:
CODE:
........................................................................................................................................................
#dynamic 0x(offset)
#org @start
lock
faceplayer
givepokemon 0x(pokemon number in hex) 0x(pokemon level in hex) 0x(pokemon item in hex)0x0 0x0 0x0
release
end
pretty self explanatory.i've already explained it there.
moving on....
........................................................................................................................................................
GIVEITEM
CODE:
#dynamic 0x(offset)
#org @start
lock
faceplayer
giveitem 0x( item number in hex) 0x(quantity of itemm)
release
end[/SPOILER ]
........................................................................................................................................................
OKAY, thats the end of my XSE tut. i hope you enjoyed and appreciate it. please post!
THE BASICS OF SCRIPTING
in this part of scripting,well learn the basics.click the spoiler to find out more......
okay, a basic text script. this makes a person talk. ill show you a sample,then i'll explain the commands.
CODE:
#dynamic 0x(offset)
#org @start
lock
faceplayer
msgbox @text 0x6
release
end
#org @start
=Hi!/nim TOM DICKHARRY.
EXPLANATION OF COMMANDS::::::
Okay, looks a bit intimidating,but it,s pretty easy.
#dynamic:the starting line of a script.ALL scripts start with this line.
0x(offset):the 0x.... is also compulsory. the offset is basically a number that you put into a script to get unused space in the rom. how to get the offset?
HOW TO GET THE OFFSET:
In XSE, go to tools, then HEX VIEWER. scroll down until you see a whole row of 0000 0000 0000..... yeah,like that. then, on the right side of the 0s, you will see 0x(some random number) remember the number after the 0x...... and copy it.
Now, go back to XSE and in the 0x......... replace the........ with the number in the hex viewer. NOTE: YOU CANT USE EACH NUMBER TWICE.
EXPLANATION OF COMMANDS CONT:
#org @start: also compulsory. @start is a pointer. pointers can be @(whatever word you like.) NOTE: pointers cannot have any spaces, so these wont work : @ hi i suck,@ hi i rock,@ pikachu !
while these will work:@sert @qwerty,@zxcvbnm.
lock:locks the player in place so that he cant move when talked to.
XTRA: a new variation,, LOCKALL locks EVERYONE in place. if you use lockall,releaseall also has to be used.
msgbox @text 0x6: msgbox is basically to call out the text box. textbox 0x6 is a normal textbox. a pointer always follows after msgbox command.
faceplayer: makes the player face the person when being talked to.
release: releases the player.
XTRA: a new variation, RELEASEALL relezases everyone. only use this if lockall was used before.
/n: makes the text move to another line...
end: ends the script.
easy right? now that we know text messages, lets move on to the next section! [/SPOILER ]!!!!!!
Now, youve finished learning text scripts,now lets move on to .....
YES/NO SCRIPTS!
[SPOILER ] alright, the yes or no scripts! these scripts give you a result based on your YES/No answer. i won't explain the commands you already know,just the new ones......
CODE:
#dynamic 0x(offset)
#org @start
lock
faceplayer
msgbox @yesno 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end
#org @yesno
(equal symbol)yes or no????
#org @yes
msgbox @yipee 0x6
release
end
#org @no
msgbox @bad 0x6
release
end
#org @yipee
(equal symbol)you said yes!
#org @bad
(equal symbol)you said no.
.............................................................
EXPLANATION......
quite a lot to cover here people!
boxtyype:0x5 : this boxtype is basically the command to call out the small yes or no option box.
if 0x1/0x0 goto @yes/@no: if is a very powerful command. it gives the script two possibilities. if you press yes,what will happen, and if you press no, what will happen. 0x0 is NO and 0x1 is yes goto is just a command.
thats all for YES or NO scripts. the nest section tells you about flags.[/SPOILER ]
Okay, you've made it this far, scripter apprentice. now for flags. check it out
FLAGS[SPOILER ]
......................................................................................................................................................
Flags are pretty basic. it's just a way of cheacking events in the game.
CODE:(CREDITs GO TO SHINY QUAGSIRE)
#dynamic 0x(offset)
#org @start
lock
faceplayer
checkflag 0x860(for emerald)/0x828(for FR/LG)
if 0x1 goto @talked
setflag 0x860/0x828
msgbox @msg 0x2
release
end
#org @talked
msgbox @talkd 0x2
release
end
#org @msg
givepokemon 0x1 0xD 0x1 0x0 0x0 0x0
#org @talkd
= You already talked to me !
EXPLANATION
allright people, calm down. i know this script has the long awaited givepokemon command but later......okay? sheesh!
............................................................................
setflag: this command basically checks a flag.
flag 0x828/0x860:this flag basically opens the pokemon menu.there are many more flags that do many more things. check it out!
FLAGS FOR FR/LG:
0x820 - First Badge
0x821 - Second Badge
0x822 - Third Badge
0x823 - Fourth Badge
0x824 - Fifth Badge
0x825 - Sixth Badge
0x826 - Seventh Badge
0x827 - Eighth Badge
0x828 - Pokemon Menu
0x829- Pokedex Menu
0x82F - Running Shoes
EMERALD
0x860 Pokemon Menu
0x861 Pokedex Menu
0x862 Pokenav menu
EXPLANATION OF COMMANDS CONT.
checkflag:checks the flag later
setflag:sets a flag
another command,not in this script, is the command clearflag i'll explain it below.
....................................................................................................................................................
clearflag:clears a flag after you have set it. only use it after you have used the commmand SETFLAG.[/SPOILER ]now we are moving on to the 2 much awaited commands.....GIVEPOKEMON and......GIVEITEM. onwards!!!!!!!
GIVEPOKEMON AND GIVEITEM[SPOILER ] okay, givepokemon command shall be explained forst,followed by the giveitem command.
............................................................................................................
GIVEPOKEMON:
CODE:
........................................................................................................................................................
#dynamic 0x(offset)
#org @start
lock
faceplayer
givepokemon 0x(pokemon number in hex) 0x(pokemon level in hex) 0x(pokemon item in hex)0x0 0x0 0x0
release
end
pretty self explanatory.i've already explained it there.
moving on....
........................................................................................................................................................
GIVEITEM
CODE:
#dynamic 0x(offset)
#org @start
lock
faceplayer
giveitem 0x( item number in hex) 0x(quantity of itemm)
release
end[/SPOILER ]
........................................................................................................................................................
OKAY, thats the end of my XSE tut. i hope you enjoyed and appreciate it. please post!