summaryrefslogtreecommitdiff
path: root/engine/events/misc_scripts_2.asm
diff options
context:
space:
mode:
authorIIMarckus <iimarckus@gmail.com>2020-02-09 02:20:05 -0700
committerIIMarckus <iimarckus@gmail.com>2020-02-09 02:20:05 -0700
commita7e3a999ff21ecac0bfbe7f091f9ff901075a323 (patch)
tree8032e91c6a426b355b6d1d3505bbc1fdc9c40fa6 /engine/events/misc_scripts_2.asm
parentd561a6d2db176240549fa605dc3e7e1f59e86607 (diff)
parent0543e933915a65127a8b803789d049478c7889d5 (diff)
Merge https://github.com/libjet/pokegold
Diffstat (limited to 'engine/events/misc_scripts_2.asm')
-rwxr-xr-xengine/events/misc_scripts_2.asm48
1 files changed, 48 insertions, 0 deletions
diff --git a/engine/events/misc_scripts_2.asm b/engine/events/misc_scripts_2.asm
new file mode 100755
index 00000000..ac0f7e31
--- /dev/null
+++ b/engine/events/misc_scripts_2.asm
@@ -0,0 +1,48 @@
+RepelWoreOffScript::
+ opentext
+ writetext .RepelWoreOffText
+ waitbutton
+ closetext
+ end
+
+.RepelWoreOffText:
+ text_far _RepelWoreOffText
+ db "@"
+
+HiddenItemScript::
+ opentext
+ copybytetovar wcf2b
+ itemtotext MEM_BUFFER_0, USE_SCRIPT_VAR
+ writetext .PlayerFoundItemText
+ giveitem ITEM_FROM_MEM
+ iffalse .bag_full
+ callasm SetMemEvent
+ specialsound
+ itemnotify
+ jump .finish
+
+.bag_full
+ buttonsound
+ writetext .ButNoSpaceText
+ waitbutton
+
+.finish
+ closetext
+ end
+
+.PlayerFoundItemText:
+ text_far _PlayerFoundItemText
+ db "@"
+
+.ButNoSpaceText:
+ text_far _ButNoSpaceText
+ db "@"
+
+SetMemEvent:
+ ld hl, wcf29
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ ld b, SET_FLAG
+ call EventFlagAction
+ ret