GameMode	beast
GameType	QUEST
	
	REDBLOCKSONSCREENCOUNTER	W
	LIVESREMAINING02COUNTER		M


Program0123


/ beast 
author pd/


TEXTBUFFER      LEVS  
                  
        beast.wbl

ENDBUFFER


/ *********************************************************/

DATABUFFER	EYE1		/ databuffers for the eyes /

10 5 10 6 9 6 8 5 9 4 10 4

ENDBUFFER


DATABUFFER	EYE2

16 6 15 6 14 5 15 4 16 4 16 5

ENDBUFFER

/ ****************************************************/

DATABUFFER	HITP 		/ critical hit points /

1 1 2 4 4 4 6 4 19 4 21 4 23 4 23 1 -1 -1

ENDBUFFER 


/ ****************************************************/

DATABUFFER	CH1L

10 3 10 2 9 2 8 2 7 3 7 4 6 5 7 6 7 7 8 8 9 8 10 8 10 9 10 10 10 12 -1 -1

EndBuffer


DATABUFFER	CH2L

10 3 10 2 9 2 8 2 7 2 6 2 5 3 5 4 4 5 5 6 5 7 5 9 -1 -1

EndBuffer


DATABUFFER	CH3L

10 3 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 3 3 4 2 5 3 6 3 7 3 9 -1 -1

EndBuffer


DATABUFFER	CH4L

10 3 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 3 1 4 0 5 0 7 -1 -1

EndBuffer


DATABUFFER	CH1R

14 3 15 2 16 2 17 2 17 3 18 4 18 5 18 6 17 7 17 8 16 8 15 8 14 9 15 10 15 12 -1 -1

EndBuffer


DATABUFFER	CH2R

14 3 15 2 16 2 17 2 18 2 19 2 19 3 20 4 20 5 20 6 19 7 19 9 -1 -1

EndBuffer


DATABUFFER	CH3R

14 3 15 2 16 2 17 2 18 2 19 2 20 2 21 2 21 3 22 4 22 5 22 6 21 7 21 9 -1 -1

EndBuffer


DATABUFFER	CH4R

14 3 15 2 16 2 17 2 18 2 19 2 20 2 21 2 22 2 23 2 23 3 24 4 24 5 24 7 -1 -1

EndBuffer

DATABUFFER	CNTR

12 5 12 7 12 9

ENDBUFFER

Loop INIT
Do

    SetParameter GD_FLOAT    30.0 0 0 0
    SetParameter GAMEDATA    WATERMINLEVEL
    SendMessage  SET_GD_FLOAT


	SetParameter	SCALE1	0.0	0.95	0.0	0.0
	SendMessage	SETBLOCKYSCALE

	SetParameter	Position	0	-200	0	0
	SendMessage	CHANGEWATERHEIGHT		

	SetParameter	POSITION	0	0	0	0
	SetParameter	PLAYERNUM 0
	SendMessage	SETBOATPOSITION

	SetParameter	TEXT	beast.wbw
	SendMessage	LOADWEAPONLIST

	SetParameter	LIVES	0
	SendMessage	SETLIVES

	SetParameter	NUMLINES	20
	SendMessage	SetStartLines
	SetParameter	BACKDROP	BACKDROP6
	SendMessage	SETBACKDROP
	SetParameter    BUFFERNAME	LEVS
        SetParameter    NUMLINES	20 
	SendMessage	LOADLEVEL  
          
	SendMessage PAUSELANDLEFT
	SendMessage PAUSELANDRIGHT

	SendMessage	DEACTIVATESCORE


	SetParameter	MESSAGE_ID	TIMER1
	SetParameter	INTERVAL	0500
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER

	SetParameter	MESSAGE_ID	TIMER2
	SetParameter	INTERVAL	1000
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER

	SetParameter	MESSAGE_ID	TIMER3
	SetParameter	INTERVAL	0200
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER

	SetParameter	MESSAGE_ID	TIMER4
	SetParameter	INTERVAL	0800
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER

	Set A To 0
	Set B To 0
	Set C To 0
	Set D To 0
	Set E To 0
	Set F To 0
	Set L To 100
	Set M To 0
	Set K To 0
	Set J To 0
	Set N To 2

	Set G To 0
	Set H To 0
	Set X To 0
	Set Y To 0
	Set P To 0
	Set Q To 0
	Set R To 0
	Set S To 0
	Set T To 0
	Set U To 0
	Set V To 0
	Set X To 0
	Set Y To 14
	Set W To 8
	Set Z To 0

	Set V To W


	ResetBuffer	EYE1
	ResetBuffer	EYE2
	ResetBuffer	HITP
	ResetBuffer	CH1L
	ResetBuffer	CH2L
	ResetBuffer	CH3L
	ResetBuffer	CH4L	
	ResetBuffer	CH1R
	ResetBuffer	CH2R
	ResetBuffer	CH3R
	ResetBuffer	CH4R
	ResetBuffer	HITP
	ResetBuffer	CNTR

	SendMessage 	MUSIC_GROOVE_LOW


	SendMessage	FIRINGOFF
	SendMessage	StartBriefing

	Randomise H From 1 To 4
	Randomise Q From 1 To 4

	GotoLoop MAIN


EndLoop

Loop	MAIN
Do


	SetParameter	Position	0	-200	0	0
	SendMessage	CHANGEWATERHEIGHT	
	SetParameter	Velocity	0.0	0.0	0.0	0.0
	SetParameter	Gravity		0.0	0.0	0.0	0.0


	SetParameter	Colour1		1.0	0.86	0.03	1.0
	SetParameter	Colour2		1.0	0.86	0.03	1.0
	SetParameter	Colour3		1.0	0.86	0.03	1.0
	SetParameter	Colour4		0.0	0.0	0.0	1.0
	SetParameter	Colour5		0.0	0.0	0.0	1.0
	SetParameter	Colour6		0.0	0.0	0.0	1.0
	SetParameter	Scale1		1.3	1.3	1.3	0.0
	SetParameter	Scale2		1.3	1.3	1.3	0.0
	SetParameter	Scale3		1.3	1.3	1.3	0.0
	SetParameter	Scale4		1.3	1.3	1.3	0.0
	SetParameter	Scale5		1.3	1.3	1.3	0.0

	SetParameter	Lifetime	0.0	0.0	0.0	0.0
	SetParameter	Justify		Centre

	SetParameter	Position	0.0	180.0	0.0	0.0
	SetParameter	Text		The_Beast
FRE	SetParameter	TEXT		La_Bête
	GER SetParameter	Text	Das_Biest
	SPA SetParameter	Text	La_Bestia
	ITA SetParameter	TEXT	La_bestia
POL	SetParameter	TEXT		Bestia
	


	SendMessage 	CREATETEXT

	SetParameter	Colour1		1.0	1.0	1.0	1.0
	SetParameter	Colour2		1.0	1.0	1.0	1.0
	SetParameter	Colour3		1.0	1.0	1.0	1.0
	SetParameter	Colour4		0.0	0.0	0.0	1.0
	SetParameter	Colour5		0.0	0.0	0.0	1.0
	SetParameter	Colour6		0.0	0.0	0.0	1.0
	SetParameter	Scale1		0.8	0.8	0.8	0.0
	SetParameter	Scale2		0.8	0.8	0.8	0.0
	SetParameter	Scale3		0.8	0.8	0.8	0.0
	SetParameter	Scale4		0.8	0.8	0.8	0.0
	SetParameter	Scale5		0.8	0.8	0.8	0.0

	SetParameter	Lifetime	0.0	0.0	0.0	0.0
	SetParameter	Justify		Centre

	SetParameter	Position	0.0	115.0	0.0	0.0
	SetParameter	Text		Destroy_the_beast_above!
FRE	SetParameter	TEXT		Détruisez_la_bête_au-dessus!
	GER SetParameter	Text	Zerstöre_das_Biest_über_dir!
	SPA SetParameter	Text	¡Destruye_a_la_bestia!
	ITA SetParameter	TEXT	Distruggi_la_bestia!
POL	SetParameter	TEXT		Zniszcz_bestiê




	SendMessage 	CREATETEXT

	SetParameter	Position	0.0	80.0	0.0	0.0
	SetParameter	Text		Break_through_the_barrier
FRE	SetParameter	TEXT		Brisez_la_barrière
	GER SetParameter	Text	Breche_durch_die_Barriere
	SPA SetParameter	Text	Atraviesa_la_barrera
	ITA SetParameter	TEXT	Attraversa_la_barriera_e
POL	SetParameter	TEXT		Przebij_siê_przez_os³onê



	SendMessage 	CREATETEXT

	SetParameter	Position	0.0	45.0	0.0	0.0
	SetParameter	Text		and_exploit_its_weak_point
FRE	SetParameter	TEXT		et_exploitez_son_point_faible
	GER SetParameter	Text	und_treffe_die_roten_Steine,_die
	SPA SetParameter	Text	y_aprovecha_sus_puntos_débiles,
	ITA SetParameter	TEXT	colpisci_i_suoi_punti_deboli,
POL	SetParameter	TEXT		i_wykorzystaj,_oznaczone_na_czer-



	SendMessage 	CREATETEXT
	
	SetParameter	Position	0.0	10.0	0.0	0.0
	SetParameter	Text		indicated_as_red_blocks.
FRE	SetParameter	TEXT		représenté_par_des_blocs_rouges.
	GER SetParameter	Text	seinen_schwachen_Punkt_markieren.
	SPA SetParameter	Text	indicados_con_bloques_rojos.
	ITA SetParameter	TEXT	indicati_dai_blocchi_rossi.
POL	SetParameter	TEXT		wono,_jej_s³abe_punkty



	SendMessage 	CREATETEXT

	SetParameter	Position	0.0	-25.0	0.0	0.0
	SetParameter	Text		However_with_each_successful_strike
FRE	SetParameter	TEXT		Mais_sachez_qu'à_chaque_coup_réussi
	GER SetParameter	Text	Allerdings_baut_das_Biest_mit_jedem
	SPA SetParameter	Text	A_cada_golpe_que_recibe,
	ITA SetParameter	TEXT	Ricorda:_ogni_volta_che_ne_colpisci_uno,
POL	SetParameter	TEXT		Po_ka¿dym_celnym_strzale



	SendMessage 	CREATETEXT
	
	SetParameter	Position	0.0	-60.0	0.0	0.0
	SetParameter	Text		the_beast_rebuilds_the_barrier.
FRE	SetParameter	TEXT		la_bête_reconstruit_la_barrière.
	GER SetParameter	Text	Treffer_die_Barriere_wieder_auf.
	SPA SetParameter	Text	la_bestia_reconstruye_una
	ITA SetParameter	TEXT	la_bestia_ricostruisce_la_barriera.
POL	SetParameter	TEXT		bestia_odbudowuje_os³onê.



	SendMessage 	CREATETEXT


	SPA SetParameter	Position	0.0	-95.0	0.0	0.0
	SPA SetParameter	Text	_parte_de_la_barrera.

	SPA SendMessage 	CREATETEXT

	SetParameter	Colour1		1.0	0.22	0.07	1.0
	SetParameter	Colour2		1.0	0.22	0.07	1.0
	SetParameter	Colour3		1.0	0.22	0.07	1.0
	SetParameter	Scale1		1.0	1.0	1.0	0.0
	SetParameter	Scale2		1.0	1.0	1.0	0.0
	SetParameter	Scale3		1.0	1.0	1.0	0.0
	SetParameter	Scale4		1.0	1.0	1.0	0.0
	SetParameter	Scale5		1.0	1.0	1.0	0.0

	SetParameter	Position	0.0	-125.0	0.0	0.0
	SetParameter	Text		Press_fire_to_start
FRE	SetParameter	TEXT		Appuyez_sur_Tir_pour_commencer!
	GER SetParameter	Text	Zum_Starten_Feuer_drücken
	ITA SetParameter	TEXT	Premi_fuoco_per_cominciare
POL	SetParameter	TEXT		Naciœnij_"Strza³"



	SPA	SetParameter	Scale1		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale2		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale3		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale4		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale5		0.8	0.8	0.8	0.0

	SPA SetParameter	Position	0.0	-150.0	0.0	0.0
	SPA SetParameter	Text	Pulsa_el_disparo_para_empezar



	SendMessage 	CREATETEXT

	SPA	SetParameter	Scale1		1.0	1.0	1.0	0.0
	SPA	SetParameter	Scale2		1.0	1.0	1.0	0.0
	SPA	SetParameter	Scale3		1.0	1.0	1.0	0.0
	SPA	SetParameter	Scale4		1.0	1.0	1.0	0.0
	SPA	SetParameter	Scale5		1.0	1.0	1.0	0.0

	OnMessage FIREPRESSED
	Do
		SendMessage EndBriefing
		SendMessage FIRINGON
		GotoLoop MAIN1
		
	EndResponse

	 
	

EndLoop


Loop MAIN1
Do
	
	SetParameter	Position	0	-200	0	0
	SendMessage	CHANGEWATERHEIGHT


	OnMessage TIMER2
	Do

		Add 1 To Z

	EndResponse

	If Z BecomesEqualTo 30
	Then

		SendMessage 	MUSIC_GROOVE_MED

		SetParameter	Colour1		0.0	0.43	0.74	1.0
		SetParameter	Colour2		0.0	0.43	0.74	1.0
		SetParameter	Colour3		0.0	0.43	0.74	1.0
		SetParameter	Colour4		1.0	1.0	1.0	1.0
		SetParameter	Colour5		1.0	1.0	1.0	1.0
		SetParameter	Colour6		1.0	1.0	1.0	1.0

		SetParameter	Position	0.0	150.0	0.0	0.0
		SetParameter	Lifetime	0.2	0.6	0.7	1.5
		SetParameter	Justify		Centre
		SetParameter	Text		Faster!
FRE		SetParameter	TEXT		Plus_vite!
		GER SetParameter	Text	Schneller!
		SPA SetParameter	Text	¡Más_rápido!
		ITA SetParameter	TEXT	PIÙ_VELOCE!
POL		SetParameter	TEXT		Szybciej

 	


		SendMessage 	CREATETEXT

		SetParameter	MESSAGE_ID	TIMER1
		SendMessage	DELETETIMER

		SetParameter	MESSAGE_ID	TIMER1
		SetParameter	INTERVAL	0400
		SetParameter	REPEAT		TRUE
		SendMessage	CREATETIMER

		SetParameter	MESSAGE_ID	TIMER3
		SendMessage	DELETETIMER

		SetParameter	MESSAGE_ID	TIMER3
		SetParameter	INTERVAL	0150
		SetParameter	REPEAT		TRUE
		SendMessage	CREATETIMER

	EndIf

	If Z BecomesEqualTo 60
	Then

		SendMessage 	MUSIC_GROOVE_MED_HI

		SetParameter	Colour1		0.0	0.43	0.74	1.0
		SetParameter	Colour2		0.0	0.43	0.74	1.0
		SetParameter	Colour3		0.0	0.43	0.74	1.0
		SetParameter	Colour4		1.0	1.0	1.0	1.0
		SetParameter	Colour5		1.0	1.0	1.0	1.0
		SetParameter	Colour6		1.0	1.0	1.0	1.0
		SetParameter	Position	0.0	150.0	0.0	0.0
		SetParameter	Lifetime	0.2	0.6	0.7	1.5
		SetParameter	Justify		Centre
		SetParameter	Text		Faster!
FRE		SetParameter	TEXT		Plus_vite!
		GER SetParameter	Text	Schneller!
		SPA SetParameter	Text	¡Más_rápido!
		ITA SetParameter	TEXT	PIÙ_VELOCE!
POL		SetParameter	TEXT		Szybciej

		SendMessage 	CREATETEXT

		SetParameter	MESSAGE_ID	TIMER1
		SendMessage	DELETETIMER

		SetParameter	MESSAGE_ID	TIMER1
		SetParameter	INTERVAL	0300
		SetParameter	REPEAT		TRUE
		SendMessage	CREATETIMER

		SetParameter	MESSAGE_ID	TIMER3
		SendMessage	DELETETIMER

		SetParameter	MESSAGE_ID	TIMER3
		SetParameter	INTERVAL	0100
		SetParameter	REPEAT		TRUE
		SendMessage	CREATETIMER


	EndIf


	If Z BecomesEqualTo 90
	Then

		SendMessage 	MUSIC_GROOVE_HIGH

		SetParameter	Colour1		0.0	0.43	0.74	1.0
		SetParameter	Colour2		0.0	0.43	0.74	1.0
		SetParameter	Colour3		0.0	0.43	0.74	1.0
		SetParameter	Colour4		1.0	1.0	1.0	1.0
		SetParameter	Colour5		1.0	1.0	1.0	1.0
		SetParameter	Colour6		1.0	1.0	1.0	1.0
		SetParameter	Position	0.0	150.0	0.0	0.0
		SetParameter	Lifetime	0.2	0.6	0.7	1.5
		SetParameter	Justify		Centre
		SetParameter	Text		Faster!
FRE		SetParameter	TEXT		Plus_vite!
		GER SetParameter	Text	Schneller!
		SPA SetParameter	Text	¡Más_rápido!
		ITA SetParameter	TEXT	PIÙ_VELOCE!
POL		SetParameter	TEXT		Szybciej

		SendMessage 	CREATETEXT

		SetParameter	MESSAGE_ID	TIMER1
		SendMessage	DELETETIMER

		SetParameter	MESSAGE_ID	TIMER1
		SetParameter	INTERVAL	0200
		SetParameter	REPEAT		TRUE
		SendMessage	CREATETIMER

		SetParameter	MESSAGE_ID	TIMER3
		SendMessage	DELETETIMER

		SetParameter	MESSAGE_ID	TIMER3
		SetParameter	INTERVAL	0075
		SetParameter	REPEAT		TRUE
		SendMessage	CREATETIMER

	EndIf


	OnMessage TIMER1
	Do

		Add 1 To A

	EndResponse

	
	OnMessage TIMER4
	Do

		Add 1 To O

	EndResponse


	If O BecomesEqualTo 1
	Then
	



		ReadFromBuffer CNTR Into	T
		ReadFromBuffer CNTR Into	U

		SetParameter	POSITION	T	U	0	0
		SetParameter	BLOCKCOLOUR	ORANGE
		SendMessage	SPAWNINBLOCK
		

	EndIf

	If O BecomesEqualTo 2
	Then


		SetParameter	POSITION	T	U	2	0
		SendMessage	DETONATEBLOCK


		ReadFromBuffer CNTR Into	T
		ReadFromBuffer CNTR Into	U

		SetParameter	POSITION	T	U	0	0
		SetParameter	BLOCKCOLOUR	ORANGE
		SendMessage	SPAWNINBLOCK


	EndIf

	If O BecomesEqualTo 3
	Then

		SetParameter	POSITION	T	U	2	0
		SendMessage	DETONATEBLOCK


		ReadFromBuffer CNTR Into	T
		ReadFromBuffer CNTR Into	U

		SetParameter	POSITION	T	U	0	0
		SetParameter	BLOCKCOLOUR	ORANGE
		SendMessage	SPAWNINBLOCK

		Set O To 0
	EndIf



	If A BecomesEqualTo 1
	Then
	
		ReadFromBuffer EYE1 Into	B
		ReadFromBuffer EYE1 Into	C

		SetParameter	POSITION	B	C	0	0
		SetParameter	BLOCKCOLOUR	ORANGE
		SendMessage	SETBLOCKCOLOUR

		ReadFromBuffer EYE2 Into	D
		ReadFromBuffer EYE2 Into 	E

		SetParameter	POSITION	D	E	0	0
		SetParameter	BLOCKCOLOUR	ORANGE
		SendMessage	SETBLOCKCOLOUR
		Add 1 To F
		Add 1 To N

	EndIf

	If A BecomesEqualTo 2
	Then

		SetParameter	POSITION	B	C	0	0
		SetParameter	BLOCKCOLOUR	DEAD
		SendMessage	SETBLOCKCOLOUR

		SetParameter	POSITION	D	E	0	0
		SetParameter	BLOCKCOLOUR	DEAD
		SendMessage	SETBLOCKCOLOUR

		Set A To 0
	EndIf
		

	If F IsEqualTo 6
	Then

		Set F To 0
		
		If G IsEqualTo 0
		Then
			
			Set G To 1
			Randomise H From 1 To 4
		
		EndIf

	EndIf

	
	If N IsEqualTo 6
	Then

		Set N To 0
		
		If P IsEqualTo 0
		Then
			
			Set P To 1
			Randomise Q From 1 To 4
		
		EndIf

	EndIf

	

	OnMessage TIMER3
	Do
		If G IsEqualTo 1
		Then

			If H IsEqualTo 1
			Then

				ReadFromBuffer CH1L Into I
				ReadFromBuffer CH1L Into J
				
				If I IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	I	J	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If I BecomesEqualTo -1
				Then

					ResetBuffer CH1L

					ReadFromBuffer CH1L Into I
					ReadFromBuffer CH1L Into J

					SetParameter	POSITION	I	J	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH1L
					Set G To 0

				
				EndIf
				
			EndIf

			If H IsEqualTo 2
			Then

				ReadFromBuffer CH2L Into I
				ReadFromBuffer CH2L Into J
				
				If I IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	I	J	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If I BecomesEqualTo -1
				Then

					ResetBuffer CH2L

					ReadFromBuffer CH2L Into I
					ReadFromBuffer CH2L Into J

					SetParameter	POSITION	I	J	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH2L
					Set G To 0



				EndIf
				
			EndIf


			If H IsEqualTo 3
			Then

				ReadFromBuffer CH3L Into I
				ReadFromBuffer CH3L Into J
				
				If I IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	I	J	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If I BecomesEqualTo -1
				Then

					ResetBuffer CH3L

					ReadFromBuffer CH3L Into I
					ReadFromBuffer CH3L Into J

					SetParameter	POSITION	I	J	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH3L
					Set G To 0


				EndIf
				
			EndIf


			If H IsEqualTo 4
			Then

				ReadFromBuffer CH4L Into I
				ReadFromBuffer CH4L Into J
				
				If I IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	I	J	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If I BecomesEqualTo -1
				Then

					ResetBuffer CH4L

					ReadFromBuffer CH4L Into I
					ReadFromBuffer CH4L Into J

					SetParameter	POSITION	I	J	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH4L
					Set G To 0

				EndIf
				
			EndIf


		EndIf

		If P IsEqualTo 1
		Then

			If Q IsEqualTo 1
			Then

				ReadFromBuffer CH1R Into R
				ReadFromBuffer CH1R Into S
				
				If R IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	R	S	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If R BecomesEqualTo -1
				Then

					ResetBuffer CH1R

					ReadFromBuffer CH1R Into R
					ReadFromBuffer CH1R Into S

					SetParameter	POSITION	R	S	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH1R
					Set P To 0


				EndIf
				
			EndIf

			If Q IsEqualTo 2
			Then

				ReadFromBuffer CH2R Into R
				ReadFromBuffer CH2R Into S
				
				If R IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	R	S	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If R BecomesEqualTo -1
				Then

					ResetBuffer CH2R

					ReadFromBuffer CH2R Into R
					ReadFromBuffer CH2R Into S

					SetParameter	POSITION	R	S	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH2R
					Set P To 0



				EndIf
				
			EndIf


			If Q IsEqualTo 3
			Then

				ReadFromBuffer CH3R Into R
				ReadFromBuffer CH3R Into S
				
				If R IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	R	S	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If R BecomesEqualTo -1
				Then

					ResetBuffer CH3R

					ReadFromBuffer CH3R Into R
					ReadFromBuffer CH3R Into S

					SetParameter	POSITION	R	S	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH3R
					Set P To 0



				EndIf
				
			EndIf


			If Q IsEqualTo 4
			Then


				ReadFromBuffer CH4R Into R
				ReadFromBuffer CH4R Into S
				
				If R IsGreaterThanOrEqualTo 0
				Then
					SetParameter	POSITION	R	S	0	0
					SetParameter	BlockColour	ORANGE
					SendMessage	SPAWNINBLOCK
				EndIf
				
				If R BecomesEqualTo -1
				Then

					ResetBuffer CH4R

					ReadFromBuffer CH4R Into R
					ReadFromBuffer CH4R Into S

					SetParameter	POSITION	R	S	1	0
					SendMessage	DETONATEBLOCK

					ResetBuffer CH4R
					Set P To 0

				EndIf
				
			EndIf


		EndIf

	EndResponse

	

	If W BecomesLessThan V
	Then

		Set Y To 14
		If W BecomesEqualTo 0
		Then



			SetParameter	Position	0.0 	0.0	0.0	0.0
			SetParameter	Lifetime	0.2	0.7	3.2	4.2
			SetParameter	Scale1		0.4	0.4	0.4	0.0
			SetParameter	Scale2		1.4	1.4	1.4	0.0
			SetParameter	Scale3		3.4	3.4	3.4	0.0
			SetParameter	Scale4		2.0	2.0	2.0	0.0
			SetParameter	Scale5		1.8	1.8	1.8	0.0
			SetParameter	Colour1		0.18	0.9	0.1	1.0
			SetParameter	Colour2		0.18	0.9	0.1	1.0
			SetParameter	Colour3		0.18	0.9	0.1	1.0
			SetParameter	Colour4		1.0	1.0	1.0	1.0
			SetParameter	Colour5		0.0	0.0	0.0	1.0
			SetParameter	Colour6		0.0	0.0	0.0	1.0
			SetParameter	Text	SUCCESS!
FRE			SetParameter	TEXT	RÉUSSI!
			GER SetParameter	Text	GESCHAFFT!
			SPA SetParameter	Text	¡LO_CONSEGUISTE!
			ITA SetParameter	TEXT	HAI_VINTO!
POL			SetParameter	TEXT	Sukces
	


			SendMessage	CREATETEXT

			SetParameter	BLOCKCOLOUR	ALLCOLOURS
			SendMessage	CLEARBLOCKS
			SendMessage CLEARPROJECTILES

			SendMessage FIRINGOFF
			Set Z To 0
			GotoLoop WIN
	
		EndIf
	
		Randomise V From 1 To 2
		
		If V IsEqualTo 1
		Then
			SetParameter	Colour1		1.0	0.86	0.03	1.0
			SetParameter	Colour2		1.0	0.86	0.03	1.0
			SetParameter	Colour3		1.0	0.86	0.03	1.0
			SetParameter	Colour4		0.0	0.0	0.0	1.0
			SetParameter	Colour5		0.0	0.0	0.0	1.0
			SetParameter	Colour6		0.0	0.0	0.0	1.0
			SetParameter	Position	0.0	50.0	0.0	0.0
			SetParameter	Lifetime	0.2	0.6	0.7	1.5
			SetParameter	Text		WOW!_You_got_one
FRE			SetParameter	TEXT		Wouah!_Bien_visé!
			GER SetParameter	Text	Wow!_Treffer
			SPA SetParameter	Text	¡Bien!_Has_conseguido_alcanzarla.
			ITA SetParameter	TEXT	HAI_VINTO!
POL			SetParameter	TEXT		O_Trafi³eœ



		SendMessage 	CREATETEXT
			EndIf

		If V IsEqualTo 2
		Then
			SetParameter	Colour1		1.0	0.86	0.03	1.0
			SetParameter	Colour2		1.0	0.86	0.03	1.0
			SetParameter	Colour3		1.0	0.86	0.03	1.0
			SetParameter	Colour4		0.0	0.0	0.0	1.0
			SetParameter	Colour5		0.0	0.0	0.0	1.0
			SetParameter	Colour6		0.0	0.0	0.0	1.0
			SetParameter	Position	0.0	50.0	0.0	0.0
			SetParameter	Lifetime	0.2	0.6	0.7	1.5
			SetParameter	Text		Good_shot!
FRE			SetParameter	TEXT		Beau_tir!
			GER SetParameter	Text	Guter_Schuss
			SPA SetParameter	Text	¡Buen_disparo!
			ITA SetParameter	TEXT	Bel_colpo!
POL			SetParameter	TEXT		Dobry_strza³




			SendMessage 	CREATETEXT
		EndIf

		While Y IsLessThan 17
		Do
			Set X To 0

			While X IsLessThan25
			Do

				SetParameter	POSITION	X	Y	0	0
				SetParameter	BlockColour	DEAD
				SendMessage	SPAWNINBLOCK
		
				Add 1 To X
			EndWhile
		
			Add 1 To Y
			
		EndWhile
	
		Set V To W
			
	EndIf
	

	If M IsEqualTo -1
	Then

		SetParameter	BLOCKCOLOUR	ALLCOLOURS
		SendMessage	CLEARBLOCKS
		SendMessage CLEARPROJECTILES

		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Scale1		8.0	8.0	8.0	1.0
		SetParameter	Scale2		5.0	5.0	5.0	1.0
		SetParameter	Scale4		3.0	3.0	3.0	1.0
		SetParameter	Colour1		1.0	0.22	0.07	1.0
		SetParameter	Colour2		1.0	0.22	0.07	1.0
		SetParameter	Colour3		1.0	0.22	0.07	1.0
		SetParameter	Colour4		0.0	0.0	0.0	1.0
		SetParameter	Colour5		0.0	0.0	0.0	1.0
		SetParameter	Colour6		0.0	0.0	0.0	1.0
		SetParameter	Lifetime	0.2	0.7	3.2	4.2
		SetParameter	Text		FAILED!
FRE		SetParameter	TEXT		ÉCHEC!
		GER SetParameter	Text	VERLOREN!
		SPA SetParameter	Text	¡FALLASTE!
		ITA SetParameter	TEXT	Missione_fallita!
POL		SetParameter	TEXT		Klêska




		SendMessage	CREATETEXT


		SendMessage FIRINGOFF
		Set Z To 0
		GotoLoop FAIL

	EndIf
	

	OnMessage TIMER2
	Do

		Randomise K From 1 To 100
			

		If K IsEqualTo 1
		Then	
			SetParameter	POSITION	12	1	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_SPEEDUP				
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
		
		If K IsEqualTo 17
		Then	
			SetParameter	POSITION	12	1	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_LASERBEAM
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
			
		If K IsEqualTo 23
		Then	
			SetParameter	POSITION	12	1	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_BOATREPAIR
			SendMessage	SPAWNINBLOCK

			GoSubLoop CRATETEXT	
		EndIf

		If K IsEqualTo 7
		Then	
			SetParameter	POSITION	2	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_SPEEDUP
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
		
		If K IsEqualTo 11
		Then	
			SetParameter	POSITION	2	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_LASERBEAM
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
			
		If K IsEqualTo 22
		Then	
			SetParameter	POSITION	2	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_BOATREPAIR
			SendMessage	SPAWNINBLOCK

			GoSubLoop CRATETEXT	
		EndIf

		If K IsEqualTo 39
		Then	
			SetParameter	POSITION	4	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_SPEEDUP
			SendMessage	SPAWNINBLOCK

			GoSubLoop CRATETEXT	
		EndIf	
		
		If K IsEqualTo 59
		Then	
			SetParameter	POSITION	4	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_LASERBEAM
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
			
		If K IsEqualTo 66
		Then	
			SetParameter	POSITION	4	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_BOATREPAIR
			SendMessage	SPAWNINBLOCK

			GoSubLoop CRATETEXT	
		EndIf
	
		If K IsEqualTo 80
		Then	
			SetParameter	POSITION	20	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_SPEEDUP
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
		
		If K IsEqualTo 19
		Then	
			SetParameter	POSITION	20	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_LASERBEAM
			SendMessage	SPAWNINBLOCK

			GoSubLoop CRATETEXT	
		EndIf	
			
		If K IsEqualTo 92
		Then	
			SetParameter	POSITION	20	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_BOATREPAIR
			SendMessage	SPAWNINBLOCK

			GoSubLoop CRATETEXT	
		EndIf

		If K IsEqualTo 97
		Then	
			SetParameter	POSITION	22	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_SPEEDUP
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
		
		If K IsEqualTo 51
		Then	
			SetParameter	POSITION	22	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_LASERBEAM
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf	
			
		If K IsEqualTo 73
		Then	
			SetParameter	POSITION	22	9	0	0
			SetParameter	BLOCKCOLOUR	CRATE
			SetParameter	CRATECONTENTS	CRATE_BOATREPAIR
			SendMessage	SPAWNINBLOCK	

			GoSubLoop CRATETEXT
		EndIf


	EndResponse


EndLoop


Loop WIN
Do


	OnMessage TIMER2
	Do

		Add 1 To Z

	EndResponse


	If Z BecomesEqualTo 4
	Then

		SetParameter 	BLOCKCOLOUR 	ALLCOLOURS
		SendMessage	CLEARBLOCKS

	
		SetParameter	TEXT	red
		SendMessage	SETNEXTGAMEMODE
		SendMessage	LOSECONDITION

	EndIf



EndLoop


Loop FAIL
Do

		


	OnMessage TIMER2
	Do

		Add 1 To Z

	EndResponse

	If Z BecomesEqualTo 4
	Then

		SendMessage LOSECONDITION

	EndIf


EndLoop

Loop CRATETEXT
Do

	Randomise K From 1 To 3

	If K BecomesEqualTo 1
	Then
		
		SetParameter	Colour1		0.1	1.0	0.65	1.0
		SetParameter	Colour2		0.1	1.0	0.65	1.0
		SetParameter	Colour3		0.1	1.0	0.65	1.0
		SetParameter	Colour4		0.0	0.0	0.0	1.0
		SetParameter	Colour5		0.0	0.0	0.0	1.0
		SetParameter	Colour6		0.0	0.0	0.0	1.0
		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Lifetime	0.2	0.5	1.5	3.0
		SetParameter	Text		Prezzies!
FRE		SetParameter	TEXT		Surprise!
		GER SetParameter	Text	Goodies!
		SPA SetParameter	Text	¡Premios!
		ITA SetParameter	TEXt	Premi!
POL		SetParameter	TEXT		Nagrody!




		SendMessage 	CREATETEXT	

	EndIf

	If K BecomesEqualTo 2
	Then
		
		SetParameter	Colour1		0.1	1.0	0.65	1.0
		SetParameter	Colour2		0.1	1.0	0.65	1.0
		SetParameter	Colour3		0.1	1.0	0.65	1.0
		SetParameter	Colour4		0.0	0.0	0.0	1.0
		SetParameter	Colour5		0.0	0.0	0.0	1.0
		SetParameter	Colour6		0.0	0.0	0.0	1.0
		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Lifetime	0.2	0.5	1.5	3.0
		SetParameter	Text		Gifts!
FRE		SetParameter	TEXT		Cadeaux!
		GER SetParameter	Text	Geschenke!
		SPA SetParameter	Text	¡Regalos!
		ITA SetParameter	TEXT	Regali!
POL		SetParameter	TEXT		Prezenty




		SendMessage 	CREATETEXT	

	EndIf

	If K BecomesEqualTo 3
	Then
		
		SetParameter	Colour1		0.1	1.0	0.65	1.0
		SetParameter	Colour2		0.1	1.0	0.65	1.0
		SetParameter	Colour3		0.1	1.0	0.65	1.0
		SetParameter	Colour4		0.0	0.0	0.0	1.0
		SetParameter	Colour5		0.0	0.0	0.0	1.0
		SetParameter	Colour6		0.0	0.0	0.0	1.0
		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Lifetime	0.2	0.5	1.5	3.0
		SetParameter	Text		Some_help!
FRE		SetParameter	TEXT		De_l'aide!
		GER SetParameter	Text	Etwas_Hilfe!
		SPA SetParameter	Text	¡Ayuda!
		ITA SetParameter	TEXT	Un_aiuto!
POL		SetParameter	TEXT		Pomoc!




		SendMessage 	CREATETEXT	

	EndIf

EndLoop


EndFile


