• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.
So I understand that Pokescript limits the help I may receive and I also need to change the flag used in this script but I still believe there is another error. I am posting both the Pokescript version and what XSE opens if I click open script through advance map. Maybe that will help. It is supposed to be a simple legendary battle with Mewtwo. After the battle, I want the screen to blink and him to disappear. When I tested this in game, everything works completely fine with the exception of his disappearance. He remains in the same location and is available to battle again.

Pokescript:
Spoiler:


XSE through advance map:
Spoiler:


Any help would be appreciated.
 
Not sure if this will work, but I currently can't compile scripts. I've downloaded Pokescript and ADV a million times with the updatecheck=0 and still nothing but that's not what I'm asking. I was wondering as long as my script is correct can I convert it into a IPS and patch it in the rom? I did that with someones Nat'l dex and it worked.
 
Not sure if this will work, but I currently can't compile scripts. I've downloaded Pokescript and ADV a million times with the updatecheck=0 and still nothing but that's not what I'm asking. I was wondering as long as my script is correct can I convert it into a IPS and patch it in the rom? I did that with someones Nat'l dex and it worked.

Use XSE or PKSV. Those are much better.
 
How do I use XSE to go with advanced map to put scripts in?

Here's a link to my tutorial.

And to open scripts on A-Map with XSE...
Set XSE as A-Map's default script editor.
Spoiler:
 
I've created an event for Mew on FireRed using the Mewtwo's script as a basis. It all works fine, but when I'm defeated or catch him, Mew doesn't disappear. It only does when I faint him.

Here's the script:

Spoiler:

P.S: I've deleted Deoxys, that's why I'm using its offset (0x165271).
 
I've created an event for Mew on FireRed using the Mewtwo's script as a basis. It all works fine, but when I'm defeated or catch him, Mew doesn't disappear. It only does when I faint him.

Here's the script:

Spoiler:

P.S: I've deleted Deoxys, that's why I'm using its offset (0x165271).

That is because Game Freak screwed up. Special 0xB4 does not ever return 0x5 as being captured. It returns 0x7, but in all of GF's scripts, they screwed it up. Also, you probably know this, but the sprite will only stay hidden if you set the flag listed in its person ID and then use hidesprite.
 
That is because Game Freak screwed up. Special 0xB4 does not ever return 0x5 as being captured. It returns 0x7, but in all of GF's scripts, they screwed it up.

So, is there any advantage on changing "compare LASTRESULT 0x5" to "compare LASTRESULT 0x7"?

Also, you probably know this, but the sprite will only stay hidden if you set the flag listed in its person ID and then use hidesprite.

I thought about the Person ID, but I can't find it anywhere on the code. Mewtwo's ID is 81.
 
So, is there any advantage on changing "compare LASTRESULT 0x5" to "compare LASTRESULT 0x7"?

Give it a try, it may work out.

I thought about the Person ID, but I can't find it anywhere on the code. Mewtwo's ID is 81.

Then add it in, it may be in a seperate script you didn't find, but either way, it has to be there. If you don't set the flag in the Person ID, the next step you take, the sprite will just reappear.
 
#org $begin
lock
faceplayer
checkflag 0x899
if b_true goto $alreadygot
message $getitem
$getitem 1 = Here you go!
boxset 6
giveitem 0x170 0x1
setflag 0x899
release
end

#org $alreadygot
lock
faceplayer
message $onlyone
$onlyone 1 = Only one allowed!
boxset 6
release
end

Trying to give a rainbow pass, but it won't let me. Any ideas why it won't work?
 
#org $begin
lock
faceplayer
checkflag 0x899
if b_true goto $alreadygot
message $getitem
$getitem 1 = Here you go!
boxset 6
giveitem 0x170 0x1
setflag 0x899
release
end

#org $alreadygot
lock
faceplayer
message $onlyone
$onlyone 1 = Only one allowed!
boxset 6
release
end

Trying to give a rainbow pass, but it won't let me. Any ideas why it won't work?
Please. Just use XSE. WHY are people still using Pokéscript? HOW do you even find it?
 
It now disappears with no message. But now whenever I catch him, the message "Mew flew away" appears (which should only happen when I defeat him) and when I'm defeated, he's still there.

Then your script is off, you need to rework it to flow with the new changes.

I am using XSE? Why do you think I am not?

Because the format of scripting you are using goes with PokeScript. Look up Diegoisawesome's XSE tutorial. That will teach you how to script XSE style.
 
Last edited:
I've created an event for Mew on FireRed using the Mewtwo's script as a basis. It all works fine, but when I'm defeated or catch him, Mew doesn't disappear. It only does when I faint him.

Here's the script:

Spoiler:

P.S: I've deleted Deoxys, that's why I'm using its offset (0x165271).

This is a prime example of why your scripts should be made by yourself. This is actually a very simple fix, involving two made-from-scratch scripts. The thing about basing stuff off scripts that were already in the game is that most of them have a ton of useless commands when you barely need ANY commands to make it work correctly. Here's a decent modifiable script that should suit your Mew needs (this is most likely what I would use, you can do whatever with it):

Spoiler:

The sad thing about that script is that Mew will "fly away" no matter if you catch it or if you beat it. Lol.

To keep Mew hidden once you re-enter the map from a different map, add this to the level script section under Header (use [03]):

Spoiler:

Those two together should make it work well. If you're using a step-on script, it's a bit different, but this should be good if you simply use Mew's person event as opposed to a step-on-script.
 
Is there any way to make Mew obey you? I have in my hack where you automatically receive all the legendary tickets, and was reading on how Mew never obeys no matter what badges you have.
 
Is there any way to make Mew obey you? I have in my hack where you automatically receive all the legendary tickets, and was reading on how Mew never obeys no matter what badges you have.

There was a thread about this topic on the first page just a few days ago. I'm sure it'd only be on the second or third by now, if not the first.

My question is does there exist a type of script that would replace one map with another. For example, if a natural disaster were to happen to a certain town or an invasion or something else of that sort, would it be possible to have a flag or something control map replacement? I ask this in this thread because it pertains to scripting more so than a general question. Also if that were possible, does anyone know if there are any tutorials/guides that include that or if there are any existing scripts in games that do a similar thing that I could decompile to look at.
 
I need some help. I'm utterly confused at the moment... I have a script where you can battle somebody 3 different times, each time having stronger Pokémon. He should give you 3 different items each time you beat him, until he is rebattle-able. He's suppose to give you Leftovers the first time you beat him, PP Max the second, and a Master ball the third. When rebattle-able, he should give a PP Up each time you beat him. As of right now, he only gives the Leftovers and Master ball. No PP Max and no PP Up. What is going on with this script?

Code:
#dynamic 0x6C4340

#org @start
checkflag 0x850
if 0x1 goto @start1
trainerbattle 0x1 0xa1 0x0 @before @after @later
end

#org @start1
checkflag 0x851
if 0x1 goto @start2
trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
end

#org @start2
settrainerflag 0x29d
trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
end

#org @later
setflag 0x850
msgbox @msg1 0x2
giveitem 0xc8 0x1 0x0
release
end

#org @later1
setflag 0x851
msgbox @msg2 0x2
giveitem 0x47 0x1 0x0
release
end

#org @later2
checkflag 0x852
if 0x1 goto @beaten
setflag 0x852
msgbox @msg3 0x2
giveitem 0x1 0x1 0x0
release
end

#org @beaten
msgbox @msg4 0x2
giveitem 0x45 0x1 0x0
release
end

#org @before
= I am legend.

#org @after
= I... am...\pI'm speechless...

#org @msg1
= You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.

#org @before1
= This time, you will not be so\nlucky.

#org @after1
= How is this possible!?

#org @msg2
= I promise...\nI will defeat you.

#org @before2
= This time, you will lose.

#org @after2
= Again, I am beaten...

#org @msg3
= You are a King among peasants.

#org @msg4
= For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
 
I've taken the time to write what I consider quite a large script and I'm at the point of rage quit now that i tried compiling the slightly incomplete script to check on what i've gotten so far and realized that the game hangs exactly where the script is supposed to start, i'd love it if someone could analyze it for me and check for errors and let me know either by a post, PM or by mail ([email protected]).

Spoiler:

Thanks a lot for your help, whoever you're gonna be in advance! =D

Earlier I forgot to mention, this script is meant to be a trigger for three scriptboxes and $script, $script1 & $script2 are the different movements the specified sprite must take to be in front of the player...Thanks again for the help!
 
Last edited:
Then your script is off, you need to rework it to flow with the new changes.

Got it to work. Now the only issue left is when I re-enter the map, he's still there.

To keep Mew hidden once you re-enter the map from a different map, add this to the level script section under Header (use [03]):

Do you know what do I need to add on the code I was using?

Thanks for the help.
 
Status
Not open for further replies.
Back
Top