{
    "DECISION_1-4" = {
        ENTER = ("rollD: 8"); 
        "ROLL_1" = ("setStateTo: HEAD_FOR_PATROLPOINT_1"); 
        "ROLL_2" = ("setStateTo: HEAD_FOR_PATROLPOINT_2"); 
        "ROLL_3" = ("setStateTo: HEAD_FOR_PATROLPOINT_3"); 
        "ROLL_4" = ("setStateTo: HEAD_FOR_PATROLPOINT_4"); 
        "ROLL_5" = ("setStateTo: HEAD_FOR_PATROLPOINT_5"); 
        "ROLL_6" = ("setStateTo: HEAD_FOR_PATROLPOINT_6"); 
        "ROLL_7" = ("setStateTo: HEAD_FOR_PATROLPOINT_7"); 
        "ROLL_8" = ("setStateTo: HEAD_FOR_PATROLPOINT_8"); 
    }; 
    "DECISION_5-8" = {
        ENTER = ("rollD: 12"); 
        "ROLL_1" = ("setStateTo: HEAD_FOR_PATROLPOINT_1"); 
        "ROLL_10" = ("setStateTo: HEAD_FOR_PATROLPOINT_10"); 
        "ROLL_11" = ("setStateTo: HEAD_FOR_PATROLPOINT_11"); 
        "ROLL_12" = ("setStateTo: HEAD_FOR_PATROLPOINT_12"); 
        "ROLL_2" = ("setStateTo: HEAD_FOR_PATROLPOINT_2"); 
        "ROLL_3" = ("setStateTo: HEAD_FOR_PATROLPOINT_3"); 
        "ROLL_4" = ("setStateTo: HEAD_FOR_PATROLPOINT_4"); 
        "ROLL_5" = ("setStateTo: HEAD_FOR_PATROLPOINT_5"); 
        "ROLL_6" = ("setStateTo: HEAD_FOR_PATROLPOINT_6"); 
        "ROLL_7" = ("setStateTo: HEAD_FOR_PATROLPOINT_7"); 
        "ROLL_8" = ("setStateTo: HEAD_FOR_PATROLPOINT_8"); 
        "ROLL_9" = ("setStateTo: HEAD_FOR_PATROLPOINT_9"); 
    }; 
    "DECISION_9-12" = {
        ENTER = ("rollD: 8"); 
        "ROLL_1" = ("setStateTo: HEAD_FOR_PATROLPOINT_5"); 
        "ROLL_2" = ("setStateTo: HEAD_FOR_PATROLPOINT_6"); 
        "ROLL_3" = ("setStateTo: HEAD_FOR_PATROLPOINT_7"); 
        "ROLL_4" = ("setStateTo: HEAD_FOR_PATROLPOINT_8"); 
        "ROLL_5" = ("setStateTo: HEAD_FOR_PATROLPOINT_9"); 
        "ROLL_6" = ("setStateTo: HEAD_FOR_PATROLPOINT_10"); 
        "ROLL_7" = ("setStateTo: HEAD_FOR_PATROLPOINT_11"); 
        "ROLL_8" = ("setStateTo: HEAD_FOR_PATROLPOINT_12"); 
    }; 
    GLOBAL = {ENTER = (switchLightsOff, "setStateTo: DECISION_5-8"); }; 
    "HEAD_FOR_PATROLPOINT_1" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_1-4"); 
        ENTER = ("setCoordinates: abs -445530 1923420 317978"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_10" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_9-12"); 
        ENTER = ("setCoordinates: abs -475060 1927221 383656"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_11" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_9-12"); 
        ENTER = ("setCoordinates: abs -460430 1950410 376711"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_12" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_9-12"); 
        ENTER = ("setCoordinates: abs -451223 1912007 383073"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_2" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_1-4"); 
        ENTER = ("setCoordinates: abs -483997 1915445 325505"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_3" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_1-4"); 
        ENTER = ("setCoordinates: abs -469367 1938634 318561"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_4" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_1-4"); 
        ENTER = ("setCoordinates: abs -460160 1900231 324923"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_5" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_5-8"); 
        ENTER = ("setCoordinates: abs -441061 1929308 347054"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_6" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_5-8"); 
        ENTER = ("setCoordinates: abs -479529 1921333 354581"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_7" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_5-8"); 
        ENTER = ("setCoordinates: abs -464898 1944522 347636"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_8" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_5-8"); 
        ENTER = ("setCoordinates: abs -455692 1906119 353998"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
    "HEAD_FOR_PATROLPOINT_9" = {
        "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, deployEscorts, "sendScriptMessage: groupAttackTarget"); 
        "APPROACH_COORDINATES" = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination
        ); 
        "ATTACKED_BY_HOSTILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination); 
        "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECISION_9-12"); 
        ENTER = ("setCoordinates: abs -436593 1935196 376129"); 
        "GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
        "INCOMING_HOSTILE_MISSILE" = (setTargetToPrimaryAggressor, "sendScriptMessage: groupAttackTarget"); 
        "INCOMING_MISSILE" = (fightOrFleeMissile); 
        "NOTHING_FOUND" = (scanForHostiles); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "sendScriptMessage: checkOffender"); 
        "TARGET_FOUND" = (setTargetToFoundTarget, "sendScriptMessage: groupAttackTarget"); 
        UPDATE = (
            setDestinationFromCoordinates, 
            "setDesiredRangeTo: 1000", 
            checkCourseToDestination, 
            scanForOffenders, 
            "pauseAI: 5.0"
        ); 
        "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist"); 
    }; 
}