The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Stop NPC from Disappearing after getting an ITEM from it

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 March 15th, 2021 (5:20 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Hello everybody,
i have a minor Problem with NPCs who give ITEMs.
I want the NPCs to still be there after I got the ITEM from them and left the map and returned there.
I think the Problem lies with setflag , but I don't know what I should change.


SCRIPT:

#dynamic 0x800000

#org @start
lock
faceplayer

checkflag 0x299
if 0x1 goto @alreadyReceived
msgbox @t1 0x6
giveitem 0xB5 0x2 MSG_OBTAIN
giveitem 0xC4 0x1 MSG_OBTAIN
setflag 0x299
release
end


#org @alreadyReceived
msgbox @t2 0x6
release
end


#org @t2
= text after receiving items

#org @t1
= start text
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 15th, 2021 (7:34 AM).
mcferaligatr's Avatar
mcferaligatr mcferaligatr is offline
 
Join Date: Nov 2018
Posts: 120
Quote:
Originally Posted by AJaxs View Post
Hello everybody,
i have a minor Problem with NPCs who give ITEMs.
I want the NPCs to still be there after I got the ITEM from them and left the map and returned there.
I think the Problem lies with setflag , but I don't know what I should change.


SCRIPT:

#dynamic 0x800000

#org @start
lock
faceplayer

checkflag 0x299
if 0x1 goto @alreadyReceived
msgbox @t1 0x6
giveitem 0xB5 0x2 MSG_OBTAIN
giveitem 0xC4 0x1 MSG_OBTAIN
setflag 0x299
release
end


#org @alreadyReceived
msgbox @t2 0x6
release
end


#org @t2
= text after receiving items

#org @t1
= start text
The only way (that I know of) why your NPC would disappear is if it has the flag 299 in its person ID box in Advance Map. If it does have it, just remove the flag from the box.
__________________
Pokemon NeonBlue:
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
Thread Tools

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:18 AM.