Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player$SummonSkillCastingTask


      if(cha == null)
        return;

      if(cha instanceof Player)
      {
        Player player = cha.getPlayer();
        if(ArcanManager.getStage() == _RED)
        {
          player.sendPacket(new EventTrigger(_BLUE, false));
          player.sendPacket(new EventTrigger(_RED, true));
        }
        else
        {
          player.sendPacket(new EventTrigger(_RED, false));
          player.sendPacket(new EventTrigger(_BLUE, true));
        }
      }
    }
View Full Code Here


  @Override
  public String onEvent(String event, QuestState st, NpcInstance npc)
  {
    String htmltext = event;
    Player player = st.getPlayer();

    if(event.equalsIgnoreCase("quest_accpted"))
    {
      st.setState(STARTED);
      st.setCond(1);
      st.playSound(SOUND_ACCEPT);
      htmltext = "sofa_sizraku_q10382_03.htm";
    }
    if(event.equalsIgnoreCase("enter_instance"))
    {
      if(player.getInventory().getItemByItemId(MARK_OF_THE_RESISTANCE) != null)
      {
        Reflection r = player.getActiveReflection();
        if(r != null)
        {
          if(player.canReenterInstance(normalTautiInstanceId))
          {
            player.teleToLocation(r.getTeleportLoc(), r);
          }
        }
        else if(player.canEnterInstance(normalTautiInstanceId))
        {
          ReflectionUtils.enterReflection(player, new TautiNormal(), normalTautiInstanceId);
        }
        return "";
      }
View Full Code Here

  }
 
  @Override
  public String onTalk(NpcInstance npc, QuestState st)
  {
    Player player = st.getPlayer();
    String htmlText = NO_QUEST_DIALOG;
    int cond = st.getCond();
    int id = st.getState();
    if (cond == 0)
    {
      if (player.getLevel() < 97)
      {
        st.exitCurrentQuest(true);
        htmlText = "33293-02";
      }
      QuestState Rumiese = player.getQuestState(_149_PrimalMotherIstina.class);
      if ((id == CREATED) && (Rumiese != null) && (Rumiese.getState() != COMPLETED))
      {
        st.exitCurrentQuest(true);
        htmlText = "33293-02.htm";
      }
View Full Code Here

  {
    final NpcInstance actor = getActor();
    final Creature following = actor.getFollowTarget();
    if ((following == null) || !actor.isFollow)
    {
      final Player master = getMaster();
      if (master != null)
      {
        actor.setFollowTarget(master);
        actor.setRunning();
        actor.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, master, Config.FOLLOW_RANGE);
View Full Code Here

    _followTask = ThreadPoolManager.getInstance().schedule(new ThinkFollow(), 250L);
    final Reflection ref = actor.getReflection();
    if ((ref != null) && (_chatTimer < System.currentTimeMillis()))
    {
      _chatTimer = System.currentTimeMillis() + 5000;
      final Player masterplayer = target.getPlayer();
      final Map<Skill, Integer> d_skill = new HashMap<>();
      final double distance = actor.getDistance(target);
      switch (ref.getInstancedZoneId())
      {
        case 156:
          final QuestState qs = masterplayer.getQuestState(_10293_SevenSignsForbiddenBook.class);
          if ((qs != null) && !qs.isCompleted())
          {
            if (Rnd.chance(20))
            {
              return;
            }
            if (qs.getCond() == 1)
            {
              Functions.npcSay(actor, NpcString.I_MUST_ASK_LIBRARIAN_SOPHIA_ABOUT_THE_BOOK);
            }
            else if (qs.getCond() == 2)
            {
              Functions.npcSay(actor, NpcString.WHAT_TOOK_SO_LONG_I_WAITED_FOR_EVER);
            }
            else if (qs.getCond() >= 5)
            {
              if (Rnd.chance(50))
              {
                Functions.npcSay(actor, NpcString.THE_BOOK_THAT_WE_SEEK_IS_CERTAINLY_HERE);
              }
              else
              {
                Functions.npcSay(actor, NpcString.AN_UNDERGROUND_LIBRARY);
              }
            }
          }
          break;
        case 151:
          final QuestState qs2 = masterplayer.getQuestState(_10294_SevenSignsMonasteryofSilence.class);
          if ((qs2 != null) && !qs2.isCompleted())
          {
            if (qs2.getCond() == 2)
            {
              if (Rnd.chance(20))
              {
                if (Rnd.chance(70))
                {
                  Functions.npcSay(actor, NpcString.IT_SEEMS_THAT_YOU_CANNOT_REMEMBER_TO_THE_ROOM_OF_THE_WATCHER_WHO_FOUND_THE_BOOK);
                }
                else
                {
                  Functions.npcSay(actor, NpcString.REMEMBER_THE_CONTENT_OF_THE_BOOKS_THAT_YOU_FOUND);
                }
              }
              if (target.getCurrentHpPercents() < 70)
              {
                addDesiredSkill(d_skill, target, distance, heal);
              }
              if (target.getCurrentMpPercents() < 50)
              {
                addDesiredSkill(d_skill, target, distance, recharge);
              }
              if (target.isInCombat())
              {
                addDesiredSkill(d_skill, target, distance, blessBlood);
              }
              addDesiredSkill(d_skill, target, distance, vampRage);
              addDesiredSkill(d_skill, target, distance, holyResist);
              final Skill r_skill = selectTopSkill(d_skill);
              chooseTaskAndTargets(r_skill, target, distance);
              doTask();
            }
            else if (qs2.getCond() == 3)
            {
              Functions.npcSay(actor, NpcString.YOUR_WORK_HERE_IS_DONE_SO_RETURN_TO_THE_CENTRAL_GUARDIAN);
            }
          }
          final QuestState qs3 = masterplayer.getQuestState(_10295_SevenSignsSolinasTomb.class);
          if ((qs3 != null) && !qs3.isCompleted())
          {
            if (qs3.getCond() == 1)
            {
              if (Rnd.chance(20))
              {
                if (Rnd.chance(30))
                {
                  Functions.npcSay(actor, NpcString.TO_REMOVE_THE_BARRIER_YOU_MUST_FIND_THE_RELICS_THAT_FIT_THE_BARRIER_AND_ACTIVATE_THE_DEVICE);
                }
                else if (Rnd.chance(30))
                {
                  Functions.npcSay(actor, NpcString.THE_GUARDIAN_OF_THE_SEAL_DOESNT_SEEM_TO_GET_INJURED_AT_ALL_UNTIL_THE_BARRIER_IS_DESTROYED);
                }
                else
                {
                  Functions.npcSay(actor, NpcString.THE_DEVICE_LOCATED_IN_THE_ROOM_IN_FRONT_OF_THE_GUARDIAN_OF_THE_SEAL_IS_DEFINITELY_THE_BARRIER_THAT_CONTROLS_THE_GUARDIANS_POWER);
                }
              }
              if (target.getCurrentHpPercents() < 80)
              {
                addDesiredSkill(d_skill, target, distance, heal);
              }
              if (target.getCurrentMpPercents() < 70)
              {
                addDesiredSkill(d_skill, target, distance, recharge);
              }
              if (target.isInCombat())
              {
                addDesiredSkill(d_skill, target, distance, blessBlood);
              }
              addDesiredSkill(d_skill, target, distance, vampRage);
              addDesiredSkill(d_skill, target, distance, holyResist);
              final Skill r_skill = selectTopSkill(d_skill);
              chooseTaskAndTargets(r_skill, target, distance);
              doTask();
            }
          }
          final QuestState qs4 = masterplayer.getQuestState(_10296_SevenSignsPoweroftheSeal.class);
          if ((qs4 != null) && !qs4.isCompleted())
          {
            if (qs4.getCond() == 2)
            {
              if (target.getCurrentHpPercents() < 80)
View Full Code Here

      if(cha == null)
      {
        return;
      }

      Player player = cha.getPlayer();

      Reflection r = player.getActiveReflection();
      if(r != null)
      {
        if(player.canReenterInstance(InstanceId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if(player.canEnterInstance(InstanceId))
      {
        ReflectionUtils.enterReflection(player, new Nursery(), InstanceId);
      }
    }
View Full Code Here

     * @see lineage2.gameserver.listener.zone.OnZoneEnterLeaveListener#onZoneEnter(Zone, Creature)
     */
    @Override
    public void onZoneEnter(Zone zone, Creature cha)
    {
      Player player = cha.getPlayer();
      if ((player == null) || !cha.isPlayer() || done)
      {
        return;
      }
      done = true;
      player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ2_HOLY_BURIAL_GROUND_OPENING);
    }
View Full Code Here

     * @see lineage2.gameserver.listener.zone.OnZoneEnterLeaveListener#onZoneEnter(Zone, Creature)
     */
    @Override
    public void onZoneEnter(Zone zone, Creature cha)
    {
      Player player = cha.getPlayer();
      if ((player == null) || !cha.isPlayer())
      {
        return;
      }
      player.broadcastPacket(new EventTrigger(21100100, true));
      if (!done)
      {
        done = true;
        player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ2_SOLINA_TOMB_OPENING);
      }
    }
View Full Code Here

  }
 
  @Override
  public String onEvent(String event, QuestState st, NpcInstance npc)
  {
    Player player = st.getPlayer();
    if (event.equalsIgnoreCase("EnterEmeraldSteam"))
    {
      st.setState(STARTED);
      enterInstance(player, 1);
      return null;
    }
    else if (event.equalsIgnoreCase("EnterCoralGarden"))
    {
      st.setState(STARTED);
      enterInstance(player, 2);
      return null;
    }
    else if (event.equalsIgnoreCase("meet"))
    {
      int state = BaylorManager.canIntoBaylorLair(player);
      if ((state == 1) || (state == 2))
      {
        return "meetingNo.htm";
      }
      else if (state == 4)
      {
        return "meetingNoParty.htm";
      }
      else if (state == 3)
      {
        return "teleportOut.htm";
      }
      st.giveItems(PRISON_KEY, 1, false);
      BaylorManager.entryToBaylorLair(player);
      return "meeting.htm";
    }
    else if (event.equalsIgnoreCase("out"))
    {
      if (player.getParty() != null)
      {
        player.getParty().setReflection(null);
        for (Player pl : player.getParty().getPartyMembers())
        {
          pl.teleToLocation(149361, 172327, -945, 0);
        }
      }
      else
      {
        player.teleToLocation(149361, 172327, -945, 0);
      }
      return null;
    }
    return event;
  }
View Full Code Here

    public void onZoneEnter(Zone zone, Creature cha)
    {
      if(_entryLocked)
        return;

      Player player = cha.getPlayer();
      if(player == null || !cha.isPlayer())
        return;

      if(checkstartCond(raidplayers.incrementAndGet()))
      {
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Player$SummonSkillCastingTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.