• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Kaith

Hacker of Fire
49
Posts
12
Years
I'm trying to make the hero move backwards, keeping him from continuing until you talk to the rival. Everything works perfectly, even the message not showing up after you talk to your rival. The problem is the movement doesn't work at all. It's the same with every other script I try and have the hero move. I can get other sprites to move, just not the hero. Is there something wrong with my script, or is the problem in Advance Map?

Game: FireRed
Type: GBA
Editor: XSE
Scrpit:
Spoiler:
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I'm trying to make the hero move backwards, keeping him from continuing until you talk to the rival. Everything works perfectly, even the message not showing up after you talk to your rival. The problem is the movement doesn't work at all. It's the same with every other script I try and have the hero move. I can get other sprites to move, just not the hero. Is there something wrong with my script, or is the problem in Advance Map?

Game: FireRed
Type: GBA
Editor: XSE
Scrpit:
Spoiler:

you forgot to include the command "waitmovement 0" after your applymovement command. ;)
 

Cathar

/人◕ ‿‿ ◕人\
79
Posts
13
Years
  • Age 36
  • Seen Jul 23, 2016
I had a problem similar to this while editing the sign's infront of Red and Green's houses. All I had to do was rewrite the script. Do you use the text adjusters in XSE? That usual fixes most of your problems.

That doesn't work. It doesn't matter what I put in at that line, it always reduces it to E? when I close and re-open the script.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
It's actually "waitmovement 0x0", just sayin'.
XSE accepts decimal notation for all numeric values with the possible exception of ROM/RAM offsets. Decimal 0 and hexadecimal 0x0 are equal to each other and equally syntactically valid.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Thanks for the help! But do I have to include it after every single applymovement I use? The guide I'm using for XSE isn't very clear about this.
Only if you want the script to pause and wait for the movements to finish before running any further commands.
 

DrerAhv

She That Derps in the Night
9
Posts
13
Years
Remove the red. That needs to be a string and hence can't have commands. The commands can be safely removed since the script that shows that string also runs them.
Thank you. I have to ask another question about this particular script;
If I wanted to make the player stay still while the movements were applied and message boxes displayed, what would I do? As of now the movements/message boxes are only enacted when I walk up to the character and talk to them; I want it to happen automatically.

Code:
#org @start
 checkflag 0x828
 if 0x0 goto @hey! 
if 0x1 goto @nightmare 
end  

#org @hey! 
setflag 0x828 
lock 
applymovement 0x4 @alert 
waitmovement 0x0 
msgbox @awake 0x6 
release 
end  

#org @awake 
= [player], wake up! \nwe're here. We're here, \nplayer. 
 #org @alert 
#raw 0x56 0xFE 

 #org @nightmare 
checkflag 0x828 
if 0x0 goto @hey! 
if 0x1 goto @okay 
 #org @okay 
lock 
faceplayer 
msgbox @feeling 0x6 
release
end  

#org @feeling 
= [player], \nare you feeling okay? \nYou looked like you were \nhaving a nightmare.
 
Last edited:

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
Thank you. I have to ask another question about this particular script;
If I wanted to make the player stay still while the movements were applied and message boxes displayed, what would I do? As of now the movements/message boxes are only enacted when I walk up to the character and talk to them; I want it to happen automatically.

You would need a scriptbox for that.

http://www.youtube.com/watch?v=hRwY-aONgDo

He gives a whole video lesson on it. It's much easier than me typing it out, and it still being confusing. xP
 

Kaith

Hacker of Fire
49
Posts
12
Years
What command is used in XSE to give the hero the national pokedex?
I did look around but could not find it

special 0x16F

This just activates the national dex after you get the pokedex. You still need to add the message and sound effect if you want.

Source: diegoisawesome's MEGA-HUGE XSE Scripting Tutorial. http://www.pokecommunity.com/showthread.php?t=164276
Scroll down to the special section of the guide for a example.
 

eratez

Unbeatable trainer
2
Posts
12
Years
This script runs fine, but if I leave the room after talking to him, he disappears and won't come back. Can someone help me

Base:Ruby
Type: person
Editor: Pokescript
Script:
#org $prof
lock
faceplayer
checkflag 0x1216
if 0x01 goto $getpoke
message $You
$You 1 = Did you come for a pokémon.\nI will tell you what,\pif you promise to be good\nI will give you one.\lI have them right
boxset 6
applymovement 0x01 $move
message $omg
$omg 1 = ...\n...\p...\lThey're gone!!!
boxset 6
applymovement 0x01 $move2
fanfare 0x13E
message $ring
$ring 1 = That's my ringtone.
boxset 6
waitfanfare
message $answer
$answer 1 = Hello\n...\pOk.\n... ahem.\pOk, thanks, see you soon.\p\v\h01, they found my pokémon in\nNew Day.\pPlease go get a pokémon from\lmy aide to guide us there.
boxset 6
setflag 0x1216
release end
#org $move
#raw 0x03 0xFE
#org $move2
#raw 0x00 0xFE
#org $getpoke
checkflag 0x1212
if 0x01 goto $leave
message $getit
$getit 1 = Go to my aide and get a pokémon.
boxset 6
release
end
#org $leave
checkflag 0x1200
if 0x01 goto $danger
message $meet
$meet 1 = Meet me outside
boxset 6
fadescreen 1
#raw 0x53 0x01 0x00
pause 0x30
fadescreen 0
release
end
#org $danger
message $train
checkflag 0x1217
if 0x01 goto $luck
$train 1 = What happened to you\n...\pWhat, wow.\nYou must begin training to\pbe ready to fight when\lit comes
boxset 6
setflag 0x1217
release
end
#org $luck
message $goodl
$goodl 1 = Good luck on your training.
boxset 6
end
#org $check
checkflag 0x1200
if 0x01 gosub $appear
release
end
#org $appear
checkflag 0x1220
if 0x01 goto $script
#raw 0x55 0x01 0x00
return
#org $script
release
end
 

Kaith

Hacker of Fire
49
Posts
12
Years
What my script does is after you leave the house, Oak's assistant brings you and your rival to Oak's lab and they both go inside. (Don't point out that I haven't added the part for the door animation yet).

I want these two sprites (Rival and Oak's Assistant) to dissapear from Pallet town after this script finishes running, and they do temporarily but after I come out of Oak's lab, they're back out in front of the house you started at. How can I get them to dissapear permanently? They only need to appear once.

Rival's Person num=4 Event num=5
Assistant Person num=5 Event num=6

Game: Fire Red
Type: Hidesprite
Editor: XSE
Scrpit:
Spoiler:
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
What my script does is after you leave the house, Oak's assistant brings you and your rival to Oak's lab and they both go inside. (Don't point out that I haven't added the part for the door animation yet).

I want these two sprites (Rival and Oak's Assistant) to dissapear from Pallet town after this script finishes running, and they do temporarily but after I come out of Oak's lab, they're back out in front of the house you started at. How can I get them to dissapear permanently? They only need to appear once.

Rival's Person num=4 Event num=5
Assistant Person num=5 Event num=6

Game: Fire Red
Type: Hidesprite
Editor: XSE
Scrpit:
Spoiler:

You have to make their person number (I think, whichever one is easily changeable) the same as a flag, then you set the flag of their person number. For example, I make their person number 4A, I must setflag 4A to make them disappear.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
It's actually "waitmovement 0x0", just sayin'.
0 in decimal is same as 0x0 which is in hexadecimal.

Thanks for the help! But do I have to include it after every single applymovement I use? The guide I'm using for XSE isn't very clear about this.
I would suggest you to do it.
It's better and you won't get errors.
 
37
Posts
13
Years
  • Age 27
  • Seen Feb 7, 2014
I'm currently working on a Fire Red total modification. Currently, I've gotten to Route 4 of my world, where you must battle Team Rocket. I'm having problems with making Team Rocket disappear after you fight the leader of the group of them.

I'm using XSE and Advance Map 1.92

Here are Person event no.'s:
1 (Basic guy you talk to)
2 (Another basic guy you talk to)
3 (The guy you battle that has the hiding scripts)

This is the script I put for the guy you battle:


'---------------
#org 0x7A4DB8
trainerbattle 0x1 0x21A 0x0 0x87A4DE4 0x87A4E03 0x87A4E6C
end

'---------------
#org 0x7A4E6C
msgbox 0x87A4E29 MSG_FACE '"TEAM ROCKET, escort me to\nSURLANK..."
fadescreen 0x1
setflag 0x2008
hidesprite 0x1
hidesprite 0x2
hidesprite 0x3
fadescreen 0x0
setflag 0x258 (This flag is to get ride of a policeman guarding Route 5 once you exit the house you're in with Team Rocket)
release
end


'---------
' Strings
'---------
#org 0x7A4DE4
= I am not who you think I am.

#org 0x7A4E03
= How could someone like you beat me?

#org 0x7A4E29
= TEAM ROCKET, escort me to\nSURLANK CITY!

--------------------------
I set all of the characters' person ID's to 2008.
After I battle the leader, the screen does fade, and all the characters do disappear. However, sometimes when you come back, they will either be there or not. When they are there, nothing will happen if you try to talk to any of them. Any help is greatly appreciated.
 

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
I'm currently working on a Fire Red total modification. Currently, I've gotten to Route 4 of my world, where you must battle Team Rocket. I'm having problems with making Team Rocket disappear after you fight the leader of the group of them.

I'm using XSE and Advance Map 1.92

Here are Person event no.'s:
1 (Basic guy you talk to)
2 (Another basic guy you talk to)
3 (The guy you battle that has the hiding scripts)

This is the script I put for the guy you battle:


'---------------
#org 0x7A4DB8
trainerbattle 0x1 0x21A 0x0 0x87A4DE4 0x87A4E03 0x87A4E6C
end

'---------------
#org 0x7A4E6C
msgbox 0x87A4E29 MSG_FACE '"TEAM ROCKET, escort me to\nSURLANK..."
fadescreen 0x1
setflag 0x2008
hidesprite 0x1
hidesprite 0x2
hidesprite 0x3
fadescreen 0x0
setflag 0x258 (This flag is to get ride of a policeman guarding Route 5 once you exit the house you're in with Team Rocket)
release
end


'---------
' Strings
'---------
#org 0x7A4DE4
= I am not who you think I am.

#org 0x7A4E03
= How could someone like you beat me?

#org 0x7A4E29
= TEAM ROCKET, escort me to\nSURLANK CITY!

--------------------------
I set all of the characters' person ID's to 2008.
After I battle the leader, the screen does fade, and all the characters do disappear. However, sometimes when you come back, they will either be there or not. When they are there, nothing will happen if you try to talk to any of them. Any help is greatly appreciated.



It could be the flag, some are temporary. Try setting them all to flag 0x258. It's more efficient, and you already know it works.

The reason when he says nothing when you return is because you already battled him, so the script goes straight to the 'end' command in 0x7A4DB8
 
124
Posts
12
Years
Game: Fire Red
Type: Signpost
Editor: XSE
Script: Sisnpost
Spoiler:



For some reason my signposts in my rom hack arn't working. I did the live update to XSE 1.1 and i can't think of anything else seeing as i followed diegosawesome tutorial correctly.

Replace '@' for '$'
Try this.
Spoiler:


I think it's just the small errors like 'lock' and 'release'.
Also, for sign boxsets, always use 0x6.
I don't know what 0x3 is but when I tested it, it didn't work.
Hopefully, this should solve your problem.

I'm trying to make the hero move backwards, keeping him from continuing until you talk to the rival. Everything works perfectly, even the message not showing up after you talk to your rival. The problem is the movement doesn't work at all. It's the same with every other script I try and have the hero move. I can get other sprites to move, just not the hero. Is there something wrong with my script, or is the problem in Advance Map?

Game: FireRed
Type: GBA
Editor: XSE
Scrpit:
Spoiler:

You need to add waitmovement 0x0 after any applymovement. For example:
Spoiler:


AND you've made a typo error in your script.

[qoute] #org @move
#raw 0x12
#raw 0xEF [/quote] It's #raw 0xFE. You've put 0xEF.

Hope this helps!

It still does the same thing

Double check ALL yours flags. You may have made an error with previous flags.
 
Last edited:
Status
Not open for further replies.
Back
Top