• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

Help Thread: Script Help Thread

Status
Not open for further replies.
Help needed on scripting

I am making a hack of emerald and I need some help on scripting.
I want to add scripts for move tutor and I am not sure how to do so, Can someone explain and give me the move table for emerald too, also explain how to select a pokemon which can learn certain move. I will be very thankful to you :)
 
I am making a hack of emerald and I need some help on scripting.
I want to add scripts for move tutor and I am not sure how to do so, Can someone explain and give me the move table for emerald too, also explain how to select a pokemon which can learn certain move. I will be very thankful to you :)

Take a look at the other move tutor scripts. If I recall correctly, the move that is going to be taught is controlled by a var which determines which move in the table to choose from. If you want to edit which Pokemon can learn which move, download G3HS.
 
Hey,

I recently made a Steven trainer script. It basically progresses the trainer (Pokemon Fire Red) and after the battle the player needs to obtain a MysticTicket (for Navel Rock).

There are 2 problems:

1. When I win I don't get the item straight away. I need to talk to him again and then he'll give. But he'll keep on giving me the ticket which shouldn't be.
2. When I have the ticket I still can't go to Navel Rock (you need to activate a flag or something, but which flag, IDK).

Spoiler:


Basically what needs to happen:

1. If the player hasn't fought Steven, show message with @intro.
2. Start the battle with Steven (trainer ID 001)
3. If the player win, show message with @afterwards
4. Give the player a MisticTicket and enable Navel Rock access.
5. Show message with @afterwards2

And after that if the player talks to Steven again:

1. Show message with @afterwards2

I hope somebody can help me. I'm no pro in scripting yet so I don't know what I'm doing wrong. I'm using PKSV-UI.
 
Hey,

I recently made a Steven trainer script. It basically progresses the trainer (Pokemon Fire Red) and after the battle the player needs to obtain a MysticTicket (for Navel Rock).

There are 2 problems:

1. When I win I don't get the item straight away. I need to talk to him again and then he'll give. But he'll keep on giving me the ticket which shouldn't be.
2. When I have the ticket I still can't go to Navel Rock (you need to activate a flag or something, but which flag, IDK).

Spoiler:


Basically what needs to happen:

1. If the player hasn't fought Steven, show message with @intro.
2. Start the battle with Steven (trainer ID 001)
3. If the player win, show message with @afterwards
4. Give the player a MisticTicket and enable Navel Rock access.
5. Show message with @afterwards2

And after that if the player talks to Steven again:

1. Show message with @afterwards2

I hope somebody can help me. I'm no pro in scripting yet so I don't know what I'm doing wrong. I'm using PKSV-UI.

Here's what you'd want to do:

Spoiler:

I noticed your syntax looks like it is from a different program, so I'm sorry for that. If you don't have XSE 1.1.1, the program whose syntax my fixed script is using, you can download it here. Note that the flag is being set but if you're only using it for this script you can omit it.
 
Here's what you'd want to do:

Spoiler:
I'm sorry if I'm being stupid but won't it start the trainer battle every time you talk with this script?
 
I'm sorry if I'm being stupid but won't it start the trainer battle every time you talk with this script?

Nope! The trainerbattle command essentially checks if the trainer flag is cleared or not, and if it is it skips it entirely. You can take a look at how the vanilla trainer scripts are structured too, it works the same way.
 
I've made some decent progress now. ( I feel like a proud kid right now, "I did it all by myself!") Now, I don't have a specific problem but rather a question. Is it possible to set an NPC script to make changes depending on the direction they're facing when spoken to? The idea I have in mind will either require different movements depending on facing, or changing it to a level script instead.
 
I've made some decent progress now. ( I feel like a proud kid right now, "I did it all by myself!") Now, I don't have a specific problem but rather a question. Is it possible to set an NPC script to make changes depending on the direction they're facing when spoken to? The idea I have in mind will either require different movements depending on facing, or changing it to a level script instead.

Surely the easier option would be to check which tile the player is stood on and make the relevant changes from that? You'd need to look into the getplayerpos command.
 
Correct me if Im wrong, in FireRed, Special 0x9F executes the Players pokemon party, what is the script that checks if I choose the 1st, 2nd , 3d slot and etc.?
 
Surely the easier option would be to check which tile the player is stood on and make the relevant changes from that? You'd need to look into the getplayerpos command.

Okay thanks, I might need a little help understanding how to set that up. If it's not too much trouble, can someone provide a simple sample script on using that command?
 
Okay thanks, I might need a little help understanding how to set that up. If it's not too much trouble, can someone provide a simple sample script on using that command?

Spoiler:

It's that simple, really. You'd then just look at where the NPC would face depending on where the player is and script accordingly.
 
Why it doesnt work?
Spoiler:

Someone said that I need to use Cleartrainerflag command and set the Persons ID to the flag I used in cleartrainer flag, the trainer will battle me anytime I also tried using this:
Spoiler:


I also had this kind of problem,
I used:
Spoiler:

The screen fades and back to normal, but the person #9 didnt disappeared, it disappeared only when I leave the map. I want when the screen fades, Person 9 completely disappears.
thanks.
 
If you wanted to make Trainer 0x3D rematchable every time, you'd cleartrainerflag 0x3D as that is their Trainer ID. I think you're confused between the Person ID, for the event in A-Map, and the Trainer ID, for the Trainer, and their team, itself.

ahhh.. how noob I really am,
another 1,
this script makes the OW disappears but when the player moves, it appears again, even if I left the OW.
Spoiler:
 
ahhh.. how noob I really am,
another 1,
this script makes the OW disappears but when the player moves, it appears again, even if I left the OW.
Spoiler:
Set the overworld you want to disappear's person ID to the flag. In this case that would be 317.
 
Set the overworld you want to disappear's person ID to the flag. In this case that would be 317.

That's what I did!
I put 317 as Persons ID of the OW
 
flags start in 200 is used in FireRed right?

And How to make a script that checks the date using DNS?
 
Status
Not open for further replies.
Back
Top