summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Plural-Giveitem.md33
1 files changed, 32 insertions, 1 deletions
diff --git a/Plural-Giveitem.md b/Plural-Giveitem.md
index caf7bb7..e06ae69 100644
--- a/Plural-Giveitem.md
+++ b/Plural-Giveitem.md
@@ -56,4 +56,35 @@ VerdanturfTown_EventScript_TownSign::
giveitem ITEM_POKE_BALL, 1
end
```
-<a href="https://imgur.com/1cDuh4f"><img src="https://i.imgur.com/1cDuh4f.gif" title="source: imgur.com" /></a> \ No newline at end of file
+<a href="https://imgur.com/1cDuh4f"><img src="https://i.imgur.com/1cDuh4f.gif" title="source: imgur.com" /></a>
+
+## Make them work with found items
+
+Credit to Jaizu
+
+### Change the found item message
+Add the following to [data/text/obtain_item.inc](../blob/master/data/text/obtain_item.inc):
+```c
+gText_PlayerFoundItems::
+ .string "{PLAYER} found {STR_VAR_1} {STR_VAR_2}!$"
+```
+
+### Change the found item script
+Open [data/scripts/obtain_item.inc](../blob/master/data/scripts/obtain_item.inc). Find `EventScript_ObtainedItem`, and modify it to the following:
+```c
+EventScript_FoundItem:: @ 8271C9B
+ compare VAR_0x8001, 1
+ goto_if_eq EventScript_FoundItemMessage
+ buffernumberstring 0, VAR_0x8001
+ message gText_PlayerFoundItems
+ return
+EventScript_FoundItemMessage::
+ message gText_PlayerFoundOneItem
+ return
+```
+
+### Result
+Please ignore the custom graphics, text color and item description, feel free to update the wiki with a vanilla screenshot.
+
+
+![](https://i.imgur.com/ZvlAIIB.png) \ No newline at end of file