• 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!
  • 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] Win/Lose based script

__fred__40

fred
  • 277
    Posts
    5
    Years
    Hi,for a while now I've been trying to make a script for Fire Red where if I lose I get a specific script(not just a simple msg,that can be done using trainerbattle 0x9 i know)but an entire different script I mean if you lose the battle you go right if you win you go left,simple as that.I know this is possible in Emerald because when you are in the battle tower and you lose you get a different script than the one you would get if you'd have won.
    So how can I do it in Fire Red?Is there maybe an ASM routine out there for it?

    EDIT:never edited a post this quickly but yeah,thx to Lunos on discord for giving me the simple and obvious yet brilliant idea of using 0x800D
    trainerbattle 0x9 0x1 0x0 @msgwin @msglose
    special 0x0
    compare 0x800D 0x0 '=win
    if 0x1 goto @win
    compare 0x800D 0x1 '=lose
    if 0x1 goto @lose
     
    Last edited:
    Can you have the player lose a battle, and not black out? The game continues, you do not fight the trainer again, and you walk away normally? Basically like losing your first rival battle.
     
    Back
    Top