// nbook Script file
// 2000 01/02 YUTAKA.

#000 {
	// HFLG
	// 浅野
	&200 = 0

	XBOOK "book\op\OP_01.xbx" #000 100
	XBOOK "book\op\OP_01.xbx" #001 105

	&2 = 0
	WHILE &2 = 0 DO {
		SELECT 1 NOSOUND {
			# 1 止める
			# 2 放っておく
		}
		IF &1 = 1 THEN {
			// 条件が真の間ループ
			&2 = 1
		}
		IF &1 = 2 THEN {
			XBOOK "book\op\OP_01.xbx" #002 110
		}
	}
	XBOOK "book\op\OP_01.xbx" #003 115


	&2 = 0
	&3 = 0
	&4 = 0
	WHILE &2 = 0 DO {
		SELECT 1 {
			# 1 見る
			# 2 話す
		}

		IF &3 = 4 THEN {
			IF &4 = 1 THEN {
				&2 = 1
			}
		}

		// 見る
		IF &1 = 1 THEN {
			// 一回め
			IF &3 = 0 THEN {
				XBOOK "book\op\OP_01.xbx" #004 120
				INC& 3
				CONTINUE
			}
			IF &3 = 1 THEN {
				XBOOK "book\op\OP_01.xbx" #005 125
				INC& 3
				CONTINUE
			}
			IF &3 = 2 THEN {
				XBOOK "book\op\OP_01.xbx" #006 130
				INC& 3
				CONTINUE
			}
			IF &3 = 3 THEN {
				XBOOK "book\op\OP_01.xbx" #007 135
				INC& 3
				CONTINUE
			}
			IF &3 = 4 THEN {
				XBOOK "book\op\OP_01.xbx" #007 135
				CONTINUE
			}
		}

		// 話す
		IF &1 = 2 THEN {
			// 一回め
			IF &4 = 0 THEN {
				XBOOK "book\op\OP_01.xbx" #008 150
				INC& 4
				CONTINUE
			}
			IF &4 = 1 THEN {
				XBOOK "book\op\OP_01.xbx" #008 150
				CONTINUE
			}
		}
	}
	XBOOK "book\op\OP_01.xbx" #009 155

	&2 = 0
	&3 = 0
	&4 = 0
	WHILE &2 = 0 DO {
		SELECT 1 {
			# 1 もっとよく見る
			# 2 話してみる
		}

		IF &3 = 4 THEN {
			IF &4 = 1 THEN {
				&2 = 1
			}
		}

		// 見る
		IF &1 = 1 THEN {
			// 一回め
			IF &3 = 0 THEN {
				XBOOK "book\op\OP_01.xbx" #010 160
				INC& 3
				CONTINUE
			}
			IF &3 = 1 THEN {
				XBOOK "book\op\OP_01.xbx" #011 170
				INC& 3
				CONTINUE
			}
			IF &3 = 2 THEN {
				XBOOK "book\op\OP_01.xbx" #012 180
				INC& 3
				CONTINUE
			}
			IF &3 = 3 THEN {
				XBOOK "book\op\OP_01.xbx" #013 190
				INC& 3
				CONTINUE
			}
			IF &3 = 4 THEN {
				XBOOK "book\op\OP_01.xbx" #013 190
				CONTINUE
			}
		}

		// 話す
		IF &1 = 2 THEN {
			// 一回め
			IF &4 = 0 THEN {
				XBOOK "book\op\OP_01.xbx" #014 195
				INC& 4
				CONTINUE
			}
			IF &4 = 1 THEN {
				XBOOK "book\op\OP_01.xbx" #014 195
				CONTINUE
			}
		}
	}

	XBOOK "book\op\OP_01.xbx" #015 200

	&2 = 0
	&3 = 0
	WHILE &2 = 0 DO {
		SELECT 1 {
			# 1 辺りを見まわす
		}
		IF &1 = 1 THEN {
			IF &3 = 0 THEN {
				XBOOK "book\op\OP_01.xbx" #016 205
				INC& 3
				CONTINUE
			}
			IF &3 = 1 THEN {
				XBOOK "book\op\OP_01.xbx" #017 210
				INC& 3
				CONTINUE
			}
			IF &3 = 2 THEN {
				XBOOK "book\op\OP_01.xbx" #018 215
				&2 = 1
				CONTINUE
			}
		}
	}

	&2 = 0
	&3 = 0
	WHILE &2 = 0 DO {
		SELECT 1 {
			# 1 下を見る
		}
		IF &1 = 1 THEN {
			IF &3 = 0 THEN {
				XBOOK "book\op\OP_01.xbx" #019 220
				INC& 3
				CONTINUE
			}
			IF &3 = 1 THEN {
				XBOOK "book\op\OP_01.xbx" #020 225
				&2 = 1
				CONTINUE
			}
		}
	}

	XBOOK "book\op\OP_01.xbx" #021 230
	YBOOK "book\op\OP.ybx" #001
}

#001 {
	XBOOK "book\op\OP_02.xbx" #022 235
	XBOOK "book\op\OP_03.xbx" #023 240
	SELECT 1 {
		# 1 カーテンを開ける
	}
	XBOOK "book\op\OP_03.xbx" #024 245
	SELECT 1 {
		# 1 見る
	}
	XBOOK "book\op\OP_03.xbx" #025 250
	SELECT 1 {
		# 1 見る
	}
	XBOOK "book\op\OP_03.xbx" #026 255
	SELECT 1 {
		# 1 見る
	}
	XBOOK "book\op\OP_03.xbx" #027 260
	SELECT 1 {
		# 1 実感……できないな
	}
	XBOOK "book\op\OP_03.xbx" #028 265
	SELECT 1 {
		# 1 振り返る
	}
	XBOOK "book\op\OP_03.xbx" #029 270
	YBOOK "book\op\OP.ybx" #002
}

#002 {
	XBOOK "book\op\OP_04.xbx" #030 280

	// 次の場所移動コマンドへの変数初期化
	//	3 = 商店街 4 = 学園 5 = 部屋
	&3 = 0
	&4 = 0
	&5 = 0

	YBOOK "book\op\OP.ybx" #003
}

#003 {
	// 2 = ループ全体 
	&2 = 0
	WHILE &2 = 0 DO {
		SELECT 1 {
			# 1 駅前商店街
			# 2 学園
			# 3 部屋にもどる
			# 4 セーブ
		}
		IF &1 = 1 THEN {
			IF &3 = 1 THEN {
				XBOOK "book\op\OP_05.xbx" #032 290
			}
			IF &3 = 0 THEN {
				XBOOK "book\op\OP_05.xbx" #031 285
				INC& 3
			}
		}
		IF &1 = 2 THEN {
			IF &4 = 1 THEN {
				XBOOK "book\op\OP_05.xbx" #034 300
			}
			IF &4 = 0 THEN {
				XBOOK "book\op\OP_05.xbx" #033 295
				INC& 4
			}
		}
		IF &1 = 3 THEN {
			IF &5 = 1 THEN {
				XBOOK "book\op\OP_05.xbx" #036 310
			}
			IF &5 = 0 THEN {
				XBOOK "book\op\OP_05.xbx" #035 305
				INC& 5
			}
		}
		IF &1 = 4 THEN {
			%10 = 0
			XBOOK "book\op\OP_05.xbx" #SAVE 10
			SAVE "book\op\load.ybx" #003_LOAD "オープニング_冬休み"
		}

		// 抜け判定
		IF &3 = 1 THEN {
			IF &4 = 1 THEN {
				IF &5 = 1 THEN {
					&2 = 1
				}
			}
		}
	}
	XBOOK "book\op\OP_05.xbx" #037 315
	YBOOK "book\op\OP.ybx" #004
}}

#004 {
	XBOOK "book\op\OP_06.xbx" #038 320
	XBOOK "book\op\OP_07.xbx" #039 325
	YBOOK "book\op\OP.ybx" #005
}

#005 {
	SELECT 1 {
		# 1 ぐっすり眠る
		# 2 セーブ
	}
	IF &1 = 2 THEN {
		SAVE "book\op\load.ybx" #005_LOAD "オープニング_始業式"
		YBOOK "book\op\OP.ybx" #005
	}

	XBOOK "book\op\OP_08.xbx" #040 330

	SELECT 1 {
		# 1 光を起こす
		# 2 起こさない
	}

	IF &1 = 1 THEN {
		XBOOK "book\op\OP_08.xbx" #041 335
		XBOOK "book\op\OP_08.xbx" #042 340
		XBOOK "book\op\OP_08.xbx" #043 345
	}
	IF &1 = 2 THEN {
		XBOOK "book\op\OP_08.xbx" #044 350
	}
	XBOOK "book\op\OP_08.xbx" #045 355
	XBOOK "book\op\OP_09.xbx" #046 360
	XBOOK "book\op\OP_09.xbx" #047 365
	XBOOK "book\op\OP_09.xbx" #048 370
	XBOOK "book\op\OP_09.xbx" #049 375

	// 浅野シナリオへ
	YBOOK "book\as\AS.ybx" #000
}






