{
  IF ( INT_GAME_TURN == 0 )
  {
    SET $0                                     0
    DO SET_DRUM_TOWER_POS                      122 80
    DO SET_ATTACK_VARIABLE                     $0
    DO STATE_CONSTRUCT_BUILDING                ON
    DO STATE_FETCH_WOOD                        ON
    SET INT_ATTR_ATTACK_PERCENTAGE             20
    SET INT_ATTR_PREF_SPY_TRAINS               0
    SET INT_ATTR_PREF_RELIGIOUS_TRAINS         0
    SET INT_ATTR_PREF_WARRIOR_TRAINS           0
    SET INT_ATTR_PREF_FIREWARRIOR_TRAINS       0
    SET INT_ATTR_PREF_BOAT_HUTS                0
    SET INT_ATTR_PREF_BALLOON_HUTS             0
    SET INT_ATTR_MAX_BUILDINGS_ON_GO           4
    SET INT_ATTR_HOUSE_PERCENTAGE              20
    DO STATE_SHAMAN_GET_WILDS                  ON
    SET INT_ATTR_EXPANSION                     20
    DO STATE_HOUSE_A_PERSON                    ON
    DO STATE_STATE_BRING_NEW_PEOPLE_BACK       ON
    DO STATE_POPULATE_DRUM_TOWER               ON
    DO SET_BASE_MARKER                         33
    DO SET_BASE_RADIUS                         16
    DO STATE_DEFEND                            ON
    DO STATE_FIREWARRIOR_DEFEND                ON
    DO STATE_DEFEND_BASE                       ON
    SET INT_ATTR_DEFENSE_RAD_INCR              2
    SET INT_ATTR_MAX_DEFENSIVE_ACTIONS         1
    SET INT_ATTR_USE_PREACHER_FOR_DEFENCE      1
    DO STATE_PREACH                            ON
    SET INT_ATTR_SHAMEN_BLAST                  64
    SET INT_ATTR_SPY_CHECK_FREQUENCY           128
    SET INT_ATTR_SPY_DISCOVER_CHANCE           50
    SET INT_ATTR_ENEMY_SPY_MAX_STAND           128
    SET INT_ATTR_RETREAT_VALUE                 20
    SET INT_ATTR_RANDOM_BUILD_SIDE             0
    DO STATE_TRAIN_PEOPLE                      ON
    SET INT_ATTR_PREF_SPY_PEOPLE               0
    SET INT_ATTR_PREF_RELIGIOUS_PEOPLE         20
    SET INT_ATTR_PREF_WARRIOR_PEOPLE           20
    SET INT_ATTR_PREF_FIREWARRIOR_PEOPLE       0
    SET INT_ATTR_MAX_TRAIN_AT_ONCE             1
    SET INT_ATTR_GROUP_OPTION                  2
    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                  0
    SET INT_ATTR_AWAY_RELIGIOUS                100
    SET INT_ATTR_AWAY_SPY                      0
    SET INT_ATTR_AWAY_FIREWARRIOR              0
    SET INT_ATTR_AWAY_SHAMAN                   100
    SET INT_ATTR_BASE_UNDER_ATTACK_RETREAT     1
    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                                    0
    SET $15                                    0
    SET $16                                    0
    SET $17                                    0
    SET $18                                    0
    SET $19                                    0
    SET $20                                    0
    SET $21                                    0
    SET $22                                    0
    SET $23                                    0
    SET $24                                    0
    SET $25                                    0
    SET $26                                    0
    SET $27                                    0
    SET $28                                    0
    SET $29                                    0
    SET $30                                    1
    SET $31                                    0
    DO CREATE_MSG_NARRATIVE                    50
    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_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 256
    {
      IF ( INT_M_BUILDING_TEMPLE < 1 )
      {
        DO COUNT_PEOPLE_IN_MARKER BLUE 40 10 $23
        DO COUNT_PEOPLE_IN_MARKER BLUE 41 10 $24
        INCREMENT $23 $24
        IF ( $23 > 0 )
        {
          SET INT_ATTR_PREF_RELIGIOUS_TRAINS      1
        }
        ENDIF
        DO PARTIAL_BUILDING_COUNT
        SET $25                                  INT_B_BUILDING_WARRIOR_TRAIN
        DO PARTIAL_BUILDING_COUNT
        INCREMENT $25 INT_B_BUILDING_TEMPLE
        IF ( $25 > 0 )
        {
          SET INT_ATTR_PREF_RELIGIOUS_TRAINS      1
        }
        ENDIF
      }
      ENDIF
      IF ( INT_M_BUILDING_MEDIUM_HUT > 0 && INT_M_BUILDING_WARRIOR_TRAIN < 1 )
      {
        SET INT_ATTR_HOUSE_PERCENTAGE            30
        SET INT_ATTR_PREF_WARRIOR_TRAINS         1
      }
      ELSE
      {
        IF ( INT_M_BUILDING_LARGE_HUT > 0 && INT_M_BUILDING_WARRIOR_TRAIN < 1 )
        {
          SET INT_ATTR_HOUSE_PERCENTAGE           30
          SET INT_ATTR_PREF_WARRIOR_TRAINS        1
        }
        ENDIF
      }
      ENDIF
      IF ( INT_M_BUILDING_WARRIOR_TRAIN > 0 )
      {
        SET INT_ATTR_PREF_RELIGIOUS_TRAINS       1
      }
      ENDIF
      IF ( INT_MY_NUM_PEOPLE > 29 )
      {
        DO STATE_SHAMAN_GET_WILDS                OFF
      }
      ELSE
      {
        IF ( INT_MY_NUM_PEOPLE < 20 )
        {
          DO STATE_SHAMAN_GET_WILDS               ON
        }
        ENDIF
      }
      ENDIF
      IF ( INT_ATTR_EXPANSION < 40 )
      {
        INCREMENT INT_ATTR_EXPANSION 1
      }
      ENDIF
      IF ( INT_MY_NUM_PEOPLE > 50 )
      {
        SET INT_ATTR_PREF_RELIGIOUS_PEOPLE       25
        SET INT_ATTR_PREF_WARRIOR_PEOPLE         35
      }
      ENDIF
      IF ( INT_M_BUILDING_LARGE_HUT > 0 && $8 < 3 )
      {
        IF ( $8 == 0 )
        {
          DO BUILD_DRUM_TOWER                     76 102
          SET $8                                  1
        }
        ELSE
        {
          IF ( $8 == 1 )
          {
            DO BUILD_DRUM_TOWER                    176 108
            SET $8                                 2
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 16
    {
      IF ( $28 == 0 )
      {
        DO GET_NUM_ONE_OFF_SPELLS 0 INT_EROSION $27
        IF ( $27 > 0 )
        {
          DO CREATE_MSG_INFORMATION               100
          DO SET_MSG_DELETE_ON_OK
          DO SET_MSG_TIMEOUT                      256
          SET $28                                 1
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 1024 100
    {
      DO COUNT_PEOPLE_IN_MARKER BLUE 1 10 $17
      DO COUNT_PEOPLE_IN_MARKER BLUE 4 10 $18
      DO COUNT_PEOPLE_IN_MARKER YELLOW 1 10 $19
      DO COUNT_PEOPLE_IN_MARKER YELLOW 4 10 $20
      IF ( $17 > $19 && INT_M_PERSON_WARRIOR > 4 )
      {
        IF ( $21 == 0 && INT_CP_FREE_ENTRIES > 0 )
        {
          IF ( $16 == 0 && INT_MY_MANA > 130000 )
          {
            DO ATTACK BLUE 5 ATTACK_PERSON INT_TARGET_SHAMAN 25 INT_LAND_BRIDGE INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 27 28 -1
            SET $21                                1
          }
          ELSE
          {
            IF ( $16 != 0 )
            {
              SET INT_ATTR_AWAY_WARRIOR             50
              SET INT_ATTR_AWAY_RELIGIOUS           50
              DO ATTACK BLUE 10 ATTACK_BUILDING INT_LARGE_HUT 25 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 7
              SET INT_ATTR_AWAY_WARRIOR             0
              SET INT_ATTR_AWAY_RELIGIOUS           100
              SET $21                               1
            }
            ELSE
            {
              SET INT_ATTR_AWAY_WARRIOR             50
              SET INT_ATTR_AWAY_RELIGIOUS           50
              SET INT_ATTR_AWAY_SHAMAN              100
              DO ATTACK BLUE $17 ATTACK_MARKER 1 999 INT_LIGHTNING 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           100
              SET INT_ATTR_AWAY_SHAMAN              100
            }
            ENDIF
          }
          ENDIF
        }
        ELSE
        {
          SET INT_ATTR_AWAY_WARRIOR               50
          SET INT_ATTR_AWAY_RELIGIOUS             50
          SET INT_ATTR_AWAY_SHAMAN                100
          DO ATTACK BLUE $17 ATTACK_MARKER 1 999 INT_LIGHTNING 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             100
          SET INT_ATTR_AWAY_SHAMAN                100
        }
        ENDIF
      }
      ENDIF
      IF ( $18 > $20 && INT_M_PERSON_WARRIOR > 4 )
      {
        SET INT_ATTR_AWAY_WARRIOR                50
        SET INT_ATTR_AWAY_RELIGIOUS              50
        SET INT_ATTR_AWAY_SHAMAN                 100
        DO ATTACK BLUE $18 ATTACK_MARKER 4 999 INT_LIGHTNING 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              100
        SET INT_ATTR_AWAY_SHAMAN                 100
      }
      ENDIF
    }
    EVERY 256 128
    {
      IF ( $8 == 2 && INT_M_PERSON_RELIGIOUS > 1 )
      {
        DO PUT_PERSON_IN_DT INT_RELIGIOUS 76 102
        DO PUT_PERSON_IN_DT INT_RELIGIOUS 176 108
      }
      ENDIF
      DIVIDE $5 INT_M_PERSON_WARRIOR 2
      DIVIDE $6 INT_M_PERSON_RELIGIOUS 2
      DECREMENT $6 2
      IF ( INT_M_PERSON_WARRIOR > 3 && $4 == 0 )
      {
        DO GUARD_BETWEEN_MARKERS                 1 2 0 $5 0 $6 GUARD_NORMAL
        SET $4                                   1
      }
      ELSE
      {
        IF ( INT_M_PERSON_WARRIOR > 3 && $4 == 1 )
        {
          DO GUARD_BETWEEN_MARKERS                4 5 0 $5 0 $6 GUARD_NORMAL
          SET $4                                  0
        }
        ENDIF
      }
      ENDIF
      IF ( INT_M_PERSON_RELIGIOUS > 1 )
      {
        DO PREACH_AT_MARKER                      6
        DO PREACH_AT_MARKER                      3
        DO PREACH_AT_MARKER                      10
      }
      ENDIF
      DO COUNT_PEOPLE_IN_MARKER BLUE 10 8 $3
      IF ( $3 > 8 )
      {
        DO SEND_ALL_PEOPLE_TO_MARKER             10
        DO TRAIN_PEOPLE_NOW 5 INT_WARRIOR
        DO TRAIN_PEOPLE_NOW 3 INT_RELIGIOUS
      }
      ENDIF
      IF ( $29 == 0 && INT_MY_NUM_PEOPLE > 8 )
      {
        DO GET_HEAD_TRIGGER_COUNT 104 54 $30
        IF ( $30 == 0 )
        {
          DO CREATE_MSG_INFORMATION               112
          DO SET_MSG_DELETE_ON_OK
          DO SET_MSG_TIMEOUT                      256
          SET $29                                 1
        }
        ENDIF
      }
      ENDIF
      IF ( $26 == 1 )
      {
        DO CREATE_MSG_INFORMATION                51
        DO SET_MSG_DELETE_ON_OK
        DO SET_MSG_TIMEOUT                       256
        SET $26                                  2
      }
      ENDIF
    }
    EVERY 2048 64
    {
      DO COUNT_PEOPLE_IN_MARKER BLUE 9 1 $2
      IF ( $2 > 0 && INT_MY_MANA > INT_M_SPELL_LIGHTNING_COST )
      {
        DO IS_SHAMAN_AVAILABLE_FOR_ATTACK        $22
        IF ( $22 > 0 && INT_CP_FREE_ENTRIES > 0 )
        {
          DO ATTACK BLUE 0 ATTACK_MARKER 9 2 INT_LIGHTNING INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 24 9 0
        }
        ENDIF
      }
      ENDIF
      DO GET_HEIGHT_AT_POS                      29 $9
      DO GET_HEIGHT_AT_POS                      25 $10
      DO GET_HEIGHT_AT_POS                      30 $11
      DO GET_HEIGHT_AT_POS                      27 $12
      DO GET_HEIGHT_AT_POS                      26 $13
      DO GET_HEIGHT_AT_POS                      28 $14
      IF ( $9 > 0 && $10 > 0 )
      {
        IF ( $11 > 0 )
        {
          SET $15                                 1
        }
        ELSE
        {
          SET $15                                 0
        }
        ENDIF
      }
      ELSE
      {
        SET $15                                  0
      }
      ENDIF
      IF ( $12 > 0 && $13 > 0 )
      {
        IF ( $14 > 0 )
        {
          SET $16                                 1
        }
        ELSE
        {
          SET $16                                 0
        }
        ENDIF
      }
      ELSE
      {
        SET $16                                  0
      }
      ENDIF
      IF ( $1 == 0 && INT_CP_FREE_ENTRIES > 0 )
      {
        IF ( $15 == 0 && INT_MY_MANA > 150000 )
        {
          IF ( INT_M_PERSON_RELIGIOUS > 4 && INT_GAME_TURN > 7000 )
          {
            DO ATTACK BLUE 5 ATTACK_BUILDING INT_WARRIOR_TRAIN 21 INT_LAND_BRIDGE INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 29 30 -1
            SET $26                                1
            SET $1                                 1
          }
          ENDIF
        }
        ELSE
        {
          IF ( INT_MY_MANA > 150000 && $15 != 0 )
          {
            IF ( INT_M_PERSON_RELIGIOUS > 4 )
            {
              DO ATTACK BLUE 5 ATTACK_BUILDING INT_WARRIOR_TRAIN 21 INT_INVISIBILITY INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 8
              SET $26                               1
              SET $1                                1
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ELSE
      {
        IF ( $1 == 1 && INT_CP_FREE_ENTRIES > 1 )
        {
          IF ( $15 == 0 && $16 == 0 )
          {
            IF ( INT_MY_MANA > 120000 && INT_M_PERSON_RELIGIOUS > 6 )
            {
              DO ATTACK BLUE 5 ATTACK_BUILDING INT_WARRIOR_TRAIN 22 INT_LAND_BRIDGE INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 29 30 -1
              SET $1                                2
            }
            ENDIF
          }
          ELSE
          {
            IF ( INT_M_PERSON_RELIGIOUS > 8 && INT_M_PERSON_WARRIOR > 4 )
            {
              IF ( INT_MY_MANA > INT_M_SPELL_INVISIBILITY_COST && INT_CP_FREE_ENTRIES > 2 )
              {
                DO ATTACK BLUE 5 ATTACK_BUILDING INT_WARRIOR_TRAIN 22 INT_INVISIBILITY INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 -1
                SET INT_ATTR_AWAY_WARRIOR            50
                SET INT_ATTR_AWAY_RELIGIOUS          50
                SET INT_ATTR_AWAY_SHAMAN             0
                DO ATTACK BLUE 8 ATTACK_BUILDING INT_TEMPLE 22 INT_NO_SPECIFIC_SPELL 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          100
                SET INT_ATTR_AWAY_SHAMAN             100
                SET $1                               2
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ELSE
        {
          IF ( $1 == 2 && INT_CP_FREE_ENTRIES > 1 )
          {
            IF ( $16 == 0 && INT_MY_MANA > 120000 )
            {
              IF ( INT_M_PERSON_RELIGIOUS > 8 && INT_M_PERSON_WARRIOR > 3 )
              {
                DO ATTACK BLUE 5 ATTACK_PERSON INT_TARGET_SHAMAN 23 INT_LAND_BRIDGE INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 27 28 -1
                SET INT_ATTR_AWAY_WARRIOR            50
                SET INT_ATTR_AWAY_RELIGIOUS          50
                SET INT_ATTR_AWAY_SHAMAN             0
                DO ATTACK BLUE 8 ATTACK_BUILDING INT_TEMPLE 23 INT_NO_SPECIFIC_SPELL 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          100
                SET INT_ATTR_AWAY_SHAMAN             100
                SET $1                               3
              }
              ENDIF
            }
            ELSE
            {
              IF ( INT_MY_MANA > 120000 && INT_M_PERSON_WARRIOR > 8 )
              {
                SET INT_ATTR_AWAY_WARRIOR            50
                SET INT_ATTR_AWAY_RELIGIOUS          50
                DO ATTACK BLUE 8 ATTACK_PERSON INT_TARGET_SHAMAN 23 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 7
                SET INT_ATTR_AWAY_SHAMAN             0
                DO ATTACK BLUE 8 ATTACK_BUILDING INT_TEMPLE 23 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 7
                SET INT_ATTR_AWAY_WARRIOR            0
                SET INT_ATTR_AWAY_RELIGIOUS          100
                SET INT_ATTR_AWAY_SHAMAN             100
                SET $1                               3
              }
              ENDIF
            }
            ENDIF
          }
          ELSE
          {
            IF ( $1 == 3 && INT_CP_FREE_ENTRIES > 1 )
            {
              IF ( $15 != 0 && $16 != 0 )
              {
                IF ( INT_MY_MANA > 150000 && INT_M_PERSON_WARRIOR > 7 )
                {
                  SET INT_ATTR_AWAY_WARRIOR           50
                  SET INT_ATTR_AWAY_RELIGIOUS         50
                  DO ATTACK BLUE 10 ATTACK_BUILDING INT_LARGE_HUT 24 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 7
                  SET INT_ATTR_AWAY_SHAMAN            0
                  DO ATTACK BLUE 5 ATTACK_BUILDING INT_LARGE_HUT 24 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 8
                  SET INT_ATTR_AWAY_WARRIOR           0
                  SET INT_ATTR_AWAY_RELIGIOUS         100
                  SET INT_ATTR_AWAY_SHAMAN            100
                  SET $1                              4
                }
                ENDIF
              }
              ELSE
              {
                IF ( $16 != 0 && INT_MY_MANA > 150000 )
                {
                  IF ( INT_M_PERSON_WARRIOR > 5 && INT_M_PERSON_RELIGIOUS > 5 )
                  {
                    SET INT_ATTR_AWAY_WARRIOR          50
                    SET INT_ATTR_AWAY_RELIGIOUS        50
                    DO ATTACK BLUE 10 ATTACK_BUILDING INT_LARGE_HUT 24 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 7
                    SET INT_ATTR_AWAY_WARRIOR          0
                    SET INT_ATTR_AWAY_RELIGIOUS        100
                    SET $1                             4
                  }
                  ENDIF
                }
                ELSE
                {
                  IF ( $15 != 0 && INT_MY_MANA > 150000 )
                  {
                    IF ( INT_M_PERSON_RELIGIOUS > 5 && INT_M_PERSON_WARRIOR > 5 )
                    {
                      SET INT_ATTR_AWAY_WARRIOR         50
                      SET INT_ATTR_AWAY_RELIGIOUS       50
                      DO ATTACK BLUE 10 ATTACK_BUILDING INT_LARGE_HUT 24 INT_INVISIBILITY INT_INVISIBILITY INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 -1 -1 8
                      SET INT_ATTR_AWAY_WARRIOR         0
                      SET INT_ATTR_AWAY_RELIGIOUS       100
                      SET $1                            4
                    }
                    ENDIF
                  }
                  ELSE
                  {
                    IF ( INT_MY_MANA > 150000 && INT_M_PERSON_RELIGIOUS > 5 )
                    {
                      IF ( INT_M_PERSON_WARRIOR > 5 )
                      {
                        SET INT_ATTR_AWAY_WARRIOR        50
                        SET INT_ATTR_AWAY_RELIGIOUS      50
                        DO ATTACK BLUE 10 ATTACK_BUILDING INT_LARGE_HUT 24 INT_LAND_BRIDGE INT_INVISIBILITY INT_INVISIBILITY ATTACK_NORMAL 0 27 28 -1
                        SET INT_ATTR_AWAY_WARRIOR        0
                        SET INT_ATTR_AWAY_RELIGIOUS      100
                        SET $1                           4
                      }
                      ENDIF
                    }
                    ENDIF
                  }
                  ENDIF
                }
                ENDIF
              }
              ENDIF
            }
            ELSE
            {
              IF ( $1 == 6 )
              {
                SET $1                               0
              }
              ELSE
              {
                IF ( $1 == 4 )
                {
                  INCREMENT $1 1
                }
                ELSE
                {
                  IF ( $1 == 5 )
                  {
                    SET $1                             6
                  }
                  ENDIF
                }
                ENDIF
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 8
    {
      IF ( $31 == 0 )
      {
        DO FLYBY_CREATE_NEW
        DO FLYBY_ALLOW_INTERRUPT                 ON
        DO FLYBY_SET_END_TARGET                  198 228 1200 0
        DO FLYBY_SET_EVENT_POS                   198 228 1 15
        DO FLYBY_SET_EVENT_POS                   136 126 40 45
        DO FLYBY_SET_EVENT_POS                   104 54 115 45
        DO FLYBY_SET_EVENT_POS                   198 228 180 40
        DO FLYBY_SET_EVENT_ANGLE                 1300 1 45
        DO FLYBY_SET_EVENT_ANGLE                 170 46 70
        DO FLYBY_SET_EVENT_ANGLE                 1200 146 55
        DO FLYBY_SET_EVENT_ZOOM                  -50 1 50
        DO FLYBY_SET_EVENT_ZOOM                  10 60 40
        DO FLYBY_SET_EVENT_ZOOM                  -30 101 50
        DO FLYBY_SET_EVENT_ZOOM                  0 151 50
        DO FLYBY_START
        SET $31                                  1
      }
      ENDIF
    }
  }
  ENDIF
}
SCRIPT_END
