@Override
 public boolean checkStartCondition(Player player) {
   return (player.getLevel() >= minLevel
       && player.getLevel() <= maxLevel
       && player.getRace() == Race.ERTHEIA
       && player.getQuestState("_10779_LetterFromTheQueen_SeaOfSpores") == null);
 }
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int cond = st.getCond();
   int id = st.getState();
   Player player = st.getPlayer();
   if (!player.isBaseClassActive()) return "no_subclass_allowed.htm";
   switch (npcId) {
     case WOOD:
       if (cond == 0) {
         QuestState qs = player.getQuestState(_198_SevenSignsEmbryo.class);
         if (player.getLevel() >= 81 && qs != null && qs.isCompleted())
           htmltext = "priest_wood_q10292_0.htm";
         else {
           htmltext = "priest_wood_q10292_0n.htm";
           st.exitCurrentQuest(true);
         }
       } else if (cond == 1) htmltext = "priest_wood_q10292_3.htm";
       else if (cond > 1 && !st.isCompleted())
         htmltext = "priest_wood_q10292_5.htm"; // TODO: Отредактировать диалог по оффу
       else if (st.isCompleted()) htmltext = "priest_wood_q10292_6.htm";
       break;
     case FRANZ:
       if (cond == 1) htmltext = "witness_of_dawn_q10292_0.htm";
       else if (cond == 2) htmltext = "witness_of_dawn_q10292_4.htm";
       break;
     case ELCARDIA:
       if (cond == 2) htmltext = "elcadia_abyssal_saintess_q10292_0.htm";
       else if (cond == 3) htmltext = "elcadia_abyssal_saintess_q10292_2.htm";
       else if (cond == 4) {
         htmltext = "elcadia_abyssal_saintess_q10292_3.htm";
         st.takeItems(ELCARDIAS_MARK, -1);
         st.playSound(SOUND_MIDDLE);
         st.setCond(5);
       } else if (cond == 5) htmltext = "elcadia_abyssal_saintess_q10292_5.htm";
       else if (cond == 6) htmltext = "elcadia_abyssal_saintess_q10292_6.htm";
       else if (cond == 7) htmltext = "elcadia_abyssal_saintess_q10292_9.htm";
       else if (cond == 8) {
         htmltext = "elcadia_abyssal_saintess_q10292_10.htm";
         st.addExpAndSp(10000000, 1000000);
         st.setState(COMPLETED);
         st.exitCurrentQuest(false);
         st.playSound(SOUND_FINISH);
       }
       break;
     case HARDIN:
       if (cond == 7) htmltext = "hardin_q10292_0.htm";
       else if (cond == 8) htmltext = "hardin_q10292_2.htm";
       break;
   }
   return htmltext;
 }
  @Override
  public void onBypassFeedback(Player player, String command) {
    if (!canBypassCheck(player, this)) return;

    if (command.startsWith("tryenter")) {
      if (NaiaLock.isEntranceActive()) {
        // instance
        if (!player.isInParty()) {
          player.sendPacket(SystemMsg.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER);
          return;
        }
        if (!player.getParty().isLeader(player)) {
          player.sendPacket(SystemMsg.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER);
          return;
        }
        for (Player member : player.getParty().getPartyMembers()) {
          if (member.getLevel() < 80) {
            player.sendPacket(
                new SystemMessage(
                        SystemMessage.C1S_LEVEL_REQUIREMENT_IS_NOT_SUFFICIENT_AND_CANNOT_BE_ENTERED)
                    .addName(member));
            return;
          }
          if (!member.isInRange(this, 500)) {
            player.sendPacket(
                new SystemMessage(
                        SystemMessage
                            .C1_IS_IN_A_LOCATION_WHICH_CANNOT_BE_ENTERED_THEREFORE_IT_CANNOT_BE_PROCESSED)
                    .addName(member));
            return;
          }
        }
        NaiaTowerManager.startNaiaTower(player);

        broadcastPacket(new MagicSkillUse(this, this, 5527, 1, 0, 0));
        doDie(null);
      } else {
        broadcastPacket(new MagicSkillUse(this, this, 5527, 1, 0, 0));
        doDie(null);
      }
    } else super.onBypassFeedback(player, command);
  }
 public MyTargetSelectedPacket(Player player, GameObject target) {
   _objectId = target.getObjectId();
   if (target.isCreature()) _color = player.getLevel() - ((Creature) target).getLevel();
   else _color = 0;
 }
 @Override
 public int compareTo(FightBattlePlayerObject o) {
   return _player.getLevel() - o.getPlayer().getLevel();
 }