{
  IF ( INT_GAME_TURN == 0 )
  {
    DO SET_REINCARNATION                       OFF
    SET $0                                     0
    DO SET_ATTACK_VARIABLE                     $0
    DO STATE_CONSTRUCT_BUILDING                OFF
    DO STATE_FETCH_WOOD                        OFF
    SET INT_ATTR_ATTACK_PERCENTAGE             10
    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           0
    SET INT_ATTR_HOUSE_PERCENTAGE              0
    DO STATE_SHAMAN_GET_WILDS                  OFF
    SET INT_ATTR_EXPANSION                     12
    DO STATE_HOUSE_A_PERSON                    OFF
    DO STATE_STATE_BRING_NEW_PEOPLE_BACK       OFF
    DO STATE_POPULATE_DRUM_TOWER               OFF
    DO STATE_DEFEND                            OFF
    DO STATE_DEFEND_BASE                       OFF
    DO STATE_FIREWARRIOR_DEFEND                OFF
    SET INT_ATTR_DEFENSE_RAD_INCR              0
    SET INT_ATTR_MAX_DEFENSIVE_ACTIONS         0
    SET INT_ATTR_SHAMEN_BLAST                  0
    SET INT_ATTR_SPY_CHECK_FREQUENCY           128
    SET INT_ATTR_RETREAT_VALUE                 0
    SET INT_ATTR_BASE_UNDER_ATTACK_RETREAT     0
    SET INT_ATTR_RANDOM_BUILD_SIDE             0
    DO STATE_TRAIN_PEOPLE                      OFF
    SET INT_ATTR_PREF_SPY_PEOPLE               0
    SET INT_ATTR_PREF_RELIGIOUS_PEOPLE         0
    SET INT_ATTR_PREF_WARRIOR_PEOPLE           0
    SET INT_ATTR_PREF_FIREWARRIOR_PEOPLE       0
    SET INT_ATTR_MAX_TRAIN_AT_ONCE             0
    SET INT_ATTR_GROUP_OPTION                  0
    DO STATE_AUTO_ATTACK                       OFF
    SET INT_ATTR_COUNT_PREACH_DAMAGE           1
    SET INT_ATTR_MAX_ATTACKS                   1
    SET INT_ATTR_AWAY_BRAVE                    100
    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                   0
    SET $1                                     1
    SET $2                                     0
    SET $3                                     1
    SET $4                                     1
    SET $5                                     1
    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
    SET $18                                    0
    SET $19                                    1
    SET $20                                    0
    SET $21                                    0
    SET $22                                    1
    SET $23                                    0
    SET $24                                    0
    SET $25                                    1
    SET $26                                    1
    SET $27                                    1
    SET $28                                    1
    SET $29                                    4
    SET $30                                    0
    SET $31                                    0
    SET $32                                    1
    SET $33                                    1
    SET $34                                    1
    SET $35                                    0
    SET $36                                    0
    SET $37                                    0
    SET $38                                    0
    SET $39                                    0
    SET $40                                    0
    SET $41                                    0
    SET $42                                    0
    SET $43                                    0
    SET $44                                    0
    SET $45                                    0
    SET $46                                    0
    SET $47                                    0
    SET $48                                    0
    SET $49                                    0
    SET $50                                    0
    SET $51                                    0
    SET $52                                    0
    SET $53                                    0
    SET $54                                    0
    SET $55                                    0
    SET $56                                    0
    SET $57                                    0
    SET $58                                    0
    SET $59                                    0
    SET $60                                    0
    SET $61                                    0
    SET $62                                    0
    SET $63                                    0
    DO SET_AUTO_BUILD                          OFF
    DO SET_AUTO_HOUSE                          OFF
  }
  ELSE
  {
    EVERY 16
    {
      DO GIVE_MANA_TO_PLAYER BLUE 500
      IF ( $13 == 10 && $30 == 9 )
      {
        IF ( $1 == 8 && $40 == 1 )
        {
          DO GET_HEAD_TRIGGER_COUNT 72 22 $4
          IF ( $44 == 2 && $4 == 0 )
          {
            DO TRIGGER_LEVEL_WON
            SET $1                                 10
          }
          ELSE
          {
            IF ( $48 == 0 )
            {
              DO CREATE_MSG_INFORMATION             141
              DO SET_MSG_AUTO_OPEN_DLG
              SET $48                               1
            }
            ENDIF
            INCREMENT $44 1
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $1 == 7 )
      {
        SET $1                                   8
      }
      ENDIF
      IF ( $1 == 6 )
      {
        IF ( $59 == 3 )
        {
          DO CREATE_MSG_INFORMATION               49
          DO SET_MSG_AUTO_OPEN_DLG
          SET $59                                 9
        }
        ELSE
        {
          IF ( $59 < 6 )
          {
            INCREMENT $59 1
          }
          ENDIF
        }
        ENDIF
        DO GET_HEAD_TRIGGER_COUNT 32 104 $22
        IF ( $22 == 0 )
        {
          SET $1                                  7
          DO FLYBY_CREATE_NEW
          DO FLYBY_SET_EVENT_POS                  228 36 1 30
          DO FLYBY_SET_EVENT_ANGLE                120 1 30
          DO FLYBY_SET_EVENT_ZOOM                 -40 1 15
          DO FLYBY_SET_EVENT_ZOOM                 0 16 15
          DO FLYBY_START
          DO CLEAR_ALL_MSG
          DO DESELECT_ALL_BLUE_PEOPLE
        }
        ENDIF
      }
      ENDIF
      IF ( $1 == 5 )
      {
        IF ( $30 == 9 )
        {
        }
        ELSE
        {
          DO REMOVE_PLAYER_THING 0 INT_BLAST
        }
        ENDIF
        DO REMOVE_PLAYER_THING 0 INT_LIGHTNING
        DO TRIGGER_THING                         156
        DO FLYBY_CREATE_NEW
        DO FLYBY_SET_EVENT_POS                   32 104 1 30
        DO FLYBY_SET_EVENT_ZOOM                  -20 1 15
        DO FLYBY_SET_EVENT_ANGLE                 1744 1 30
        DO FLYBY_SET_EVENT_ZOOM                  0 16 14
        DO FLYBY_START
        SET $1                                   6
      }
      ENDIF
      IF ( $1 == 4 )
      {
        IF ( $50 == 1 )
        {
          IF ( $55 == 1 )
          {
            DO CREATE_MSG_INFORMATION              47
            DO SET_MSG_AUTO_OPEN_DLG
            SET $50                                2
            SET $55                                2
          }
          ENDIF
          IF ( $56 == 1 )
          {
            DO CREATE_MSG_INFORMATION              47
            DO SET_MSG_AUTO_OPEN_DLG
            DO SET_MSG_DELETE_ON_OK
            SET $50                                2
            SET $56                                2
          }
          ENDIF
          IF ( $54 < 3 )
          {
            IF ( $54 == 1 )
            {
              SET $55                               1
            }
            ENDIF
            IF ( $54 == 2 )
            {
              SET $56                               1
            }
            ENDIF
            INCREMENT $54 1
          }
          ENDIF
        }
        ENDIF
        IF ( $24 == 0 )
        {
          IF ( $50 == 0 )
          {
            DO FLYBY_CREATE_NEW
            DO FLYBY_SET_EVENT_POS                 32 80 1 30
            DO FLYBY_SET_EVENT_ZOOM                -20 1 15
            DO FLYBY_SET_EVENT_ANGLE               2016 1 30
            DO FLYBY_SET_EVENT_ZOOM                0 16 14
            DO FLYBY_START
            SET $50                                1
            SET $24                                1
          }
          ELSE
          {
            DO ZOOM_TO                             32 80 2016
            SET $24                                1
          }
          ENDIF
        }
        ENDIF
        IF ( $24 == 2 )
        {
          DO TRIGGER_THING                        70
          SET $24                                 0
          SET $50                                 1
        }
        ENDIF
        IF ( INT_M_PERSON_WARRIOR > 0 && INT_B_PERSON_RELIGIOUS == 0 )
        {
          DO KILL_TEAM_IN_AREA 32 80 5
          DO CREATE_MSG_INFORMATION               121
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $24                                 2
        }
        ENDIF
        IF ( INT_M_PERSON_WARRIOR == 0 && INT_B_PERSON_RELIGIOUS > 0 )
        {
          DO TRIGGER_THING                        5
          DO CREATE_MSG_INFORMATION               48
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $1                                  5
        }
        ENDIF
      }
      ENDIF
      IF ( $1 == 3 )
      {
        IF ( $23 == 1 )
        {
          IF ( $57 == 2 )
          {
            DO CREATE_MSG_INFORMATION              45
            DO SET_MSG_AUTO_OPEN_DLG
            SET $23                                2
          }
          ENDIF
          INCREMENT $57 1
        }
        ENDIF
        IF ( $23 == 0 )
        {
          DO FLYBY_CREATE_NEW
          DO FLYBY_SET_EVENT_POS                  58 106 1 30
          DO FLYBY_SET_EVENT_ZOOM                 -20 1 15
          DO FLYBY_SET_EVENT_ANGLE                1456 1 30
          DO FLYBY_SET_EVENT_ZOOM                 0 16 14
          DO FLYBY_START
          SET $23                                 1
        }
        ENDIF
        IF ( INT_M_PERSON_BRAVE > 0 && INT_B_PERSON_WARRIOR == 0 )
        {
          DO TRIGGER_THING                        4
          DO TRIGGER_THING                        70
          DO CREATE_MSG_INFORMATION               120
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $1                                  4
        }
        ENDIF
        IF ( INT_M_PERSON_BRAVE == 0 && INT_B_PERSON_WARRIOR > 0 )
        {
          DO TRIGGER_THING                        4
          DO TRIGGER_THING                        70
          DO CREATE_MSG_INFORMATION               46
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $1                                  4
        }
        ENDIF
      }
      ENDIF
      IF ( $1 == 2 )
      {
        IF ( INT_M_PERSON_BRAVE == 0 && INT_B_PERSON_BRAVE > 0 )
        {
          DO TRIGGER_THING                        3
          DO CREATE_MSG_INFORMATION               43
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $1                                  3
        }
        ENDIF
        IF ( INT_M_PERSON_BRAVE > 0 && INT_B_PERSON_BRAVE == 0 )
        {
          SET $1                                  3
          DO CREATE_MSG_INFORMATION               44
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          DO TRIGGER_THING                        3
        }
        ENDIF
      }
      ENDIF
      IF ( $1 == 0 )
      {
        IF ( INT_B_PERSON_WARRIOR > 1 && INT_B_BUILDING_WARRIOR_TRAIN > 0 || $36 > 1 )
        {
          IF ( $36 == 1 )
          {
            DO FLYBY_CREATE_NEW
            DO FLYBY_SET_EVENT_POS                 34 128 1 30
            DO FLYBY_SET_EVENT_ZOOM                -20 1 15
            DO FLYBY_SET_EVENT_ANGLE               960 1 30
            DO FLYBY_SET_EVENT_ZOOM                0 16 14
            DO FLYBY_START
          }
          ENDIF
          IF ( $36 == 4 )
          {
            DO TRIGGER_THING                       2
          }
          ENDIF
          IF ( $36 == 5 )
          {
            DO CREATE_MSG_INFORMATION              42
            DO SET_MSG_AUTO_OPEN_DLG
            SET $1                                 2
          }
          ELSE
          {
            INCREMENT $36 1
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $1 < 2 )
      {
        DO GET_HEAD_TRIGGER_COUNT 230 40 $5
        IF ( $5 == 0 && $49 == 1 )
        {
          DO GET_HEAD_TRIGGER_COUNT 240 54 $1
          IF ( $1 == 0 && $37 == 7 )
          {
            DO TURN_PANEL_ON                       2
            DO GIVE_PLAYER_SPELL 0 INT_BLAST
            DO GIVE_PLAYER_SPELL 0 INT_LIGHTNING
            DO TRIGGER_THING                       1
            DO CREATE_MSG_INFORMATION              77
            DO SET_MSG_AUTO_OPEN_DLG
            SET $37                                9
            SET $1                                 0
          }
          ELSE
          {
            IF ( $37 < 7 && $1 == 0 )
            {
              IF ( $38 == 0 )
              {
                DO FLYBY_CREATE_NEW
                DO FLYBY_SET_EVENT_POS               32 104 1 30
                DO FLYBY_SET_EVENT_ZOOM              20 11 20
                DO FLYBY_SET_EVENT_ANGLE             1360 1 25
                DO FLYBY_SET_EVENT_ZOOM              -20 31 20
                DO FLYBY_SET_EVENT_ANGLE             1768 26 30
                DO FLYBY_SET_EVENT_POS               8 102 51 15
                DO FLYBY_SET_EVENT_ZOOM              0 51 15
                DO FLYBY_START
                DO CLEAR_ALL_MSG
                DO DESELECT_ALL_BLUE_PEOPLE
                SET $38                              1
              }
              ENDIF
              INCREMENT $37 1
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 32 2
    {
      IF ( $12 == 1 )
      {
        IF ( $13 == 9 )
        {
          DO GET_HEAD_TRIGGER_COUNT 216 108 $14
          IF ( $14 == 0 )
          {
            SET $12                                2
            DO TRIGGER_THING                       159
            DO TURN_PANEL_ON                       2
            DO FLASH_BUTTON 0 OFF
            DO FLYBY_CREATE_NEW
            DO FLYBY_SET_EVENT_POS                 228 36 1 30
            DO FLYBY_SET_EVENT_ANGLE               120 1 30
            DO FLYBY_SET_EVENT_ZOOM                -40 1 15
            DO FLYBY_SET_EVENT_ZOOM                0 16 15
            DO FLYBY_START
            DO CLEAR_ALL_MSG
            DO DESELECT_ALL_BLUE_PEOPLE
            SET $13                                10
          }
          ENDIF
        }
        ENDIF
        IF ( $13 == 8 )
        {
          DO CREATE_MSG_INFORMATION               41
          DO SET_MSG_AUTO_OPEN_DLG
          DO TRIGGER_THING                        157
          DO ZOOM_TO                              216 108 415
          DO REMOVE_PLAYER_THING 0 INT_BLAST
          DO REMOVE_PLAYER_THING 0 INT_LIGHTNING
          SET $13                                 9
        }
        ENDIF
        IF ( $13 == 7 )
        {
          DO CREATE_MSG_INFORMATION_ZOOM          38 190 108 1769
          DO SET_MSG_AUTO_OPEN_DLG
          SET $13                                 8
        }
        ENDIF
        IF ( $13 == 6 )
        {
          DO COUNT_BLUE_IN_HOUSES $15
          IF ( $15 > 4 )
          {
            DO CREATE_MSG_INFORMATION              119
            DO SET_MSG_AUTO_OPEN_DLG
            SET $13                                7
          }
          ENDIF
          IF ( INT_GAME_TURN > $16 && $15 < 5 )
          {
            DO CREATE_MSG_INFORMATION              39
            DO SET_MSG_AUTO_OPEN_DLG
            DO SET_MSG_DELETE_ON_OK
            INCREMENT $16 512
          }
          ENDIF
        }
        ENDIF
        IF ( $13 == 5 )
        {
          SET $63                                 INT_B_BUILDING_SMALL_HUT
          INCREMENT $63 INT_B_BUILDING_MEDIUM_HUT
          INCREMENT $63 INT_B_BUILDING_LARGE_HUT
          IF ( $63 > 2 )
          {
            DO FLASH_BUTTON 0 OFF
            DO CREATE_MSG_INFORMATION              37
            DO SET_MSG_AUTO_OPEN_DLG
            SET $13                                6
            SET $16                                INT_GAME_TURN
            INCREMENT $16 256
          }
          ENDIF
        }
        ENDIF
        IF ( $13 == 4 )
        {
          DO PARTIAL_BUILDING_COUNT
          SET $63                                 INT_B_BUILDING_SMALL_HUT
          DO PARTIAL_BUILDING_COUNT
          INCREMENT $63 INT_B_BUILDING_MEDIUM_HUT
          DO PARTIAL_BUILDING_COUNT
          INCREMENT $63 INT_B_BUILDING_LARGE_HUT
          IF ( $63 < 3 )
          {
            DO CREATE_MSG_INFORMATION              36
            DO SET_MSG_AUTO_OPEN_DLG
          }
          ENDIF
          SET $13                                 5
        }
        ENDIF
        IF ( $13 == 3 )
        {
          SET $63                                 INT_B_BUILDING_SMALL_HUT
          INCREMENT $63 INT_B_BUILDING_MEDIUM_HUT
          INCREMENT $63 INT_B_BUILDING_LARGE_HUT
          IF ( $63 == 2 )
          {
            DO CREATE_MSG_INFORMATION              40
            DO SET_MSG_AUTO_OPEN_DLG
            SET $13                                4
          }
          ELSE
          {
            IF ( $63 > 1 )
            {
              SET $13                               4
            }
            ELSE
            {
              DO COUNT_BLUE_WITH_BUILD_COMMAND $21
              IF ( INT_B_BUILDING_SMALL_HUT == 1 && $21 < 1 )
              {
                IF ( $20 == 0 && INT_GAME_TURN > $18 )
                {
                  DO CREATE_MSG_INFORMATION           35
                  DO SET_MSG_AUTO_OPEN_DLG
                  DO SET_MSG_DELETE_ON_OK
                  DO SET_AUTO_BUILD                   ON
                  SET $20                             1
                }
                ENDIF
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
        IF ( $13 == 2 )
        {
          DO COUNT_BLUE_SHAPES $17
          IF ( $17 > 0 )
          {
            DO CREATE_MSG_INFORMATION              34
            DO SET_MSG_AUTO_OPEN_DLG
            SET $13                                3
            SET $18                                INT_GAME_TURN
            INCREMENT $18 300
          }
          ENDIF
        }
        ENDIF
        IF ( $13 == 1 )
        {
          DO TURN_PANEL_ON                        0
          DO FLASH_BUTTON 0 ON
          DO GIVE_PLAYER_SPELL 0 INT_BLAST
          DO GIVE_PLAYER_SPELL 0 INT_LIGHTNING
          DO CREATE_MSG_INFORMATION               33
          DO SET_MSG_AUTO_OPEN_DLG
          SET $13                                 2
        }
        ENDIF
        IF ( $13 == 0 )
        {
          IF ( $43 == 2 )
          {
            DO ZOOM_TO                             190 108 1769
            SET $13                                1
          }
          ELSE
          {
            INCREMENT $43 1
          }
          ENDIF
        }
        ENDIF
      }
      ELSE
      {
        IF ( $12 == 0 )
        {
          DO GET_HEAD_TRIGGER_COUNT 216 44 $19
          DO GET_HEAD_TRIGGER_COUNT 230 40 $5
          IF ( $19 == 0 && $5 == 0 )
          {
            IF ( $49 == 1 )
            {
              SET $12                               1
              DO FLYBY_CREATE_NEW
              DO FLYBY_SET_EVENT_POS                206 106 1 30
              DO FLYBY_SET_EVENT_ZOOM               -30 25 15
              DO FLYBY_SET_EVENT_ZOOM               0 40 15
              DO FLYBY_SET_EVENT_ANGLE              339 1 30
              DO FLYBY_SET_EVENT_ANGLE              1415 31 24
              DO FLYBY_START
              DO CLEAR_ALL_MSG
              DO DESELECT_ALL_BLUE_PEOPLE
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 16 8
    {
      IF ( INT_M_PERSON_RELIGIOUS > 0 )
      {
        DO PUT_PERSON_IN_DT INT_RELIGIOUS 14 238
      }
      ENDIF
      DO GET_HEAD_TRIGGER_COUNT 230 40 $5
      IF ( $41 == 0 && $5 == 0 )
      {
        IF ( $49 == 1 )
        {
          SET $41                                 1
          DO FLYBY_CREATE_NEW
          DO FLYBY_ALLOW_INTERRUPT                ON
          DO FLYBY_SET_END_TARGET                 228 38 2031 0
          DO FLYBY_SET_EVENT_POS                  216 44 1 15
          DO FLYBY_SET_EVENT_TOOLTIP              216 44 0 1 60
          DO FLYBY_SET_EVENT_ZOOM                 50 1 20
          DO FLYBY_SET_EVENT_ANGLE                1338 1 15
          DO FLYBY_SET_EVENT_ZOOM                 0 21 35
          DO FLYBY_SET_EVENT_ANGLE                207 16 70
          DO FLYBY_SET_EVENT_POS                  240 54 50 20
          DO FLYBY_SET_EVENT_TOOLTIP              240 54 0 62 20
          DO FLYBY_SET_EVENT_ZOOM                 -40 65 20
          DO FLYBY_SET_EVENT_POS                  236 30 80 20
          DO FLYBY_SET_EVENT_TOOLTIP              236 30 0 83 58
          DO FLYBY_SET_EVENT_ANGLE                1193 86 40
          DO FLYBY_SET_EVENT_ZOOM                 0 85 41
          DO FLYBY_SET_EVENT_POS                  228 38 126 15
          DO FLYBY_SET_EVENT_ANGLE                2031 126 15
          DO FLYBY_START
          DO CLEAR_ALL_MSG
        }
        ENDIF
      }
      ELSE
      {
        IF ( $41 > 0 && $41 < 20 )
        {
          INCREMENT $41 1
          IF ( $41 == 14 )
          {
            DO CREATE_MSG_INFORMATION              122
            DO SET_MSG_AUTO_OPEN_DLG
            SET $41                                99
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $3 == 1 && $5 == 0 )
      {
        IF ( $49 == 1 )
        {
          DO GET_HEAD_TRIGGER_COUNT 236 30 $3
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 9 )
      {
        DO GET_HEAD_TRIGGER_COUNT 72 22 $4
        IF ( $4 == 0 && $40 == 0 )
        {
          DO TURN_PANEL_ON                        2
          DO FLYBY_CREATE_NEW
          DO FLYBY_SET_EVENT_POS                  228 36 1 30
          DO FLYBY_SET_EVENT_ANGLE                120 1 30
          DO FLYBY_SET_EVENT_ZOOM                 -40 1 15
          DO FLYBY_SET_EVENT_ZOOM                 0 16 15
          DO FLYBY_START
          DO CLEAR_ALL_MSG
          DO DESELECT_ALL_BLUE_PEOPLE
          SET $40                                 1
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 8 )
      {
        DO CREATE_MSG_INFORMATION                31
        DO TRIGGER_THING                         158
        DO ZOOM_TO                               70 22 472
        DO SET_MSG_AUTO_OPEN_DLG
        SET $30                                  9
      }
      ENDIF
      IF ( $30 == 7 )
      {
        DO COUNT_PEOPLE_IN_MARKER RED 10 1 $25
        DO COUNT_PEOPLE_IN_MARKER RED 11 1 $26
        DO COUNT_PEOPLE_IN_MARKER RED 12 1 $27
        DO COUNT_PEOPLE_IN_MARKER RED 13 1 $28
        SET $29                                  $25
        INCREMENT $29 $26
        INCREMENT $29 $27
        INCREMENT $29 $28
        IF ( $29 == 0 )
        {
          DO CREATE_MSG_INFORMATION               30
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $30                                 8
        }
        ELSE
        {
          DO GET_NUM_ONE_OFF_SPELLS 0 INT_BLAST $31
          IF ( $29 > 0 && $31 == 0 )
          {
            IF ( $42 > 0 && $61 == 0 )
            {
              DO CREATE_MSG_INFORMATION             28
              DO SET_MSG_DELETE_ON_OK
              DO SET_MSG_AUTO_OPEN_DLG
              SET $61                               1
            }
            ENDIF
            INCREMENT $42 1
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $30 > 5 && $30 < 8 )
      {
        IF ( $61 == 1 && $29 > 0 )
        {
          DO GET_NUM_ONE_OFF_SPELLS 0 INT_BLAST $31
          IF ( $31 > 0 )
          {
            SET $42                                0
            SET $61                                0
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 6 )
      {
        DO COUNT_PEOPLE_IN_MARKER RED 10 1 $25
        DO COUNT_PEOPLE_IN_MARKER RED 11 1 $26
        DO COUNT_PEOPLE_IN_MARKER RED 12 1 $27
        DO COUNT_PEOPLE_IN_MARKER RED 13 1 $28
        SET $29                                  $25
        INCREMENT $29 $26
        INCREMENT $29 $27
        INCREMENT $29 $28
        DO GET_NUM_ONE_OFF_SPELLS 0 INT_BLAST $31
        IF ( $26 == 1 && $27 == 1 )
        {
          IF ( $25 == 0 && $60 == 0 )
          {
            DO MOVE_SHAMAN_TO_MARKER               122
            SET $60                                1
          }
          ENDIF
        }
        ENDIF
        IF ( $25 == 0 && $26 == 0 )
        {
          IF ( $27 == 1 && $62 == 0 )
          {
            DO MOVE_SHAMAN_TO_MARKER               123
            SET $62                                1
          }
          ENDIF
        }
        ENDIF
        IF ( $29 > 0 && $31 == 0 )
        {
          IF ( $51 == 2 )
          {
            IF ( $42 > 0 && $61 == 0 )
            {
              DO CREATE_MSG_INFORMATION             28
              DO SET_MSG_AUTO_OPEN_DLG
              DO SET_MSG_DELETE_ON_OK
              SET $61                               1
            }
            ENDIF
            INCREMENT $42 1
            SET $51                                0
          }
          ELSE
          {
            INCREMENT $51 1
          }
          ENDIF
        }
        ENDIF
        IF ( $29 == 0 && $28 == 0 )
        {
          DO TRIGGER_THING                        230
          DO CREATE_MSG_INFORMATION               29
          DO SET_MSG_AUTO_OPEN_DLG
          SET $30                                 7
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 5 )
      {
        DO GET_HEAD_TRIGGER_COUNT 52 254 $32
        IF ( $32 == 0 && $45 == 2 )
        {
          DO CREATE_MSG_INFORMATION               117
          DO GIVE_ONE_SHOT INT_BLAST BLUE
          DO GIVE_ONE_SHOT INT_BLAST BLUE
          DO GIVE_ONE_SHOT INT_BLAST BLUE
          DO SET_MSG_AUTO_OPEN_DLG
          SET $30                                 6
        }
        ELSE
        {
          IF ( $32 == 0 )
          {
            INCREMENT $45 1
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 4 )
      {
        DO GET_HEAD_TRIGGER_COUNT 42 238 $33
        IF ( $33 == 0 )
        {
          DO CREATE_MSG_INFORMATION               116
          DO SET_MSG_AUTO_OPEN_DLG
          SET $30                                 5
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 3 )
      {
        IF ( $58 == 1 )
        {
          DO CREATE_MSG_INFORMATION               115
          DO ZOOM_TO                              42 238 249
          DO SET_MSG_AUTO_OPEN_DLG
          SET $30                                 4
        }
        ENDIF
        INCREMENT $58 1
      }
      ENDIF
      IF ( $30 == 2 )
      {
        IF ( INT_M_BUILDING_DRUM_TOWER == 0 && INT_M_PERSON_RELIGIOUS == 0 )
        {
          DO CREATE_MSG_INFORMATION               113
          DO SET_MSG_AUTO_OPEN_DLG
          DO SET_MSG_DELETE_ON_OK
          SET $30                                 3
          DO TRIGGER_THING                        146
        }
        ELSE
        {
          DO GET_NUM_ONE_OFF_SPELLS 0 INT_LIGHTNING $2
          IF ( INT_M_BUILDING_DRUM_TOWER > 0 && $2 == 0 )
          {
            IF ( INT_M_PERSON_RELIGIOUS > 0 )
            {
              IF ( $47 == 2 )
              {
                DO GIVE_ONE_SHOT INT_LIGHTNING BLUE
                DO CREATE_MSG_INFORMATION            114
                DO SET_MSG_AUTO_OPEN_DLG
                DO SET_MSG_DELETE_ON_OK
                SET $47                              0
              }
              ELSE
              {
                INCREMENT $47 1
              }
              ENDIF
            }
            ENDIF
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 1 )
      {
        DO GET_HEAD_TRIGGER_COUNT 50 216 $34
        IF ( $34 == 0 && $46 == 2 )
        {
          DO ZOOM_TO                              14 238 778
          DO CREATE_MSG_INFORMATION               27
          DO SET_MSG_AUTO_OPEN_DLG
          SET $30                                 2
        }
        ELSE
        {
          IF ( $34 == 0 )
          {
            INCREMENT $46 1
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
      IF ( $30 == 0 && $3 == 0 )
      {
        IF ( $35 == 2 && $49 == 1 )
        {
          DO TURN_PANEL_ON                        1
          DO CREATE_MSG_INFORMATION               32
          DO SET_MSG_AUTO_OPEN_DLG
          SET $30                                 1
        }
        ELSE
        {
          INCREMENT $35 1
          IF ( $39 == 0 )
          {
            DO ZOOM_TO                             70 230 1403
            SET $39                                1
          }
          ENDIF
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 16 12
    {
    }
    EVERY 64 4
    {
      DO IS_PLAYER_IN_WORLD_VIEW $8
      IF ( $8 > 0 )
      {
        SET $53                                  $7
        SET $7                                   1
      }
      ELSE
      {
        SET $7                                   0
      }
      ENDIF
      IF ( $9 == 6 && $7 != 1 )
      {
        SET $49                                  1
        DO FLASH_BUTTON 16 OFF
        DO CREATE_MSG_INFORMATION                150
        DO SET_MSG_AUTO_OPEN_DLG
        SET $9                                   9
      }
      ENDIF
      IF ( $9 == 5 && $7 != 1 )
      {
        DO TRIGGER_THING                         102
        DO FLYBY_CREATE_NEW
        DO FLYBY_SET_EVENT_POS                   230 40 1 30
        DO FLYBY_SET_EVENT_TOOLTIP               230 40 0 2 29
        DO FLYBY_SET_EVENT_ANGLE                 1406 1 30
        DO FLYBY_SET_EVENT_ZOOM                  -40 1 15
        DO FLYBY_SET_EVENT_ZOOM                  0 17 14
        DO FLYBY_START
        SET $9                                   6
      }
      ENDIF
      IF ( $9 == 4 && $7 != 1 )
      {
        DO FLASH_BUTTON 16 ON
        DO CREATE_MSG_INFORMATION                61
        DO SET_MSG_AUTO_OPEN_DLG
        SET $9                                   5
      }
      ENDIF
      IF ( $9 == 3 && $7 != 1 )
      {
        DO FLYBY_CREATE_NEW
        DO FLYBY_SET_EVENT_POS                   214 20 1 30
        DO FLYBY_SET_EVENT_ANGLE                 256 1 30
        DO FLYBY_START
        SET $9                                   4
      }
      ENDIF
      IF ( $9 == 2 )
      {
        IF ( $7 == 0 )
        {
          DO CREATE_MSG_INFORMATION               135
          DO SET_MSG_AUTO_OPEN_DLG
          SET $9                                  3
        }
        ENDIF
      }
      ENDIF
    }
    EVERY 8
    {
      IF ( $9 == 1 )
      {
        DO CREATE_MSG_INFORMATION                137
        DO SET_MSG_AUTO_OPEN_DLG
        SET $9                                   2
      }
      ENDIF
      IF ( $9 == 0 )
      {
        DO CREATE_MSG_NARRATIVE                  17
        DO TURN_PANEL_ON                         2
        DO SET_MSG_AUTO_OPEN_DLG
        SET $9                                   1
      }
      ENDIF
    }
  }
  ENDIF
}
SCRIPT_END
