• 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.
Can someone tell me how to script for a trainer that if we want to battle him again, we talk to him (after 1st battle) he asks whether you want to battle again or not?
 
Can someone tell me how to script for a trainer that if we want to battle him again, we talk to him (after 1st battle) he asks whether you want to battle again or not?

Have a look at Spherical's post here for a brief overview - as your thread will be similar.

In the second part of your script ('snippet 1') you'll need to have a msgbox question - have a look at msgbox 0x5 here for details on how to do that.

To rebattle him with the exact same team, I believe you'll have to 'cleartrainerflag' and then repeat the trainerbattle command. Or you could direct the script to a different trainer ID! Up to you.

Hope this helps :< Afraid I'm avoiding writing a full script ;).
 
Have a look at Spherical's post here for a brief overview - as your thread will be similar.

In the second part of your script ('snippet 1') you'll need to have a msgbox question - have a look at msgbox 0x5 here for details on how to do that.

To rebattle him with the exact same team, I believe you'll have to 'cleartrainerflag' and then repeat the trainerbattle command. Or you could direct the script to a different trainer ID! Up to you.

Hope this helps :< Afraid I'm avoiding writing a full script ;).

Actually you helped perfectly thanks for that, I was wondering if you know the range of usable flags in emerald or ruby/sapphire game?

flags start in 200 is used in FireRed right?

And How to make a script that checks the date using DNS?
These are used flags in fire red / leaf green :) (you can use other flags than these i think)
Spoiler:

I dunno what these flags do (I got these from XSE guide book or something like that ;) )
For the other part of your post I can't help sorry.
 
Last edited by a moderator:
This is Elite 4 Lorelei script
Spoiler:


Where in that script makes LORELEI able to battle anytime..
I cant see cleartrainerflag there
also, cleartrainerflag does not work to me.

will this code works?
Spoiler:


You're using disappear for some reason? Try using hidesprite. Also, flags above 0x2FF, in general, are unsafe, so it's best to stick within the range of 0x200 to 0x2FF.

while searching Hall of Fame scrift, I found this interesting code... cleartrainerflag doesnt work to me so Ill try to use if settrainerflag will work... heres the code:
Spoiler:


Gotcha!
Code:
settrainerflag 0x[Trainer ID]
this code will let you battle trainers anytime
 
Last edited by a moderator:
Are there ways to make a wild Pokémon battle script in Emerald happen if you have certain Pokémon? Like, for example, having Regirock, Regice, and Registeel in order to battle Regigigas?
 
Can someone tell me which vars are safe to use in emerald version?

Try using 4090.
I used that after I browsed through Dark Sneasel's hack xD (Sorry)
And, I noticed that it was used a lot of times, so I figured out it was for multi-use, but I'm not sure if my theory is true. Try asking Dark Sneasel: https://www.pokecommunity.com/members/396177

What are the safe vars for Emerald?
 
Last edited by a moderator:
Can someone tell me which vars are safe to use in emerald version?
What are the safe vars for Emerald?

Here's what karatekid552 has to say on the matter in his thread about flags, variables and scripts:

In general, only vars 0x4011-0x40FF are the safe. All others overlap different RAM such as PC Boxes or flags, or they are temporary/disposable. That being said, some of the ones in that range are also temporary or used by the games engine. So, just like with flags, you have to be careful. Check the lists, run some tests, delete old events; these are the only ways to truly know of they are safe. Outside of that range; forget about it, you'll end up ruining other events or causing bad eggs.

(Once again, these general rules apply to RSE too, you just won't have a list.)

While his thread's research is mainly directed towards FRLG, like he said in the quote, the safe variables should be pretty much the same with regards to Emerald's variables. If anybody more experienced with Emerald has a more precise answer then it would be great if you could post.
 
Last edited by a moderator:
So I was reading the shiny quagsire's ASM tutorial and when I tried to compile this script:
Spoiler:


I got this error: "error 13, type mismatch on line 7 missing #define". So I added "#define" before that and got another error: "too many parameters, the correct number is 2". Could someone help and explain this to me?

edit: solved, turned out my XSE verstion was outdated
 
Last edited:
0x4011-0x40FF are the safe
You sure thats, the only safe ones? Cause I use 500-6000 in emerald. I've found that 4000-4010 are great for temp vars for doing a quick pos check.
 
You sure thats, the only safe ones? Cause I use 500-6000 in emerald. I've found that 4000-4010 are great for temp vars for doing a quick pos check.

0x4000 - 0x4010 are indeed temporary, however above 0x40FF are used by things like the Storage System, and so on, and are almost definitely unsafe. Under 0x4000 tend to be either temporary or used for flags, I believe. 256 variables is plenty, anyway.
 
0x4000 - 0x4010 are indeed temporary, however above 0x40FF are used by things like the Storage System, and so on, and are almost definitely unsafe. Under 0x4000 tend to be either temporary or used for flags, I believe. 256 variables is plenty, anyway.
Huh... Well then...I guess I will not be using anymore of those variables ever again.
Thank you for telling me that.
 
How to delete Mugshot of Elite 4 in Pokemon ruby?
Spoiler:
 
How to delete Mugshot of Elite 4 in Pokemon ruby?
Spoiler:

It might help to have the whole script, cause it may be part of the script that shows it, or its the class. So edit a class the say Elite Four and use that.

Idk though, I havent bothered with ruby.
 
Again, what is the code that checks the pokemon party slot I pressed in Special 9F
 
Again, what is the code that checks the pokemon party slot I pressed in Special 9F

Taken from this thread:

09F chooses a pokemon for a purpose and stores its position at 0x8004. works even with eggs

So the special buffers the slot into the variable 0x8004, which you can then manipulate in whichever way you what.
 
Taken from this thread:



So the special buffers the slot into the variable 0x8004, which you can then manipulate in whichever way you what.

so will this script works?
Spoiler:

which 0x0 is the First slot and 0x5 is the last slot?
 
so will this script works?
Spoiler:

which 0x0 is the First slot and 0x5 is the last slot?

Yes, that would be a way to check if the Pokémon the player selected was in the first slot.
 
Status
Not open for further replies.
Back
Top