• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

RaiRai-kun's XSE Tutorial [Updated Big-Time!]

Status
Not open for further replies.

Tropical Sunlight

The Faltine
3,476
Posts
16
Years
I actually have a script for getting a pokeball sprite (item)

#dynamic 0xoffset

#org @masterball
lock
msgbox @ugotmasterball
fanfare (forget the number i got it in my script)
waitfanfare
setflag 0x200
hidesprite 0x01
release
end

#org @ugotmasterball
= You got a Masterball!

(note: their may be some stuff i'm missing from my original script)
Ugh...
You don't have a giveitem...
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
You are not supposed to click debug, you are supposed to click compile. If the problem continues, post your script.

Ok... I just read this post, and I am disgusted!
You ALWAYS click DEBUG
Debug is the function that FINDS BUGS, so you can fix them BEFORE you put them into the game.

The error type, means that one of the parameters on line 16 of the script, is wrong.


Notice
Line #16 is HERE
givepokemon 282x 25x 0x0 0x0 0x0 0x0
You sure you dont see anything wrong?
look

282x?
25x?
WRONG
if you are trying to give a LV25 Gardevior, you are going to want to rewrite this one line...
You can either write this line as
givepokemon 282 25 0 0 0 0
OR, you can write it all as HEX, like THIS (Which is the way I do it for giggles)
givepokemon 0x11A 0x19 0x0 0x0 0x0 0x0

Now, that 2nd line may not look right, but it is, since 0x11A is the same as 282, and 0x19 is the same as 25
Try replacing that old givepokemon line, with the one I wrote.
 
2
Posts
14
Years
  • Seen Apr 23, 2009
Now, I wrote this script thingy here to give the player a VS Seeker as soon as they leave their house at the beggining of the game. (in my FireRed hack that I'm currently working on) But I can't compile it; it says:
"No #org directives were found. Cannot compile."
And I don't really understand that.
So what's wrong with my script?

#Dynamic 0x71C694

checkflag 0x292
if 0x0 goto @givevs
if 0x1 goto @end

#org @givevs
lockall
applymovement 0x3 @move
waitmovement
msgbox @takethis
giveitem 0x16A 0x1 0x0
fanfare 0x013D
waitfanfare
msgbox @recieved
msgbox @gottago
applymovement 0x3 @move2
waitmovement
hidesprite LASTTALKED
releaseall
end

#org @move
#raw 0x1
#raw 0xFE

#org @takethis
= ???: \c\h01\h06Hey, It's you!\nHeh, you probably don't know who I\lam.\pRegardless, don't forget this!

#org @recieved
= [PLAYER] recieved the VS SEEKER!

#org @gottago
= \c\h01\h06What is it? Why, it's a VS SEEKER!\nIt emits radio waves that can\lhypnotise other trainers into\lwanting to battle you again!\pIt can also be used as a cellphone.\pAnyway, I gotta go.\nG'bye!

#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x02
#raw 0x02
#raw 0x10
#raw 0xFE

#org @end
end
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Now, I wrote this script thingy here to give the player a VS Seeker as soon as they leave their house at the beggining of the game. (in my FireRed hack that I'm currently working on) But I can't compile it; it says:
"No #org directives were found. Cannot compile."
And I don't really understand that.
So what's wrong with my script?

#dynamic 0x71C694

#org @start
checkflag 0x292
if 0x0 goto @givevs
checkflag 0x292
if 0x1 goto @end

#org @givevs
lockall
applymovement 0x3 @move
waitmovement 0x0
msgbox @takethis 0x6
giveitem 0x16A 0x1 0x0
fanfare 0x013D
waitfanfare
msgbox @gottago 0x6
applymovement 0x3 @move2
waitmovement 0x0
hidesprite LASTTALKED
releaseall
end

#org @move
#raw 01 FE

#org @takethis
= ???: \c\h01\h06Hey, It's you!\nHeh, you probably don't know who I\lam.\pRegardless, don't forget this!

#org @gottago
= \c\h01\h06What is it? Why, it's a VS SEEKER!\nIt emits radio waves that can\lhypnotise other trainers into\lwanting to battle you again!\pIt can also be used as a cellphone.\pAnyway, I gotta go.\nG'bye!

#org @move2
#raw 10 10 10 10 02 02 10 FE

#org @end
release
end


First of all, you need a #org @whatever at the top
I am tired of posting this but...
READ YOUR ERROR CODES!
100% of the time, those error codes will tell you what is wrong in your script! STOP POSTING ABOUT ERROR CODES!

I fixed and optimized your script, check the quote.
All added stuff in in bold
Removed stuff is well... removed...
IFNO:
the D in dynamic should be lowercase...
All msgbox should have both a pointer, (@something) and a byte at the end telling it the boxset (0x6 for instance)
Movements dont need there own line per RAW, and if you say RAW, you dont need the 0x prefix of a HEX number, you can just write 1D for instance
Finally, giving the player a real item, like the VS Seeker, automatically displays the message FOR you, no need yo write your own, because if you do, it shows it twice!
 

.Seth

.explorer.
1,644
Posts
15
Years

Announcements

1. Please go to the "Script Help Thread" in the ROM Hacking section for major script help. Minor script errors may be posted.
2. I am remaking this tutorial, so please look for a new thread soon, since some of this thread has comments on the very first version of this tutorial.
3. This may be locked, due to obvious (^) reasons.
 
2
Posts
14
Years
  • Seen Apr 23, 2009
Thank you, Om3GA ARS3NAL. But it still won't compile right. If I reopen the script, it just comes up as this:

'-----------------------
#org 0x71C694
checkflag 0x292
if 0x0 goto 0x871C6A4
if 0x1 goto 0x871C844
'-----------------------
#org 0x71C6A4
lockall
'-----------------------
#org 0x71C844

And that doesn't work. How can I fix it?
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Thank you, Om3GA ARS3NAL. But it still won't compile right. If I reopen the script, it just comes up as this:

'-----------------------
#org 0x71C694
checkflag 0x292
if 0x0 goto 0x871C6A4
if 0x1 goto 0x871C844
'-----------------------
#org 0x71C6A4
lockall
'-----------------------
#org 0x71C844

And that doesn't work. How can I fix it?

You are going to have to go to the script help thread now. Rai has defined this thread as unused, please respect that.
 

Zanny77

I'm back, baby!
259
Posts
15
Years
This is the ONLY THING I cannot seem to figure out, and NO tutorial I have read (and I have read multiple ones on this site and many on others) have mentioned it. Once you have the first script done, what do you do to make another one? Do you make a new tab? Just write on the one you just made?

EDIT: I'm a liar. :\
Two things. I messed up the words on one of my scripts, but it won't let me compile. I tried to find a way around it, and managed to change it by changing the offset. I had another script that I had messed up (:\), and did the same thing, but now the person does nothing. How do I fix this, and is there a simpler way to change it if I mess up?
Here's the script that won't go at all:
Spoiler:
 
Last edited:

NTA

Where?
264
Posts
16
Years
  • Age 30
  • Seen Feb 10, 2012
msgbox @text2 0x6
where can i find the other pointers like 0x5 and 0x6?
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Now I see where bad scripting knowledge come from...

Code:
#org @start
lock
faceplayer
msgbox @yesno 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end

That's wrong and won't work. You can't use two ifs like that and there's not even a compare so the two ifs are pointless anyway. Also, some parts of the tutorial aren't updated for the newest XSE yet. So I would suggest the author fixing everything so people will have less problem with scripting. Thanks in advance.
 

DarkPrince304

Back to Hacking after exams!!!
167
Posts
14
Years
Can anyone make a script or explain me how to make a script to change the starting point of the game?
like in fire red i dont want to begin the game in my room...i want to begin the game in another place...so can anyone help me?
 
22
Posts
14
Years
  • Age 28
  • Seen Jun 14, 2015
as usual i probly over looked something, but it saves as a seperate file, right, so how does it get on the rom? or does it save to .XXX file and add script to rom?
 
Status
Not open for further replies.
Back
Top