SCRIPT_CHAPTER

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

section DECLARE

// entites
	_COURONNE_SAUL		546
	_SAGRAMOR		371
	_MORGANOR		16
	_CERDRIC		544
	_MARCUS			229
	_TABLETTE_PLOMB_1		555
		
	_COR				882
	_ECU_NOIR		554	//6
	_EPEE_VERITE			384
	_DUMMY_FORG		450
	$dlg
	$dlm
	$tabcer
	$tabmar
	
// items objet
	_IO_CHASTIEFOL		1
	_IO_BROCHE_LUTISSE	86	
	_IO_ECU			209	
	_IO_ECU_NOIR		211
	_IO_COURONNE_SAUL	203	
	_IO_EPEE_VERITE		179
	_IO_TABLETTE_PLOMB_1	212
	_IO_TABLETTE_PLOMB_2	213
	_IO_TABLETTE_PLOMB_3	214
	_IO_MOT			201	// provisoire
	
	
// items indice
	_II_DOPPLEGANGER	120
	_II_MOT			121
	_II_ARTHUR		29
	_II_LUTISSE		47
	_II_LANCELOT		11
	_II_COURONNE_SAUL	168
	_II_SAGRAMOR		118
	_II_GUENIEVRE		117
	
// items destinations

// evenements

	// use

	// pick

	// explorer
	// commentaires
	// dialogues
	_DIAL_MORGANOR	8
	_DIAL_MARCUS	9
	_DIAL_CERDRIC	10
	_DIAL_G_PICTE	6
	// CTR

	// generiques
	
	// options cbts

	// cbts

section END


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

section EVENTS
	
	COMMENT //corwyn
	{
		ID		1
		AREA		 _CAMP_SAXON
		PRIMTRIG
		{
			DIST	800
			//ORIENT	"NONE"
			ENTITE	_CERDRIC
		}
		ACTION		0
		COMMENT		1
	}
	
	COMMENT //corwyn
	{
		ID		2
		AREA		 _CAMP_MARCUS
		PRIMTRIG
		{
			DIST	900
			//ORIENT	"NONE"
			ENTITE	_MARCUS
		}
		ACTION		0
		COMMENT		2
	}
	
	DIALOG
	{
		ID		3
		AREA		 _CAMP_SAXON
		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	( 713 , 700 )
			
		}
		
		FIN
		{
			ID	1
			TALK	(712,711)
		}
		FIN
		{
			ID	2
			TALK	(712, 3 )
			STATUS	0
		}
		
		RETOUR
		{
			ID	1
			TALK	(712,711)
		}
		RETOUR
		{
			ID	2
			TALK	(712, 3 )
			STATUS	0
		}
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_1 
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_DLG_2 ACCESS
			FXFRAME	"tabplb"

			STATUS	0	// desact fin 1 + retour 1, act 2
		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_2 
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE2_DLG_2 ACCESS
			FXFRAME	"tabplb"

			STATUS	0	// desact fin 1 + retour 1, act 2
		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_3 
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE3_DLG_2 ACCESS
			FXFRAME	"tabplb"

			STATUS	0	// desact fin 1 + retour 1, act 2
		}	
	}

	DIALOG		
	{
		ID		4	
		AREA		 25
		ENTITE		_GARDE_ROMAIN
		 
		
		PRIMTRIG
		{
			DIST	500
			//ORIENT	"NONE"
			ENTITE	_GARDE_ROMAIN
		}
		
		SECTRIG
		{
			DIST	400
			ORIENT	"FACE"
			ENTITE	_GARDE_ROMAIN
		}
		STAND
		{
			ID	1
			TALK	(713, 709)
			
		}
		
		FIN
		{
			ID	1
			TALK	(712,714)
		}
		
		RETOUR
		{
			ID	1
			TALK	(712,714)
		}		
		
	}
	ACTION
	{
		ID 	105
		AREA	_LANDSCAPE_ARDEN
		PRIMTRIG
		{
			TRIGGER	1
		}
		ACTION	0
	}

	DIALOG
	{
		ID		7
		AREA		 _COUR_CAMELOT
		ENTITE		_GARDE_ENTREE
		 
		
		PRIMTRIG
		{
			DIST	500
			//ORIENT	"NONE"
			ENTITE	_GARDE_ENTREE
		}
		
		SECTRIG
		{
			DIST	400
			ORIENT	"FACE"
			ENTITE	_GARDE_ENTREE
		}
		STAND
		{
			ID	1
			TALK	(713, 707)
			
		}
		
		FIN
		{
			ID	1
			TALK	(712,706)
		}
		
		RETOUR
		{
			ID	1
			TALK	(712,707)
		}		
		
		USE
		{
			ID	  _IO_ECU // le remettre
			TALK	(710,708 )
			
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
				
		}		
	}

	DIALOG
	{
		ID		_DIAL_G_PICTE
		AREA		 _CAMP_ATREBATES
		ENTITE		_GARDE_PICTE
		 
		
		PRIMTRIG
		{
			DIST		400
			ORIENT	"NONE"
			ENTITE	_GARDE_PICTE
			////TRIGGER		3
		}
		
		SECTRIG
		{
			DIST	300
			ORIENT	"FACE"
			ENTITE	_GARDE_PICTE
		}
		STAND
		{
			ID	1
			TALK	(713, 705)
			
		}
		
		FIN
		{
			ID	1
			TALK	(712,704)
		}
		
		FIN
		{
			ID	2
			TALK	(712,  5)
			STATUS	0
		}
		RETOUR
		{
			ID	1
			TALK	(712,704)
		}		
		
		RETOUR
		{
			ID	2
			TALK	(712,  5)
			STATUS	0
		}
		
		USE
		{
			ID	_IO_TABLETTE_PLOMB_1	//remettre
			TALK	(  4,  5)
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			//fx 230
			// des fin+ret1, act 2
			FX	_FX_USE_TABLETTE_2PMA_2 ACCESS
			FXFRAME	"tabplb"
			//break	1
		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_2 
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_2PMB_2 ACCESS
			FXFRAME	"tabplb"
//			break	1
			STATUS	0	// desact fin 1 + retour 1, act 2
		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_3 
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_2PMC_2 ACCESS
			FXFRAME	"tabplb"
//			break	1
			STATUS	0	// desact fin 1 + retour 1, act 2
		}	
	}

	DIALOG
	{
		ID		5
		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	(713, 703)
			
		}
		
		FIN
		{
			ID	1
			TALK	(712,702)
		}
		
		FIN
		{
			ID	2
			TALK	(712, 6)
			STATUS	0
		}
		
		RETOUR
		{
			ID	1
			TALK	(712,702)
		}		
		
		RETOUR
		{
			ID	2
			TALK	(712, 6 )
			STATUS	0
		}		
		
		USE
		{
			ID	_IO_TABLETTE_PLOMB_1	//remettre
			TALK	(710,  6)
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"	// des fin+ret1, act 2
			//break	1
			STATUS	0
			//fx 230	
			FX	_FX_USE_TABLETTE_PMA_2 ACCESS
			FXFRAME	"tabplb"

		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_2
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_PMB_2 ACCESS
			FXFRAME	"tabplb"
			//break	1
			STATUS	0	// desact fin 1 + retour 1, act 2
		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_3
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_PMC_2 ACCESS
			FXFRAME	"tabplb"
			//break	1
			STATUS	0	// desact fin 1 + retour 1, act 2
		}	

	}

	DIALOG
	{
		ID		_DIAL_MORGANOR
		AREA		 _CAMP_ATREBATES
		ENTITE		_MORGANOR
		CAMERA		6 
		
		PRIMTRIG
		{
			DIST	300
			//ORIENT	"NONE"
			ENTITE	_MORGANOR
		}
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_MORGANOR
		}
		STAND
		{
			ID	1
			TALK	( 7, 8)(9,10)
			BASEJEU	  62
		}
		
		FIN
		{
			ID	1
			TALK	( 11, 12)
		}
		
		RETOUR
		{
			ID	1
			TALK	( 7, 8)
		}		
		
		SUJET
		{
			ID	_II_DOPPLEGANGER
			TALK	(17, 18, _II_MOT, _INV_INDIC)
			BASEJEU	  68
		}
		
		SUJET
		{
			ID	_II_LANCELOT
			TALK	( 15, 16)
			BASEJEU	  64
		}
		
		SUJET
		{
			ID	_II_ARTHUR
			TALK	( 21, 22)
			BASEJEU	  65
		}
		
		SUJET
		{
			ID	 _II_MOT
			TALK	( 19, 20)
		}
		
		USE
		{
			ID	_IO_EPEE_VERITE		//remettre
			TALK	( 13, 14)
			ACCESS	 _EPEE_VERITE
			// PAS ANIM JURE
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			BASEJEU	  63
			//fx 228
		}
		
	}

	DIALOG
	{
		ID		_DIAL_MARCUS
		AREA		_CAMP_MARCUS
		ENTITE		_MARCUS
		CAMERA		5 
		
		PRIMTRIG
		{
			DIST	300
			//ORIENT	"NONE"
			ENTITE	_MARCUS
		}
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_MARCUS
		}
		STAND
		{
			ID	1
			TALK	(713,36)
			
		}
		
		FIN
		{
			ID	1
			TALK	(37,38)
		}
		
		FIN
		{
			ID	2
			TALK	(37,48)
			STATUS	0
		}
		
		RETOUR
		{
			ID	1
			TALK	(715,36)
		}		
		
		SUJET
		{
			ID	  _II_MOT
			TALK	(44,45)(46,47,_ID_ARDEN,_INV_DESTI, _IO_MOT, _INV_OBJET)
			BASEJEU	    71
			//break		1
			STATUS 		0
		}		
	
		USE  		// des fin1, act fin2
		{
			ID	  _IO_TABLETTE_PLOMB_1	//remettre
			TALK	(27,39)(701,41)(42,43,_IO_TABLETTE_PLOMB_2,_INV_OBJET)
			ACCESS	   _TABLETTE_PLOMB_1
			//fx 270
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_3PMA_2 ACCESS
			FXFRAME	"tabplb"
			//break 	1
		}	
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_2 
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_3PMB_2 ACCESS
			FXFRAME	"tabplb"
			//break 	1
			STATUS	0	// desact fin 1 + retour 1, act 2
		}	

	}

	DIALOG
	{
		ID		_DIAL_CERDRIC
		AREA		 _CAMP_SAXON
		ENTITE		_CERDRIC
		CAMERA		6		 
		
		PRIMTRIG
		{
			DIST	300
			//ORIENT	"NONE"
			ENTITE	_CERDRIC
		}
		
		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	_CERDRIC
		}
		STAND
		{
			ID	1
			TALK	(713,23)
			
		}
		
		FIN
		{
			ID	1
			TALK	(24 ,25 )
		}
		
		FIN
		{
			ID	2
			TALK	(24 ,26 )
			STATUS	0
			BASEJEU	67
		}
		RETOUR
		{
			ID	1
			TALK	(715, 25)
		}		
		
		SUJET
		{
			ID	_II_DOPPLEGANGER
			TALK	(30 ,31)(32,33, _IO_TABLETTE_PLOMB_3, _INV_OBJET)
			STATUS	0
			//break	1
			BASEJEU	69
		}

		SUJET
		{
			ID	_II_MOT
			TALK	(34,35)
			//break	1
			STATUS	0
		}
		USE  
		{
			ID	 _IO_TABLETTE_PLOMB_1	//remettre
			TALK	(27 ,26)(28,29)
			ACCESS	   _TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			//break	1
			//fx 270
			FX	_FX_USE_TABLETTE_1C1_2 ACCESS
			FXFRAME	"tabplb"
		}
		USE
		{
			ID	 _IO_TABLETTE_PLOMB_2
			TALK	(710,  3 )
		
			ACCESS	_TABLETTE_PLOMB_1
			ANIM	"give 2" "give 2 - pause"
			Sync	"" "give 2 - pause"
			FX	_FX_USE_TABLETTE_2C1_2 ACCESS
			FXFRAME	"tabplb"
			//break	1
			STATUS	0	// desact fin 1 + retour 1, act 2
		}	

	}

section END


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

section COMBATS



section END

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

// desactivation sorties non permises

	
//Cerdric	

				//id, 		boite, lieu, actif, visible, coll decor
	#OBJ_LOAD		(_GARDE_MARCUS,	 1, _CAMP_MARCUS, 1, 1, 1)
//Marcus
	#OBJ_LOAD		(_MARCUS,	 3, _CAMP_MARCUS, 0, 1, 1)

	#COL_ENABLE		(1, _CAMP_MARCUS) //porte marcus
	#COL_ENABLE		(2, _CAMP_MARCUS) //tente yvaine


	#OBJ_LOAD		(_GARDE_PICTE,	 1, _CAMP_ATREBATES, 1, 1, 1)
//Morganor
	#OBJ_LOAD		(_MORGANOR,	 3, _CAMP_ATREBATES, 1, 1, 1)
	#COL_ENABLE		(1, _CAMP_ATREBATES) 
	
	#OBJ_LOAD		(_GARDE_ROMAIN, 1,   _CAMP_SAGRAMOR, 1, 1, 1)
	#DOO_LOCK		(_PORTE_SAGRAMOR_N1, 	 _CAMP_SAGRAMOR)
	
	#OBJ_LOAD		(_GARDE_ENTREE, 	1 ,  _COUR_CAMELOT, 1, 1, 1)
	#DOO_LOCK		(_PORTE_CAMELOT_VERSTABLERONDE_N1, 	 _COUR_CAMELOT)
	#DOO_LOCK		(_PORTE_CAMELOT_ENCEINTE_N1, _COUR_CAMELOT)
	#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)
	
	
	#COL_ENABLE		(1, _CAMP_SAXON) 
	#OBJ_LOAD		(_GARDE_SAXON, 1, _CAMP_SAXON, 1, 1, 1) 
//cerdric
	#OBJ_LOAD		(_CERDRIC, 2, _CAMP_SAXON, 0, 1, 1) 
	
	
// inventaire

	////#INV_PUTPLQ		(_IO_TABLETTE_PLOMB_1, 	_INV_OBJET) 
	////#INV_PUTPLQ		(_IO_ECU, 		_INV_OBJET) 
	////#INV_PUTPLQ		(_IO_ECU_NOIR, 		_INV_OBJET) 
	////#INV_PUTPLQ		(_IO_EPEE_VERITE, 	_INV_OBJET) 
	////#INV_PUTPLQ		(_IO_BROCHE_LUTISSE, 	_INV_OBJET) 
	
	////#INV_PUTPLQ		(_II_DOPPLEGANGER, 	_INV_INDIC) 
	////#INV_PUTPLQ		(_II_ARTHUR, 		_INV_INDIC) 
	////#INV_PUTPLQ		(_II_LANCELOT, 		_INV_INDIC) 
	
//	#INV_PUTPL		(101,_INV_DESTI)	//test  arden ch 9
//tablette

	#OBJ_LOADACCESS		(_TABLETTE_PLOMB_1,	1 )
	#OBJ_LOADACCESS		(_EPEE_VERITE,		1 )
	
	set $dlg, 0
	set $dlm, 0
	set $tabcer, 0
	set $tabmar, 0

section END

section LOOP
//gardes
OnDialog 3 use _IO_TABLETTE_PLOMB_1
{
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_1, _INV_OBJET) = 0
	{
		#INV_PUTPLQ	( _IO_TABLETTE_PLOMB_1, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(3, _CAMP_SAXON, 1)
	#DLG_DISABLERET		(3, _CAMP_SAXON, 1)
	#DLG_ENABLEFIN		(3, _CAMP_SAXON, 2)
	#DLG_ENABLERET		(3, _CAMP_SAXON, 2)
	
	#COL_DISABLE		(1, _CAMP_SAXON)
}

OnDialog 7 use _IO_ECU
{
	if @INV_OWNPL(_IO_ECU, _INV_OBJET) = 0
	{
		#INV_PUTPLQ( _IO_ECU, _INV_OBJET)
	}
}

OnDialog _DIAL_G_PICTE use _IO_TABLETTE_PLOMB_1
{
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_1, _INV_OBJET) = 0
	{
		#INV_PUTPLQ		( _IO_TABLETTE_PLOMB_1, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(_DIAL_G_PICTE, _CAMP_ATREBATES, 1)
	#DLG_DISABLERET		(_DIAL_G_PICTE, _CAMP_ATREBATES, 1)
	#DLG_ENABLEFIN		(_DIAL_G_PICTE, _CAMP_ATREBATES, 2)
	#DLG_ENABLERET		(_DIAL_G_PICTE, _CAMP_ATREBATES, 2)
	
	#COL_DISABLE		(1, _CAMP_ATREBATES)
}

OnDialog 5 use _IO_TABLETTE_PLOMB_1
{
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_1, _INV_OBJET) = 0
	{
		#INV_PUTPLQ		( _IO_TABLETTE_PLOMB_1, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(5, _CAMP_MARCUS, 1)
	#DLG_DISABLERET		(5, _CAMP_MARCUS, 1)
	#DLG_ENABLEFIN		(5, _CAMP_MARCUS, 2)
	#DLG_ENABLERET		(5, _CAMP_MARCUS, 2)
	
	#COL_DISABLE		(1, _CAMP_MARCUS)
	
}
//rois
OnDialog _DIAL_MORGANOR use _IO_EPEE_VERITE
{
	if @INV_OWNPL(_IO_EPEE_VERITE, _INV_OBJET) = 0
	{
		#INV_PUTPLQ		( _IO_EPEE_VERITE, _INV_OBJET)
	}
}

OnDialog _DIAL_MORGANOR sujet _II_ARTHUR
{
//	active entité 544/cerdric		
	#OBJ_ENABLE		(_CERDRIC)

//	active io 212 in event 3/dial garde saxon(cerdric)
	#DLG_ENABLEUSE		(3,_CAMP_SAXON,_IO_TABLETTE_PLOMB_1 )

//	active entité 229/marcus					
	#OBJ_ENABLE		(_MARCUS)

//	active io 212 in event 5/dial garde marcus	
	#DLG_ENABLEUSE		(5,_CAMP_MARCUS,_IO_TABLETTE_PLOMB_1 )
	
}

OnDialog _DIAL_MARCUS use _IO_TABLETTE_PLOMB_1
{
	if $dlm = 0
	{
		#BJE_SUBEVENT(70, _DIAL_MARCUS, _IO_TABLETTE_PLOMB_1)
		set $dlm, 1
	}
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_1, _INV_OBJET) = 0
	{
		#INV_PUTPLQ		( _IO_TABLETTE_PLOMB_1, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(_DIAL_MARCUS, _CAMP_MARCUS, 1)
	#DLG_ENABLEFIN		(_DIAL_MARCUS, _CAMP_MARCUS, 2)
	#DLG_DISABLEUSE		(_DIAL_MARCUS, _CAMP_MARCUS, _IO_TABLETTE_PLOMB_2)
	set $tabmar,1
	if $tabcer = 1 & $tabmar = 1
	{
		#DLG_ENABLESUJ		(_DIAL_MARCUS,_CAMP_MARCUS,_II_MOT)
	}

}

OnDialog _DIAL_MARCUS use _IO_TABLETTE_PLOMB_2
{
	if $dlm = 0
	{
		#BJE_SUBEVENT(70, _DIAL_MARCUS, _IO_TABLETTE_PLOMB_2)
		set $dlm, 1
	}
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_2, _INV_OBJET) = 0
	{
		#INV_PUTPLQ	( _IO_TABLETTE_PLOMB_2, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(_DIAL_MARCUS, _CAMP_MARCUS, 1)
	#DLG_ENABLEFIN		(_DIAL_MARCUS, _CAMP_MARCUS, 2)
	#DLG_DISABLEUSE		(_DIAL_MARCUS, _CAMP_MARCUS, _IO_TABLETTE_PLOMB_1)
	set $tabmar,1
	if $tabcer = 1 & $tabmar = 1
	{
		#DLG_ENABLESUJ		(_DIAL_MARCUS,_CAMP_MARCUS,_II_MOT)
	}
}

OnDialog _DIAL_CERDRIC use _IO_TABLETTE_PLOMB_2
{
	if $dlg = 0
	{
		#BJE_SUBEVENT(66, _DIAL_CERDRIC, _IO_TABLETTE_PLOMB_2)
		set $dlg, 1
	}
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_2, _INV_OBJET) = 0
	{
		#INV_PUTPLQ		( _IO_TABLETTE_PLOMB_2, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(_DIAL_CERDRIC,_CAMP_SAXON,1)
	#DLG_ENABLEFIN		(_DIAL_CERDRIC,_CAMP_SAXON,2)
	
	#DLG_ENABLESUJ		(_DIAL_CERDRIC,_CAMP_SAXON,_II_DOPPLEGANGER )
	#DLG_ENABLESUJ		(_DIAL_CERDRIC,_CAMP_SAXON,_II_MOT)	
	#DLG_DISABLEUSE		(_DIAL_CERDRIC,_CAMP_SAXON,_IO_TABLETTE_PLOMB_1)
}
OnDialog _DIAL_CERDRIC use _IO_TABLETTE_PLOMB_1
{
	if $dlg = 0
	{
		#BJE_SUBEVENT(66, _DIAL_CERDRIC, _IO_TABLETTE_PLOMB_1)
		set $dlg, 1
	}
	if @INV_OWNPL(_IO_TABLETTE_PLOMB_1, _INV_OBJET) = 0
	{
		#INV_PUTPLQ	( _IO_TABLETTE_PLOMB_1, _INV_OBJET)
	}
	#DLG_DISABLEFIN		(_DIAL_CERDRIC,_CAMP_SAXON,1)
	#DLG_ENABLEFIN		(_DIAL_CERDRIC,_CAMP_SAXON,2)
	
	#DLG_ENABLESUJ		(_DIAL_CERDRIC,_CAMP_SAXON,_II_DOPPLEGANGER )
	#DLG_ENABLESUJ		(_DIAL_CERDRIC,_CAMP_SAXON,_II_MOT)	
	#DLG_DISABLEUSE		(_DIAL_CERDRIC,_CAMP_SAXON,_IO_TABLETTE_PLOMB_2)	
}

OnDialog _DIAL_CERDRIC sujet _II_MOT
{
	set $tabcer,1
	if $tabcer = 1 & $tabmar = 1
	{
		#DLG_ENABLESUJ		(_DIAL_MARCUS,_CAMP_MARCUS,_II_MOT)
	}
	
}

OnEvent 105
{
 	#INV_REMPL(	_ID_ARDEN,_INV_DESTI)

	endc
}

section END

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

section CTR



section END
