/////////////////////////////////////////////////
// GTA2 SAN ANDREAS CANNON BALL RUN - 2 PLAYER //
/////////////////////////////////////////////////

// directions: 0 = South, 90 = East, 180 = North, 270 = West

// Players

PLAYER_PED p1 = ( 12.9 , 90.5 , 1.0 ) 7 90 // Scientist
PLAYER_PED p2 = ( 14.9 , 90.5 , 1.0 ) 8 90 // Zaibatsu
// PLAYER_PED p3 = ( 16.9 , 90.5 , 1.0 ) 9 90 // Krishna
// PLAYER_PED p4 = ( 12.9 , 92.5 , 1.0 ) 10 90 // Russian

// Arrows
ARROW_DATA arrow1

// Parked Cars
	// Player Cars
PARKED_CAR_DATA p1car = ( 13.5 , 90.5 , 1.0 ) 35 180 MIURA // Yellow Miara
PARKED_CAR_DATA p2car = ( 15.5 , 90.5 , 1.0 ) 2 180 MIURA // Black Miara
//PARKED_CAR_DATA p3car = ( 17.5 , 90.5 , 1.0 ) 24 180 MIURA // Orange Miara
//PARKED_CAR_DATA p4car = ( 13.5 , 92.5 , 1.0 ) 17 180 MIURA // Dark Red Miara

// Respray Shops
OBJ_DATA respray1 = ( 23.9 , 193.5 , 2.0 ) 0 car_shop 2
OBJ_DATA respray2 = ( 211.5 , 244.9 , 2.0 ) 0 car_shop 4
OBJ_DATA respray3 = ( 224.9 , 147.5 , 2.0 ) 0 car_shop 8
OBJ_DATA respray4 = ( 115.9 , 119.5 , 2.0 ) 0 car_shop 16
OBJ_DATA respray5 = ( 59.9 , 58.5 , 3.0 ) 0 car_shop 24

// Onscreen Counters
ONSCREEN_COUNTER tokensleftcounter

// Counters
COUNTER true = 1
COUNTER check = 0
COUNTER tokensleft = 25
COUNTER p1tokens = 0
COUNTER p2tokens = 0
COUNTER p3tokens = 0
COUNTER p4tokens = 0
COUNTER winner = 0

// Declarations
	// Police Level
DECLARE_POLICELEVEL ( 3 ) // max level is: Hard Police (3 heads)

LEVELSTART

////////////////
// START RACE //
////////////////

// Set the shading level of the map
SET_SHADING_LEVEL ( 20 )

// Display how many tokens are left via counter 'tokensleft'
ADD_ONSCREEN_COUNTER ( tokensleftcounter , tokensleft )

// Display message "Race On!", comes with audio!
DISPLAY_MESSAGE ( 5504 )

// Point arrow to first check...
POINT_ARROW_AT ( arrow1 , 65.5 , 9.5 , 5.0 )

ADD_SCORE ( p1 , 5000 )
ADD_SCORE ( p2 , 5000 )

WHILE_EXEC ( true = 1 )

/////////////////
// TOKEN 01... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 65.5 , 9.5 , 5.0 , 2.0 , 2.0 ) ) AND ( check = 0 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 1
	POINT_ARROW_AT ( arrow1 , 79.5 , 116.5 , 2.0 ) // point to check 02...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 65.5 , 9.5 , 5.0 , 2.0 , 2.0 ) ) AND ( check = 0 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 1
	POINT_ARROW_AT ( arrow1 , 79.5 , 116.5 , 2.0 ) // point to check 02...
ENDIF

/////////////////
// TOKEN 02... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 79.5 , 116.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 1 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 2
	POINT_ARROW_AT ( arrow1 , 165.5 , 111.5 , 2.0 ) // point to check 03...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 79.5 , 116.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 1 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 2
	POINT_ARROW_AT ( arrow1 , 165.5 , 111.5 , 2.0 ) // point to check 03...
ENDIF

/////////////////
// TOKEN 03... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 165.5 , 111.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 2 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 3
	POINT_ARROW_AT ( arrow1 , 156.5 , 191.5 , 3.0 ) // point to check 04...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 165.5 , 111.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 2 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 3
	POINT_ARROW_AT ( arrow1 , 156.5 , 191.5 , 3.0 ) // point to check 04...
ENDIF

/////////////////
// TOKEN 04... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 156.5 , 191.5 , 3.0 , 2.0 , 2.0 ) ) AND ( check = 3 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 4
	POINT_ARROW_AT ( arrow1 , 188.5 , 221.5 , 2.0 ) // point to check 05...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 156.5 , 191.5 , 3.0 , 2.0 , 2.0 ) ) AND ( check = 3 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 4
	POINT_ARROW_AT ( arrow1 , 188.5 , 221.5 , 2.0 ) // point to check 05...
ENDIF

/////////////////
// TOKEN 05... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 188.5 , 221.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 4 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 5
	POINT_ARROW_AT ( arrow1 , 251.5 , 251.5 , 2.0 ) // point to check 06...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 188.5 , 221.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 4 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 5
	POINT_ARROW_AT ( arrow1 , 251.5 , 251.5 , 2.0 ) // point to check 06...
ENDIF

/////////////////
// TOKEN 06... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 251.5 , 251.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 5 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 6
	POINT_ARROW_AT ( arrow1 , 102.5 , 248.5 , 2.0 ) // point to check 07...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 251.5 , 251.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 5 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 6
	POINT_ARROW_AT ( arrow1 , 102.5 , 248.5 , 2.0 ) // point to check 07...
ENDIF

/////////////////
// TOKEN 07... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 102.5 , 248.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 6 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 7
	POINT_ARROW_AT ( arrow1 , 29.5 , 225.5 , 2.0 ) // point to check 08...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 102.5 , 248.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 6 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 7
	POINT_ARROW_AT ( arrow1 , 29.5 , 225.5 , 2.0 ) // point to check 08...
ENDIF

/////////////////
// TOKEN 08... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 29.5 , 225.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 7 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 8
	POINT_ARROW_AT ( arrow1 , 22.5 , 246.5 , 2.0 ) // point to check 09...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 29.5 , 225.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 7 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 8
	POINT_ARROW_AT ( arrow1 , 22.5 , 246.5 , 2.0 ) // point to check 09...
ENDIF

/////////////////
// TOKEN 09... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 22.5 , 246.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 8 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 9
	POINT_ARROW_AT ( arrow1 , 71.5 , 201.5 , 2.0 ) // point to check 10...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 22.5 , 246.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 8 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 9
	POINT_ARROW_AT ( arrow1 , 71.5 , 201.5 , 2.0 ) // point to check 10...
ENDIF

/////////////////
// TOKEN 10... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 71.5 , 201.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 9 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 10
	POINT_ARROW_AT ( arrow1 , 62.5 , 151.5 , 2.0 ) // point to check 11...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 71.5 , 201.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 9 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 10
	POINT_ARROW_AT ( arrow1 , 62.5 , 151.5 , 2.0 ) // point to check 11...
ENDIF

/////////////////
// TOKEN 11... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 62.5 , 151.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 10 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 11
	POINT_ARROW_AT ( arrow1 , 38.5 , 117.5 , 2.0 ) // point to check 12...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 62.5 , 151.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 10 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 11
	POINT_ARROW_AT ( arrow1 , 38.5 , 117.5 , 2.0 ) // point to check 12...
ENDIF

/////////////////
// TOKEN 12... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 38.5 , 117.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 11 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 12
	POINT_ARROW_AT ( arrow1 , 130.5 , 147.5 , 2.0 ) // point to check 13...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 38.5 , 117.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 11 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 12
	POINT_ARROW_AT ( arrow1 , 130.5 , 147.5 , 2.0 ) // point to check 13...
ENDIF

/////////////////
// TOKEN 13... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 130.5 , 147.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 12 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 13
	POINT_ARROW_AT ( arrow1 , 206.5 , 150.5 , 2.0 ) // point to check 14...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 130.5 , 147.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 12 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 13
	POINT_ARROW_AT ( arrow1 , 206.5 , 150.5 , 2.0 ) // point to check 14...
ENDIF

/////////////////
// TOKEN 14... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 206.5 , 150.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 13 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 14
	POINT_ARROW_AT ( arrow1 , 244.5 , 134.5 , 2.0 ) // point to check 15...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 206.5 , 150.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 13 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 14
	POINT_ARROW_AT ( arrow1 , 244.5 , 134.5 , 2.0 ) // point to check 15...
ENDIF

/////////////////
// TOKEN 15... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 244.5 , 134.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 14 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 15
	POINT_ARROW_AT ( arrow1 , 139.5 , 63.5 , 2.0 ) // point to check 16...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 244.5 , 134.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 14 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 15
	POINT_ARROW_AT ( arrow1 , 139.5 , 63.5 , 2.0 ) // point to check 16...
ENDIF

/////////////////
// TOKEN 16... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 139.5 , 63.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 15 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 16
	POINT_ARROW_AT ( arrow1 , 100.5 , 40.5 , 4.0 ) // point to check 17...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 139.5 , 63.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 15 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 16
	POINT_ARROW_AT ( arrow1 , 100.5 , 40.5 , 4.0 ) // point to check 17...
ENDIF

/////////////////
// TOKEN 17... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 100.5 , 40.5 , 4.0 , 2.0 , 2.0 ) ) AND ( check = 16 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 17
	POINT_ARROW_AT ( arrow1 , 180.5 , 6.5 , 5.0 ) // point to check 18...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 100.5 , 40.5 , 4.0 , 2.0 , 2.0 ) ) AND ( check = 16 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 17
	POINT_ARROW_AT ( arrow1 , 180.5 , 6.5 , 5.0 ) // point to check 18...
ENDIF

/////////////////
// TOKEN 18... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 180.5 , 6.5 , 5.0 , 2.0 , 2.0 ) ) AND ( check = 17 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 18
	POINT_ARROW_AT ( arrow1 , 184.5 , 89.5 , 1.0 ) // point to check 19...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 180.5 , 6.5 , 5.0 , 2.0 , 2.0 ) ) AND ( check = 17 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 18
	POINT_ARROW_AT ( arrow1 , 184.5 , 89.5 , 1.0 ) // point to check 19...
ENDIF

/////////////////
// TOKEN 19... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 184.5 , 89.5 , 1.0 , 2.0 , 2.0 ) ) AND ( check = 18 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 19
	POINT_ARROW_AT ( arrow1 , 243.5 , 12.5 , 4.0 ) // point to check 20...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 184.5 , 89.5 , 1.0 , 2.0 , 2.0 ) ) AND ( check = 18 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 19
	POINT_ARROW_AT ( arrow1 , 243.5 , 12.5 , 4.0 ) // point to check 20...
ENDIF

/////////////////
// TOKEN 20... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 243.5 , 12.5 , 4.0 , 2.0 , 2.0 ) ) AND ( check = 19 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 20
	POINT_ARROW_AT ( arrow1 , 248.5 , 93.5 , 2.0 ) // point to check 21...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 243.5 , 12.5 , 4.0 , 2.0 , 2.0 ) ) AND ( check = 19 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 20
	POINT_ARROW_AT ( arrow1 , 248.5 , 93.5 , 2.0 ) // point to check 21...
ENDIF

/////////////////
// TOKEN 21... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 248.5 , 93.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 20 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 21
	POINT_ARROW_AT ( arrow1 , 143.5 , 222.5 , 3.0 ) // point to check 22...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 248.5 , 93.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 20 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 21
	POINT_ARROW_AT ( arrow1 , 143.5 , 222.5 , 3.0 ) // point to check 22...
ENDIF

/////////////////
// TOKEN 22... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 143.5 , 222.5 , 3.0 , 2.0 , 2.0 ) ) AND ( check = 21 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 22
	POINT_ARROW_AT ( arrow1 , 119.5 , 110.5 , 2.0 ) // point to check 23...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 143.5 , 222.5 , 3.0 , 2.0 , 2.0 ) ) AND ( check = 21 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 22
	POINT_ARROW_AT ( arrow1 , 119.5 , 110.5 , 2.0 ) // point to check 23...
ENDIF

/////////////////
// TOKEN 23... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 119.5 , 110.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 22 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 23
	POINT_ARROW_AT ( arrow1 , 65.5 , 58.5 , 3.0 ) // point to check 24...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 119.5 , 110.5 , 2.0 , 2.0 , 2.0 ) ) AND ( check = 22 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 23
	POINT_ARROW_AT ( arrow1 , 65.5 , 58.5 , 3.0 ) // point to check 24...
ENDIF

/////////////////
// TOKEN 24... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 65.5 , 58.5 , 3.0 , 2.0 , 2.0 ) ) AND ( check = 23 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	SET check = 24
	POINT_ARROW_AT ( arrow1 , 20.5 , 91.5 , 1.0 ) // point to check 25...
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 65.5 , 58.5 , 3.0 , 2.0 , 2.0 ) ) AND ( check = 23 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	SET check = 24
	POINT_ARROW_AT ( arrow1 , 20.5 , 91.5 , 1.0 ) // point to check 25...
ENDIF

/////////////////
// TOKEN 25... //
/////////////////

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 20.5 , 91.5 , 1.0 , 2.0 , 2.0 ) ) AND ( check = 24 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p1tokens
	DISPLAY_MESSAGE ( 5501 )
	SET check = 25
ENDIF

IF ( ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 20.5 , 91.5 , 1.0 , 2.0 , 2.0 ) ) AND ( check = 24 ) )
	REMOVE_ARROW ( arrow1 )
	-- tokensleft
	++ p2tokens
	DISPLAY_MESSAGE ( 5501 )
	SET check = 25
ENDIF

////////////////////////////////////////
// WORK OUT WINNER WHEN 0 TOKENS LEFT //
////////////////////////////////////////

IF ( ( ( ( ( p1tokens > p2tokens )
AND ( p1tokens > p3tokens ) )
AND ( p1tokens > p4tokens ) )
AND ( winner = 0 ) )
AND ( tokensleft = 0 ) )
ADD_SCORE ( p1 , 500000 )
SET winner = 1
ENDIF

IF ( ( ( ( ( p2tokens > p1tokens )
AND ( p2tokens > p3tokens ) )
AND ( p2tokens > p4tokens ) )
AND ( winner = 0 ) )
AND ( tokensleft = 0 ) )
ADD_SCORE ( p2 , 500000 )
SET winner = 1
ENDIF

ENDWHILE

/////////////////
// END OF CODE //
/////////////////

LEVELEND