• 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

TB Pro

Old-timer
2,708
Posts
19
Years
FIXED...KINDA
Game: FireRed
Type: Level
Editor: XSE
Script:
Spoiler:


Problem: When I compile this script into the game, and set it up, you know blah, it deletes all the other scripts in the game. I don't know if the foul-up is caused by me not putting it in correctly, or what. Thanks for the help.
 
Last edited:

Andryandrew

Italian Asm Hacker
117
Posts
17
Years
  • Age 30
  • Seen Jul 4, 2015
Spoiler:
Spoiler:
 
If I may ask another question:

Firered/ XSE

I have two scripts here: The first is a script I wrote that will move the main character back a step.
script 1
Spoiler:


It will work the first time you step on the tile, but if you step on the tile a second time, the message will appear, and the game freezes. My main problem is the interaction with the second script:

Script 2:
Spoiler:


This second script is attached to a person event. It also works, however, only if you activate it before you activate the first script, otherwise, it will freeze. I'm assuming that I've scripted something wrong, so that the scripts can't work with one another?

Many thanks in advance, if you can help me out.
 
Last edited:

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
If I may ask another question:

Firered/ XSE

I have two scripts here: The first is a script I wrote that will move the main character back a step.
script 1
Spoiler:


It will work the first time you step on the tile, but if you step on the tile a second time, the message will appear, and the game freezes. My main problem is the interaction with the second script:

Script 2:
Spoiler:


This second script is attached to a person event. It also works, however, only if you activate it before you activate the first script, otherwise, it will freeze. I'm assuming that I've scripted something wrong, so that the scripts can't work with one another?

Many thanks in advance, if you can help me out.

Well, one problem is that you dont have a movement 0xFE at the end of those movements... (Finish Movement)
Try adding it and then coming back here? Okay hon'?

~0a :t282:
 
Last edited:
[solved]

Well, one problem is that you dont have a movement 0xFE at the end of those movements... (Finish Movement)
Try adding it and then coming back here? Okay hon'?

Ok. That fixes the first script right up. Now when the second script is activated, it will work, and then when I go back to the first tile script, the game will freeze up. So do I need to put in a call for yes and point it to an end command in order to remove the script? Thank you for your time.
 
Last edited:
30
Posts
15
Years
  • Seen Oct 6, 2009
Uhm, can anyone help?

I have a basic givepokemon script that makes your dad give you an eevee. The dad is replacing your mom in the game, but I want to know if I can merge the script I have with the original mom script.


Here's the Eevee one. It also sets the running shoes flag, but I might remove that as its not working. I can easily make someone else give you them.

Code:
#org $start
lock
faceplayer
checkflag 0x828
if b_true goto $done
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 133 5 0
fanfare 0x13E
message $3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
boxset 6
goto $shoes
release
end

#org $shoes
message $9
fanfare 0x13E
message $7
boxset 4
waitfanfare
#raw 0x68
setflag 0x860
message $8
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $done
message $6
boxset 6
release
end

#org $1
$1 1 =So, \v\h01, today is the day\n you set off.\pI know you've always wanted to\n search for your mother.\pAnyway, this was your\nmother's Eevee.\pDo you want it?

#org $2
$2 1 =Are you sure? You really\nshould take it.

#org $3
$3 1 =\c\h01\h02You received an Eevee!

#org $4
$4 1 =\c\h01\h02Would you like to rename Eevee?

#org $5
$5 1 =Take Care of Eevee.

#org $6
$6 1 =I hope you're taking good care of\nEevee.

#org $7
$7 1 =\c\h01\h02You received the Running Shoes!

#org $8
$8 1 =\c\h01\h02 Start blazing trails of adventure by holding B!

#org $9
$9 1 =Oh, take these too!\nI think they'll be\nuseful for your journey.

#org $10
$10 1 =\v\h01! I nearly forgot. Professor Aspen in Quentila Town has\na package for you.\pYou should go and see him.\pGood luck \v\h01.



And I'm using FireRed if you need to know.
 

Novus

The English Kiwi
183
Posts
15
Years
Hi, I'm making a hack and am having a problem with a script I made. As you're about to leave your house your mum comes up to you and says some stuff and then walks away offscreen. But when I do the 'debug script' in XSE, it says:

Spoiler:


This is my script:

Spoiler:


What's wrong?
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Ok. That fixes the first script right up. Now when the second script is activated, it will work, and then when I go back to the first tile script, the game will freeze up. So do I need to put in a call for yes and point it to an end command in order to remove the script? Thank you for your time.

Well, you should also always include a 'release', even if there is no lock, especially if nothing happens. (A checkflag does not really count) Try adding a release after the checkflag.
(But of course, here is a fabulous tip... Try adding a 'goto @TEXT' after the checkflag (Text can be anything) and then make it be;
#org @TEXT
release
end

Then just write down that pointer after you compile and use that whenever you need to simply 'end' a script, it will be a great time saver.)

~0A :t282:


Hi, I'm making a hack and am having a problem with a script I made. As you're about to leave your house your mum comes up to you and says some stuff and then walks away offscreen. But when I do the 'debug script' in XSE, it says:

Spoiler:


This is my script:

Spoiler:


What's wrong?

You forgot to add a 'done' section silly!
There are no sections that have,
#org @done
as there starter lines!
Another bit of information, this is not PokeScript anymore, Movements can be written on one line!
Also, you are going to want to update your copy of XSE, because XSE does not use 'boxset' anymore.
NOW it uses

message @talk 6

See, boxset, is now a part of 'message'!
So just add the #org @done section, including all of hte script you are going to need, and update XSE, and then fix that boxset, and this script will work fine!


I can't find ANY helpful Trainer Battle scripts(for XSE of course) in Tuts... Help?

Wel, you might want to update your XSE and look at the newest guide then huh? It comes with a section on trainer battles and all of it's glory!
Just get hte newest XSE, open it up, and press the F2 button!

~~0A
 
Last edited:

Razer Rage

Beginning Hacker
126
Posts
16
Years
  • Seen Jul 1, 2012
I'm working on the first script I've ever made, and I'm having trouble with XSE. I made one script and gave it a new offset I found with the FSF, compiled into my rom (at least I guess that's what I managed to do; you compile it just by clicking the button that looks like two blue gears, right?), went into the game and checked it out--it worked fine, the character talked just like he was supposed to. Except I'd messed up some of the dialogue and wanted to change it, so I went back into the script, changed the dialogue, and compiled it again.

But when I went back into the game it hadn't changed. I've tried several times. I've closed and opened XSE and compiled it again to see if it'd change, and saved in AdvanceMap after compiling to see if that would do any good. It hasn't.

What do I need to do to change a script once it's been compiled?

XSE is a little weird. It changes the offset of your script every time you compile it, but those changes are not reflected in the script itself until you reload it.

If you want to use the same offset, then you must first decompile the offset, add the changes, and then recompile it.

So for example, let's say your offset is 800000. In the toolbar (under the tabs) on the right hand side you will see "offset". Next to that is a field. Enter in the offset (in this case, 800000), and then click on the cross wrench/screwdriver symbol (or "decompile") next to the form. This will bring back the old script that was first compiled.

As far as I know, it is not possible to delete offsets, or scripts for that matter. Or, there is a way and I still can't figure it out. -.-

I have a couple of questions that I can't seem to find answers too. First off for offsets, why does the default seem to be 800000? What do all the numbers mean? :P I know that with flags it is recommended to go with 1000+ because up to 800 is reserved by the game, is this the case with offsets too?

Also, I've noticed that there are no warp points in advanced maps for built in game maps (like pallet town to route 1). I was wondering how this could be done with custom built maps?

I have other questions I'm sure, but I will use search first (which in my opinion, is not a very good search engine.).

Thanks.

EDIT: I just remembered, for some reason I can not access the built in XSE guide. When I try to open it I first get this page:

Navigation to the webpage was canceled

What you can try:

bullet.png
Retype the address.



Then when I try to navigate, I get this page:


The address is not valid

Most likely causes:


  • There might be a typing error in the address.
  • If you clicked on a link, it may be out of date.
What you can try:

bullet.png
Retype the address.


bullet.png
Go back to the previous page.


Help?
 
Last edited:
EDIT: I just remembered, for some reason I can not access the built in XSE guide. When I try to open it I first get this page:

Navigation to the webpage was canceled

What you can try:

bullet.png
Retype the address.



Then when I try to navigate, I get this page:


The address is not valid

Most likely causes:


  • There might be a typing error in the address.
  • If you clicked on a link, it may be out of date.
What you can try:

bullet.png
Retype the address.


bullet.png
Go back to the previous page.

Help?
I can't help with the other stuff, but I know the answer to the guide. What I had to do was allow it through the firewall on my computer. I'm pretty sure you're firewall is blocking it.
 

Razer Rage

Beginning Hacker
126
Posts
16
Years
  • Seen Jul 1, 2012
I can't help with the other stuff, but I know the answer to the guide. What I had to do was allow it through the firewall on my computer. I'm pretty sure you're firewall is blocking it.

That's what I was afraid of. I'm at school, and I think the router is configured to more or less block anything that is not an internet browser from accessing the internet. I've been able to get ONE program to work, but not the rest.

Why isn't the guide a part of the download package? In that case, does anyone know the web location of the guide? I'd like to be able to download it for when I'm not online. :)

EDIT: For those who can access the guide, I'm pretty sure you can get the location by right clicking on the page and then clicking "copy page location", or something like that.
 
Last edited:
30
Posts
15
Years
  • Seen Oct 6, 2009
help. I sorted the previous problem.

Anyways, I have the exit to the first town, its one block wide, and there's a mand stadning there. He's menat to tell you to go see you dad, unless you have a pokemon, whne he is supposed to walk off screen.

Earlier I had it working so you could talk to him without a poke and it'd be fine. But when you got it it would be glitchy text.

But now he doesn't even talk. DDDDDDDD;


Code:
#org $start
lock
faceplayer
checkflag 0x828
if b_true goto $done
message $1
boxset 6
release
end

#org $done
message $2
applymovement 0x06 $move
release
end

#org $move
#raw 0x13 0x13 0x13 0x13 0x13 0x60

#org $1
$1 1 = \v\h01! Are you leaving today?\nHave you talked to your father?\pI think you should.

#org $2
$2 1 =Oh, I see you have a pokemon now.\nI guess you can leave.



I think its something to do with the applymovement but I'm lost.
 

Corvus of the Black Night

Wild Duck Pokémon
3,416
Posts
15
Years
help. I sorted the previous problem.

Anyways, I have the exit to the first town, its one block wide, and there's a mand stadning there. He's menat to tell you to go see you dad, unless you have a pokemon, whne he is supposed to walk off screen.

Earlier I had it working so you could talk to him without a poke and it'd be fine. But when you got it it would be glitchy text.

But now he doesn't even talk. DDDDDDDD;


Code:
#org $start
lock
faceplayer
checkflag 0x828
if b_true goto $done
message $1
boxset 6
release
end
 
#org $done
message $2
applymovement 0x06 $move
release
end
 
#org $move
#raw 0x13 0x13 0x13 0x13 0x13 0x60
 
#org $1
$1 1 = \v\h01! Are you leaving today?\nHave you talked to your father?\pI think you should.
 
#org $2
$2 1 =Oh, I see you have a pokemon now.\nI guess you can leave.



I think its something to do with the applymovement but I'm lost.

Hmm, you don't have a boxset between the message 2 and the applymovement. You had one earlier, but I guess you forgot to encode the second one. Don't worry, I make stupid errors like that all the time XD

Also, unless you want the sprite to be moving after the release, I'd recommend a waitmovement command.
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
hiya Ive been working on my hack pokemon light and I was editing a script
for a wild pokemon I did everything the tutorial says but it dosent work here is my script
Spoiler:
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Hello people. I'm having trouble with a script. Im using the latest xse and am hacking ruby.

Spoiler:



Ok so the problem...

I want it to say the stuff at text1 if the flag is not set. Regardless of whether the checkflag thing isnt set that comes after. Right now it just goes straight to text2 even though it should go to text one. Idk if im making my self clear... (as always)
 

Novus

The English Kiwi
183
Posts
15
Years
Well, you should also always include a 'release', even if there is no lock, especially if nothing happens. (A checkflag does not really count) Try adding a release after the checkflag.
(But of course, here is a fabulous tip... Try adding a 'goto @TEXT' after the checkflag (Text can be anything) and then make it be;
#org @TEXT
release
end

Then just write down that pointer after you compile and use that whenever you need to simply 'end' a script, it will be a great time saver.)

~0A :t282:



You forgot to add a 'done' section silly!
There are no sections that have,
#org @done
as there starter lines!
Another bit of information, this is not PokeScript anymore, Movements can be written on one line!
Also, you are going to want to update your copy of XSE, because XSE does not use 'boxset' anymore.
NOW it uses

message @talk 6

See, boxset, is now a part of 'message'!
So just add the #org @done section, including all of hte script you are going to need, and update XSE, and then fix that boxset, and this script will work fine!



Wel, you might want to update your XSE and look at the newest guide then huh? It comes with a section on trainer battles and all of it's glory!
Just get hte newest XSE, open it up, and press the F2 button!

~~0A
OMG, now I just feel like an idiot, I can believe I didn't see that. Thanks OA.
 
30
Posts
15
Years
  • Seen Oct 6, 2009
Thanks for the help Pokemon Jupiter! But I have another problem.

Code:
#org $start
lock
faceplayer
checkflag 0x828
if b_true goto $done
message $1
boxset 6
release
end

#org $done
message $2
boxset 6
applymovement 0x06 $move
pausemove0x0
release
end

#org $move
#raw 0x10 0x10 0x12 0x10 0x10 0x10 0x10 0x60

#org $1
$1 1 = \v\h01! Are you leaving today?\nHave you talked to your father?\pI think you should.

#org $2
$2 1 =Oh, I see you have a pokemon now.\nI guess you can leave.


This is the new script. I've changed the movement, because it was moving the hero rather than the NPC. Now the corect person moves, they do it exactly right. Do their steps, go offscreen and then hide. But the Hero is now locked and you cannot move anywhere. D;
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
Guys this is urgent!!

Game: Fire Red BPRE
Script Type: Level Script
Level Script Type: 5 - on entering map/on menu close

Script

Spoiler:


It turns the player into an overworld and I need it to be type 5 because I need the player to remain as that overworld when the menu is closed. However the script doesn't turn the player into an different overworld.

Please help. Thanks in advance.
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Hello people. I'm having trouble with a script. Im using the latest xse and am hacking ruby.

Spoiler:



Ok so the problem...

I want it to say the stuff at text1 if the flag is not set. Regardless of whether the checkflag thing isnt set that comes after. Right now it just goes straight to text2 even though it should go to text one. Idk if im making my self clear... (as always)

Try changing lines 5 and 7 to
if 0x0 call @-----

(----- is the offset you wrote up there, in these cases, line 5 would be @uncle and line 7 would be @bro )
The problem is, that you are checking if it IS set, and if it is then go to @uncle.

What you are saying you WANT is to see if it is NOT set, and if it is NOT then call @uncle...
0x0 = NOT set
0x1 = YES set
get it?
 
Status
Not open for further replies.
Back
Top