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

[Script] Help with a give item script[SOLVED]

red5677

Non-Existent Elite Four Champ
27
Posts
15
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:
242
Posts
6
Years
  • Age 30
  • Seen Apr 3, 2023
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...
 
476
Posts
6
Years
  • Age 23
  • Seen Feb 26, 2020
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