SCRIPT_CHAPTER

/////////////////////////////////////////////////////////////////
// Déclaration constantes & variables
/////////////////////////////////////////////////////////////////

section DECLARE

// entites

	_GARDE_MAGOVENIUM		86
	_CLAUDIUS			87
	_CORNELIUS			88
	_DUMMY_CORNELIUS		572
	_DUMMY_POMMIER			599
	_CORNELIUS_CA			1200

// items objet

	_IO_EPEE_BRADWEN_CELTE		0
	_IO_CROIX			41

// items indice

	_II_GWEN			18
	_II_NOVELIUS			19
	_II_CROIX			20

// items destinations

	_ID_LANDSCAPE_MAGO		102

// evenements

	// use

	// pick

	// explorer

	// commentaires

	_C_DEBUT_QUETE			1
	_C_POMMIER			2

	// dialogues

	_D_GARDE_MAGOVENIUM		3
	_D_CLAUDIUS			4
	_D_CORNELIUS			5	

	// CTR

	// generiques

	_G_BW_ENTREE_CIRQUE		6

	// options cbts

	// cbts

	// variables
	
	$stop_if
	$stop_if_2
	$stop_if_3

section END


/////////////////////////////////////////////////////////////////
// Définition des événements
/////////////////////////////////////////////////////////////////

section EVENTS

	COMMENT
	{
		ID		_C_DEBUT_QUETE
		AREA		_LANDSCAPE_MAGO
		
		PRIMTRIG
		{
			ORIENT	"NONE"
			TRIGGER	1
		}
		
		COMMENT		100
	}
	
	COMMENT
	{
		ID		_C_POMMIER
		AREA		_RUINES
		
		PRIMTRIG
		{
			ORIENT	"TO"
			ENTITE	_DUMMY_POMMIER
		}
		
		PERSIST		1
		COMMENT		901
		ACTION		1
	}

	// ==============================================

	DIALOG
	{
		ID		_D_GARDE_MAGOVENIUM
		AREA		_ENTREE_CIRQUE
		ENTITE		_GARDE_MAGOVENIUM
		
		CAMERA		8
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_GARDE_MAGOVENIUM
		}
		
		PRIMTRIG
		{
			DIST	250
			ORIENT	"NONE"
			ENTITE	_GARDE_MAGOVENIUM
		}
		
		STAND
		{
			ID	1
			TALK	(1, 2)
			BASEJEU	2
		}
		
		FIN
		{
			ID	1
			TALK	(3, 4)
		}
		
		FIN
		{
			ID	2
			TALK	(37, 38)
			STATUS	0
		}
		
		RETOUR
		{
			ID	1
			TALK	(3, 6)
		}
		
		RETOUR
		{
			ID	2
			TALK	(37, 38)
			STATUS	0
		}
		
		USE
		{
			ID	_IO_CROIX
			TALK	(7, 8)
			ANIM	"give 2" "give 2 - pause"
		}
	}

	DIALOG
	{
		ID		_D_CLAUDIUS
		AREA		_ENTREE_CIRQUE
		ENTITE		_CLAUDIUS
		
		CAMERA		9
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_CLAUDIUS
		}
		
		PRIMTRIG
		{
			DIST	250
			ORIENT	"NONE"
			ENTITE	_CLAUDIUS
		}
		
		STAND
		{
			ID	1
			TALK	(9, 10) (11, 12, _II_NOVELIUS, _INV_INDIC)
			BASEJEU	3
		}
		
		FIN
		{
			ID	1
			TALK	(13, 14)
		}
		
		RETOUR
		{
			ID	1
			TALK	(15, 16)
		}
		
		SUJET
		{
			ID	_II_GWEN
			TALK	(21, 22)
			BASEJEU	5
		}
		
		SUJET
		{
			ID	_II_NOVELIUS
			TALK	(17, 18) (19, 20, _II_CROIX, _INV_INDIC)
			BASEJEU	4
		}
		
		SUJET
		{
			ID	_II_CROIX
			TALK	(23, 24) (25, 26)
			BASEDOC	29
		}
	}

	DIALOG
	{
		ID		_D_CORNELIUS
		AREA		_RUINES
		ENTITE		_CORNELIUS
		
		CAMERA		7
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_CORNELIUS
		}
		
		PRIMTRIG
		{
			DIST	250
			ORIENT	"NONE"
			ENTITE	_CORNELIUS
		}
		
		STAND
		{
			ID	1
			TALK	(27, 28)
		}
		
		FIN
		{
			ID	1
			TALK	(29, 30)
		}
		
		RETOUR
		{
			ID	1
			TALK	(31, 32)
		}
		
		SUJET
		{
			ID	_II_NOVELIUS
			TALK	(35, 36)
		}
		
		SUJET
		{
			ID	_II_CROIX
			TALK	(33, 34, _IO_CROIX, _INV_OBJET)
			BASEJEU	6
		}
	}

	// ==============================================

	ACTION
	{
		ID		_G_BW_ENTREE_CIRQUE
		AREA		_CIRQUE
		
		PRIMTRIG
		{
			ORIENT	"NONE"
			TRIGGER	9
		}
	}
	
section END


/////////////////////////////////////////////////////////////////
// Définition des combats
/////////////////////////////////////////////////////////////////

section COMBATS



section END

/////////////////////////////////////////////////////////////////
// Programme
/////////////////////////////////////////////////////////////////

section INIT

//  corwyn

	set $pub3, 1

// basejeu

	#BJE_BASIC		(0)

// desactivation sorties non permises

// landscape

	#OBJ_LOAD		(_CORNELIUS_CA,		40, _LANDSCAPE_MAGO, 0, 1, 0)

// entree cirque

	#OBJ_LOAD		(_GARDE_MAGOVENIUM,	 4, _ENTREE_CIRQUE, 1, 1, 1)
	#OBJ_LOAD		(_CLAUDIUS,		 5, _ENTREE_CIRQUE, 1, 1, 1)
	
// ruines

	#OBJ_LOAD		(_CORNELIUS,		 1, _RUINES, 0, 1, 1)
	#OBJ_LOAD		(_DUMMY_POMMIER,	 7, _RUINES, 1, 0, 0)
	#OBJ_LOAD		(_DUMMY_CORNELIUS,	13, _RUINES, 1, 0, 0)

// verouillage portes

	#DOO_LOCK		(_PORTE_CIRQUE_EXT_N1, _ENTREE_CIRQUE)

// colli dummy

	#OBJ_DISABLECOLLIOBJ	(_DUMMY_POMMIER)
	#OBJ_DISABLECOLLIOBJ	(_DUMMY_CORNELIUS)

// aauto

	#OBJ_AATARGET		(_CORNELIUS, _DUMMY_CORNELIUS)

section END

section LOOP

	if @INV_OWNPL	(_IO_EPEE_BRADWEN_CELTE, _INV_OBJET) = 0 & $stop_if = 0
	{
		#INV_PUTPLQ		(_IO_EPEE_BRADWEN_CELTE, _INV_OBJET)
		add			$stop_if, 1
	}
	
	if @INV_OWNPL	(_II_GWEN, _INV_INDIC) = 0 & $stop_if_2 = 0
	{
		#INV_PUTPL		(_II_GWEN, _INV_INDIC)
		add			$stop_if_2, 1
	}
	
	if @INV_OWNPL	(_ID_LANDSCAPE_MAGO, _INV_DESTI) = 0 & $stop_if_3 = 0
	{
		#INV_PUTPL		(_ID_LANDSCAPE_MAGO, _INV_DESTI)
		add			$stop_if_3, 1
	}

	OnDialog _D_GARDE_MAGOVENIUM use _IO_CROIX
	{
		#DOO_UNLOCK	(_PORTE_CIRQUE_EXT_N1, _ENTREE_CIRQUE)
		#DLG_DISABLERET	(_D_GARDE_MAGOVENIUM, _ENTREE_CIRQUE, 1)
		#DLG_DISABLEFIN	(_D_GARDE_MAGOVENIUM, _ENTREE_CIRQUE, 1)
		#DLG_ENABLEFIN	(_D_GARDE_MAGOVENIUM, _ENTREE_CIRQUE, 2)
	}
	
	OnDialog _D_CLAUDIUS sujet _II_CROIX
	{
		#OBJ_ENABLE	(_CORNELIUS)
		#OBJ_ENABLE	(_CORNELIUS_CA)
	}
	
	OnEvent		_C_DEBUT_QUETE
	{
		#BDC_ENABLE	(16)
	}
	
	OnEvent		_G_BW_ENTREE_CIRQUE
	{
		if @INV_OWNPL	(_II_CROIX, _INV_INDIC) = 1
		{
			#INV_REMPL	(_II_CROIX, _INV_INDIC)
		}
		
		ENDC
	}

section END

/////////////////////////////////////////////////////////////////
// Définition des CTR
/////////////////////////////////////////////////////////////////

section CTR



section END
