pokecrystal-board/event/itemfinder.asm

59 lines
982 B
NASM
Raw Normal View History

2015-11-11 13:11:08 -08:00
ItemFinder: ; 12580
callba CheckForHiddenItems
2015-11-11 13:11:08 -08:00
jr c, .found_something
ld hl, .Script_FoundNothing
jr .resume
.found_something
ld hl, .Script_FoundSomething
.resume
call QueueScript
ld a, $1
2015-12-17 14:51:32 -08:00
ld [wItemEffectSucceeded], a
2015-11-11 13:11:08 -08:00
ret
; 12599
.ItemfinderSound: ; 12599
2015-12-18 17:07:09 -08:00
ld c, 4
2015-11-11 13:11:08 -08:00
.sfx_loop
push bc
ld de, SFX_SECOND_PART_OF_ITEMFINDER
call WaitPlaySFX
ld de, SFX_TRANSACTION
call WaitPlaySFX
pop bc
dec c
jr nz, .sfx_loop
ret
; 125ad
.Script_FoundSomething: ; 0x125ad
reloadmappart
special UpdateTimePals
callasm .ItemfinderSound
writetext .Text_FoundSomething
2015-11-25 07:16:29 -08:00
closetext
2015-11-11 13:11:08 -08:00
end
; 0x125ba
.Script_FoundNothing: ; 0x125ba
reloadmappart
special UpdateTimePals
writetext .Text_FoundNothing
2015-11-25 07:16:29 -08:00
closetext
2015-11-11 13:11:08 -08:00
end
; 0x125c3
.Text_FoundSomething: ; 0x125c3
; Yes! ITEMFINDER indicates there's an item nearby.
text_jump UnknownText_0x1c0a77
db "@"
; 0x125c8
.Text_FoundNothing: ; 0x125c8
; Nope! ITEMFINDER isn't responding.
text_jump UnknownText_0x1c0aa9
db "@"
; 0x125cd