• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Help with a give item script[SOLVED]

red5677

Non-Existent Elite Four Champ
  • 27
    Posts
    16
    Years
    [UPDATE]
    It was just a problem on my end....


    Can someone help me debug this?

    #dynamic 0x2E508E

    #org @start
    lock
    checkflag 0x1201
    if 0x1 goto @done
    msgbox @talk1 0x6
    faceplayer
    msgbox @talk2 0x6
    giveitem 0x0C8 0x1 0x0
    msgbox @talk3 0x6
    setflag 0x1201
    release
    end

    #org @done
    = Hmm....
    release
    end

    #org @talk1
    = Hmm where is that item....

    #org @talk2
    = Oh hello! I was looking for\nsomething but I found a bunch of\ljunk. Perhaps this would be of use\lto you.

    #org @talk3
    = Have fun!

    I've learned and applied a similar format and that one does work. However with this script it just keeps giving infinite items. Is it something to do with the checkflag/setflag? I've tried experimenting with clearflag but that didn't yield any results either. Also please correct me if my posting etiquitte is wrong. Thanks!
     
    Last edited:
    I'm just curious what is that flag, are you using an expanded ROM or something? I wasn't even aware there were 1200 flags in the game. And well I guess it's in hex, so more like 4000 flags or something...

    As long as the value fits within the hex limit that flags can have in the game, you can use any valid number the game doesn't already use. I use 1213 and 1214 for the first two scripts (respectively) in my ROM Hack.
     
    Last edited:
    Back
    Top