//************************
//*        TALES         *
//* 		         *
//*    Quete 2 chapitre 2*
//*     Voie Celte       *
//*      Last modif      *
//*	23/06/00         *
//************************




//**Entete fichier**
SCRIPT_CHAPTER


//------------------------------------
// Déclaration constantes et variables
//------------------------------------

section DECLARE

$stop_if
$stop_if_2
$stop_if_3

_CHAMPI 47
_DUMMY 572
_SANGLIER 180
_FEEAQUA2 173
_COUPESOM 181
_FLEUR1 182
_DUMMY 572
_DUMMY2 599
_DUMMY3 574
_FEEAQUA3  183
_SORCIERE  43
_PIERREGIV1 48
_PIERREGIV2 49
_PIERREGIV3 50
_PIERREFLEUR1 184
_PIERREFLEUR2 185
_PIERREFLEUR3 186
_FLEUR2 187
_LOUP 195

_FEEAQUA4 188
_CORBEAU 174
_DUMMY 573
_FLEUR3 189
_COUPSOM2 190
_CORFEE 191
_COUPE1 192
_COUPE2 193
_COUPE3 194
_JOYAU  575

_FOULQUE 1216
_PRINCE  425

// Variables
$cercle
$nb_pierre
$breakfee1
$breakfee2
$breakfee3
$nbfee
$nbfleurie
$test

section END


//-- ---------------------------------- --
//-- Section des événements --
//-- ---------------------------------- --

section EVENTS

SAVE
{
	ID		1000
	AREA		20

	PRIMTRIG
	{
		ORIENT	"NONE"
		TRIGGER	1
	}

	PERSIST		1
}

SAVE
{
	ID		1001
	AREA		19

	PRIMTRIG
	{
		ORIENT	"NONE"
		TRIGGER	2
	}

	PERSIST		1
}

SAVE
{
	ID		1002
	AREA		20

	PRIMTRIG
	{
		ORIENT	"NONE"
		TRIGGER	2
	}

	PERSIST		1
}

// Evenements de types action
ACTION
	{
		ID		5
		AREA	19

		PRIMTRIG
		{
			DIST	300
			ORIENT	"TO"
			ENTITE	181
		}

		STATUS 1
		ACTION	1
		PAUSE		1	// LG

	}

	ACTION
	{
		ID		99
		AREA		19
	}

	ACTION
	{
		ID		999
		AREA		20
	}

	ACTION
	{
		ID		9999
		AREA		22
	}


	ACTION
	{
		ID		23
		AREA		22

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	190
		}

		STATUS 1
		ACTION	1
		PAUSE		1	// LG
	}

// événements de types COMMENT


// invectives de la sorcière 1
COMMENT
{
	ID 16
	AREA	20
	PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	_SORCIERE


		}

	COMMENT 47
	STATUS 0
}

// invectives de la sorcière 2
COMMENT
{
	ID 17
	AREA	20
	PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	_SORCIERE


		}

	COMMENT 48
	STATUS 0
}

// invectives de la sorcière 3
COMMENT
{
	ID 18
	AREA	20
	PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	_SORCIERE


		}

	COMMENT 49
	STATUS 0
}

// Appels corwynn
COMMENT
{
	ID 53
	AREA	20
	PRIMTRIG
		{
			DIST	300
			ORIENT	"TO"
			ENTITE	47


		}

	COMMENT 201
	STATUS 0

}

// événements de type EXPLORE
// Pollen
EXPLORE
	{
		ID		2
		AREA	19
		HEIGHT "H0"
		PRIMTRIG
		{
			DIST	400
			ORIENT	"TO"
			ENTITE	599
		}

		FX	_FX_CYCLIF_POLLEN
		FXFRAME	"mainD"
		ENTITE 599
		ITEM (53,_INV_OBJET)
		ACTION	1
		//COMMENT	50
		PERSIST	1
		STATUS 1
	}


// Observer sanglier
EXPLORE
	{
		ID		7
		AREA	19

		PRIMTRIG
			{
			DIST	300
			ORIENT	"TO"
			ENTITE	180

			}

		ACTION	1
		PERSIST	1
		DELAY	10
		STATUS 1
		COMMENT 50
	}


// Observer pomme d'or
EXPLORE
	{
		ID		1
		AREA	19

		PRIMTRIG

		{
			DIST	300
			ORIENT	"TO"
			ENTITE	472
		}
		ACTION	1
		COMMENT 51
		PERSIST	1
		DELAY	10
		STATUS 1
	}

// Observer pierre givrée 1
EXPLORE
	{
		ID		9
		AREA	20

		PRIMTRIG

		{
			DIST	500
			ORIENT	"TO"
			ENTITE	48
		}
		COMMENT 3
		ACTION	1
		PERSIST	1
		DELAY	10
		STATUS 1
	}

// Observer pierre givrée 2
EXPLORE
	{
		ID		11
		AREA	20

		PRIMTRIG

		{
			DIST	500
			ORIENT	"TO"
			ENTITE	49
		}
		COMMENT 3
		ACTION	1
		PERSIST	1
		DELAY	10
		STATUS 1
	}

// Observer pierre givrée 3
EXPLORE
	{
		ID		13
		AREA	20

		PRIMTRIG
			{
			DIST	500
			ORIENT	"TO"
			ENTITE	50
		}
		COMMENT 3
		ACTION	1
		PERSIST	1
		DELAY	10
		STATUS 1
	}

// Observer champignon
EXPLORE
	{
		ID		6
		AREA	19

		PRIMTRIG
			{
			DIST	500
			ORIENT	"TO"
			ENTITE	_CHAMPI
		}
		COMMENT 700
		ACTION	1
		PERSIST	1
		DELAY	10
		STATUS 1
	}







//Observer feu de morgane
//
//EXPLORE
//	{
//		ID		19
//		AREA	20
//
//		PRIMTRIG
//
//		{
//			DIST	300
//			ORIENT	"TO"
//			ENTITE
//		}
//
//		ACTION	1
//		PERSIST	1
//		DELAY	10
//		STATUS 1
//	}

// Evenements de types PICK
// prise fleur 1

PICK
	{
		ID		4
		AREA	19
		HEIGHT	"H0"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	182

		}
		STATUS	1
		ENTITE	182
		ITEM	(58, _INV_OBJET)
		ACTION	1
		COMMENT	1
	}


// prise fleur 2
PICK
	{
		ID		60
		AREA	20
		HEIGHT	"H0"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	187

		}
		STATUS	1
		ENTITE	187
		ITEM	(59, _INV_OBJET)
		ACTION	1
		COMMENT	1
}

// prise fleur 3
PICK
	{
		ID		22
		AREA	22
		HEIGHT	"H0"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	189

		}
		STATUS	1
		ENTITE	189
		ITEM	(60, _INV_OBJET)
		ACTION	1
		COMMENT	1
}

// Cor
PICK
	{
		ID		24
		AREA	22
		HEIGHT	"H1"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	191
		}
		STATUS	1
		ENTITE	191
		ITEM	(62, _INV_OBJET)
		ACTION	1
		//COMMENT
}


// Prise Coupe 1
PICK
	{
		ID		27
		AREA	22
		HEIGHT	"H1"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	192
		}
		STATUS	1
		ENTITE	192
		ITEM	(63, _INV_OBJET)
		ACTION	1
		//COMMENT
}



// Prise Coupe 2
PICK
	{
		ID		45
		AREA	22
		HEIGHT	"H1"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	193

		}
		STATUS	1
		ENTITE	193
		ITEM	(64, _INV_OBJET)
		ACTION	1
		//COMMENT
}


// Prise Coupe 3
PICK
	{
		ID		46
		AREA	22
		HEIGHT	"H1"

		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	194

		}
		STATUS	1
		ENTITE	194
		ITEM	(65, _INV_OBJET)
		ACTION	1
		//COMMENT
}


//évenements USE

// Utilisation Joyau sur DUMMY pour feu Morgane
USE
	{
		ID		20
		AREA	20
		PRIMTRIG
		{
			DIST	500
			ORIENT	"TO"
			ENTITE	_DUMMY3
		}

		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	575
		ITEM	(216, _INV_OBJET)
		STATUS	1
	}


// use multiple sur entite pierre givrée (fleurs)
USEM
	{
		ID		10
		AREA	20
		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	48
		}

		USE
		 {

			 ID 1
			ANIM	"use cup" "brandir pierre - pause"
			ENTITE	187
			ITEM	(58, _INV_OBJET)
			//ITEM	(59, _INV_OBJET)
			//ITEM	(60, _INV_OBJET)
			STATUS	1
		}

//Fleur 2
	USE
	{

		ID 2
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(59, _INV_OBJET)
		STATUS	1
	}
// Fleur 3
	USE
	{

		ID		3
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(60, _INV_OBJET)
		STATUS	1
	}
}




// use multiple sur pierre givree(id 49)

USEM
	{
		ID		12
		AREA	20
		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	49
		}
//FLEUR 1
		USE
		{

		ID 1
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(58, _INV_OBJET)
		STATUS	1
		}
//Fleur 2
USE
	{
		ID		2
		AREA	20
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(59, _INV_OBJET)
		STATUS	1
	}

// Fleur 3
USE
	{

		ID		3
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(60, _INV_OBJET)
		STATUS	1
	}

 }

// sur entité 50
USEM
	{
		ID		14
		AREA	20
		PRIMTRIG
		{
			DIST	200
			ORIENT	"TO"
			ENTITE	50
		}
//FLEUR 1
		USE
		{

		ID 1
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(58, _INV_OBJET)
		STATUS	1
		}
//Fleur 2
USE
	{
		ID		2
		AREA	20
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(59, _INV_OBJET)
		STATUS	1
	}

// Fleur 3
USE
	{

		ID		3
		ANIM	"use cup" "brandir pierre - pause"
		ENTITE	187
		ITEM	(60, _INV_OBJET)
		STATUS	1
	}
}

//utiliser cor
USE
	{
		ID		25
		AREA	22
		PRIMTRIG
		{
			DIST	500
			ORIENT	"NONE"
			ENTITE	573
		}

		ANIM	"use horn" "jouer cor - pause"
		ENTITE	191
		ITEM	(62, _INV_OBJET)
		STATUS	1
	}




	//** Dialogues
// Corbeau
DIALOG
	{
		ID		26
		AREA	22
		ENTITE	174
		STATUS	0

		PRIMTRIG
		{
			DIST	300
			ORIENT	"NONE"
			ENTITE	174
		}

		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	174
		}

		STAND
		{
			ID		1
			TALK	(33,34,38,_INV_INDIC)
			BASEJEU 16
		}
		FIN
		{
			ID		1
			TALK	(35,36)
		}

		RETOUR
		{
			ID		1
			TALK	(35,36)
		}
	}



	//Fee 2
	DIALOG
	{
		ID		3
		AREA	19
		ENTITE	173
		STATUS	1

		PRIMTRIG
		{
			DIST	300
			ORIENT	"NONE"
			ENTITE	173
		}

		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	173
		}

		STAND
		{
			ID		1
			TALK	(6, 7)

		}
		FIN
		{
			ID		1
			TALK	(8, 9)
		}

		RETOUR
		{
			ID		1
			TALK	(8,9)
		}

		SUJET
		{
		ID	38
		TALK (10,11)
		}
		GIVE
		{
		ID 63
		talk (707,701)
		}
		GIVE
		{
		ID 64
		talk (707,701)
		}
		GIVE
		{
		ID 65
		talk (707,701)
		}
		GIVE
		{
		ID 53
		talk (707,701)
		}

}



// Fee aquatique 3

DIALOG
{
		ID	8
		AREA	20
		ENTITE	183
		STATUS	1

		PRIMTRIG
		{
			DIST	300
			ORIENT	"NONE"
			ENTITE	183
		}

		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	183
		}

		STAND
		{
			ID		1
			TALK	(6, 14)

		}
		FIN
		{
			ID		1
			TALK	(8, 15)
		}

		RETOUR
		{
			ID		1
			TALK	(8,15)
		}
		SUJET
		{
		ID 10
		TALK (16,17)
		}
		SUJET
		{
		ID 37
		talk (18,19)
		BASEJEU 18
		}
		SUJET
		{
		ID 38
		TALK(10,11)
		}
		SUJET
		{
		ID 123
		talk (21,22)
		}
		GIVE
		{
		ID 63
		TALK (707,701)
		}
		GIVE
		{
		ID 64
		TALK (707,701)
		}
		GIVE
		{
		ID 65
		TALK (707,701)
		}
		GIVE
		{
		ID 53
		TALK (707,20, 123, _INV_INDIC)
		}

}

// dialogue sorciere
DIALOG
{
		ID	15
		AREA	20
		ENTITE	43
		STATUS	1

		PRIMTRIG
		{
			DIST	300
			ORIENT	"NONE"
			ENTITE	43
		}

		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	43
		}

		STAND
		{
			ID		1
			TALK	(37, 38,12,_INV_INDIC)
			FIGHT 1
			BASEJEU 12
		}
		FIN
		{
			ID		1
			TALK	(39, 40)
			FIGHT 1
		}

		RETOUR
		{
			ID		1
			TALK	(39,40)
			FIGHT    1
		}

		SUJET
		{
		ID	37
		talk (44,40)
		}

		SUJET
		{
		ID	38
		TALK (45,46)
		}

		SUJET
		{
		ID	34
		TALK (42,43)
		}

		SUJET
		{
		ID 12
		TALK (41,40)
		BASEJEU 13
		FIGHT 1
		}
	}

	//Fee 2
	DIALOG
	{
		ID		21
		AREA	22
		ENTITE	188
		STATUS	1

		PRIMTRIG
		{
			DIST	300
			ORIENT	"NONE"
			ENTITE	188
		}

		SECTRIG
		{
			DIST	200
			ORIENT	"FACE"
			ENTITE	188
		}

		STAND
		{
			ID		1
			TALK	(6,23)

		}
		FIN
		{
			ID		1
			TALK	(8,9)
		}

		RETOUR
		{
			ID		1
			TALK	(8,9)

		}

		SUJET
		{
		ID 10
		TALK (24,25)
		}

		SUJET
		{
		ID 38
		TALK (10,11)
		}

		SUJET
		{
		ID 12
		TALK (26,27)(28,29)
		BASEJEU 15
				}

		SUJET
		{
		ID 34
		TALK(30,31)
		BASEJEU 14
		}

		SUJET
		{
		ID 124
		TALK (32,22)
		}
		GIVE	// coupe1
		{
			ID		63
			TALK	(707,701)
//			BREAK	1
					}

		GIVE	// coupe1
		{
			ID		64
			TALK	(707,701)
//			BREAK	1

		}
	GIVE	// coupe1
		{
			ID		65
			TALK	(707,701)
//			BREAK	1
				}
	}


// Combats
FIGHT
{
	ID 1
	AREA	20
	LIST		(0,569,1)
}
section END


//---------------------
//---section COMBATS---
//---------------------
section COMBATS

	FIGHT
	{
		ID		1
		AREA	20
		CAMERA	12
		TARGET	470
//		WIN		0

		OPPONENT
		{
			ENTITE	_BRADWEN
			BOX		4
			ANIM	"combat 24" "combat 24"
			LWEAPON	675
			DEAD	1
		}

		OPPONENT
		{
			ENTITE 43
			BOX		2
			ANIM	"combat 24" "combat 24"
			//RWEAPON	684
			SOUND	"cb24" 100
		}
	}
section END






	//------------------------------
	// Section Loop
	//------------------------------

	section LOOP

	if @INV_OWNPL	(34, _INV_INDIC) = 0 & $stop_if_3 = 0
	{
		#INV_PUTPLQ (34, _INV_INDIC) // indice Morgane
		add	$stop_if_3, 1
	}

	if @OBJ_ENMAIN (569) = 1 & $stop_if_2 = 0
	{
		#TIM_START	(1)
		add		$stop_if_2, 1
	}

	if @TIM_VALUE	(1) > 4000 & $stop_if_2 = 1
	{
		#VFX_START	(_FX_SORTGEL)
		add		$stop_if_2, 1
	}

	// Utilisation joyau sur feu de morgane
	OnEvent 20
	{
		#COL_DISABLE	(19,20)

		if @INV_OWNPL	(123, _INV_INDIC) = 1
		{
			#INV_REMPL	(123, _INV_INDIC)
		}

		#VFX_STOP	(_FX_FEUMOF_1)
	}

	OnEvent		27
	{
		#VFX_STOP	(_FX_CYCLIF_COUPE_2)
	}

	OnEvent		45
	{
		#VFX_STOP	(_FX_CYCLIF_COUPE_3)
	}

	OnEvent		46
	{
		#VFX_STOP	(_FX_CYCLIF_COUPE_4)
	}

	OnEvent		24
	{
		#VFX_STOP	(_FX_CYCLIF_COR)
	}

	OnEvent		99
	{
		#VFX_START	(_FX_CYCLIF_COUPE)
		#VFX_START	(_FX_CYCLIPF_FEE_1)
	}

	OnEvent		999
	{
		#VFX_START	(_FX_CYCLIPF_FEE_2)
	}

	OnEvent		9999
	{
		#VFX_START	(_FX_CYCLIPF_FEE_3)
	}

	OnDialog 3 give 63
	{
	if $breakfee1=0
	{
		RUN	907
		add $breakfee1,1
		add $nbfee,1
	}
	}
	OnDialog 3 give 64
	{
	if $breakfee1=0
	{
		RUN	907
		add $breakfee1,1
		add $nbfee,1
	}
	}
	OnDialog 3 give 65
	{
	if $breakfee1=0
	{
		RUN	907
		add $breakfee1,1
		add $nbfee,1
	}
	}
	OnDialog 8 give 65
	{
	if $breakfee2=0
	{
		RUN	906
		add $breakfee2,1
		add $nbfee,1
	}
	}
	OnDialog 8 give 64
	{
	if $breakfee2=0
	{
		RUN	906
		add $breakfee2,1
		add $nbfee,1
	}
	}
	OnDialog 8 give 63
	{
	if $breakfee2=0
	{
		RUN	906
		add $breakfee2,1
		add $nbfee,1
	}
	}
	OnDialog 8 give 53
	{
		if @INV_OWNPL	(216, _INV_OBJET) = 0
		{
			#INV_PUTPL (216, _INV_OBJET)
		}
	}

	OnDialog 21 give 63
	{
	if $breakfee3=0
		{
			RUN	905
			add $breakfee3,1
			add $nbfee,1
		}
	}

	OnDialog 21 give 64
	{
	if $breakfee3=0
		{
			RUN	905
			add $breakfee3,1
			add $nbfee,1
		}
	}

	OnDialog 21 give 65
	{
		if $breakfee3=0
		{
			RUN	905
			add $breakfee3,1
			add $nbfee,1
		}
	}

	OnDialog 21 sujet 12
	{
		#COL_DISABLE	(24, 22)
		#VFX_STOP	(_FX_FEUMOF_7)
	}

	OnDialog 26 stand 1
	{
		#COL_DISABLE	(23, 22)
		#VFX_STOP	(_FX_FEUMOF_6)
	}

	OnEvent	5
	{
		run	28
		over 0
	}

	OnEvent 23
		{
			run	41
			over 2
		}

	OnEvent 9
		{
			if $cercle=0
			 {
				// on gagne indice cercle
				#INV_PUTPL (37, _INV_INDIC)
				set	$cercle, 1
			}
		}

	OnEvent 11
		{
			if $cercle=0
			 {
				// on gagne indice cercle
				#INV_PUTPL (37, _INV_INDIC)
				set	$cercle, 1
			}
		}

OnEvent 13
		{
			if $cercle=0
			 {
				// on gagne indice cercle
				#INV_PUTPL (37, _INV_INDIC)
				set	$cercle, 1
			}
		}

OnEvent 21
{
#EVT_DISABLE(48)
}

OnEvent 25
{
	RUN	111
}

OnEvent 26
{
#EVT_DISABLE(49)
#EVT_DISABLE(52)
}

OnEvent 10
{
	run 901
	add $nbfleurie,1
	}



OnEvent 12
{
	run 902
	add $nbfleurie,1
}


OnEvent 14
{
	run 903
	add $nbfleurie,1
}

if $nbfleurie=3 & $stop_if = 0
{
	RUN 904
	#BJE_BASIC	(17)
	add $stop_if, 1
}

OnDialog 15 retour 1 PERM
{
	if $nbfleurie=3
	{
		run 35
		#INT_GOZI (0,2)
		run 37
		#INT_GOZI (19, 3)
		endc
	}
}

// OnEvent 20
// Désactive feu de Morgane


//OnEvent 41
//{
//#EVT_ENABLE(42)
//}

OnFight 1
{
#EVT_DISABLE	(15)
#OBJ_ENABLE	(569)
#OBJ_ENABLE	(675)
#OBJ_ENMAIND	(_BRADWEN, 569)
#OBJ_ENMAING	(_BRADWEN, 675)
over 0
}

section END


//-------------------
//--- Section Init---
//-------------------
section INIT

	// obj_load entite,boite,lieu,actif,visible,collisions decors

	// **zi 19**
	#OBJ_LOAD (_CHAMPI, 10,19,1,1,0)
	#OBJ_LOAD (472,12,19,1,0,0)
	#OBJ_DISABLECOLLIOBJ(472)
	#OBJ_LOAD (572,9,19,1,0,0)
	#OBJ_LOAD (180,8,19,1,1,1)
	#OBJ_LOAD (173,4,19,1,1,1)
	#OBJ_LOAD (181,79,19,1,1,0)
	#OBJ_LOAD (182,78,19,0,1,0)
	#OBJ_LOAD (_DUMMY2,58,19,1,0,0)

	//**zi 20**
	#OBJ_LOAD (183,16,20,1,1,1)
	#OBJ_LOAD (43,2,20,1,1,1)
	#OBJ_LOAD (48,8,20,1,1,0)
	#OBJ_LOAD (49,9,20,1,1,0)
	#OBJ_LOAD (50,10,20,1,1,0)
	#OBJ_LOAD (184,8,20,0,1,0)
	#OBJ_LOAD (185,9,20,0,1,0)
	#OBJ_LOAD (186,10,20,0,1,0)
	#OBJ_LOAD (187,29,20,0,1,0)
	#OBJ_LOAD (_LOUP,4,20,0,1,1)
	#OBJ_LOAD(572,22,20,1,0,0)
	#OBJ_DISABLECOLLIOBJ(572)
	#OBJ_LOAD(574,24,20,1,0,0)
	#OBJ_DISABLECOLLIOBJ(574)
	#OBJ_LOAD(575,24,20,0,1,0)
	#OBJ_DISABLECOLLIOBJ(575)
	// Dummy combat (target)
	#OBJ_LOAD(470,22,20,1,0,0)
	#OBJ_DISABLECOLLIOBJ(470)

	//**zi 22**
	#OBJ_LOAD (188,1,22,1,1,1)
	#OBJ_LOAD (174,29,22,0,1,1)
	#OBJ_LOAD (573,29,22,1,0,0)
	#OBJ_LOAD (189,43,22,0,1,1)
	#OBJ_LOAD (190,3,22,1,1,0)
	#OBJ_LOAD (191,16,22,1,1,1)
	#OBJ_LOAD (192,10,22,1,1,0)
	#OBJ_LOAD (193,11,22,1,1,0)
	#OBJ_LOAD (194,12,22,1,1,0)
	#OBJ_DISABLECOLLIOBJ(573)

	//zi 23
	#OBJ_LOAD(451,8,23,1,1,0)

	// Zi tour de Foulque
	#OBJ_LOAD(_FOULQUE,2,0,1,1,0)
	#OBJ_LOAD(_PRINCE,1,0,1,1,0)

	// Activation collision feu de morgane
	#COL_ENABLE(19,20)

// timer

	#TIM_ADD		(1)

        set $breakfee1,0
        set $breakfee2,0
        set $breakfee3,0
        set $nbfee,0
    	// status corwyn
        set $pub3,2
        set $test,0

	// ---------------------------------------------------------------
	// Objets Coll interactifs
	// ---------------------------------------------------------------

	#COL_ENABLE		(5, 103)
	#COL_ENABLE		(9, 103)
	#COL_ENABLE		(120, 103)
	#COL_ENABLE		(130, 103)

	#COL_ENABLE		(23, 22)
	#COL_ENABLE		(24, 22)

	// ---------------------------------------------------------------
	// FXs
	// ---------------------------------------------------------------

	#VFX_LOAD		(_FX_METAMF1_FEE_1, _FEEAQUA2, 0)
	#VFX_LOADLINK		(_FX_METAMF2_FEE_1, _FEEAQUA2, "bassin", 0)
	#VFX_LOAD		(_FX_METAMF3_FLEUR_1, _FLEUR1, 0)

	#VFX_LOAD		(_FX_METAMF1_FEE_2, _FEEAQUA3, 0)
	#VFX_LOADLINK		(_FX_METAMF2_FEE_2, _FEEAQUA3, "bassin", 0)
	#VFX_LOAD		(_FX_METAMF3_FLEUR_2, _FLEUR2, 0)

	#VFX_LOAD		(_FX_METAMF1_FEE_3, _FEEAQUA4, 0)
	#VFX_LOADLINK		(_FX_METAMF2_FEE_3, _FEEAQUA4, "bassin", 0)
	#VFX_LOAD		(_FX_METAMF3_FLEUR_3, _FLEUR3, 0)

	#VFX_LOADLINK		(_FX_CYCLIPF_FEE_1, _FEEAQUA2, "bassin", 0)
	#VFX_LOADLINK		(_FX_CYCLIPF_FEE_2, _FEEAQUA3, "bassin", 0)
	#VFX_LOADLINK		(_FX_CYCLIPF_FEE_3, _FEEAQUA4, "bassin", 0)

	#VFX_LOADLINK		(_FX_CYCLIF_COUPE, 181, "CoupeS", 0)

	#VFX_LOADBOX		(_FX_AURAM_PG_1, 8, 20, 0)
	#VFX_LOADBOX		(_FX_AURAM_PG_2, 9, 20, 0)
	#VFX_LOADBOX		(_FX_AURAM_PG_3, 10, 20, 0)

	#VFX_LOAD		(_FX_METAMF1_PIERRE_1, _PIERREGIV1, 0)
	#VFX_LOADLINK		(_FX_METAMF2_PIERRE_1, _PIERREGIV1, "Pfx", 0)
	#VFX_LOAD		(_FX_METAMF3_PIERRE_1, _PIERREFLEUR1, 0)

	#VFX_LOAD		(_FX_METAMF1_PIERRE_2, _PIERREGIV2, 0)
	#VFX_LOADLINK		(_FX_METAMF2_PIERRE_2, _PIERREGIV2, "Pfx", 0)
	#VFX_LOAD		(_FX_METAMF3_PIERRE_2, _PIERREFLEUR2, 0)

	#VFX_LOAD		(_FX_METAMF1_PIERRE_3, _PIERREGIV3, 0)
	#VFX_LOADLINK		(_FX_METAMF2_PIERRE_3, _PIERREGIV3, "Pfx", 0)
	#VFX_LOAD		(_FX_METAMF3_PIERRE_3, _PIERREFLEUR3, 0)

	#VFX_LOADFLOAT		(_FX_METAMF2_BRADWEN_2)
	#VFX_LOAD		(_FX_METAMF3_BRADWEN_2, _LOUP, 0)

	#VFX_LOADLINK		(_FX_APPARF1_CORBEAU, _CORBEAU, "Bassin", 0)
	#VFX_LOAD		(_FX_APPARF2_CORBEAU, _CORBEAU, 0)

	#VFX_LOADLINK		(_FX_CYCLIF_COUPE_1, _COUPSOM2, "CoupeS", 0)
	#VFX_LOADLINK		(_FX_CYCLIF_COUPE_2, _COUPE1, "CoupeP", 0)
	#VFX_LOADLINK		(_FX_CYCLIF_COUPE_3, _COUPE2, "CoupeP", 0)
	#VFX_LOADLINK		(_FX_CYCLIF_COUPE_4, _COUPE3, "CoupeP", 0)
	#VFX_LOADLINK		(_FX_CYCLIF_COR, _CORFEE, "Corfee", 0)

	#VFX_LOADLINK		(_FX_SORTGEL, _SORCIERE, "_repere", 0)

	#VFX_LOADBOX		(_FX_FEUMOF_1, 24, 20, 0)
	#VFX_START		(_FX_FEUMOF_1)

	#VFX_LOADBOX		(_FX_FEUMOF_2, 1, 103, 0)
	#VFX_LOADBOX		(_FX_FEUMOF_3, 3, 103, 0)
	#VFX_LOADBOX		(_FX_FEUMOF_4, 7, 103, 0)
	#VFX_LOADBOX		(_FX_FEUMOF_5, 8, 103, 0)

	#VFX_LOADBOX		(_FX_FEUMOF_6, 86, 22, 0)
	#VFX_LOADBOX		(_FX_FEUMOF_7, 90, 22, 0)

	#VFX_START		(_FX_FEUMOF_2)
	#VFX_START		(_FX_FEUMOF_3)
	#VFX_START		(_FX_FEUMOF_4)
	#VFX_START		(_FX_FEUMOF_5)
	#VFX_START		(_FX_FEUMOF_6)
	#VFX_START		(_FX_FEUMOF_7)

	#VFX_START		(_FX_CYCLIF_COUPE_1)
	#VFX_START		(_FX_CYCLIF_COUPE_2)
	#VFX_START		(_FX_CYCLIF_COUPE_3)
	#VFX_START		(_FX_CYCLIF_COUPE_4)
	#VFX_START		(_FX_CYCLIF_COR)

	#VFX_START		(_FX_AURAM_PG_1)
	#VFX_START		(_FX_AURAM_PG_2)
	#VFX_START		(_FX_AURAM_PG_3)

	#VFX_LOADBOX 		(_FX_CERCLE_SORCIERE, 2, 20, 0)

//	#VFX_START		(_FX_CYCLIF_COUPE)

//	#VFX_START		(_FX_CYCLIPF_FEE_1)
//	#VFX_START		(_FX_CYCLIPF_FEE_2)
//	#VFX_START		(_FX_CYCLIPF_FEE_3)

section END


section CTR

		CTR
	{
		ID			28
		prog
		{
			// Boit du vin
			#OBJ_SENDEVENT (_BRADWEN, "pick 2")
			SyncState _BRADWEN "pause - pick 2"
			#OBJ_ENMAIND (_BRADWEN, _COUPESOM)

			// la boit
			SyncState _BRADWEN "pick 2 - pause"
			#OBJ_SENDEVENT (_BRADWEN, "aspec 7")

			SyncState _BRADWEN "mort avec fiole"
		}
	}

	CTR
	{
		ID 22
		prog
		{
			#OBJ_SENDEVENT (_BRADWEN, "boire")
			SyncState _BRADWEN "pause-boire"
		}
	}
	CTR
	{
		ID 34
		prog
		{
		//foulque tué au combat
		}
	}
	CTR
	{
	ID 35

	prog
	{
		#VFX_LOAD	(_FX_METAMF1_BRADWEN_2, _BRADWEN, 0)
		#VFX_LINK	(_FX_METAMF2_BRADWEN_2, _BRADWEN, "bassin")
		#OBJ_DISABLECOLLIOBJ	(_SORCIERE)
		#OBJ_DISABLECOLLIOBJ	(_BRADWEN)
		#VFX_STOP	(_FX_CERCLE_SORCIERE)
		// Sorcière paralysée
		// Bradwen tue la sorcière
		#CAM_ENABLE(12)
		#CAM_FORCE(12,0)
		#OBJ_MOVETOBOX(_BRADWEN,4)
		#OBJ_MOVETOBOX(_SORCIERE,2)
		#OBJ_SENDEVENT	(_BRADWEN, "break")
		SyncState	_BRADWEN "pause"
		#CAM_TRACK(470)
		#OBJ_SENDEVENT (_BRADWEN,"dlg agr")
		#NAR_COMMENT(52)
		SyncComm
		#OBJ_SENDEVENT	(43, "break")
		SyncState	_SORCIERE "pause"
		#OBJ_SENDEVENT (_SORCIERE,"dlg nor")
		#NAR_COMMENT(53)
		SyncComm
		#OBJ_SENDEVENT (_BRADWEN,"dlg agr")
		#NAR_COMMENT(54)
		SyncComm
		#OBJ_SENDEVENT (_SORCIERE,"dlg nor")
		#NAR_COMMENT(55)
		SyncComm
		#OBJ_SENDEVENT (_BRADWEN,"dlg agr")
		#NAR_COMMENT(56)
		SyncComm
		#OBJ_SENDEVENT (_SORCIERE,"dlg nor")
		#NAR_COMMENT(57)
		SyncComm
		#OBJ_SENDEVENT (_BRADWEN,"dlg agr")
		#NAR_COMMENT(58)
		SyncComm
		#OBJ_SENDEVENT (_SORCIERE,"dlg nor")
		#NAR_COMMENT(59)
		SyncComm
		#OBJ_SENDEVENT (_BRADWEN,"dlg agr")
		#NAR_COMMENT(60)
		SyncComm
		SyncState _BRADWEN "pause"
		#OBJ_SENDEVENT (_BRADWEN, "aspec 6")
		SyncState _BRADWEN "hurler - pause"
		#VFX_START		(_FX_METAMF1_BRADWEN_2)
		#VFX_START		(_FX_METAMF2_BRADWEN_2)
		SyncFx			_FX_METAMF1_BRADWEN_2 0
		#OBJ_HIDE		(_BRADWEN)

		#OBJ_ENABLE(_LOUP)
		#OBJ_DISABLECOLLIOBJ(_LOUP)

		#VFX_START	(_FX_METAMF3_BRADWEN_2)
		SyncFx		_FX_METAMF3_BRADWEN_2 0

		#OBJ_SENDEVENT	(_LOUP, "break")
		#OBJ_SENDEVENT	(43, "break")
		SyncState	43 "pause"
		SyncState 195 "pause"

		#OBJ_SENDEVENT (43, "combat 25")
		#OBJ_SENDEVENT (_LOUP, "combat 25")
		SyncState 195 "pause"
		#CAM_UNLOCK()
		#OBJ_SENDEVENT (_LOUP,"aspec 1")
		SyncState	_LOUP "coucher"
		#BJE_CTR	(20, 35)
	}
}

	CTR
	{
		ID 37
		prog
		{
			//#INT_GOZI (0,1)

			#CAM_FORCE(3,1)
			#CAM_TRACK(_PRINCE)
			//#CAM_TRACK(_FOULQUE)
			SyncTime	1
			#OBJ_SENDEVENT (_FOULQUE, "dlg nor")
			#NAR_COMMENT(67)
			synccomm
			#OBJ_SENDEVENT (_PRINCE, "break")
			SyncState	_PRINCE "pause"
			#OBJ_SENDEVENT (_PRINCE, "dlg nor")
			#NAR_COMMENT(78)
			synccomm
			#OBJ_SENDEVENT (_FOULQUE, "dlg nor")
			#NAR_COMMENT(79)
			synccomm
			#OBJ_SENDEVENT (_PRINCE, "dlg nor")
			#NAR_COMMENT(80)
			synccomm
			#OBJ_SENDEVENT (_FOULQUE, "dlg nor")
			#NAR_COMMENT(81)
			synccomm

		}
	}

CTR
{
	ID 41

	prog
	{
		// Boit du vin
		#OBJ_SENDEVENT (_BRADWEN, "pick 1")
		SyncState _BRADWEN "pause - pick 1"
		#OBJ_ENMAIND (_BRADWEN, _COUPSOM2)

		// la boit
		SyncState _BRADWEN "pick 1 - pause"
		#OBJ_SENDEVENT (_BRADWEN, "aspec 7")

		SyncState _BRADWEN "mort avec fiole"
	}
}

CTR
{
ID 30
prog
{
//foulque/ folie de bradwen
}
}

	CTR
	{
		ID 901
		prog
		{
			#NAR_COMMENT (5)
			#VFX_START (_FX_METAMF1_PIERRE_1)
			#VFX_START (_FX_METAMF2_PIERRE_1)
			SyncFx	_FX_METAMF1_PIERRE_1 0
			#VFX_STOP (_FX_AURAM_PG_1)
			#OBJ_DISABLE(48)
			#OBJ_ENABLE(184)
			#VFX_START (_FX_METAMF3_PIERRE_1)
			SyncFx	_FX_METAMF3_PIERRE_1 0
			#NAR_COMMENT(47)
		}
	}


	CTR
	{
		ID 902
		prog
		{
			#NAR_COMMENT (5)
			#VFX_START (_FX_METAMF1_PIERRE_2)
			#VFX_START (_FX_METAMF2_PIERRE_2)
			SyncFx	_FX_METAMF1_PIERRE_2 0
			#VFX_STOP (_FX_AURAM_PG_2)
			#OBJ_DISABLE(49)
			#OBJ_ENABLE(185)
			#VFX_START (_FX_METAMF3_PIERRE_2)
			SyncFx	_FX_METAMF3_PIERRE_2 0
			#NAR_COMMENT(48)
		}
	}

	CTR
	{
		ID 903
		prog
		{
			#NAR_COMMENT (5)
			#VFX_START (_FX_METAMF1_PIERRE_3)
			#VFX_START (_FX_METAMF2_PIERRE_3)
			SyncFx	_FX_METAMF1_PIERRE_3 0
			#VFX_STOP (_FX_AURAM_PG_3)
			#OBJ_DISABLE(50)
			#OBJ_ENABLE(186)
			#VFX_START (_FX_METAMF3_PIERRE_3)
			SyncFx	_FX_METAMF3_PIERRE_3 0
			#NAR_COMMENT(49)
			#BJE_CTR	(19, 903)
		}
	}

	CTR
	{
		ID	904
		PROG
		{
			#CAM_LOCK	()
			#CAM_TRACK	(43)
			#CAM_RETARGET	(1)

			SyncTime	2
			#VFX_START	(_FX_CERCLE_SORCIERE)
			SyncTime	2

			#CAM_TRACK	(_BRADWEN)
			#CAM_RETARGET	(1)
			#CAM_UNLOCK	()
		}
	}

	CTR
	{
		ID	905
		PROG
		{
			#EVT_DISABLE	(21)
			#VFX_START	(_FX_METAMF1_FEE_3)
			#VFX_START	(_FX_METAMF2_FEE_3)
			SyncFx		_FX_METAMF1_FEE_3 0
			#VFX_STOP	(_FX_CYCLIPF_FEE_3)
			#OBJ_DISABLE(_FEEAQUA4)
			#OBJ_ENABLE(189)
			#VFX_START	(_FX_METAMF3_FLEUR_3)
			SyncFx		_FX_METAMF3_FLEUR_3 0
		}
	}

	CTR
	{
		ID	906
		PROG
		{
			#EVT_DISABLE	(8)
			#VFX_START	(_FX_METAMF1_FEE_2)
			#VFX_START	(_FX_METAMF2_FEE_2)
			SyncFx		_FX_METAMF1_FEE_2 0
			#VFX_STOP	(_FX_CYCLIPF_FEE_2)
			#OBJ_DISABLE(_FEEAQUA3)
			#OBJ_ENABLE(187)
			#VFX_START	(_FX_METAMF3_FLEUR_2)
			SyncFx		_FX_METAMF3_FLEUR_2 0
		}
	}

	CTR
	{
		ID	907
		PROG
		{
			#EVT_DISABLE	(3)
			#VFX_START	(_FX_METAMF1_FEE_1)
			#VFX_START	(_FX_METAMF2_FEE_1)
			SyncFx		_FX_METAMF1_FEE_1 0
			#VFX_STOP	(_FX_CYCLIPF_FEE_1)
			#OBJ_DISABLE(173)
			#OBJ_ENABLE(182)
			#VFX_START	(_FX_METAMF3_FLEUR_1)
			SyncFx		_FX_METAMF3_FLEUR_1 0
		}
	}

	CTR
	{
		ID	111

		PROG
		{
			#OBJ_ENABLE(174)
			#VFX_START (_FX_APPARF1_CORBEAU)
			#VFX_START (_FX_APPARF2_CORBEAU)
			SyncFx	_FX_APPARF1_CORBEAU 0
			#EVT_ENABLE	(26)
		}
	}

section END