summaryrefslogtreecommitdiff
path: root/engine/events/misc_scripts_2.asm
diff options
context:
space:
mode:
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