2018-06-24 16:09:41 +02:00
|
|
|
ItemFinder:
|
2017-12-24 12:47:30 -05:00
|
|
|
farcall CheckForHiddenItems
|
2015-11-11 16:11:08 -05: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 17:51:32 -05:00
|
|
|
ld [wItemEffectSucceeded], a
|
2015-11-11 16:11:08 -05:00
|
|
|
ret
|
|
|
|
|
2018-06-24 16:09:41 +02:00
|
|
|
.ItemfinderSound:
|
2015-12-18 20:07:09 -05:00
|
|
|
ld c, 4
|
2015-11-11 16:11:08 -05: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
|
|
|
|
|
2018-06-25 02:10:37 +02:00
|
|
|
.Script_FoundSomething:
|
2015-11-11 16:11:08 -05:00
|
|
|
reloadmappart
|
|
|
|
special UpdateTimePals
|
|
|
|
callasm .ItemfinderSound
|
|
|
|
writetext .Text_FoundSomething
|
2015-11-25 10:16:29 -05:00
|
|
|
closetext
|
2015-11-11 16:11:08 -05:00
|
|
|
end
|
|
|
|
|
2018-06-25 02:10:37 +02:00
|
|
|
.Script_FoundNothing:
|
2015-11-11 16:11:08 -05:00
|
|
|
reloadmappart
|
|
|
|
special UpdateTimePals
|
|
|
|
writetext .Text_FoundNothing
|
2015-11-25 10:16:29 -05:00
|
|
|
closetext
|
2015-11-11 16:11:08 -05:00
|
|
|
end
|
|
|
|
|
2018-06-25 02:10:37 +02:00
|
|
|
.Text_FoundSomething:
|
2015-11-11 16:11:08 -05:00
|
|
|
; Yes! ITEMFINDER indicates there's an item nearby.
|
2018-10-28 17:16:55 +01:00
|
|
|
text_far UnknownText_0x1c0a77
|
2018-11-17 13:33:03 -05:00
|
|
|
text_end
|
2015-11-11 16:11:08 -05:00
|
|
|
|
2018-06-25 02:10:37 +02:00
|
|
|
.Text_FoundNothing:
|
2015-11-11 16:11:08 -05:00
|
|
|
; Nope! ITEMFINDER isn't responding.
|
2018-10-28 17:16:55 +01:00
|
|
|
text_far UnknownText_0x1c0aa9
|
2018-11-17 13:33:03 -05:00
|
|
|
text_end
|