<?xml version="1.0" encoding="windows-1251"?>

<quests>

  <!-- //////////////////// after_exams_gift //////////////////// -->
  <after_exams_gift enabled_sub_quests="t0">

    <enable_condition>
      <have_mark mark="exam4_complete" />
    </enable_condition>

    <sub_quests>

      <!-- t0 -->
      <t0 holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <set_quest_status status="done" />
        </actions>
      </t0>

    </sub_quests>

  </after_exams_gift>

  <!-- //////////////////// after_final //////////////////// -->
  <after_final enabled_sub_quests="talk">

    <enable_condition>
      <have_mark mark="win_var_1" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <set_mark mark="win_end" />
          <set_quest_status status="done" />
          <disable_sub_quest name="talk" />
        </actions>
      </talk>

    </sub_quests>

  </after_final>

  <!-- //////////////////// after_final_2 //////////////////// -->
  <after_final_2 enabled_sub_quests="talk">

    <enable_condition>
      <have_mark mark="win_var_2" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <disable_sub_quest name="talk" />
          <enable_sub_quest name="talk1" />
        </actions>
      </talk>

      <!-- talk1 -->
      <talk1 holder="explorer">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <add_quest person="explorer" quest_name="after_final_2" />
          <add_task_count count="15000" item="money" quest_name="after_final_2" />
          <disable_sub_quest name="talk1" />
          <enable_sub_quest name="wait" />
        </actions>
      </talk1>

      <!-- wait -->
      <wait holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <have_items count="15000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <remove_items count="15000" name="money" />
                <set_mark mark="win_end" />
                <disable_sub_quest name="wait" />
                <set_quest_status status="done" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait>

    </sub_quests>

  </after_final_2>

  <!-- //////////////////// afterparty //////////////////// -->
  <afterparty enabled_sub_quests="q1">

    <enable_condition>
      <have_mark mark="win_end" />
    </enable_condition>

    <sub_quests>

      <!-- q1 -->
      <q1 holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
        </dialog>
        <actions>
          <next_sub_quest name="q1w" />
          <enable_bug_item count="20" item="etti_club" />
          <add_quest person="explorer" quest_name="afterparty" />
          <add_task_count count="20" item="etti_club" quest_name="afterparty" />
        </actions>
      </q1>

      <!-- q1w -->
      <q1w holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <have_items count="20" name="etti_club" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <remove_items count="20" name="etti_club" />
                <next_sub_quest name="q2" />
                <remove_all_task quest_name="afterparty" />
                <add_task item="talk" quest_name="afterparty" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </q1w>

      <!-- q2 -->
      <q2 holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
        </dialog>
        <actions>
          <next_sub_quest name="q3" />
          <add_items count="5000" name="money" />
          <remove_quest quest_name="afterparty" />
        </actions>
      </q2>

      <!-- q3 -->
      <q3 holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="q3w" />
          <add_quest person="pirate_leader" quest_name="afterparty" />
          <add_task_count count="35000" item="money" quest_name="afterparty" />
          <update_quest_title quest_name="afterparty" title_from="q3"/>
        </actions>
      </q3>

      <!-- q3w -->
      <q3w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="35000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="35000" name="money" />
                <enable_farm name="location_1" />
                <enable_farm name="location_2" />
                <enable_farm name="location_3" />
                <enable_town name="location_1" />
                <enable_town name="location_2" />
                <enable_town name="location_3" />
                <set_quest_status status="done" />
                <set_mark mark="boat" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </q3w>

    </sub_quests>

  </afterparty>

  <!-- //////////////////// afterparty2 //////////////////// -->
  <afterparty2 enabled_sub_quests="d1">

    <enable_condition>
      <have_mark mark="boat" />
    </enable_condition>

    <sub_quests>

      <!-- d1 -->
      <d1 holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <disable_helper not_used="" />
          <next_sub_quest name="d1w" />
          <add_quest person="pirate_leader" quest_name="afterparty2" />
          <add_task_count count="25000" item="money" quest_name="afterparty2" />
        </actions>
      </d1>

      <!-- d1e -->
      <d1e holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="d2" />
          <change_quest_person person="pirate_captain" quest_name="afterparty2" />
        </actions>
      </d1e>

      <!-- d1w -->
      <d1w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="25000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="d1e" />
                <remove_items count="25000" name="money" />
                <remove_all_task quest_name="afterparty2" />
                <add_task item="talk" quest_name="afterparty2" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </d1w>

      <!-- d2 -->
      <d2 holder="pirate_captain">
        <dialog>
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <next_sub_quest name="d2w" />
          <remove_all_task quest_name="afterparty2" />
          <add_task_count count="30000" item="money" quest_name="afterparty2" />
        </actions>
      </d2>

      <!-- d2e -->
      <d2e holder="pirate_captain">
        <dialog>
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <set_mark mark="dragon_sick" />
          <set_quest_status status="done" />
          <add_quest person="traveller" quest_name="dragon_sick" location="location_1"/>
          <add_task item="talk" quest_name="dragon_sick" location="location_1"/>
        </actions>
      </d2e>

      <!-- d2w -->
      <d2w holder="pirate_captain">
        <dialog>
          <question
            talker="pirate_captain"
          >
            <answer>
              <active_if>
                <have_items count="30000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_captain"
                />
              </dialog>
              <actions>
                <remove_items count="30000" name="money" />
                <next_sub_quest name="d2e" />
                <set_quest_status status="done" />
                <remove_all_task quest_name="afterparty2" />
                <add_task item="talk" quest_name="afterparty2" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_captain"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </d2w>

    </sub_quests>

  </afterparty2>

  <!-- //////////////////// arrive //////////////////// -->
  <arrive enabled_sub_quests="first_talk">

    <enable_condition>
    </enable_condition>

    <sub_quests>

      <!-- first_talk -->
      <first_talk holder="pirate_captain">
        <dialog>
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <set_quest_status status="done" />
          <enable_farm name="location_4" />
          <add_quest person="explorer" quest_name="explorer" />
          <add_task_count count="4000" item="money" quest_name="explorer" />
        </actions>
      </first_talk>

    </sub_quests>

  </arrive>

  <!-- //////////////////// etti_club //////////////////// -->
  <etti_club enabled_sub_quests="talk">

    <enable_condition>
      <quest_status name="pirates_expedition_1" status="done" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <enable_bug_item count="1" item="etti_club" />
          <disable_sub_quest name="talk" />
          <enable_sub_quest name="wait" />
          <add_quest person="pirate_leader" quest_name="etti_club" />
          <add_task item="etti_club" quest_name="etti_club" />
        </actions>
      </talk>

      <!-- wait -->
      <wait holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="1" name="etti_club" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="1" name="etti_club" />
                <add_items count="1000" name="money" />
                <disable_sub_quest name="wait" />
                <set_quest_status status="done" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait>

    </sub_quests>

  </etti_club>

  <!-- //////////////////// exams //////////////////// -->
  <exams enabled_sub_quests="c0">

    <enable_condition>
      <have_mark mark="exam3_complete" />
    </enable_condition>

    <sub_quests>

      <!-- bribe1w -->
      <bribe1w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="bribe2w" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c1b" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </bribe1w>

      <!-- bribe2w -->
      <bribe2w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="100000" name="money" />
              </active_if>
              <actions>
                <open_next_sub_quest name="bribe_given" />
                <remove_items count="100000" name="money" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c1b" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </bribe2w>

      <!-- bribe_given -->
      <bribe_given holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="c1b" />
        </actions>
      </bribe_given>

      <!-- c0 -->
      <c0 holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <open_next_sub_quest name="bribe1w" />
        </actions>
      </c0>

      <!-- c1b -->
      <c1b holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c1e" />
                <store_state />
                <disable_town name="location_1; location_2; location_3" />
                <set_money count="1000" />
                <set_barrels count="1" />
                <set_max_boxes count="0" />
                <remove_well count="1" />
                <remove_all_vegetations />
                <clear_bouquets />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="5000" item="money" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c1b>

      <!-- c1e -->
      <c1e holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="5000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="5000" name="money" />
                <next_sub_quest name="c2b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c1b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c1e>

      <!-- c2b -->
      <c2b holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c2e" />
                <store_state />
                <disable_town name="location_1; location_2; location_3" />
                <set_money count="0" />
                <set_barrels count="1" />
                <set_max_barrels count="2" />
                <set_boxes count="1" />
                <remove_well count="1" />
                <remove_all_vegetations />
                <clear_bouquets />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <add_vegetation name="fire_1;fire_1;fire_1" />
                <disable_buy_vegetation name="fire_1" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="60" item="p_fire_3" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c2b>

      <!-- c2e -->
      <c2e holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="60" name="p_fire_3" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c3b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c2b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c2e>

      <!-- c31b -->
      <c31b holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <actions>
                <open_next_sub_quest name="c31b2" />
                <store_state />
                <disable_town name="location_1; location_2; location_3" />
                <set_money count="0" />
                <set_max_barrels count="3" />
                <set_barrels count="1" />
                <set_pests_key key="stage31" />
                <disable_helper />
                <remove_all_vegetations />
                <disable_buy_vegetation name="tiger_1; fern_1; fire_1" />
                <add_vegetation name="fire_3;fire_3;fire_3;" />
                <enable_bug_item count="100" item="ghost_weight" />
                <clear_bouquets />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <add_items count="1" name="magic_sword" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="100" item="ghost_weight" quest_name="exams" />
                <add_task_count count="3" item="fire_3" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c31b>

      <!-- c31b2 -->
      <c31b2 holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="c31e" />
        </actions>
      </c31b2>

      <!-- c31e -->
      <c31e holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="100" name="ghost_weight" />
                <have_items count="3" name="fire_3" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="10" name="p_tiger_3" />
                <next_sub_quest name="c4b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
                <remove_items count="1" name="magic_sword" />
                <add_items count="1" name="simple_sword" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="5000" item="money" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c31b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
                <reset_bug_item item="ghost_weight" />
                <remove_items count="1" name="magic_sword" />
                <add_items count="1" name="simple_sword" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c31e>

      <!-- c3b -->
      <c3b holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c3e" />
                <store_state />
                <disable_town name="location_1; location_2; location_3" />
                <set_money count="200" />
                <remove_all_vegetations />
                <set_ridges installed="3" not_installed="0" />
                <set_pests_key key="stage3" />
                <disable_helper />
                <set_barrels count="2" />
                <add_vegetation name="tiger_3;tiger_3;tiger_3" />
                <disable_buy_vegetation name="tiger_1; fern_1; fire_1" />
                <enable_bug_item count="40" item="etti_club" />
                <clear_bouquets />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="40" item="etti_club" quest_name="exams" />
                <add_task_count count="3" item="tiger_3" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c3b>

      <!-- c3e -->
      <c3e holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="3" name="tiger_3" />
                <have_items count="40" name="etti_club" />
              </active_if>
              <actions>
                <open_next_sub_quest name="c3e2" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c3b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
                <reset_bug_item item="etti_club" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c3e>

      <!-- c3e2 -->
      <c3e2 holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="c31b" />
        </actions>
      </c3e2>

      <!-- c4b -->
      <c4b holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c4e" />
                <store_state />
                <disable_town name="location_1; location_2; location_3" />
                <set_money count="0" />
                <set_max_barrels count="2" />
                <set_barrels count="2" />
                <enable_buy_water enable="true" />
                <add_well />
                <disable_helper />
                <remove_all_vegetations />
                <disable_buy_vegetation name="tiger_1; fern_1; fire_1" />
                <set_ridges installed="9" not_installed="0" />
                <add_vegetation name="tiger_1;tiger_1;tiger_1;fern_1;fern_1;fern_1;fire_1;fire_1;fire_1" />
                <clear_bouquets />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="3" item="tiger_3" quest_name="exams" />
                <add_task_count count="3" item="fire_3" quest_name="exams" />
                <add_task_count count="3" item="fern_3" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c4b>

      <!-- c4e -->
      <c4e holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="3" name="tiger_3" />
                <have_items count="3" name="fern_3" />
                <have_items count="3" name="fire_3" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c5b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <remove_all_vegetations />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c4b" />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
                <remove_all_vegetations />
                <enable_buy_vegetation name="tiger_1; fern_1; fire_1" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c4e>

      <!-- c5b -->
      <c5b holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="c5e" />
                <store_state />
                <disable_town name="location_1; location_2; location_3" />
                <set_money count="150" />
                <remove_all_vegetations />
                <set_pests_key key="stage5" />
                <set_barrels count="2" />
                <clear_bouquets />
                <remove_items count="100" name="p_romashka_1;p_romashka_2;p_romashka_3;p_tree_1;p_tree_2;p_tree_3;p_rose_1;p_rose_2;p_rose_3" />
                <remove_items count="100" name="p_klubnika_1; p_klubnika_2; p_klubnika_3; p_bell_1; p_bell_2; p_bell_3; p_heart_1; p_heart_2; p_heart_3" />
                <remove_items count="100" name="p_pineapple_1; p_pineapple_2; p_pineapple_3; p_cactus_1; p_cactus_2; p_cactus_3; p_nopal_1; p_nopal_2; p_nopal_3" />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <set_ridges installed="7" not_installed="3" />
                <add_vegetation name="romashka;tree;rose;bell_1;heart_1;cactus_1;nopal_1;" />
                <add_quest person="pirate_leader" quest_name="exams" />
                <add_task_count count="1" name="romashka_3" quest_name="exams"/>
                <add_task_count count="1" name="tree_3" quest_name="exams"/>
                <add_task_count count="1" name="rose_3" quest_name="exams"/>
                <add_task_count count="1" name="bell_3" quest_name="exams"/>
                <add_task_count count="1" name="heart_3" quest_name="exams"/>
                <add_task_count count="1" name="cactus_3" quest_name="exams"/>
                <add_task_count count="1" name="nopal_3" quest_name="exams"/>
                <add_task_count count="1" name="fern_3" quest_name="exams"/>
                <add_task_count count="1" name="tiger_3" quest_name="exams"/>
                <add_task_count count="1" name="fire_3" quest_name="exams"/>
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c5b>

      <!-- c5e -->
      <c5e holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="1" name="romashka_3" />
                <have_items count="1" name="tree_3" />
                <have_items count="1" name="rose_3" />
                <have_items count="1" name="bell_3" />
                <have_items count="1" name="heart_3" />
                <have_items count="1" name="cactus_3" />
                <have_items count="1" name="nopal_3" />
                <have_items count="1" name="fern_3" />
                <have_items count="1" name="tiger_3" />
                <have_items count="1" name="fire_3" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="100" name="p_romashka_1;p_romashka_2;p_romashka_3;p_tree_1;p_tree_2;p_tree_3;p_rose_1;p_rose_2;p_rose_3" />
                <remove_items count="100" name="p_klubnika_1; p_klubnika_2; p_klubnika_3; p_bell_1; p_bell_2; p_bell_3; p_heart_1; p_heart_2; p_heart_3" />
                <remove_items count="100" name="p_pineapple_1; p_pineapple_2; p_pineapple_3; p_cactus_1; p_cactus_2; p_cactus_3; p_nopal_1; p_nopal_2; p_nopal_3" />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <set_quest_status status="done" />
                <set_mark mark="exam4_complete" />
                <remove_all_vegetations />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="100" name="p_romashka_1;p_romashka_2;p_romashka_3;p_tree_1;p_tree_2;p_tree_3;p_rose_1;p_rose_2;p_rose_3" />
                <remove_items count="100" name="p_klubnika_1; p_klubnika_2; p_klubnika_3; p_bell_1; p_bell_2; p_bell_3; p_heart_1; p_heart_2; p_heart_3" />
                <remove_items count="100" name="p_pineapple_1; p_pineapple_2; p_pineapple_3; p_cactus_1; p_cactus_2; p_cactus_3; p_nopal_1; p_nopal_2; p_nopal_3" />
                <remove_items count="100" name="p_fern_1; p_fern_2; p_fern_3; p_tiger_1; p_tiger_2; p_tiger_3; p_fire_1; p_fire_2; p_fire_3" />
                <next_sub_quest name="c5b" />
                <remove_all_vegetations />
                <restore_state />
                <remove_quest location="location_4" quest_name="exams" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </c5e>

    </sub_quests>

  </exams>

  <!-- //////////////////// explorer //////////////////// -->
  <explorer enabled_sub_quests="first_expedition">

    <enable_condition>
      <quest_status name="arrive" status="done" />
    </enable_condition>

    <sub_quests>

      <!-- first_expedition -->
      <first_expedition holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <have_items count="4000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <remove_items count="4000" name="money" />
                <set_quest_status status="done" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </first_expedition>

    </sub_quests>

  </explorer>

  <!-- //////////////////// explorer_returns //////////////////// -->
  <explorer_returns enabled_sub_quests="report">

    <enable_condition>
      <quest_status name="explorer" status="done" />
      <have_mark mark="casual" />
    </enable_condition>

    <sub_quests>

      <!-- report -->
      <report holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
        </dialog>
        <actions>
          <next_sub_quest name="wait" />
          <set_mark mark="wait_for_pirates_expedition" />
          <disable_sub_quest name="wait" />
          <disable_sub_quest name="report" />
          <set_quest_status status="done" />
          <set_mark mark="exp_done" />
        </actions>
      </report>

      <!-- wait -->
      <wait holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <quest_status name="pirates_expedition" status="done" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <set_quest_status status="done" />
              </actions>
            </answer>
            <answer>
              <dialog>
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait>

    </sub_quests>

  </explorer_returns>

  <!-- //////////////////// explorer_returns_hardcore //////////////////// -->
  <explorer_returns_hardcore enabled_sub_quests="report">

    <enable_condition>
      <quest_status name="explorer" status="done" />
      <have_mark mark="hardcore" />
    </enable_condition>

    <sub_quests>

      <!-- report -->
      <report holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="explorer"
          />
        </dialog>
        <actions>
          <disable_sub_quest name="report" />
          <enable_sub_quest name="wait" />
          <add_quest person="explorer" quest_name="explorer_returns_hardcore" />
          <add_task_count count="3000" item="money" quest_name="explorer_returns_hardcore" />
          <add_task_count count="11" item="p_tiger_1" quest_name="explorer_returns_hardcore" />
          <add_task_count count="11" item="p_fire_1" quest_name="explorer_returns_hardcore" />
          <add_task_count count="11" item="p_fern_1" quest_name="explorer_returns_hardcore" />
        </actions>
      </report>

      <!-- wait -->
      <wait holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <have_items count="3000" name="money" />
                <have_items count="11" name="p_tiger_1" />
                <have_items count="11" name="p_fire_1" />
                <have_items count="11" name="p_fern_1" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <remove_items count="3000" name="money" />
                <remove_items count="11" name="p_tiger_1" />
                <remove_items count="11" name="p_fire_1" />
                <remove_items count="11" name="p_fern_1" />
                <disable_sub_quest name="wait" />
                <enable_sub_quest name="wait_pirat" />
                <set_mark mark="wait_for_pirates_expedition" />
                <set_mark mark="exp_done" />
                <set_quest_status status="done" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait>

    </sub_quests>

  </explorer_returns_hardcore>

  <!-- //////////////////// george1 //////////////////// -->
  <george1 enabled_sub_quests="t1">

    <enable_condition>
      <have_mark mark="dragon_cured" />
    </enable_condition>

    <sub_quests>

      <!-- t1 -->
      <t1 holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <next_sub_quest name="t1w" />
          <set_mark mark="george_egg" />
          <add_quest person="traveller" quest_name="dragon_egg" location ="location_1"/>
          <add_task item="talk" quest_name="dragon_egg" location ="location_1"/>
        </actions>
      </t1>

      <!-- t1w -->
      <t1w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_mark mark="know_george_egg" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <open_next_sub_quest name="t2" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </t1w>

      <!-- t2 -->
      <t2 holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="t2w" />
          <remove_all_task quest_name="george1" />
          <add_task_count count="10" item="p_fire_1" quest_name="george1" />
          <add_task_count count="10" item="p_fire_2" quest_name="george1" />
          <add_task_count count="10" item="p_fire_3" quest_name="george1" />
        </actions>
      </t2>

      <!-- t2w -->
      <t2w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="10" name="p_fire_1" />
                <have_items count="10" name="p_fire_2" />
                <have_items count="10" name="p_fire_3" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <remove_items count="10" name="p_fire_1" />
                <remove_items count="10" name="p_fire_2" />
                <remove_items count="10" name="p_fire_3" />
                <next_sub_quest name="t3" />
                <remove_all_task quest_name="george1" />
                <add_task item="talk" quest_name="george1" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </t2w>

      <!-- t3 -->
      <t3 holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <set_mark mark="george_food" />
          <next_sub_quest name="t3w" />
          <remove_quest quest_name="george1" />
          <add_quest person="traveller" quest_name="dragon_food" location ="location_1"/>
          <add_task item="talk" quest_name="dragon_food" location ="location_1"/>
        </actions>
      </t3>

      <!-- t3w -->
      <t3w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_mark mark="know_george_food" />
              </active_if>
              <dialog>
                <phrase
                  talker="hero"
                />
              </dialog>
              <actions>
                <next_sub_quest name="t4" />
                <remove_quest quest_name="george1" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </t3w>

      <!-- t4 -->
      <t4 holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_mark mark="george_food_packed" />
              </active_if>
              <dialog>
              </dialog>
              <actions>
                <next_sub_quest name="t4w" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="t4w" />
              </actions>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </t4>

      <!-- t4w -->
      <t4w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_mark mark="george_food_packed" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <next_sub_quest name="t5" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </t4w>

      <!-- t5 -->
      <t5 holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <set_quest_status status="done" />
        </actions>
      </t5>

    </sub_quests>

  </george1>

  <!-- //////////////////// horn //////////////////// -->
  <horn enabled_sub_quests="explorer">

    <enable_condition>
      <have_mark mark="exp_done" />
      <have_mark mark="horn" />
    </enable_condition>

    <sub_quests>

      <!-- explorer -->
      <explorer holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
        </dialog>
        <actions>
          <disable_sub_quest name="explorer" />
          <enable_sub_quest name="wait_money" />
          <set_mark mark="" />
          <set_mark mark="" />
          <add_quest person="explorer" quest_name="horn" />
          <add_task_count count="5000" item="money" quest_name="horn" />
        </actions>
      </explorer>

      <!-- wait_money -->
      <wait_money holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <have_items count="5000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <remove_items count="5000" name="money" />
                <disable_sub_quest name="wait_money" />
                <set_quest_status status="done" />
                <add_horn no_param="" />
                <set_mark mark="shop_horn_2" />
                <set_mark mark="shop_horn_3" />
                <reset_mark mark="horn" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait_money>

    </sub_quests>

  </horn>

  <!-- //////////////////// meeting //////////////////// -->
  <meeting enabled_sub_quests="talk">

    <enable_condition>
      <quest_status name="etti_club" status="done" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="parents"
          />
          <phrase
            talker="parents"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="parents"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <disable_sub_quest name="talk" />
          <set_quest_status status="done" />
          <enable_town name="location_5" />
        </actions>
      </talk>

    </sub_quests>

  </meeting>

  <!-- //////////////////// parrot //////////////////// -->
  <parrot enabled_sub_quests="t1">

    <enable_condition>
      <quest_status name="george1" status="done" />
    </enable_condition>

    <sub_quests>

      <!-- t1 -->
      <t1 holder="pirate_leader">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <next_sub_quest name="t1w" />
          <set_mark mark="find_parrot" />
        </actions>
      </t1>

      <!-- t1w -->
      <t1w holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_mark mark="found_parrot" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <add_items count="2000" name="money" />
                <set_quest_status status="done" />
              </actions>
            </answer>
            <answer />
          </question>
        </dialog>
        <actions>
        </actions>
      </t1w>

    </sub_quests>

  </parrot>

  <!-- //////////////////// pirates_expedition //////////////////// -->
  <pirates_expedition enabled_sub_quests="talk">

    <enable_condition>
      <have_mark mark="wait_for_pirates_expedition" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="pirate_leader">
        <dialog>
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_leader"
          />
        </dialog>
        <actions>
          <next_sub_quest name="wait_money" />
          <set_mark mark="horn" />
          <add_quest person="pirate_leader" quest_name="pirates_expedition" />
          <add_task_count count="10000" item="money" quest_name="pirates_expedition" />
        </actions>
      </talk>

      <!-- wait_money -->
      <wait_money holder="pirate_leader">
        <dialog>
          <question
            talker="pirate_leader"
          >
            <answer>
              <active_if>
                <have_items count="10000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
              <actions>
                <set_quest_status status="done" />
                <remove_items count="10000" name="money" />
                <disable_sub_quest name="wait_money" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_leader"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait_money>

    </sub_quests>

  </pirates_expedition>

  <!-- //////////////////// pirates_expedition_1 //////////////////// -->
  <pirates_expedition_1 enabled_sub_quests="talk">

    <enable_condition>
      <quest_status name="pirates_expedition" status="done" />
      <quest_status name="horn" status="done" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <set_quest_status status="done" />
          <disable_sub_quest name="talk" />
        </actions>
      </talk>

    </sub_quests>

  </pirates_expedition_1>

  <!-- //////////////////// toplivo //////////////////// -->
  <toplivo enabled_sub_quests="talk">

    <enable_condition>
      <have_mark mark="need_toplivo" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="explorer">
        <dialog>
          <phrase
            talker="explorer"
          />
          <phrase
            talker="hero"
          />
        </dialog>
        <actions>
          <disable_sub_quest name="talk" />
          <enable_sub_quest name="wait" />
          <remove_quest location="location_5" quest_name="legend" />
          <add_quest person="explorer" quest_name="toplivo" />
          <add_task_count count="13" item="p_fire_2" quest_name="toplivo" />
        </actions>
      </talk>

      <!-- wait -->
      <wait holder="explorer">
        <dialog>
          <question
            talker="explorer"
          >
            <answer>
              <active_if>
                <have_items count="13" name="p_fire_2" />
              </active_if>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
              <actions>
                <remove_items count="13" name="p_fire_2" />
                <reset_mark mark="need_toplivo" />
                <set_mark mark="toplivo" />
                <disable_sub_quest name="wait" />
                <set_quest_status status="done" />
                <add_quest person="pirate_leader" location="location_5" quest_name="legend" />
                <add_task item="talk" location="location_5" quest_name="legend" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="explorer"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait>

    </sub_quests>

  </toplivo>

  <!-- //////////////////// weapon_pistol //////////////////// -->
  <weapon_pistol enabled_sub_quests="talk">

    <enable_condition>
      <quest_status name="explorer" status="done" />
    </enable_condition>

    <sub_quests>

      <!-- talk -->
      <talk holder="pirate_captain">
        <dialog>
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_captain"
          />
          <phrase
            talker="hero"
          />
          <phrase
            talker="pirate_captain"
          />
        </dialog>
        <actions>
          <disable_sub_quest name="talk" />
          <enable_sub_quest name="wait" />
          <add_quest person="pirate_captain" quest_name="weapon_pistol" />
          <add_task_count count="1000" item="money" quest_name="weapon_pistol" />
          <add_task_count count="13" item="p_tiger_1" quest_name="weapon_pistol" />
        </actions>
      </talk>

      <!-- wait -->
      <wait holder="pirate_captain">
        <dialog>
          <question
            talker="pirate_captain"
          >
            <answer>
              <active_if>
                <have_items count="13" name="p_tiger_1" />
                <have_items count="1000" name="money" />
              </active_if>
              <dialog>
                <phrase
                  talker="pirate_captain"
                />
              </dialog>
              <actions>
                <remove_items count="13" name="p_tiger_1" />
                <remove_items count="1000" name="money" />
                <disable_sub_quest name="wait" />
                <set_quest_status status="done" />
                <add_weapon name="pistol" />
                <set_mark mark="weapon_4" />
              </actions>
            </answer>
            <answer>
              <dialog>
                <phrase
                  talker="pirate_captain"
                />
              </dialog>
            </answer>
          </question>
        </dialog>
        <actions>
        </actions>
      </wait>

    </sub_quests>

  </weapon_pistol>


</quests>