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

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
Ash493 said:
Have you ever decompiled E4 script?
There are tons of flags to choose from =)

Sorry, I misinterpreted the question...I was thinking that dido was referring to a custom e4 script, rather than one of the existing ones...

...in that case, of course there are probably tons to choose from :D
(I never have decompiled an e4 script...yet. I'm fairly new to scripting)
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Sorry, I misinterpreted the question...I was thinking that dido was referring to a custom e4 script, rather than one of the existing ones...

...in that case, of course there are probably tons to choose from :D
(I never have decompiled an e4 script...yet. I'm fairly new to scripting)
I see =D It's cool =D It sometimes happens =)

For the #org @msg2, I will use a text adjuster to make it fit later.
As David said you needed goto function instead of call.
I would suggest using call only in special cases when you need to jump from one script to for example existing one in ROM =)
 

ZxC Mirai

Huh?
267
Posts
12
Years
Could someone tell what is wrong with this Script...
When i walk and near with it,,, It Restarts The Game I cant go to the Script tile
here is the Script. (PERSON IS HIDDEN)

Spoiler:


Help would be Greatly Appreciated! Thanks :D
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Could someone tell what is wrong with this Script...
When i walk and near with it,,, It Restarts The Game I cant go to the Script tile
here is the Script. (PERSON IS HIDDEN)

Spoiler:


Help would be Greatly Appreciated! Thanks :D

Setting a sprite to Hidden causes the game to restart, so it's not the script that's doing it.

You can either change it to the Hidden movement type that's at the end of the list of movement types instead of the one near the top, or (I recommend) setting the OW's Person ID # to 2c, which hides any sprite (in Fire Red) like it isn't there. The problem with the Hidden command is that the sprite is still there, and can be bumped into and interacted with - it just can't be seen. Setting the ID as 2C makes it as if the sprite isn't even on the map.
 

Alex

what will it be next?
6,408
Posts
17
Years
  • Seen Dec 30, 2022
I've been at it for the past hour, trying to fix this script myself, but I have to humbly ask for the community's help on this one.

First time scripting, what really confuses me is the simplicity of this script, I just don't understand why it won't work.

Spoiler:

lol the irony. When I go to talk to the NPC to whom I've assigned the script, the game doesn't freeze or anything. I hear the talking click sound, but no text box comes up. I'm not locked toward the NPC, nor does he immediately face me after pressing A. In fact, he seems to only face me after pressing A twice. As far as I can tell, there's no problems with the script. I'm thinking its probably an offset issue or something of the like.
 

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
I've been at it for the past hour, trying to fix this script myself, but I have to humbly ask for the community's help on this one.

First time scripting, what really confuses me is the simplicity of this script, I just don't understand why it won't work.

Spoiler:

lol the irony. When I go to talk to the NPC to whom I've assigned the script, the game doesn't freeze or anything. I hear the talking click sound, but no text box comes up. I'm not locked toward the NPC, nor does he immediately face me after pressing A. In fact, he seems to only face me after pressing A twice. As far as I can tell, there's no problems with the script. I'm thinking its probably an offset issue or something of the like.


Try a different offset, that one is really low. It's most likely the cause of the problem. At least, it would be for me.

Also, this problem happens with certain emulators, too, so it could be that.
 

Alex

what will it be next?
6,408
Posts
17
Years
  • Seen Dec 30, 2022
Try a different offset, that one is really low. It's most likely the cause of the problem. At least, it would be for me.

Also, this problem happens with certain emulators, too, so it could be that.

I tried using the offset A006AE this time, same thing. The person behaves as if I'm talking to it, but no still no text box.

Using VBA 1.7.2.
 
50
Posts
14
Years
  • Seen Aug 28, 2011
Still not working ):

'---------------
#org 0x201F60
lockall
checkflag 0x1232
if 0x1
goto 0x826D6CC
releaseall
end

'---------------
#org 0x26D6CC
applymovement MOVE_PLAYER
0x826D6E9
special 0x113
applymovement MOVE_CAMERA
0x826D6EC
waitmovement 0x0
special 0x114
setflag
0x1232
releaseall
end

'-----------
' Movements
'-----------
#org 0x26D6E9
#raw 0x62
'Exclamation Mark (!)
#raw 0xFE 'End of Movements


#org 0x26D6EC
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left
(Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x18 'Delay1
#raw 0x1E 'Step Up
(Fast)
#raw 0x20 'Step Right (Fast)
#raw 0x20 'Step Right (Fast)
#raw 0xFE 'End of Movements
 

niven

Leader of Team LegendaryTrio
109
Posts
12
Years
Still not working ):

'---------------
#org 0x201F60
lockall
checkflag 0x1232
if 0x1
goto 0x826D6CC
releaseall
end

'---------------
#org 0x26D6CC
applymovement MOVE_PLAYER
0x826D6E9
special 0x113
applymovement MOVE_CAMERA
0x826D6EC
waitmovement 0x0
special 0x114
setflag
0x1232
releaseall
end

'-----------
' Movements
'-----------
#org 0x26D6E9
#raw 0x62
'Exclamation Mark (!)
#raw 0xFE 'End of Movements


#org 0x26D6EC
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left
(Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x18 'Delay1
#raw 0x1E 'Step Up
(Fast)
#raw 0x20 'Step Right (Fast)
#raw 0x20 'Step Right (Fast)
#raw 0xFE 'End of Movements

is that 8 supposed to be there?

I'm trying to make a big script.I already wrote it but can't write it to my game, because every time i try i get an error. I use pokescript to compile and write scripts, it usually works, but this time i got run-time error '13' type mismatch.

My script is:
Spoiler:

Can someone reply to this?
 
Last edited:
5,256
Posts
16
Years
Still not working ):

'---------------
#org @start
lockall
checkflag 0x1232
if 0x1 goto @snippet1
releaseall
end

#org @snippet1
applymovement MOVE_PLAYER @move1
special 0x113
applymovement MOVE_CAMERA @move2
waitmovement 0x0
special 0x114
setflag 0x1232
releaseall
end

'-----------
' Movements
'-----------
#org @move1
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements


#org @move2
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x18 'Delay1
#raw 0x1E 'Step Up (Fast)
#raw 0x20 'Step Right (Fast)
#raw 0x20 'Step Right (Fast)
#raw 0xFE 'End of Movements
It seems there were some random new lines, and also if you were compiling it as you posted it wouldn't work as you specified the pointers in hex. :/ Try the code in the quote now.

is that 8 supposed to be there?
Yes, the 8 will be there because it is a hex pointer.
 

ZxC Mirai

Huh?
267
Posts
12
Years
I've been at it for the past hour, trying to fix this script myself, but I have to humbly ask for the community's help on this one.

First time scripting, what really confuses me is the simplicity of this script, I just don't understand why it won't work.

Spoiler:

lol the irony. When I go to talk to the NPC to whom I've assigned the script, the game doesn't freeze or anything. I hear the talking click sound, but no text box comes up. I'm not locked toward the NPC, nor does he immediately face me after pressing A. In fact, he seems to only face me after pressing A twice. As far as I can tell, there's no problems with the script. I'm thinking its probably an offset issue or something of the like.

i think your XSE is not Version 1.1.1
Check your XSE maybe your Vesion is 1.0.0 or 1.1.0 :D

Why is my Script isn't Working?????
when ever i walk To the Script tile???? Nothing Happens!
i have tested my Script in two Roms...nothing really happens..

when i first compile my Script it Works..

but the 4th and so on it doesn't Works :(

What is the Problem can someone tell me?
 
Last edited:

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I've been at it for the past hour, trying to fix this script myself, but I have to humbly ask for the community's help on this one.

First time scripting, what really confuses me is the simplicity of this script, I just don't understand why it won't work.

Spoiler:

lol the irony. When I go to talk to the NPC to whom I've assigned the script, the game doesn't freeze or anything. I hear the talking click sound, but no text box comes up. I'm not locked toward the NPC, nor does he immediately face me after pressing A. In fact, he seems to only face me after pressing A twice. As far as I can tell, there's no problems with the script. I'm thinking its probably an offset issue or something of the like.

From diegoisawesome's scripting tutorial:

0x6
Spoiler:

You are using msgbox 0x6 (msg_normal). The sprite will not face you, or lock the sprite in place, so it will still move around.

You want to use msg_face, or msgbox 0x2.
 

Rayziken 2

Beginning ROM Hacker
232
Posts
13
Years
  • Seen Sep 9, 2016
Could someone PM me a little bit of advice please? I want to make an event like the Pokemon tirathlon like on the anime, but I simply don't know how to. It would occur from 12PM to 6PM in the Safari Zone.

In fact, I don't know how to script anyways because I don't have the correct programs to do so. So, could you include all programs that I'd need in order to make very advanced script events for my game in the PM please?

Thanks in advance.
 

Trodx

That Guy Behind You
26
Posts
16
Years
  • Seen May 13, 2012
Game: Pokemon Leaf Green (U)
Editor: XSE 1.1
Script:
Spoiler:





This has been driving me crazy for the longest time. I see no problems with the script itself, I double check advance map settings and all the offsets are correct but the sprite does absolutely nothing when I talk to it in game. Any Ideas as to whats wrong?
 
5,256
Posts
16
Years
While it may not be the reason it isn't working, try this:

Spoiler:


As a side note, if you're just starting your hack, working on FireRed would be better than LeafGreen imo as there will be more support and research done into it.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Game: Pokemon Leaf Green (U)
Editor: XSE 1.1
Script:
Spoiler:





This has been driving me crazy for the longest time. I see no problems with the script itself, I double check advance map settings and all the offsets are correct but the sprite does absolutely nothing when I talk to it in game. Any Ideas as to whats wrong?

At the moment you're using XSE 1.1, rather than the 1.1.1 version. Another person was having the same problem a few posts above and when they changed to the new version everything began working. Download the updated XSE and try it out :)
 

Trodx

That Guy Behind You
26
Posts
16
Years
  • Seen May 13, 2012
While it may not be the reason it isn't working, try this:

Spoiler:


As a side note, if you're just starting your hack, working on FireRed would be better than LeafGreen imo as there will be more support and research done into it.

Thanks man, this fixed the problem!
I guess I was using the wrong message box.

I also updated to XSE 1.1.1 and switched to fire red, it seems to running smoothly!!

As soon as you take care of one problem another comes up -__-
Spoiler:


For some reason, the script stops just ends after the message and doesn't move the player down, I thought I had to put waitmovement in, but that didn't solve it either.
 
Last edited:

ZxC Mirai

Huh?
267
Posts
12
Years
COULD SOMEONE HELP ME???

when i put a Script to a Person it works

but my Main sCript Won't Works it just do the Evil Lurks Sound and nothing
happens....

But the first that i didn't put a Script to that Person it
Works What is the ProbleM?Could someone Tellme?
 
Status
Not open for further replies.
Back
Top