• 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] Script for setting starter pokemon based on Flags

  • 1
    Posts
    3
    Years
    • Seen Jul 13, 2022
    Hello!
    I've been stuck on this issue for a few hours now and have been unnable to find something that can point me in the right direction.

    the default ingame script that is used for setting the starter pokemon when interacting with the pokeball is:

    Code:
    #org 0x169D78
    lock
    faceplayer
    setvar 0x4001 0x1
    setvar 0x4002 0x7
    setvar 0x4003 0x1
    setvar 0x4004 0x5
    compare 0x4055 0x3
    if 0x4 goto 0x8169DE4
    compare 0x4055 0x2
    if 0x1 goto 0x8169BE1
    msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
    release
    end

    the script i have tried is:

    Code:
    #dynamic 0x800708
    
    #org @whatregion
    lock
    faceplayer
    setvar 0x4001 0x0
    checkflag 0x201
    if 0x1 goto @kantostart
    checkflag 0x202
    if 0x1 goto @johtostart
    checkflag 0x203
    if 0x1 goto @hoennstart
    setvar 0x4003 0x4
    setvar 0x4004 0x7
    compare 0x4055 0x3
    if 0x4 goto 0x8169DE4
    compare 0x4055 0x2
    if 0x1 goto 0x8169BE1
    msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
    release
    end
    
    #org @kantostart
    setvar 0x4002 0x1
    return
    
    #org @johtostart
    setvar 0x4002 0x98
    return
    
    #org @hoennstart
    setvar 0x4002 0x115
    return

    If anyone has any ideas that would be much appreciated! Thank you!
     
    Last edited:
    Back
    Top