	const_def 2 ; object constants
	const SPARKLE_RANCH_EDDY

SparkleRanchHouse_MapScripts:
	db 0 ; scene scripts
        db 1 ; callbacks
	callback MAPCALLBACK_OBJECTS, .HideSheperd

.HideSheperd:
	checkevent EVENT_RESCUED_SPARKY
	iffalse .skip
	appear SPARKLE_RANCH_EDDY
.skip:
	return

SparkleRanchEddyScript:
	faceplayer
	opentext
	checkevent EVENT_GOT_SPARKY
	iftrue .HowsSparky
	writetext .AskSparkyText
	yesorno
	iffalse .DoNotWait
	checkpoke FLAAFFY
	iftrue .KeepSparky
	checkpoke AMPHAROS
	iftrue .KeepSparky
	writetext .NoSparkyText
	jump .done

.DoNotWait:
	writetext .DoNotWaitText
	jump .done

.KeepSparky:
	writetext .KeepSparkyText
	waitbutton
	verbosegiveitem MOOMOO_MILK, 5
	setevent EVENT_GOT_SPARKY
	jump .done

.HowsSparky:
	writetext .HowsSparkyText
	jump .done

.done:
	waitbutton
	closetext
	end

.DoNotWaitText:
	text "Please do not wait"
	line "too long."
	done

.AskSparkyText:
	text "Finally! Did you"
	line "save Sparky?"
	done

.KeepSparkyText:
	text "Thank you so much!"
	para "I was so worried"
	line "about its faith!"

	para "Sparky, come now!"
	para "<…>"

	para "It looks like it"
	line "enjoyed travelling"
	cont "with you<…>"

	para "<…>"
	para "You know what?"

	para "How about you keep"
	line "it? I know you'll"
	cont "treat it well!"

	para "Also, if you plan"
	line "on taking down the"
	cont "Rocket gang, you"
	cont "will need that!"
	done

.NoSparkyText:
	text "I don't see Sparky"
	line "in your party."
	done

.HowsSparkyText:
	text "Hey <PLAYER>!"
	line "How's Sparky?"
	para "I'm sure it's very"
	line "happy with you!"
	done

SparkleRanchHouse_MapEvents:
	db 0, 0 ; filler
	db 2 ; warp events
	warp_event  4,  7, SPARKLE_RANCH, 2
	warp_event  5,  7, SPARKLE_RANCH, 2
	db 0 ; coord events
	db 0 ; bg events
	db 1 ; object events
	object_event 7, 4, SPRITE_CHUCK, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_OW_BROWN, OBJECTTYPE_SCRIPT, 0, SparkleRanchEddyScript, EVENT_SPARKLE_RANCH_HERD_VISIBLE
