{
  IF ( INT_GAME_TURN == 0 )
  {
    SET $0                                     0
    DO SET_ATTACK_VARIABLE                     $0
    DO STATE_CONSTRUCT_BUILDING                ON
    DO STATE_FETCH_WOOD                        ON
    SET INT_ATTR_ATTACK_PERCENTAGE             130
    SET INT_ATTR_PREF_SPY_TRAINS               1
    SET INT_ATTR_PREF_RELIGIOUS_TRAINS         1
    SET INT_ATTR_PREF_WARRIOR_TRAINS           2
    SET INT_ATTR_PREF_FIREWARRIOR_TRAINS       1
    SET INT_ATTR_PREF_BOAT_HUTS                1
    SET INT_ATTR_PREF_BALLOON_HUTS             0
    SET INT_ATTR_MAX_BUILDINGS_ON_GO           3
    SET INT_ATTR_HOUSE_PERCENTAGE              95
    DO SET_DRUM_TOWER_POS                      86 106
    DO STATE_SHAMAN_GET_WILDS                  OFF
    SET INT_ATTR_EXPANSION                     35
    DO STATE_HOUSE_A_PERSON                    ON
    DO STATE_STATE_BRING_NEW_PEOPLE_BACK       ON
    DO STATE_POPULATE_DRUM_TOWER               ON
    DO STATE_DEFEND                            ON
    DO STATE_DEFEND_BASE                       ON
    DO STATE_FIREWARRIOR_DEFEND                ON
    SET INT_ATTR_DEFENSE_RAD_INCR              5
    SET INT_ATTR_MAX_DEFENSIVE_ACTIONS         3
    SET INT_ATTR_USE_PREACHER_FOR_DEFENCE      1
    DO STATE_PREACH                            ON
    SET INT_ATTR_SHAMEN_BLAST                  32
    SET INT_ATTR_SPY_CHECK_FREQUENCY           64
    SET INT_ATTR_SPY_DISCOVER_CHANCE           50
    SET INT_ATTR_ENEMY_SPY_MAX_STAND           128
    DO STATE_FETCH_LOST_PEOPLE                 ON
    DO STATE_FETCH_LOST_VEHICLE                OFF
    DO STATE_FETCH_FAR_VEHICLE                 ON
    DO STATE_TRAIN_PEOPLE                      ON
    SET INT_ATTR_PREF_SPY_PEOPLE               2
    SET INT_ATTR_PREF_RELIGIOUS_PEOPLE         20
    SET INT_ATTR_PREF_WARRIOR_PEOPLE           33
    SET INT_ATTR_PREF_FIREWARRIOR_PEOPLE       30
    DO STATE_BUILD_VEHICLE                     ON
    SET INT_ATTR_PEOPLE_PER_BOAT               7
    SET INT_ATTR_PREF_BOAT_DRIVERS             8
    SET INT_ATTR_MAX_TRAIN_AT_ONCE             1
    SET INT_ATTR_GROUP_OPTION                  0
    DO STATE_AUTO_ATTACK                       ON
    SET INT_ATTR_COUNT_PREACH_DAMAGE           1
    SET INT_ATTR_MAX_ATTACKS                   3
    SET INT_ATTR_AWAY_BRAVE                    0
    SET INT_ATTR_AWAY_WARRIOR                  50
    SET INT_ATTR_AWAY_RELIGIOUS                20
    SET INT_ATTR_AWAY_SPY                      0
    SET INT_ATTR_AWAY_FIREWARRIOR              30
    SET INT_ATTR_AWAY_SHAMAN                   100
    SET INT_ATTR_RETREAT_VALUE                 20
    DO SET_MARKER_ENTRY                        1 1 2 0 7 3 1
    DO SET_MARKER_ENTRY                        2 3 4 0 7 3 0
    DO SET_MARKER_ENTRY                        3 15 16 0 8 5 1
    DO SET_MARKER_ENTRY                        4 17 18 0 8 5 1
    DO SET_MARKER_ENTRY                        5 19 20 0 8 5 1
    DO SET_MARKER_ENTRY                        6 21 22 0 4 2 0
    DO SET_MARKER_ENTRY                        7 23 24 0 4 2 0
    DO SET_MARKER_ENTRY                        8 22 23 0 3 2 0
    DO SET_MARKER_ENTRY                        9 21 27 0 3 2 0
    SET $1                                     0
    SET $2                                     0
    SET $3                                     0
    SET $4                                     0
    SET $5                                     0
    SET $6                                     0
    SET $7                                     0
    SET $8                                     0
    SET $9                                     0
    SET $10                                    0
    SET $11                                    0
    SET $12                                    0
    SET $13                                    0
    SET $14                                    1
    SET $15                                    0
    SET $16                                    0
    SET $17                                    0
    DO MARKER_ENTRIES                          1 -1 -1 -1
    DO CREATE_MSG_NARRATIVE                    5
    DO SET_MSG_AUTO_OPEN_DLG
  }
  ELSE
  {
    EVERY 64
    {
      IF ( INT_MY_NUM_PEOPLE < 8 && INT_MY_NUM_KILLED_BY_HUMAN > 10 )
      {
        IF ( INT_M_BUILDING_MEDIUM_HUT < 1 && INT_M_BUILDING_LARGE_HUT < 1 )
        {
          IF ( INT_M_BUILDING_SMALL_HUT < 1 )
          {
            DO GIVE_UP_AND_SULK                    ON
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 256 133
    {
      IF ( INT_GAME_TURN > 24000 && $15 == 0 )
      {
        DO GET_HEAD_TRIGGER_COUNT 64 182 $14
        IF ( $14 == 1 && INT_MY_NUM_PEOPLE > 35 )
        {
          SET INT_ATTR_AWAY_BRAVE                 0
          SET INT_ATTR_AWAY_WARRIOR               0
          SET INT_ATTR_AWAY_RELIGIOUS             0
          SET INT_ATTR_AWAY_SPY                   0
          SET INT_ATTR_AWAY_FIREWARRIOR           0
          SET INT_ATTR_AWAY_SHAMAN                100
          DO PRAY_AT_HEAD                         6 72
          SET INT_ATTR_AWAY_BRAVE                 0
          SET INT_ATTR_AWAY_WARRIOR               50
          SET INT_ATTR_AWAY_RELIGIOUS             20
          SET INT_ATTR_AWAY_SPY                   0
          SET INT_ATTR_AWAY_FIREWARRIOR           30
          SET INT_ATTR_AWAY_SHAMAN                100
        }
        ELSE
        {
          DO GET_NUM_ONE_OFF_SPELLS 1 INT_WRATH_OF_GOD $16
          IF ( $16 > 0 )
          {
            DO SPELL_ATTACK INT_WRATH_OF_GOD 73 0
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $15 == 0 )
      {
        DO GET_SPELLS_CAST RED INT_WRATH_OF_GOD $17
        IF ( $17 > 0 )
        {
          SET $15                                 1
        }
        ENDIF
      }
      ENDIF
      IF ( INT_GAME_TURN > 400 && $13 == 0 )
      {
        DO TRIGGER_THING                         70
        SET $13                                  1
      }
      ENDIF
      IF ( INT_MY_NUM_PEOPLE < 73 )
      {
        DO SET_BUCKET_USAGE                      ON
        DO SET_BUCKET_COUNT_FOR_SPELL INT_BLAST                 8
        DO SET_BUCKET_COUNT_FOR_SPELL INT_CONVERT               8
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWARM                 32
        DO SET_BUCKET_COUNT_FOR_SPELL INT_INVISIBILITY          40
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SHIELD                48
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LAND_BRIDGE           66
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LIGHTNING             64
        DO SET_BUCKET_COUNT_FOR_SPELL INT_HYPNOTISM             70
        DO SET_BUCKET_COUNT_FOR_SPELL INT_TORNADO               72
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWAMP                 80
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FLATTEN               100
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EARTHQUAKE            140
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EROSION               168
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FIRESTORM             320
        DO SET_BUCKET_COUNT_FOR_SPELL INT_ANGEL_OF_DEATH        408
        DO SET_BUCKET_COUNT_FOR_SPELL INT_VOLCANO               640
      }
      ELSE
      {
        DO SET_BUCKET_USAGE                      ON
        DO SET_BUCKET_COUNT_FOR_SPELL INT_BLAST                 4
        DO SET_BUCKET_COUNT_FOR_SPELL INT_CONVERT               4
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWARM                 16
        DO SET_BUCKET_COUNT_FOR_SPELL INT_INVISIBILITY          20
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SHIELD                24
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LAND_BRIDGE           33
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LIGHTNING             32
        DO SET_BUCKET_COUNT_FOR_SPELL INT_HYPNOTISM             35
        DO SET_BUCKET_COUNT_FOR_SPELL INT_TORNADO               36
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWAMP                 40
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FLATTEN               50
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EARTHQUAKE            70
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EROSION               84
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FIRESTORM             180
        DO SET_BUCKET_COUNT_FOR_SPELL INT_ANGEL_OF_DEATH        204
        DO SET_BUCKET_COUNT_FOR_SPELL INT_VOLCANO               320
      }
      ENDIF
    }
    EVERY 2048 576
    {
      IF ( $2 == 0 )
      {
        DO MARKER_ENTRIES                        1 2 -1 -1
        DO PREACH_AT_MARKER                      5
      }
      ENDIF
    }
    EVERY 2048 64
    {
      IF ( INT_MY_NUM_KILLED_BY_BLUE > 9 && $2 == 0 )
      {
        SET $2                                   1
      }
      ENDIF
      IF ( $2 == 1 )
      {
        DO ATTACK BLUE 10 ATTACK_BUILDING INT_FIREWARRIOR_TRAIN 30 INT_LIGHTNING INT_LIGHTNING INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
        DO VEHICLE_PATROL 4 8 9 8 10 BOAT_TYPE
        SET INT_ATTR_AWAY_WARRIOR                0
        SET INT_ATTR_AWAY_RELIGIOUS              70
        SET INT_ATTR_AWAY_SPY                    40
        SET INT_ATTR_AWAY_FIREWARRIOR            0
        SET INT_ATTR_AWAY_SHAMAN                 0
        DO ATTACK BLUE 3 ATTACK_BUILDING INT_NO_SPECIFIC_BUILDING 20 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_BY_BOAT 1 9 -1 -1
        SET INT_ATTR_AWAY_WARRIOR                50
        SET INT_ATTR_AWAY_RELIGIOUS              20
        SET INT_ATTR_AWAY_SPY                    0
        SET INT_ATTR_AWAY_FIREWARRIOR            30
        SET INT_ATTR_AWAY_SHAMAN                 100
        SET $2                                   2
      }
      ELSE
      {
        IF ( $2 == 2 )
        {
          DO ATTACK BLUE 12 ATTACK_BUILDING INT_DRUM_TOWER 25 INT_HYPNOTISM INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
          SET INT_ATTR_AWAY_WARRIOR               0
          SET INT_ATTR_AWAY_RELIGIOUS             0
          SET INT_ATTR_AWAY_SPY                   100
          SET INT_ATTR_AWAY_FIREWARRIOR           0
          SET INT_ATTR_AWAY_SHAMAN                0
          DO ATTACK BLUE 3 ATTACK_BUILDING INT_NO_SPECIFIC_BUILDING 20 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_BY_BOAT 1 11 -1 -1
          SET INT_ATTR_AWAY_WARRIOR               50
          SET INT_ATTR_AWAY_RELIGIOUS             20
          SET INT_ATTR_AWAY_SPY                   0
          SET INT_ATTR_AWAY_FIREWARRIOR           30
          SET INT_ATTR_AWAY_SHAMAN                100
          SET $2                                  3
        }
        ELSE
        {
          IF ( $2 == 3 )
          {
            DO ATTACK BLUE 12 ATTACK_BUILDING INT_DRUM_TOWER 25 INT_LIGHTNING INT_LIGHTNING INT_LIGHTNING ATTACK_BY_BOAT 1 12 -1 -1
            SET INT_ATTR_AWAY_SHAMAN               0
            DO ATTACK BLUE 6 ATTACK_BUILDING INT_NO_SPECIFIC_BUILDING 20 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
            SET INT_ATTR_AWAY_SHAMAN               100
            SET $2                                 4
          }
          ELSE
          {
            IF ( $2 == 4 )
            {
              IF ( $7 == 0 )
              {
                DO ATTACK BLUE 12 ATTACK_PERSON INT_TARGET_SHAMAN 12 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
                SET $2                               5
              }
              ELSE
              {
                DO COUNT_PEOPLE_IN_MARKER BLUE 30 10 $8
                DO GET_HEIGHT_AT_POS                 13 $9
                DO GET_HEIGHT_AT_POS                 14 $10
                IF ( $8 > 3 )
                {
                  IF ( $9 != 0 && $10 != 0 )
                  {
                    SET $7                             2
                  }
                  ELSE
                  {
                    SET $7                             1
                  }
                  ENDIF
                }
                ENDIF
                IF ( $7 == 1 )
                {
                  DO ATTACK BLUE 12 ATTACK_BUILDING INT_DRUM_TOWER 25 INT_LAND_BRIDGE INT_LIGHTNING INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 28 29 0
                }
                ELSE
                {
                  DO ATTACK BLUE 12 ATTACK_BUILDING INT_DRUM_TOWER 25 INT_LIGHTNING INT_EROSION INT_LIGHTNING ATTACK_NORMAL 0 14 -1 -1
                }
                ENDIF
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $2 == 5 )
      {
        IF ( INT_M_PERSON_WARRIOR > 50 && INT_M_PERSON_FIREWARRIOR > 40 )
        {
          IF ( INT_BLUE_PEOPLE < 30 && INT_YELLOW_PEOPLE < 1 )
          {
            DO ATTACK BLUE 50 ATTACK_BUILDING INT_TEMPLE 999 INT_LIGHTNING INT_LIGHTNING INT_LIGHTNING ATTACK_NORMAL 0 -1 -1 -1
          }
          ELSE
          {
            DO ATTACK BLUE 20 ATTACK_PERSON INT_TARGET_SHAMAN 12 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
          }
          ENDIF
        }
        ELSE
        {
          IF ( INT_M_PERSON_WARRIOR > 42 && INT_M_PERSON_FIREWARRIOR > 35 )
          {
            IF ( $11 == 0 && $12 == 1 )
            {
              DO ATTACK BLUE 20 ATTACK_PERSON INT_TARGET_SHAMAN 35 INT_LIGHTNING INT_HYPNOTISM INT_HYPNOTISM ATTACK_NORMAL 0 29 -1 -1
            }
            ELSE
            {
              DO ATTACK BLUE 20 ATTACK_PERSON INT_TARGET_SHAMAN 35 INT_LIGHTNING INT_HYPNOTISM INT_LIGHTNING ATTACK_NORMAL 0 -1 -1 -1
            }
            ENDIF
          }
          ELSE
          {
            IF ( INT_M_PERSON_WARRIOR > 35 && INT_M_PERSON_FIREWARRIOR > 33 )
            {
              DO ATTACK BLUE 6 ATTACK_BUILDING INT_WARRIOR_TRAIN 24 INT_INVISIBILITY INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
              SET INT_ATTR_AWAY_WARRIOR             0
              SET INT_ATTR_AWAY_RELIGIOUS           0
              SET INT_ATTR_AWAY_SPY                 100
              SET INT_ATTR_AWAY_FIREWARRIOR         0
              SET INT_ATTR_AWAY_SHAMAN              0
              DO ATTACK BLUE 2 ATTACK_BUILDING INT_TEMPLE 1 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_BY_BOAT 0 9 -1 -1
              SET INT_ATTR_AWAY_WARRIOR             50
              SET INT_ATTR_AWAY_RELIGIOUS           20
              SET INT_ATTR_AWAY_SPY                 0
              SET INT_ATTR_AWAY_FIREWARRIOR         30
              SET INT_ATTR_AWAY_SHAMAN              100
            }
            ELSE
            {
              IF ( INT_M_PERSON_WARRIOR > 30 && INT_M_PERSON_FIREWARRIOR > 30 )
              {
                DO ATTACK BLUE 5 ATTACK_BUILDING INT_TEMPLE 1 INT_LIGHTNING INT_LIGHTNING INT_BLAST ATTACK_BY_BOAT 1 12 -1 -1
                SET INT_ATTR_AWAY_WARRIOR            0
                SET INT_ATTR_AWAY_RELIGIOUS          50
                SET INT_ATTR_AWAY_SPY                50
                SET INT_ATTR_AWAY_FIREWARRIOR        0
                SET INT_ATTR_AWAY_SHAMAN             0
                DO ATTACK BLUE 2 ATTACK_BUILDING INT_WARRIOR_TRAIN 1 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_BY_BOAT 1 9 -1 -1
                SET INT_ATTR_AWAY_WARRIOR            0
                SET INT_ATTR_AWAY_RELIGIOUS          0
                SET INT_ATTR_AWAY_SPY                100
                SET INT_ATTR_AWAY_FIREWARRIOR        0
                SET INT_ATTR_AWAY_SHAMAN             0
                DO ATTACK BLUE 1 ATTACK_BUILDING INT_TEMPLE 1 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 17 -1 -1
                SET INT_ATTR_AWAY_WARRIOR            50
                SET INT_ATTR_AWAY_RELIGIOUS          20
                SET INT_ATTR_AWAY_SPY                0
                SET INT_ATTR_AWAY_FIREWARRIOR        30
                SET INT_ATTR_AWAY_SHAMAN             100
              }
              ELSE
              {
                IF ( INT_M_PERSON_FIREWARRIOR > 30 && INT_M_VEHICLE_BOAT > 0 )
                {
                  DO VEHICLE_PATROL 3 8 9 8 10 BOAT_TYPE
                  SET INT_ATTR_AWAY_WARRIOR           0
                  SET INT_ATTR_AWAY_RELIGIOUS         0
                  SET INT_ATTR_AWAY_SPY               100
                  SET INT_ATTR_AWAY_FIREWARRIOR       0
                  SET INT_ATTR_AWAY_SHAMAN            0
                  DO ATTACK BLUE 1 ATTACK_BUILDING INT_LARGE_HUT 999 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_BY_BOAT 1 8 -1 -1
                  SET INT_ATTR_AWAY_WARRIOR           50
                  SET INT_ATTR_AWAY_RELIGIOUS         20
                  SET INT_ATTR_AWAY_SPY               0
                  SET INT_ATTR_AWAY_FIREWARRIOR       30
                  SET INT_ATTR_AWAY_SHAMAN            100
                }
                ENDIF
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 1024 96
    {
      IF ( $5 < 4 )
      {
        DO COUNT_PEOPLE_IN_MARKER RED 7 5 $6
        IF ( $6 == 0 )
        {
          INCREMENT $5 1
        }
        ELSE
        {
          IF ( $6 > 5 )
          {
            SET $5                                 0
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 8192 32
    {
      IF ( $2 == 5 && $11 == 0 )
      {
        DO COUNT_PEOPLE_IN_MARKER BLUE 30 10 $8
        DO GET_HEIGHT_AT_POS                     13 $9
        DO GET_HEIGHT_AT_POS                     14 $10
        IF ( $9 != 0 && $10 != 0 )
        {
          DO SPELL_ATTACK INT_SWAMP 14 0
          SET $11                                 1
        }
        ENDIF
        IF ( $8 > 5 )
        {
          IF ( $9 != 0 && $10 != 0 )
          {
            SET $12                                1
          }
          ELSE
          {
            SET $12                                0
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 256
    {
      IF ( $3 == 0 )
      {
        IF ( $5 < 4 )
        {
          DO PUT_PERSON_IN_DT INT_FIREWARRIOR 64 204
          DO PUT_PERSON_IN_DT INT_FIREWARRIOR 52 198
          DO PUT_PERSON_IN_DT INT_RELIGIOUS 60 198
          DO PREACH_AT_MARKER                     15
          DO PREACH_AT_MARKER                     16
          DO MARKER_ENTRIES                       3 -1 -1 -1
          SET $3                                  1
        }
        ELSE
        {
          DO PUT_PERSON_IN_DT INT_FIREWARRIOR 70 170
          DO PUT_PERSON_IN_DT INT_FIREWARRIOR 60 166
          DO PUT_PERSON_IN_DT INT_RELIGIOUS 66 166
          DO PREACH_AT_MARKER                     17
          DO PREACH_AT_MARKER                     18
          DO MARKER_ENTRIES                       4 -1 -1 -1
          SET $3                                  1
        }
        ENDIF
      }
      ELSE
      {
        IF ( $3 == 1 )
        {
          DO PUT_PERSON_IN_DT INT_FIREWARRIOR 110 178
          DO PUT_PERSON_IN_DT INT_FIREWARRIOR 100 188
          DO PUT_PERSON_IN_DT INT_RELIGIOUS 90 174
          DO PREACH_AT_MARKER                     19
          DO PREACH_AT_MARKER                     20
          DO MARKER_ENTRIES                       5 -1 -1 -1
          SET $3                                  2
        }
        ELSE
        {
          IF ( $3 == 2 )
          {
            DO PUT_PERSON_IN_DT INT_FIREWARRIOR 142 128
            DO PUT_PERSON_IN_DT INT_FIREWARRIOR 142 122
            DO PREACH_AT_MARKER                    21
            DO PREACH_AT_MARKER                    22
            DO MARKER_ENTRIES                      6 -1 -1 -1
            SET $3                                 3
          }
          ELSE
          {
            IF ( $3 == 3 )
            {
              DO PUT_PERSON_IN_DT INT_FIREWARRIOR 78 88
              DO PUT_PERSON_IN_DT INT_FIREWARRIOR 70 88
              DO PREACH_AT_MARKER                   23
              DO PREACH_AT_MARKER                   24
              DO MARKER_ENTRIES                     7 -1 -1 -1
              SET $3                                4
            }
            ELSE
            {
              IF ( $3 == 4 )
              {
                DO PUT_PERSON_IN_DT INT_FIREWARRIOR 78 118
                DO PUT_PERSON_IN_DT INT_FIREWARRIOR 86 132
                DO PUT_PERSON_IN_DT INT_FIREWARRIOR 88 144
                DO PREACH_AT_MARKER                  25
                DO MARKER_ENTRIES                    8 -1 -1 -1
                SET $3                               5
              }
              ELSE
              {
                IF ( $3 == 5 )
                {
                  DO PUT_PERSON_IN_DT INT_FIREWARRIOR 96 90
                  DO PUT_PERSON_IN_DT INT_FIREWARRIOR 106 104
                  DO PUT_PERSON_IN_DT INT_FIREWARRIOR 120 118
                  DO PREACH_AT_MARKER                 26
                  DO MARKER_ENTRIES                   9 -1 -1 -1
                  SET $3                              0
                }
                ENDIF
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 128 30
    {
      IF ( INT_M_PERSON_BRAVE > 40 && INT_M_PERSON_WARRIOR < 30 )
      {
        DO TRAIN_PEOPLE_NOW 10 INT_WARRIOR
      }
      ENDIF
      IF ( INT_M_PERSON_BRAVE > 40 && INT_M_PERSON_RELIGIOUS < 15 )
      {
        DO TRAIN_PEOPLE_NOW 5 INT_RELIGIOUS
      }
      ENDIF
      IF ( INT_M_PERSON_BRAVE > 40 && INT_M_PERSON_FIREWARRIOR < 30 )
      {
        DO TRAIN_PEOPLE_NOW 10 INT_FIREWARRIOR
      }
      ENDIF
    }
  }
  ENDIF
}
SCRIPT_END
