counter delivered_rm2 = 0


FORWARD clean_up_red_phone2_m2:


red_phone2_m2:
SET failed_red_phone2_m2 = 0
SET flag_on_mission = 1
SET flag_on_red_mission = 1

POINT_ARROW_AT ( blaow , 115.5 , 214.0 , 2.0 )


WHILE_EXEC ( delivered_rm2 = 0 )

IF ( LOCATE_CHARACTER_ON_FOOT ( p1 , 115.5 , 214.0 , 2.0 , 0.5 , 0.5  ) )
set delivered_rm2 = 1

endif 
endwhile


IF ( ( passed_red_phone2_m2 = 0 )
AND ( delivered_rm2 = 1 ) )  
	DISPLAY_BRIEF ( 3537 ) 
	SET passed_red_phone2_m2	= 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_m2:

IF ( passed_red_phone2_m2 = 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_m2 = 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_m2:

	GOSUB clean_up_red_phone2_m2:

MISSIONEND