SCRIPT_CHAPTER

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

section DECLARE

// entites
	_SAGRAMOR		371
	_EPEE_DE_VERITE		384	//4
	_EPEE_VERITE_2		878
	_DUMMY_FORG		450

// items objet
	_IO_EPEE_VERITE		179
	
	_IO_BROCHE_LUTISSE	86	//ch 1 2 3
	_IO_ECU			209	//ch 1 2 3
// items indice
	_II_ARTHUR		29
	_II_LUTISSE		47
	_II_LANCELOT		11
	_II_SAGRAMOR		118
	_II_GUENIEVRE		117
	
// items destinations

// evenements

	// use
	_E_ETENDARDS		1
	// pick
	
	// explorer
	// commentaires
	
	// dialogues
	_D_SAXON		2
	_D_ROMAIN		3
	_D_MARCUS		4
	_D_PICTE		5
	_D_CAMELOT		6
	_D_CYM			7
	_D_SAG			8
	
	// CTR

	// generiques
	
	// options cbts

	// cbts

section END


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

section EVENTS
	COMMENT
	{
		ID		_E_ETENDARDS
		AREA		_COUR_CAMELOT

		PRIMTRIG	
		{
			
			ORIENT "NONE"
			TRIGGER	6
		}
		ITEM		(_II_LANCELOT, _INV_INDIC)
		DELAY		0
		
		COMMENT		715
		ACTION		1
		
	}

	DIALOG
	{
		ID		_D_SAXON
		AREA		 26
		ENTITE		_GARDE_SAXON
		 
		
		PRIMTRIG
		{
			DIST	400
			ORIENT	"NONE"
			ENTITE	_GARDE_SAXON
			////TRIGGER		2
		}
		
		SECTRIG
		{
			DIST	300
			ORIENT	"FACE"
			ENTITE	_GARDE_SAXON
		}
		STAND
		{
			ID	1
			TALK	( 701 , 706 )
			
		}
		
		FIN
		{
			ID	1
			TALK	(703,702)
		}
		FIN
		{
			ID	2
			TALK	( 2 , 3 )
			STATUS	0
		}
		
		RETOUR
		{
			ID	1
			TALK	(703,702)
		}
		RETOUR
		{
			ID	2
			TALK	( 2 , 3 )
			STATUS	0
		}
		
		SUJET
		{
			ID	  _II_LANCELOT
			TALK	(714, 702)
			
		}	
		SUJET
		{
			ID	  _II_SAGRAMOR
			TALK	( 2 , 3  )
			STATUS	0
		}	
	}

	DIALOG		
	{
		ID		3	
		AREA		 _CAMP_SAGRAMOR
		ENTITE		_GARDE_ROMAIN
		 
		
		PRIMTRIG
		{
			DIST	250
			//ORIENT	"NONE"
			ENTITE	_GARDE_ROMAIN
		}
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_GARDE_ROMAIN
		}
		STAND
		{
			ID	1
			TALK	(701, 713)
			
		}
		
		FIN
		{
			ID	1
			TALK	(703,704)
		}
		
		RETOUR
		{
			ID	1
			TALK	(703,704)
		}		
		
		SUJET
		{
			ID	  _II_LANCELOT
			TALK	(714,  4 )
			
		}		
		SUJET
		{
			ID	  _II_SAGRAMOR
			TALK	( 2 , 5 )
			
		}		
	}

	DIALOG
	{
		ID		4
		AREA		 _CAMP_MARCUS
		ENTITE		_GARDE_MARCUS
		 
		
		PRIMTRIG
		{
			DIST	500
			//ORIENT	"NONE"
			ENTITE	_GARDE_MARCUS
		}
		
		SECTRIG
		{
			DIST	400
			ORIENT	"FACE"
			ENTITE	_GARDE_MARCUS
		}
		STAND
		{
			ID	1
			TALK	(701, 707)
			
		}
		
		FIN
		{
			ID	1
			TALK	(703,700)
		}
		
		RETOUR
		{
			ID	1
			TALK	(703,700)
		}		
		
		SUJET
		{
			ID	  _II_LANCELOT
			TALK	(714,705 )
			
		}		
	}

	DIALOG
	{
		ID		5
		AREA		 28
		ENTITE		_GARDE_PICTE
		 
		
		PRIMTRIG
		{
			DIST	400
			ORIENT	"NONE"
			ENTITE	_GARDE_PICTE
			////TRIGGER 	3
		}
		
		SECTRIG
		{
			DIST	400
			ORIENT	"FACE"
			ENTITE	_GARDE_PICTE
		}
		STAND
		{
			ID	1
			TALK	(701, 709)
			
		}
		
		FIN
		{
			ID	1
			TALK	(703,710)
		}
		
		RETOUR
		{
			ID	1
			TALK	(703,710)
		}		
			
	}

	DIALOG
	{
		ID		_D_CAMELOT
		AREA		 29
		ENTITE		_GARDE_ENTREE
		 
		
		PRIMTRIG
		{
			DIST	350
			//ORIENT	"NONE"
			ENTITE	_GARDE_ENTREE
		}
		
		SECTRIG
		{
			DIST	300
			ORIENT	"FACE"
			ENTITE	_GARDE_ENTREE
		}
		STAND
		{
			ID	1
			TALK	(701, 6)
			BASEJEU	40
		}
		
		FIN
		{
			ID	1
			TALK	(703, 7)
		}
		
		RETOUR
		{
			ID	1
			TALK	(703, 6 )
		}		
		
		SUJET
		{
			ID	  _II_LANCELOT
			TALK	(714, 8  )
			BASEJEU	  41
		}		

		GIVE
		{
			ID	  _IO_ECU
			TALK	(708, 9 )
		}		
	}

	DIALOG
	{
		ID		7
		AREA		 27
		ENTITE		_CYMERILL
		 
		
		PRIMTRIG
		{
			DIST	500
			//ORIENT	"NONE"
			ENTITE	_CYMERILL
		}
		
		SECTRIG
		{
			DIST	300
			ORIENT	"FACE"
			ENTITE	_CYMERILL
		}
		STAND
		{
			ID	1
			TALK	(10,11)
			BASEJEU	42
		}
		
		FIN
		{
			ID	1
			TALK	( 12, 13)
		}
		
		RETOUR
		{
			ID	1
			TALK	( 10,14 )
		}		
		
		SUJET
		{
			ID	  _II_LANCELOT
			TALK	( 15, 16 ,  _II_GUENIEVRE, _INV_INDIC)
			BASEJEU	42
			BASEDOC	96
		}	
		SUJET
		{
			ID	  _II_GUENIEVRE
			TALK	( 17,18  ,_II_SAGRAMOR, _INV_INDIC)
			BASEJEU	  43
		}
		SUJET
		{
			ID	  _II_SAGRAMOR
			TALK	(19 ,20  )
			
		}	
	}

	DIALOG
	{
		ID		8
		AREA		 _CAMP_SAXON
		ENTITE		_SAGRAMOR
		 CAMERA		4 
		
		PRIMTRIG
		{
			DIST	500
			//ORIENT	"NONE"
			ENTITE	_SAGRAMOR
		}
		
		SECTRIG
		{
			DIST	400
			ORIENT	"FACE"
			ENTITE	_SAGRAMOR
		}
		STAND
		{
			ID	1
			TALK	(701,21)
			
		}
		
		FIN
		{
			ID	1
			TALK	( 22, 23)
		}
		
		RETOUR
		{
			ID	1
			TALK	(712,711)
		}		
		
		USE
		{
			ID	_IO_EPEE_VERITE
			TALK	( 28, 29)(30, 31, _ID_ARDEN, _INV_DESTI)
			ACCESS	_EPEE_VERITE_2 
			//ANIM	"jure"
			ANIM	"aspec 15" 	"jurer - pause" 
			//Sync	"" "jurer - pause"
			Sync	"" "jurer 2"
			BASEJEU	44
			STATUS	0
		}		
		SUJET
		{
			ID	_II_LANCELOT
			TALK	( 24, 25)(26,27)
			BASEJEU	45
		}
	}

ACTION
{
	ID 	105
	AREA	_LANDSCAPE_ARDEN
	PRIMTRIG
	{
		TRIGGER	1
	}
	ACTION	0
}
	
section END


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

section COMBATS



section END

/////////////////////////////////////////////////////////////////
// Programme
/////////////////////////////////////////////////////////////////
section INIT

// desactivation sorties non permises

////Camelot
// atrebates
				//id, 		boite, lieu, actif, visible, coll decor
	#OBJ_LOAD		(_GARDE_MARCUS,	 1, _CAMP_MARCUS, 1, 1, 1)
	#OBJ_LOAD		(_CYMERILL,	 1, _CAMP_MARCUS, 0, 1, 1)
	#OBJ_LOAD		(_GARDE_PICTE,	 1, _CAMP_ATREBATES, 1, 1, 1)
	
	#OBJ_LOAD		(_GARDE_ROMAIN, 1,   _CAMP_SAGRAMOR, 1, 1, 1)
//3 
	#OBJ_LOAD		(_SAGRAMOR, 	3,   _CAMP_SAXON, 1, 1, 1)
	#OBJ_LOAD		(_GARDE_ENTREE, 	1 ,  _COUR_CAMELOT, 1, 1, 1)
	#OBJ_LOAD		(_GARDE_SAXON, 1, _CAMP_SAXON, 1, 1, 1) 
	
	#DOO_LOCK		(_PORTE_CAMELOT_VERSTABLERONDE_N1, 	 _COUR_CAMELOT)
	#DOO_LOCK		(_PORTE_CAMELOT_ENCEINTE_N1, _COUR_CAMELOT)
	
	#COL_ENABLE		(1, _CAMP_MARCUS) //porte marcus
	#DOO_LOCK		(_PORTE_SAGRAMOR_N1, 	 _CAMP_SAGRAMOR)
	#COL_ENABLE		(1, _CAMP_SAXON) 
	#COL_ENABLE		(1, _CAMP_ATREBATES) 
	#OBJ_LOADACCESS(_EPEE_VERITE_2, 1)
	
// inventaire

	////#INV_PUTPLQ		(_IO_EPEE_BRADWEN, _INV_OBJET) //epee
	////#INV_PUTPLQ		(_IO_EPEE_VERITE, _INV_OBJET)  // from chapitre prec
	////#INV_PUTPLQ		(_IO_BROCHE_LUTISSE, 	_INV_OBJET) 

	////#INV_PUTPLQ		(_IO_ECU, _INV_OBJET) //
	
	//#INV_PUTPL		(_II_SAGRAMOR, _INV_INDIC) 	//TEST
	//#INV_PUTPL		(11,_INV_INDIC) 		//TEST
	//#INV_PUTPL		(_II_GUENIEVRE, _INV_INDIC) 	//TEST
 	//#INV_PUTPL		(	_ID_ARDEN, _INV_DESTI)	//test


	#OBJ_LOAD		(_DUMMY_FORG, 		_BOITE_DUMMY_FORG, _COUR_CAMELOT, 1, 0, 0)
	#OBJ_DISABLECOLLIOBJ 	(_DUMMY_FORG)
	
	#OBJ_LOAD		(_FORGERON, 	 3, 	 _COUR_CAMELOT, 1, 1, 1)
	#OBJ_AATARGET		(_FORGERON,	_DUMMY_FORG)


section END

section LOOP

OnDialog _D_SAXON  sujet _II_SAGRAMOR
{
	
	//disable collision
	#COL_DISABLE		(1,_CAMP_SAXON)
	#DLG_DISABLEFIN		(_D_SAXON,_CAMP_SAXON,	1)
	#DLG_ENABLEFIN		(_D_SAXON, _CAMP_SAXON,	2)
	
	#DLG_DISABLERET		(_D_SAXON, _CAMP_SAXON, 	1)
	#DLG_ENABLERET		(_D_SAXON, _CAMP_SAXON, 	2)
}
OnDialog 8 sujet _II_LANCELOT
{
	#DLG_ENABLEUSE		(8, _CAMP_SAXON, _IO_EPEE_VERITE)
}
OnDialog 8 use  _IO_EPEE_VERITE
{
	if @INV_OWNPL(_IO_EPEE_VERITE, _INV_OBJET) = 0
	{
		#INV_PUTPLQ	(_IO_EPEE_VERITE, _INV_OBJET)
	}
}
OnDialog 6 give _IO_ECU
{
	if @INV_OWNPL(_IO_ECU, _INV_OBJET) = 0
	{
		#INV_PUTPLQ	(_IO_ECU, _INV_OBJET)
	}
}

OnEvent _E_ETENDARDS
{
	#OBJ_DISABLE(_GARDE_MARCUS)
	#OBJ_ENABLE(_CYMERILL)
}	
OnDialog 3 sujet _II_SAGRAMOR 
{
	#DLG_ENABLESUJ		(_D_SAXON, _CAMP_SAXON, 	_II_SAGRAMOR)		
}

OnDialog 7 sujet _II_LANCELOT 
{
	#DLG_DISABLESUJ		( 2,26, _II_LANCELOT)
	#DLG_DISABLESUJ		( 3,25, _II_LANCELOT)
	#DLG_DISABLESUJ		( 4,27, _II_LANCELOT)
	#DLG_DISABLESUJ		( 6,29, _II_LANCELOT)
}
					
//si use iv 101	FIN DU CHAPITRE
OnEvent 105
{
	#INV_REMPL	(_ID_ARDEN, _INV_DESTI)
 	endc
}



section END

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

section CTR



section END
