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

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Change the var number to "5240" and the unknown to "03 00", without quotes obviously.

Any var in the 5000's below 5E00 will work, just FYI. Also, with script tiles, you don't need to use flags. Just set the var you use to any other number besides zero at the end of the script and it will never happen again as long as that var does not equal 0.

S-tile scripts only run when the specified var is set to the specified value below it.
 
50
Posts
11
Years
  • Seen Jan 4, 2021
Hey, I'm using a FireRed ROM that has all the scripts completely wiped out. Because of that, the player doesn't return to a Pokemon Center after being defeated. Does anybody know how to fix this?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Hey, I'm using a FireRed ROM that has all the scripts completely wiped out. Because of that, the player doesn't return to a Pokemon Center after being defeated. Does anybody know how to fix this?

See the documentation that came with his hack for the section on the "sethealingplace" command. This is what will control where you go to when you are defeated, however, the structure was changed by his hack which is why you must consult the documentation.
 
4
Posts
11
Years
  • Seen May 22, 2013
#org 0x82DD785
#dynamic 0x82DD785
'-----------------------------------
lock
faceplayer
checkflag FR_BADGE_1
if 0xFR_BADGE_1 jump @open
msgbox 0x82DD791 ' You can't pass...
callstd MSG_LOCK ' Built-in lock command
release
end

#org 0x82DD791
= You can't pass\p there have been \nreports of people missing and were \ptrying to investigate
#org @open
message @opentxt
showmsg
waitbutton
fadescreen 3
closemsg
disappear 0x4
setflag 0x209
fadescreen 2
release
end
#org @opentxt
= That badge! ok you can go,\nbut be carefull[.]

When I go to check on the guy all I hear is beep sounds and nothing happens, this is script Im trying to make it so that you have to have gotten the first badge to be able to pass the bridge and the guy will disapear. Kinda similar to the old man and his coffee, also i get this error.
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)
 
Last edited:

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Apr 2, 2024
#org 0x82DD785
#dynamic 0x82DD785
'-----------------------------------
lock
faceplayer
checkflag FR_BADGE_1
if 0xFR_BADGE_1 jump @open
msgbox 0x82DD791 ' You can't pass...
callstd MSG_LOCK ' Built-in lock command
release
end

#org 0x82DD791
= You can't pass\p there have been \nreports of people missing and were \ptrying to investigate
#org @open
message @opentxt
showmsg
waitbutton
fadescreen 3
closemsg
disappear 0x4
setflag 0x209
fadescreen 2
release
end
#org @opentxt
= That badge! ok you can go,\nbut be carefull[.]

When I go to check on the guy all I hear is beep sounds and nothing happens, this is script Im trying to make it so that you have to have gotten the first badge to be able to pass the bridge and the guy will disapear. Kinda similar to the old man and his coffee, also i get this error.
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)

Well I sure can see one problem:
#org 0x82DD785
#dynamic 0x82DD785

It should be #dynamic before #org.
Also, another problem is if 0xFR_BADGE_1 jump @open
it should be
if 0x1 goto @open

This means that if you do have the badge, goto @open. If you don't want that, just replace 0x1 with 0x0, which means if you don't have the badge, goto @open.

I'm not sure about your XSE, but mine doesn't use Callstd. If your does, okay then. But if it doesn't, it should be:
msgbox 0x82DD791 0x2

Also, what is the line message @opentxt doing there?
Your bottom part of your script should look like this I believe:
showmsg @opentext
waitmsg
fadescreen 0x3
closeonkeypress
hidesprite 0x800F
fadescreen 0x2
setflag 0x209


Anyway, it looks like you just made up some commands that you thought sounded right and put them into your script, which is probably gave you the error. So just fix it up and it'll probably work.
 
4
Posts
11
Years
  • Seen May 22, 2013
Can someone please help when I put in a yesno code with a addpokemon cammand I keep getting these ****ing raw junk
Spoiler:

then it becomes
Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Can someone please help when I put in a yesno code with a addpokemon cammand I keep getting these ****ing raw junk
Spoiler:

then it becomes
Spoiler:

I would suggest not using the dynamic offset you chose. Use 0x740000 as a better option. i know there is free space where you were before, but it isn't very much.

Also, make sure you release under the @yes label.
 
4
Posts
11
Years
  • Seen May 22, 2013
Well I sure can see one problem:


It should be #dynamic before #org.
Also, another problem is if 0xFR_BADGE_1 jump @open
it should be
if 0x1 goto @open

This means that if you do have the badge, goto @open. If you don't want that, just replace 0x1 with 0x0, which means if you don't have the badge, goto @open.

I'm not sure about your XSE, but mine doesn't use Callstd. If your does, okay then. But if it doesn't, it should be:
msgbox 0x82DD791 0x2

Also, what is the line message @opentxt doing there?
Your bottom part of your script should look like this I believe:
showmsg @opentext
waitmsg
fadescreen 0x3
closeonkeypress
hidesprite 0x800F
fadescreen 0x2
setflag 0x209


Anyway, it looks like you just made up some commands that you thought sounded right and put them into your script, which is probably gave you the error. So just fix it up and it'll probably work.

Btw i'm using pksv so it may have different functions
 
241
Posts
11
Years
I've got a problem. I'm trying to make a sprite on a different map disappear after a rival battle. I've set the person id to 200 on the sprite I want to get rid of, and when I test it by itself it works with this script:

#dynamic 0x800000
#org @begin
lock
setflag 0x200
release
end

but when I add the set flag to this larger rival script, it doesn't disappear:

Spoiler:


Anyone know what I'm doing wrong?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I've got a problem. I'm trying to make a sprite on a different map disappear after a rival battle. I've set the person id to 200 on the sprite I want to get rid of, and when I test it by itself it works with this script:

#dynamic 0x800000
#org @begin
lock
setflag 0x200
release
end

but when I add the set flag to this larger rival script, it doesn't disappear:

Spoiler:


Anyone know what I'm doing wrong?

Add this:

fadescreen 0x0
hidesprite 0x<rival>
serflag 0x200
fadescreen 0x1

You just needed to refreash the map.
 
241
Posts
11
Years
But I'm not trying to hide the rival. I'm trying to hide a sprite on a different map. I'm copying the script as it is used when Giovanni is defeated in Saffron. And like I said, it works with the most basic script, but not when I added it to the rival script.
 

Blah

Free supporter
1,924
Posts
11
Years
But I'm not trying to hide the rival. I'm trying to hide a sprite on a different map. I'm copying the script as it is used when Giovanni is defeated in Saffron. And like I said, it works with the most basic script, but not when I added it to the rival script.

That's pretty weird. The script itself doesn't look wrong, though is hidesprite 0x1 the rival? If it is, is he being hidden? If he's not then there's your problem :D

Otherwise, make sure that there is no level script in the map where the sprite that's not disappearing with a command like "showsprite" or something.
If none of these work, try going into the map where the guy isn't disappearing through warp.

Try these and see what happens.
 
241
Posts
11
Years
That's pretty weird. The script itself doesn't look wrong, though is hidesprite 0x1 the rival? If it is, is he being hidden? If he's not then there's your problem :D

Otherwise, make sure that there is no level script in the map where the sprite that's not disappearing with a command like "showsprite" or something.
If none of these work, try going into the map where the guy isn't disappearing through warp.

Try these and see what happens.

The rival sprite is hidden (This is verbatim the script from the Pokemon Tower in Lavender. I just added the flag)

I'll check the level scripts and see if I can find anything. The problem is that I can't check to see if it's working very easily, considering what I said about the simple script vs adding it into the complex one.

A little bit more info:
The sprite in question is in Pallet town, the script is in the Pokemon Tower. When I've tested it before I just created someone on route 1 whose sole purpose is to set that flag. Then, when I walk back to Pallet, the sprite is gone. When the flag is set by the rival script and then you walk back to Pallet, the sprite is still there.

EDIT: Nothing doing with the level scripts. What do you mean by entering the map with a warp?
 

Blah

Free supporter
1,924
Posts
11
Years
The rival sprite is hidden (This is verbatim the script from the Pokemon Tower in Lavender. I just added the flag)

I'll check the level scripts and see if I can find anything. The problem is that I can't check to see if it's working very easily, considering what I said about the simple script vs adding it into the complex one.

A little bit more info:
The sprite in question is in Pallet town, the script is in the Pokemon Tower. When I've tested it before I just created someone on route 1 whose sole purpose is to set that flag. Then, when I walk back to Pallet, the sprite is gone. When the flag is set by the rival script and then you walk back to Pallet, the sprite is still there.

EDIT: Nothing doing with the level scripts. What do you mean by entering the map with a warp?

No, it's not the map refresh thing. I initially thought that there may be a map connection, but that seems not to be the case.

Can you tell me the sprite number of the sprite you're talking about (the one in pallette town). This is turning out to be less and less conceivable as we go :P
 
241
Posts
11
Years
I created this sprite. He's person no. 6, event no. 4 (don't know if that matters. it's because I deleted the annoying girl that reads you the sign)
 

Blah

Free supporter
1,924
Posts
11
Years
I created this sprite. He's person no. 6, event no. 4 (don't know if that matters. it's because I deleted the annoying girl that reads you the sign)

I'd check to make sure you didn't clear or reuse 0x200 at all. I know it sounds stupid, but at this point your error doesn't seem like it should've caused an error.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
I created this sprite. He's person no. 6, event no. 4 (don't know if that matters. it's because I deleted the annoying girl that reads you the sign)
If you want to hide sprite on a different map, setting a flag and assigning the corresponding ID to the sprite is what you need.
For reappearing clearflag command is what you need.
You can also just make him hidden by setting his movement in Advanced Map and then just by applymovement make him appear.

 
947
Posts
11
Years
Yo!

I just read dieagoisawesome's tutorial, and now I am trying to follow its instructions but I get a problem.
I am trying to insert a Script that triggers when you walk on it, in a Fire Red rom.
Spoiler:


I compile the code etc etc, when I run the rom and walk on the script to test my code, the movements are all aplied but not a single messagebox appears. So, I opened the script and noticed there is no 0x6 nor a callstd 0x6 in the code... and this is my problem: the callstd 0x6 disappears when I compile the code.
Spoiler:



P.S.: I tried "msgbox @alert callstd 0x6" instead of "msgbox @alert 0x6", but nothing changes
P.S. #2: I tried to insert "callstd 0x6" after every message in the compiled code, it worked, BUT the last part of the code does not work, apparently it went trought the offset of another code or something like that!
Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Yo!

I just read dieagoisawesome's tutorial, and now I am trying to follow its instructions but I get a problem.
I am trying to insert a Script that triggers when you walk on it, in a Fire Red rom.
Spoiler:


I compile the code etc etc, when I run the rom and walk on the script to test my code, the movements are all aplied but not a single messagebox appears. So, I opened the script and noticed there is no 0x6 nor a callstd 0x6 in the code... and this is my problem: the callstd 0x6 disappears when I compile the code.
Spoiler:



P.S.: I tried "msgbox @alert callstd 0x6" instead of "msgbox @alert 0x6", but nothing changes
P.S. #2: I tried to insert "callstd 0x6" after every message in the compiled code, it worked, BUT the last part of the code does not work, apparently it went trought the offset of another code or something like that!
Spoiler:

I don't know why all of your strings are messed up, however I do know that on XSE 1.0.0, you can't do a msgbox @msg 0x6. It just isn't supported, which is why you must callstd. However, it is supported in v.1.1.1. Your other problem, I believe is that you edited the in game, already compiled script. If you add to a script, you must repoint it, because it takes up more room.
 
Status
Not open for further replies.
Back
Top