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

Shukumei

Teh Haxxorz
27
Posts
14
Years
Yeah I notice that you should always have an "end". And good point it might just be the program not the actual game, always test first(hey something might go terribly wrong and you might get a few laughs)

I agree. There's no reason not to end any script with a

release
end

It just makes good programming sense. Sure you'll lose a bit of free space in your rom but it's not like those two bytes are going to be of much importance later on and it's more important that you get the proper results in-game.
 

Haku.

(FLAME)...H....A...K..U
385
Posts
16
Years
I agree. There's no reason not to end any script with a

release
end

It just makes good programming sense. Sure you'll lose a bit of free space in your rom but it's not like those two bytes are going to be of much importance later on and it's more important that you get the proper results in-game.


Not all need to use
release
End
Only those who use lock command need to add release.

and end is important to make the script run properly.
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
actual if you step on a tile and use an applymovement after the script if you don't but release you can't move. Even if you did not use a lock.
 

Haku.

(FLAME)...H....A...K..U
385
Posts
16
Years
Forgot to mention that :P
But most of the time, you don't need a release before an end.
Thats my point if you use level scripts and signposts
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Okay, I tried adding "release" and "end" at the end of the first "paragraph", but and everything looks just fine.

Except one thing. The number "8" is added in front of my offsets. I mean, what?

This is what I mean: If I use 0x9A6740 in the script, after I click on compile and open again, 0x9A6740 turns into 0x89A6740.

Now where did that 8 come from?
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
Okay, I tried adding "release" and "end" at the end of the first "paragraph", but and everything looks just fine.

Except one thing. The number "8" is added in front of my offsets. I mean, what?

This is what I mean: If I use 0x9A6740 in the script, after I click on compile and open again, 0x9A6740 turns into 0x89A6740.

Now where did that 8 come from?

The 8 means that it points into the first 16mb of the rom. In hex your pointer is 08 9A 67 40, but it gets flipped into reverse making it, 40 67 9A 08. :3
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
what pokepal said XD but if that's something that realy bothers you I think you can edit the setting of xse to never show the 8( or just use pksv witch always uses 8)

All in all 8 appearing or not will not effect the script.
 

theschmizz393

Cleffas will rule!
45
Posts
16
Years
Well, I'm new to scripting, and all I'm trying to do is make the National Dex available early in the game. I might be doing this totally wrong, but here it is:

'---------------
#org 0x800690
lock
faceplayer
checkflag 0x1F3
if 0x0 goto 0x88006A4
if 0x1 goto 0x88006B6
release
end

'---------------
#org 0x8006A4
fanfare 0x13E
waitfanfare
setflag 0x1F3
msgbox 0x88006C0 0x6 '"Your Pokedex was upgraded!"
release
end

'---------------
#org 0x8006B6
msgbox 0x88006D5 0x6 '"You're welcome."
end


'---------
' Strings
'---------
#org 0x8006C0
= Your Pokedex was upgraded!

#org 0x8006D5
= You're welcome.



I'm using xse and everytime I try to put this on a trainer the game freezes when I talk to them. Thanks for helping!
 
Last edited:

TB Pro

Old-timer
2,708
Posts
19
Years
Daznam. I haz script troubles. Also, sorry in advance for the decompiled version.

Problem: The NPC won't disappear(setflag wise)unless I talk to him a second time. Meaning, he is invisible, but still in my path, so I have to talk to him again. After that, it's all good. Now, why did that happen? Thx

Script:
Spoiler:
 

Samike360

Lover of May
397
Posts
15
Years
Daznam. I haz script troubles. Also, sorry in advance for the decompiled version.

Problem: The NPC won't disappear(setflag wise)unless I talk to him a second time. Meaning, he is invisible, but still in my path, so I have to talk to him again. After that, it's all good. Now, why did that happen? Thx

Script:
Spoiler:

Hmm...that has never never happened to me. Make sure the person ID is flag 209, but you should try the hidesprite command-I'm pretty sure that'll fix it
 

Aether Noir

<(^.^<) (>^.^)>
9
Posts
15
Years
  • Seen Feb 3, 2011
Arghhhh, I've been trying this over and over and can't find a solution on my own, so here goes.

I'm trying to give a mantine, and then hide the sprite that gave it to you, but the sprite never shows up at all. Here's what I've got, and keep in mind this is my VERY FIRST non pure-speech script ever.

I'm using XSE, on FireRed and the general goal of this script is to give a pokemon, and have the pokeball sprite go away forever.

Decompiled:
Spoiler:


Compiled:
Spoiler:
 
Last edited:

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
@Jesse : I don't see any wrong part there... is number of NPC you wanna disappear 1? Since I guess the final applymovement is for him/her to disappear right?

@Samike : If it's FR then hidesprite might not work.

@Aether : You forgot to end script in @start string.
 

Aether Noir

<(^.^<) (>^.^)>
9
Posts
15
Years
  • Seen Feb 3, 2011
I added an end, but my sprite still doesn't show up at all, I can't go up and activate the pokeball if it's not there...
 
44
Posts
15
Years
Alright, I am making a script that gives you a message, causes an earthquake, fades out, changes some tiles, resets the map, and finally fades in. I'm finally getting the hang of XSE, as everything works... except for the fadescreen...
So close, and yet, so far.

Spoiler:
 
9
Posts
14
Years
  • Seen Mar 12, 2010
s there a way to make a follow script so when you move anther thing follows behind like in d/p/p in the forest with that girl but for FR
 
Status
Not open for further replies.
Back
Top