counter delivered_rm1 = 0
COUNTER deaded = 0
CHAR_DATA protest_1
CHAR_DATA protest_2
CHAR_DATA protest_3
CHAR_DATA protest_4
CHAR_DATA protest_5
CHAR_DATA protest_6
CHAR_DATA protest_7
CHAR_DATA protest_8
CHAR_DATA protest_9
CHAR_DATA protest_10
CHAR_DATA protest_11
CHAR_DATA protest_12



FORWARD clean_up_red_phone2_m1:


red_phone2_m1:
SET failed_red_phone2_m1 = 0
SET flag_on_mission = 1
SET flag_on_red_mission = 1
set deaded = 0

DISPLAY_MESSAGE ( 3848 ) 
DISPLAY_BRIEF ( 3880 )

protest_1 = CREATE_CHAR ( 96.0 , 95.5 , 1.0 ) 1 90 criminal END
protest_2 = CREATE_CHAR ( 96.5 , 95.5 , 1.0 ) 1 90 criminal END
protest_3 = CREATE_CHAR ( 97.0 , 95.5 , 1.0 ) 1 90 criminal END
protest_4 = CREATE_CHAR ( 97.5 , 95.5 , 1.0 ) 1 90 criminal END
protest_5 = CREATE_CHAR ( 98.0 , 95.5 , 1.0 ) 1 90 criminal END
protest_6 = CREATE_CHAR ( 98.5 , 95.5 , 1.0 ) 1 90 criminal END
protest_7 = CREATE_CHAR ( 99.0 , 95.5 , 1.0 ) 1 90 criminal END
protest_8 = CREATE_CHAR ( 100.0 , 95.5 , 1.0 ) 1 90 criminal END
protest_9 = CREATE_CHAR ( 100.5 , 95.5 , 1.0 ) 1 90 criminal END
protest_10 = CREATE_CHAR ( 101.0 , 95.5 , 1.0 ) 1 90 criminal END
protest_11 = CREATE_CHAR ( 101.5 , 95.5 , 1.0 ) 1 90 criminal END
protest_12 = CREATE_CHAR ( 102.0 , 95.5 , 1.0 ) 1 90 criminal END

SET_CHAR_OBJECTIVE ( protest_1 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_2 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_3 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_4 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_5 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_6 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_7 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_8 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_9 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_10 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_11 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( protest_12 , GUARD_AREA )

SET_CHAR_THREAT_SEARCH ( protest_1 , area )
SET_CHAR_THREAT_SEARCH ( protest_2 , area )
SET_CHAR_THREAT_SEARCH ( protest_3 , area )
SET_CHAR_THREAT_SEARCH ( protest_4 , area )
SET_CHAR_THREAT_SEARCH ( protest_5 , area )
SET_CHAR_THREAT_SEARCH ( protest_6 , area )
SET_CHAR_THREAT_SEARCH ( protest_7 , area )
SET_CHAR_THREAT_SEARCH ( protest_8 , area )
SET_CHAR_THREAT_SEARCH ( protest_9 , area )
SET_CHAR_THREAT_SEARCH ( protest_10 , area )
SET_CHAR_THREAT_SEARCH ( protest_11 , area )
SET_CHAR_THREAT_SEARCH ( protest_12 , area )

SET_CHAR_THREAT_REACTION  ( protest_1 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_2 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_3 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_4 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_5 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_6 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_7 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_8 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_9 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_10 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_11 , NO_REACTION )
SET_CHAR_THREAT_REACTION  ( protest_12 , NO_REACTION )

SET_CHAR_BRAVERY_LEVEL  ( protest_1 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_2 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_3 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_4 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_5 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_6 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_7 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_8 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_9 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_10 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_11 , loony )
SET_CHAR_BRAVERY_LEVEL  ( protest_12 , loony )

POINT_ARROW_AT ( blaow , 99.5 , 95.5 , 1.0 )


WHILE_EXEC ( delivered_rm1 = 0 )

IF   ( HAS_CHARACTER_DIED ( protest_1 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_3 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_5 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_7 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_9 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_10 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_4 ) )
++ deaded
return
endif

IF   ( HAS_CHARACTER_DIED ( protest_12 ) )
++ deaded
return
endif


if ( deaded > 7 )
 
set delivered_rm1 = 1

endif 
endwhile


IF ( ( passed_red_phone2_m1 = 0 )
AND ( delivered_rm1 = 1 ) )  
	DISPLAY_BRIEF ( 3537 ) 
	SET passed_red_phone2_m1	= 1
	++ counter_all_missions_passed
	DISPLAY_MESSAGE ( 3100 ) 
        remove_arrow ( blaow )
	ADD_SCORE ( p1 , 40000 )
	ADD_MULTIPLIER ( p1 , 1 ) 
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE ( gng2 , p1 , 1 )
	CLEAR_WANTED_LEVEL ( p1 )
	
	RETURN
ENDIF




clean_up_red_phone2_m1:

IF ( passed_red_phone2_m1 = 1 )
		++ flag_red_missions_passed
		++ flag_all_missions_passed
                REMOVE_ARROW ( blaow )
		IF ( flag_red_missions_passed = 7 )
			DISPLAY_BRIEF ( 3673 ) 
			DISPLAY_MESSAGE ( 3672 ) 
		ENDIF
	ENDIF

	IF ( failed_red_phone2_m1 = 1 )
		++ flag_red_missions_failed
		++ flag_all_missions_failed
                REMOVE_ARROW ( blaow )
		CHANGE_GANG_CHAR_RESPECT_AND_UPDATE ( gng2 , p1 , -1 ) 
		CLEAR_WANTED_LEVEL ( p1 )
//		CLEAR_ALL_BRIEFS ( )
	ENDIF

	IF ( CHECK_DEATHARREST_EXECUTED ( ) )
		++ flag_red_missions_failed
		++ flag_all_missions_failed
                REMOVE_ARROW ( blaow )
		CHANGE_GANG_CHAR_RESPECT_AND_UPDATE ( gng2 , p1 , -1 ) 
		CLEAR_WANTED_LEVEL ( p1 )
	ENDIF

	MISSION_HAS_FINISHED ( )

	SET flag_on_mission	= 0
	SET flag_on_red_mission = 0
	
	RETURN





MISSIONSTART

	GOSUB red_phone2_m1:

	GOSUB clean_up_red_phone2_m1:

MISSIONEND
