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

[Other✓] Scripting

287
Posts
11
Years
  • Hello, In my hack I'd like to have a battle where your obligated to loose, however, I don't want you to be teleported to the Pokémon Center.
    I think it's possible, because (correct me if I'm wrong), I've seen it in Ash Grey
    If it's not even possible, then if I use "setflag" after "trainerbattle", and the player loses, will it still set the flag?
    Thanks for your time, hope you can help me :)
     

    Mrakbarman

    The Jolly Juvenile
    13
    Posts
    12
    Years
  • Yeah I'm interested to know this as well. Btw is it possible to make the CPU use a rare candy in battle on his fainted pokemon?
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    You can use trainer battle 0x9, however that has some speech over the top as it is the tutorial battle system. Don't know if that'll work for you!

    In a normal battle (0x1 in this case) a flag won't be set in the 'later' part of a script if you lose. You can set the flag before the battle, however!

    @above I don't understand why you'd even want that o__o? I don't think such specific AI can work in a battle. You'd normally end the battle, let the script continue (saying he's using rare candy/revive) then start another battle with altered pokemon.
     
    466
    Posts
    10
    Years
    • Seen Jul 12, 2016
    one, im interested too. two, a rare candy? don't you mean a revive?
    lol im to slow at posting.
     
    287
    Posts
    11
    Years
  • You can use trainer battle 0x9, however that has some speech over the top as it is the tutorial battle system. Don't know if that'll work for you!

    In a normal battle (0x1 in this case) a flag won't be set in the 'later' part of a script if you lose. You can set the flag before the battle, however!

    @above I don't understand why you'd even want that o__o? I don't think such specific AI can work in a battle. You'd normally end the battle, let the script continue (saying he's using rare candy/revive) then start another battle with altered pokemon.

    Forget the flag part, I didn't quite understand, if I do a script that goes on after the player lost, will the script continue or not?
    I believe not, but do you think it would work if I used pokeheal?
    Probably not aswell.
    You may have answered me already but if so I didn't catch it (pokepun), could you explain again please?
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    If you use the scripting command 'trainerbattle 0x9' then the script continues even if you lose. But, as I said, there is some tutorial talk by Oak on that version. A normal trainer battle script will not continue if you lose.

    Do you mean the healing special? The script wouldn't continue long enough for that to kick in so no that wouldn't work :(.
     

    Mrakbarman

    The Jolly Juvenile
    13
    Posts
    12
    Years
  • Hey, guys, just to explain why I specifically needed a rare candy: Theres a character that called 'Trickster' that uses a self destruct electrode and revives it on the second turn using a rare candy. Basically, his purpose indirectly teaches the player new shortcuts/tricks on pokemon items and moves. Needless to say, he is a trickroom user.
    Sorry for the long elaboration.
     
    287
    Posts
    11
    Years
  • If you use the scripting command 'trainerbattle 0x9' then the script continues even if you lose. But, as I said, there is some tutorial talk by Oak on that version. A normal trainer battle script will not continue if you lose.

    Do you mean the healing special? The script wouldn't continue long enough for that to kick in so no that wouldn't work :(.

    Ok, thank you very much, the way I understood the first time made me think that trainerbattle 0x9 was a scripted battle just as say, Wally catching a ralts on emerald/ruby/sapphire
    I'll defenitly look into it

    Hey, guys, just to explain why I specifically needed a rare candy: Theres a character that called 'Trickster' that uses a self destruct electrode and revives it on the second turn using a rare candy. Basically, his purpose indirectly teaches the player new shortcuts/tricks on pokemon items and moves. Needless to say, he is a trickroom user.
    Sorry for the long elaboration.

    Rare candy gives you an extra level, I believe you mean revive, or max revive
     

    Mrakbarman

    The Jolly Juvenile
    13
    Posts
    12
    Years
  • Hey, Jose, it actually is a legitimate trick! You can actually use a rare candy to revive a dead pokemon. I found this out by accident and its a pretty nifty trick and this is the reason why I created the trickster character, to show people unique tricks even hard-core fans don't know about!
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Maybe the trickster can just explain it :). Tbh it's not a very useful thing since it'll be revived with such little health and would need healing anyway!
     

    Mrakbarman

    The Jolly Juvenile
    13
    Posts
    12
    Years
  • Hello, Magic, I just wanted to remind you that the electrode only has the self destruct move. Hope you got the strategy behind him.
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Hello, Magic, I just wanted to remind you that the electrode only has the self destruct move. Hope you got the strategy behind him.

    Yes I know but it's still going to die easily ;; demonstration of strategy, on a battle, only really works if the player is oblivious to what's happening and doesn't try and stop it. Plus... I doubt a player would want to waste a rare candy over a $1500 revive - so although the strategy might be there I don't understand the importance of rare candy as well xD. Too many things in one!!
     

    Mrakbarman

    The Jolly Juvenile
    13
    Posts
    12
    Years
  • Yeah, I see where your coming from. Anyways, thanks for the feedback.
    On a side note, is there any tricks you guys have found in the games? I need more ideas.
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen May 10, 2024
    Two things.

    First, to the original question, apart from the text tutorial involved with trainerbattle 0x9, there is no way to make a script continue after a trainer battle is lost. You always go back to the last healing place.

    Second, the rare candy strategy is an impossibility. While it is true that a rare candy can be used to revive a fainted Pokémon, a rare candy can only be used outside of battle. Therefore, it would be useless to a trainer, and would not be able to be used like you want.
     
    Back
    Top