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

Help Thread: Script Help Thread

Status
Not open for further replies.
  • 21
    Posts
    9
    Years
    • Seen Jan 18, 2015
    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?
     
  • 10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    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 ;).
     
  • 21
    Posts
    9
    Years
    • Seen Jan 18, 2015
    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:

    Lance32497

    LanceKoijer of Pokemon_Addicts
  • 792
    Posts
    9
    Years
    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:
  • 5,256
    Posts
    16
    Years
    I'm glad you've worked out what you were trying to do, but please bear in mind that consecutive posting is against the rules. In the future, use the Edit button :D
     

    LCCoolJ95

    Limited Capacity
  • 638
    Posts
    14
    Years
    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?
     

    Danny0317

    Fluorite's back, brah
  • 1,067
    Posts
    10
    Years
    • Age 24
    • Seen Nov 19, 2023
    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?

    Itari made a check pokemon routine for EM. It's in the quick RD thread. Stack three of them, and all is good.
     
  • 3,044
    Posts
    9
    Years
    Last edited by a moderator:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
  • 1,691
    Posts
    14
    Years
    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:
  • 794
    Posts
    10
    Years
    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:
  • 5,256
    Posts
    16
    Years
    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.
     

    Joexv

    ManMadeOfGouda joexv.github.io
  • 1,037
    Posts
    11
    Years
    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.
     

    Joexv

    ManMadeOfGouda joexv.github.io
  • 1,037
    Posts
    11
    Years
    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.
     
    Status
    Not open for further replies.
    Back
    Top