The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Stop NPC from Disappearing after getting an ITEM from it (https://www.pokecommunity.com/showthread.php?t=446465)

AJaxs March 15th, 2021 5:20 AM

Stop NPC from Disappearing after getting an ITEM from it
 
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

mcferaligatr March 15th, 2021 7:34 AM

Quote:

Originally Posted by AJaxs (Post 10312972)
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.


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


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.