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

(public
	Room694 0
)

(local
	newProp_3
	newProp_4
	newView
	newProp_2
	newProp
	newAct
	local6
	local7
)
(instance Room694 of Rm
	(properties
		picture 204
		style $0008
	)
	
	(method (init)
		(super init:)
		(self setRegions: 521)
		(= number gCurRoomNum)
		(gRoom setScript: actions)
	)
)

(instance actions of Script
	(properties)
	
	(method (changeState newState &tmp [temp0 12])
		(switch (= state newState)
			(0
				(= local6 1)
				(self changeState: 500)
			)
			(1
				(if (gEgo has: 25)
					(self changeState: 100)
				else
					((View new:)
						view: 786
						loop: 4
						cel: 0
						posn: 277 171
						setPri: 13
						ignoreActors:
						init:
						addToPic:
					)
					((= newProp (Prop new:))
						view: 786
						loop: 5
						cel: 0
						posn: 277 138
						setPri: 14
						init:
					)
					(= seconds 6)
				)
			)
			(2
				(gCast eachElementDo: #dispose)
				(gAddToPics eachElementDo: #dispose)
				(gRoom drawPic: 991)
				(self changeState: 3)
			)
			(3
				((= newView (View new:))
					view: 752
					loop: 1
					cel: 0
					posn: 159 114
					setPri: 14
					init:
					addToPic:
				)
				(= global120 (Print 694 0 67 -1 117 88))
				(= newProp_2 (Prop new:))
				(newProp_2
					view: 752
					loop: 5
					cel: 2
					posn: 164 88
					cycleSpeed: 18
					setPri: 15
					init:
					setCycle: Beg self
				)
			)
			(4
				(newProp_2
					view: 752
					loop: 5
					cel: 0
					posn: 164 88
					cycleSpeed: 8
					setPri: 15
					init:
					setCycle: End self
				)
				(= seconds 12)
			)
			(5
				(proc0_21)
				(gCast eachElementDo: #dispose)
				(gAddToPics eachElementDo: #dispose)
				(newProp_2 dispose:)
				(= local6 6)
				(self changeState: 500)
			)
			(6
				((View new:)
					view: 786
					loop: 4
					cel: 0
					posn: 277 171
					setPri: 13
					ignoreActors:
					init:
					addToPic:
				)
				((= newProp (Prop new:))
					view: 786
					loop: 5
					cel: 0
					posn: 277 138
					setPri: 14
					init:
				)
				(= seconds 3)
			)
			(7
				(= global120 (Print 694 1 67 -1 25 70 240 88))
				(= seconds 2)
				(newProp_3 cel: 1)
			)
			(8
				(newProp cel: 3)
				(newProp_4 cel: 1)
				(if (== ((ScriptID 521 1) state?) 3)
					((ScriptID 521 1) client: actions)
					((ScriptID 0 4) setReal: self 10)
				else
					(= seconds 10)
				)
			)
			(9
				(if
					(or
						(gTimers contains: (ScriptID 0 4))
						(== ((ScriptID 521 1) state?) 3)
					)
					(-- state)
				else
					(self changeState: 10)
				)
			)
			(10 (= global127 1) (proc0_21))
			(100
				(= newAct (Act new:))
				(= newProp (Act new:))
				(newProp
					view: 786
					setLoop: 5
					cel: 2
					posn: 298 141
					setPri: 13
					ignoreActors:
					setMotion: MoveTo 250 142
					init:
				)
				(newAct
					view: 786
					setLoop: 4
					cel: 0
					posn: 298 174
					setPri: 12
					setMotion: MoveTo 250 175 self
					init:
				)
			)
			(101
				(newProp cel: 4)
				(gEgo put: 25 999)
				(= global120 (Print 694 2 67 -1 35 70 240 88))
				(= seconds 8)
			)
			(102
				(proc0_21)
				(gCast eachElementDo: #dispose)
				(gAddToPics eachElementDo: #dispose)
				(gRoom drawPic: 991)
				((View new:)
					view: 752
					loop: 1
					cel: 0
					posn: 159 114
					setPri: 14
					init:
					addToPic:
				)
				(= newProp_2 (Prop new:))
				(newProp_2
					view: 752
					setLoop: 6
					cel: 0
					posn: 164 88
					cycleSpeed: 10
					setCycle: Fwd
					setPri: 15
					init:
				)
				(= seconds 8)
			)
			(103
				(newProp_2
					setLoop: 7
					cel: 0
					cycleSpeed: 18
					setCycle: End self
				)
			)
			(104
				(newProp_2 dispose:)
				((View new:)
					view: 786
					loop: 2
					cel: 0
					posn: 85 177
					setPri: 11
					ignoreActors:
					init:
					addToPic:
				)
				((= newProp_3 (Prop new:))
					view: 786
					loop: 3
					cel: 2
					posn: 85 147
					setPri: 12
					init:
					stopUpd:
				)
				((View new:)
					view: 786
					loop: 0
					cel: 0
					posn: 228 176
					setPri: 11
					ignoreActors:
					init:
					addToPic:
				)
				((= newProp_4 (Prop new:))
					view: 786
					loop: 1
					cel: 2
					posn: 228 101
					setPri: 12
					init:
					stopUpd:
				)
				((View new:)
					view: 752
					loop: 0
					cel: 1
					posn: 163 137
					setPri: 14
					ignoreActors:
					init:
					addToPic:
				)
				((View new:)
					view: 786
					setLoop: 5
					cel: 4
					posn: 250 141
					setPri: 13
					ignoreActors:
					init:
					addToPic:
				)
				((View new:)
					view: 786
					setLoop: 4
					cel: 0
					posn: 250 174
					setPri: 12
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 2
					cel: 0
					posn: 204 89
					setPri: 6
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 2
					cel: 0
					posn: 123 89
					setPri: 6
					init:
					addToPic:
				)
				((Prop new:)
					view: 752
					loop: 4
					cel: 1
					posn: 204 63
					setPri: 14
					ignoreActors:
					cycleSpeed: 1
					setCycle: Fwd
					init:
				)
				((Prop new:)
					view: 752
					loop: 4
					cel: 0
					posn: 123 63
					setPri: 14
					ignoreActors:
					cycleSpeed: 1
					setCycle: Fwd
					init:
				)
				((View new:)
					view: 752
					loop: 3
					cel: 0
					posn: 64 139
					setPri: 0
					init:
					addToPic:
				)
				(gRoom drawPic: 204)
				(= seconds 4)
			)
			(105
				(= global120
					(Print 694 3 67 -1 20 70 240 80 {Rosella} 88)
				)
				(= seconds 7)
			)
			(106
				(proc0_21)
				(= global120
					(Print 694 4 67 -1 20 70 240 80 {King Graham} 88)
				)
				(= seconds 7)
			)
			(107
				(proc0_21)
				(= global120
					(Print 694 5 67 -1 20 70 240 80 {Rosella} 88)
				)
				(= seconds 8)
			)
			(108
				(proc0_21)
				(gCast eachElementDo: #dispose)
				(gAddToPics eachElementDo: #dispose)
				(gRoom drawPic: 991)
				((= newProp_2 (View new:))
					view: 752
					setLoop: 0
					cel: 3
					posn: 159 114
					setPri: 14
					init:
				)
				(= global120
					(Print 694 6 67 -1 138 70 240 80 {Rosella} 88)
				)
				(= seconds 15)
			)
			(109
				(proc0_21)
				(newProp_2 dispose:)
				((View new:)
					view: 786
					loop: 2
					cel: 0
					posn: 85 177
					setPri: 11
					ignoreActors:
					init:
					addToPic:
				)
				((= newProp_3 (Prop new:))
					view: 786
					loop: 3
					cel: 2
					posn: 85 147
					setPri: 12
					init:
					stopUpd:
				)
				((View new:)
					view: 786
					loop: 0
					cel: 0
					posn: 228 176
					setPri: 11
					ignoreActors:
					init:
					addToPic:
				)
				((= newProp_4 (Prop new:))
					view: 786
					loop: 1
					cel: 2
					posn: 228 101
					setPri: 12
					init:
					stopUpd:
				)
				((View new:)
					view: 752
					loop: 0
					cel: 1
					posn: 163 137
					setPri: 14
					ignoreActors:
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 0
					cel: 2
					posn: 158 82
					ignoreActors:
					setPri: 15
					init:
				)
				((View new:)
					view: 786
					setLoop: 4
					cel: 0
					posn: 250 174
					setPri: 12
					init:
					addToPic:
				)
				((View new:)
					view: 786
					setLoop: 5
					cel: 4
					posn: 250 141
					setPri: 13
					ignoreActors:
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 2
					cel: 0
					posn: 204 89
					setPri: 6
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 2
					cel: 0
					posn: 123 89
					setPri: 6
					init:
					addToPic:
				)
				((Prop new:)
					view: 752
					loop: 4
					cel: 1
					posn: 204 63
					setPri: 14
					ignoreActors:
					cycleSpeed: 1
					setCycle: Fwd
					init:
				)
				((Prop new:)
					view: 752
					loop: 4
					cel: 0
					posn: 123 63
					setPri: 14
					ignoreActors:
					cycleSpeed: 1
					setCycle: Fwd
					init:
				)
				((View new:)
					view: 752
					loop: 3
					cel: 0
					posn: 64 139
					setPri: 0
					init:
					addToPic:
				)
				(gRoom drawPic: 204)
				(if (== ((ScriptID 521 1) state?) 3)
					((ScriptID 521 1) client: actions)
					((ScriptID 0 4) setReal: self 5)
				else
					(= seconds 5)
				)
			)
			(110
				(if
					(or
						(gTimers contains: (ScriptID 0 4))
						(== ((ScriptID 521 1) state?) 3)
					)
					(-- state)
				else
					(self changeState: 111)
				)
			)
			(111
				(Print 694 7 67 -1 85 82 100 0 0 88)
				(= global160 0)
				(= seconds 10)
			)
			(112 (proc0_21))
			(500
				((View new:)
					view: 786
					loop: 2
					cel: 0
					posn: 85 177
					setPri: 11
					ignoreActors:
					init:
					addToPic:
				)
				((View new:)
					view: 786
					loop: 0
					cel: 0
					posn: 228 176
					setPri: 11
					ignoreActors:
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 0
					cel: 0
					posn: 163 137
					setPri: 15
					ignoreActors:
					init:
					addToPic:
				)
				((= newProp_4 (Prop new:))
					view: 786
					loop: 1
					cel: 0
					posn: 228 101
					setPri: 12
					init:
					stopUpd:
				)
				((= newProp_3 (Prop new:))
					view: 786
					loop: 3
					cel: 0
					posn: 85 147
					setPri: 12
					init:
					stopUpd:
				)
				((View new:)
					view: 752
					loop: 2
					cel: 0
					posn: 204 89
					setPri: 6
					init:
					addToPic:
				)
				((View new:)
					view: 752
					loop: 2
					cel: 0
					posn: 123 89
					setPri: 6
					init:
					addToPic:
				)
				((Prop new:)
					view: 752
					loop: 4
					cel: 1
					posn: 204 63
					setPri: 14
					ignoreActors:
					cycleSpeed: 1
					setCycle: Fwd
					init:
				)
				((Prop new:)
					view: 752
					loop: 4
					cel: 0
					posn: 123 63
					setPri: 14
					ignoreActors:
					cycleSpeed: 1
					setCycle: Fwd
					init:
				)
				((View new:)
					view: 752
					loop: 3
					cel: 0
					posn: 64 139
					setPri: 0
					init:
					addToPic:
				)
				(gRoom drawPic: 204)
				(self changeState: local6)
			)
			(600
				(StrAt @temp0 10)
				(= local7 0)
				(while (<= local7 9)
					(StrAt @temp0 local7 (+ (Random 0 25) 65))
					(++ local7)
				)
				(StrAt @temp0 10 0)
				(if (== global15 230)
					(StrAt @temp0 2 69)
					(StrAt @temp0 6 52)
					(StrAt @temp0 9 65)
				)
				(Print
					(Format
						@global228
						{Your Secret Code is:\0A\0A___%s}
						@temp0
					)
				)
			)
		)
	)
)
