summaryrefslogtreecommitdiff
path: root/engine/events/misc_scripts.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/events/misc_scripts.asm')
-rwxr-xr-xengine/events/misc_scripts.asm55
1 files changed, 55 insertions, 0 deletions
diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm
new file mode 100755
index 00000000..f9ba459f
--- /dev/null
+++ b/engine/events/misc_scripts.asm
@@ -0,0 +1,55 @@
+Script_AbortBugContest:
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iffalse .finish
+ setflag ENGINE_DAILY_BUG_CONTEST
+ special ContestReturnMons
+.finish
+ end
+
+FindItemInBallScript::
+ callasm .TryReceiveItem
+ iffalse .no_room
+ disappear LAST_TALKED
+ opentext
+ writetext .FoundItemText
+ playsound SFX_ITEM
+ pause 60
+ itemnotify
+ closetext
+ end
+
+.no_room
+ opentext
+ writetext .FoundItemText
+ waitbutton
+ writetext .CantCarryItemText
+ waitbutton
+ closetext
+ end
+
+.FoundItemText:
+ text_far _FoundItemText
+ db "@"
+
+.CantCarryItemText:
+ text_far _CantCarryItemText
+ db "@"
+
+.TryReceiveItem:
+ xor a
+ ld [wScriptVar], a
+ ld a, [wcf29]
+ ld [wDeciramBuffer], a
+ call GetItemName
+ ld hl, wStringBuffer3
+ call CopyName2
+ ld a, [wcf29]
+ ld [wd002], a
+ ld a, [wcf2a]
+ ld [wItemQuantityChangeBuffer], a
+ ld hl, wNumItems
+ call ReceiveItem
+ ret nc
+ ld a, $1
+ ld [wScriptVar], a
+ ret \ No newline at end of file