SweetScentFromMenu:
	ld hl, SweetScentScript
	call QueueScript
	ld a, $1
	ld [wFieldMoveSucceeded], a
	ret

SweetScentScript:
	reloadmappart
	special UpdateTimePals
	callasm GetPartyNick
	farwritetext SweetScentText
	closetext

	farscall FieldMovePokepicScript

	callasm SweetScentEncounter
	sif false
		farjumptext SweetScentNothingHere
	randomwildmon
	startbattle
	reloadmapafterbattle
	end

SweetScentEncounter:
	callba CanUseSweetScent
	jr nc, .no_battle
	callba GetMapEncounterRate
	ld a, b
	and a
	jr z, .no_battle
	callba ChooseWildEncounter
	jr nz, .no_battle
	jr .start_battle

.start_battle
	ld a, $1
	jr .load_var

.no_battle
	xor a
	ld [wBattleType], a
.load_var
	ld [hScriptVar], a
	ret
