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

(public
	cemReg 0
)
(synonyms
	(fence wall)
)

(instance cemReg of Rgn
	(properties)
	
	(method (handleEvent pEvent &tmp gInvSaidMe)
		(if (pEvent claimed?) (return 1))
		(return
			(if (== (pEvent type?) evSAID)
				(cond 
					((Said 'look>')
						(cond 
							((Said '/flora') (Print 510 0))
							((Said '/boulder') (Print 510 1))
							((Said '/dirt,down') (Print 510 2))
							((Said '/grass') (Print 510 3))
							((Said '/bush') (Print 510 4))
							((Said '/blossom') (Print 510 5))
							((Said '/fence') (Print 510 6))
							((Said '/forest') (Print 510 7))
							((Said '/cemetery,cemetery') (Print 510 8))
							((Said '/grave,crypt') (Print 510 9))
							((Said '/gravestone') (Print 510 10))
							((Said '/monument') (Print 510 11))
							((Said '/ghoul')
								(if (and global100 global186)
									(Print 510 12)
								else
									(Print 510 13)
								)
							)
						)
					)
					((Said 'get/blossom') (Print 510 14))
					((Said 'dig[/grave,hole]')
						(if (not ((Inv at: 15) owner: gEgo))
							(Print 510 15)
						)
						(if (== 5 global113) (Print 510 16))
					)
					((Said 'conceal<behind/grave,gravestone') (Print 510 17))
					((Said 'get/gravestone') (Print 510 18))
					((Said 'move/gravestone') (Print 510 19))
					((Said 'converse[/ghoul]')
						(if (and global100 global186)
							(Print 510 20)
						else
							(Print 510 21)
						)
					)
					((Said 'kill[/ghoul]')
						(if (and global100 global186)
							(Print 510 22)
						else
							(Print 510 13)
						)
					)
					((Said 'climb/boulder') (Print 510 23))
					((Said 'get,capture/ghoul')
						(if (and global100 global186)
							(Print 510 24)
						else
							(Print 510 13)
						)
					)
					((Said 'kiss[/ghoul]')
						(if (and global100 global186)
							(Print 510 25)
						else
							(pEvent claimed: 0)
						)
					)
					(
					(and (Said 'deliver>') (= gInvSaidMe (gInv saidMe:)))
						(if (gEgo has: (gInv indexOf: gInvSaidMe))
							(if (== global186 0)
								(Print 510 21)
							else
								(Print 510 26)
							)
						else
							(proc0_17)
						)
					)
				)
			else
				0
			)
		)
	)
)
