The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Help with a give item script[SOLVED]

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 6th, 2018 (9:02 PM). Edited May 8th, 2018 by red5677.
red5677 red5677 is offline
Non-Existent Elite Four Champ
 
Join Date: Jun 2008
Location: California, United States
Gender: Male
Nature: Brave
Posts: 27
[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!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 7th, 2018 (10:22 AM).
Sakakii's Avatar
Sakakii Sakakii is offline
 
Join Date: Nov 2017
Posts: 242
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...
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 19th, 2018 (1:50 PM). Edited May 19th, 2018 by BirdstarCat13.
BirdstarCat13 BirdstarCat13 is offline
 
Join Date: Nov 2017
Gender: Male
Posts: 476
Quote:
Originally Posted by Sakakii View Post
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.
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:17 AM.