diff options
author | Jaizu <jaizu85@gmail.com> | 2021-07-08 19:02:49 +0200 |
---|---|---|
committer | Jaizu <jaizu85@gmail.com> | 2021-07-08 19:02:49 +0200 |
commit | fed67332fc03964046fa105ce26b2c842edce539 (patch) | |
tree | 681de63a7ae647561d3c7ac1b968e81cdf17057b | |
parent | 7720d17e2dad60be560ec5bd2393f1526f8b1145 (diff) |
Added support for found items.
-rw-r--r-- | Plural-Giveitem.md | 33 |
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. + + +
\ No newline at end of file |