mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
5efce10789
That should be all of them this time
58 lines
934 B
NASM
58 lines
934 B
NASM
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 .text_found
|
|
playsound SFX_ITEM
|
|
pause 60
|
|
itemnotify
|
|
closetext
|
|
end
|
|
|
|
.no_room
|
|
opentext
|
|
writetext .text_found
|
|
waitbutton
|
|
writetext .text_bag_full
|
|
waitbutton
|
|
closetext
|
|
end
|
|
|
|
.text_found
|
|
; found @ !
|
|
text_jump UnknownText_0x1c0a1c
|
|
db "@"
|
|
|
|
.text_bag_full
|
|
; But can't carry any more items.
|
|
text_jump UnknownText_0x1c0a2c
|
|
db "@"
|
|
|
|
.TryReceiveItem:
|
|
xor a
|
|
ld [wScriptVar], a
|
|
ld a, [wEngineBuffer1]
|
|
ld [wNamedObjectIndexBuffer], a
|
|
call GetItemName
|
|
ld hl, wStringBuffer3
|
|
call CopyName2
|
|
ld a, [wEngineBuffer1]
|
|
ld [wCurItem], a
|
|
ld a, [wCurFruit]
|
|
ld [wItemQuantityChangeBuffer], a
|
|
ld hl, wNumItems
|
|
call ReceiveItem
|
|
ret nc
|
|
ld a, $1
|
|
ld [wScriptVar], a
|
|
ret
|