2018-06-24 14:09:41 +00:00
|
|
|
ItemFinder:
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CheckForHiddenItems
|
2015-11-11 21:11:08 +00: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 22:51:32 +00:00
|
|
|
ld [wItemEffectSucceeded], a
|
2015-11-11 21:11:08 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.ItemfinderSound:
|
2015-12-19 01:07:09 +00:00
|
|
|
ld c, 4
|
2015-11-11 21:11:08 +00: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 00:10:37 +00:00
|
|
|
.Script_FoundSomething:
|
2015-11-11 21:11:08 +00:00
|
|
|
reloadmappart
|
|
|
|
special UpdateTimePals
|
|
|
|
callasm .ItemfinderSound
|
2019-10-20 22:24:17 +00:00
|
|
|
writetext .ItemfinderItemNearbyText
|
2015-11-25 15:16:29 +00:00
|
|
|
closetext
|
2015-11-11 21:11:08 +00:00
|
|
|
end
|
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
.Script_FoundNothing:
|
2015-11-11 21:11:08 +00:00
|
|
|
reloadmappart
|
|
|
|
special UpdateTimePals
|
2019-10-20 22:24:17 +00:00
|
|
|
writetext .ItemfinderNopeText
|
2015-11-25 15:16:29 +00:00
|
|
|
closetext
|
2015-11-11 21:11:08 +00:00
|
|
|
end
|
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.ItemfinderItemNearbyText:
|
|
|
|
text_far _ItemfinderItemNearbyText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|
2015-11-11 21:11:08 +00:00
|
|
|
|
2019-10-20 22:24:17 +00:00
|
|
|
.ItemfinderNopeText:
|
|
|
|
text_far _ItemfinderNopeText
|
2018-11-17 18:33:03 +00:00
|
|
|
text_end
|