;;; Sierra Script 1.0 - (do not remove this comment)
(script# 504)
(include sci.sh)
(use Main)
(use Class_255_0)
(use Cycle)
(use Game)
(use Feature)

(public
	Gull_Region 0
)

(local
	local0
	[local1 4]
	local5
)
(instance gullBlock1 of Cage
	(properties)
)

(instance Gull_Region of Rgn
	(properties
		name "Gull Region"
	)
	
	(method (init)
		(if (not global100)
			(gullBlock1
				top: -20
				bottom: 55
				left: -30
				right: 349
				init:
			)
			(= local0 2)
			(if
			(and (!= gCurRoomNum 7) (!= gCurRoomNum 40) global223)
				(= local5 1)
				(while (<= local5 local0)
					(= [local1 local5]
						((Act new:)
							x: (Random 1 280)
							y: (Random 1 30)
							xStep: 1
							yStep: 1
							cycleSpeed: 1
							observeBlocks: gullBlock1
							setPri: 0
							setCycle: Fwd
							setMotion: Wander 15
							view: (if (== gCurRoomNum 32) 325 else (Random 325 326))
							ignoreHorizon: 1
							illegalBits: 16384
							init:
							yourself:
						)
					)
					(++ local5)
				)
			)
		)
		(super init:)
	)
	
	(method (handleEvent pEvent &tmp gInvSaidMe)
		(if (pEvent claimed?) (return 1))
		(return
			(if (== (pEvent type?) evSAID)
				(if (not global100)
					(cond 
						((Said '/gull,gull,bird>')
							(cond 
								((Said 'look') (Print 504 0))
								((Said 'converse') (Print 504 1))
								((Said 'get,capture') (Print 504 2))
								((Said 'kiss') (Print 504 3))
								((Said 'feed') (Print 504 4))
							)
						)
						((Said 'deliver/*/gull,gull,bird')
							(cond 
								((not (= gInvSaidMe (gInv saidMe:))) (Print 504 5))
								((gEgo has: (gInv indexOf: gInvSaidMe)) (Print 504 6))
								(else (proc0_17))
							)
						)
						((Said 'fling')
							(cond 
								((not (= gInvSaidMe (gInv saidMe:))) (Print 504 7))
								((gEgo has: (gInv indexOf: gInvSaidMe)) (Print 504 8))
								(else (proc0_17))
							)
						)
					)
				else
					(Print 504 9)
				)
			else
				0
			)
		)
	)
)
