Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player$SummonSkillCastingTask


  }
 
  @Override
  public String onTalk(NpcInstance npc, QuestState st)
  {
    Player player = st.getPlayer();
    String htmltext = "noquest";
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    if (npcId == CON1)
    {
      if (st.getState() == CREATED)
      {
        if (player.getLevel() < 97)
        {
          htmltext = "33044-02.htm";
          st.exitCurrentQuest(true);
        }
        else
View Full Code Here


     * @see lineage2.gameserver.listener.actor.player.OnAnswerListener#sayNo()
     */
    @Override
    public void sayNo()
    {
      Player player1, player2;
      if (((player1 = _playerRef1.get()) == null) || ((player2 = _playerRef2.get()) == null))
      {
        return;
      }
      player1.sendMessage(new CustomMessage("lineage2.gameserver.model.L2Player.EngageAnswerNo", player2));
    }
View Full Code Here

  @Override
  public String onKill(NpcInstance npc, QuestState st)
  {
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    Player player = st.getPlayer();
    if (cond == 1)
    {
      if (npcId == CON2)
      {
        if (player.getParty() == null)
        {
          st.setCond(2);
          st.giveItems(CON3, 1);
          st.playSound(SOUND_MIDDLE);
        }
        else
        {
          for (Player pmember : player.getParty().getPartyMembers())
          {
            QuestState pst = pmember.getQuestState("_180_InfernalFlamesBurningInCrystalPrison");
            if ((pst != null) && (pst.getCond() == 1))
            {
              pst.setCond(2);
View Full Code Here

  {
    if (!item.isEquipable())
    {
      return;
    }
    Player player = (Player) actor;
    ArmorSet armorSet = ArmorSetsHolder.getInstance().getArmorSet(item.getItemId());
    if (armorSet == null)
    {
      return;
    }
    boolean update = false;
    if (armorSet.containItem(slot, item.getItemId()))
    {
      List<Skill> skills = armorSet.getSkills(armorSet.getEquipedSetPartsCount(player));
      for (Skill skill : skills)
      {
        player.addSkill(skill, false);
        update = true;
      }
      if (armorSet.containAll(player))
      {
        if (armorSet.containShield(player))
        {
          skills = armorSet.getShieldSkills();
          for (Skill skill : skills)
          {
            player.addSkill(skill, false);
            update = true;
          }
        }
        if (armorSet.isEnchanted6(player))
        {
          skills = armorSet.getEnchant6skills();
          for (Skill skill : skills)
          {
            player.addSkill(skill, false);
            update = true;
          }
        }
      }
    }
    else if (armorSet.containShield(item.getItemId()) && armorSet.containAll(player))
    {
      List<Skill> skills = armorSet.getShieldSkills();
      for (Skill skill : skills)
      {
        player.addSkill(skill, false);
        update = true;
      }
    }
    if (update)
    {
      player.sendPacket(new SkillList(player));
      player.updateStats();
    }
  }
View Full Code Here

  }
 
  @Override
  public String onEvent(String event, QuestState st, NpcInstance npc)
  {
    Player player = st.getPlayer();
    String htmltext = event;
    if (event.equalsIgnoreCase("30191-02.htm"))
    {
      st.setCond(1);
      st.setState(STARTED);
      st.playSound(SOUND_ACCEPT);
      st.giveItems(JacobsNecklace, 1);
    }
    else if (event.equalsIgnoreCase("32569-05.htm"))
    {
      st.setCond(2);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("32570-02.htm"))
    {
      st.setCond(3);
      st.giveItems(DeadmansHerb, 1);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("30760-02.htm"))
    {
      if (player.getBaseClassId() == player.getActiveClassId())
      {
        st.addExpAndSp(10000000, 2500000);
        st.setState(COMPLETED);
        st.exitCurrentQuest(false);
        st.playSound(SOUND_FINISH);
      }
      else
      {
        return "subclass_forbidden.htm";
      }
    }
    else if (event.equalsIgnoreCase("close_your_eyes"))
    {
      st.setCond(4);
      st.takeItems(DeadmansHerb, -1);
      st.playSound(SOUND_MIDDLE);
      player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ_DYING_MASSAGE);
      return "";
    }
    else if (event.equalsIgnoreCase("32569-09.htm"))
    {
      htmltext = "32569-09.htm";
      Functions.npcSay(npc, st.getPlayer().getName() + "! That stranger must be defeated. Here is the ultimate help!");
      NpcInstance mob = st.addSpawn(ShilensEvilThoughts, 82425, 47232, -3216, 0, 0, 180000);
      spawns.put(player.getObjectId(), mob.getObjectId());
      mob.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, player, 100000);
    }
    else if (event.equalsIgnoreCase("32569-13.htm"))
    {
      st.setCond(6);
View Full Code Here

  public String onTalk(NpcInstance npc, QuestState st)
  {
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    int id = st.getState();
    Player player = st.getPlayer();
    if (npcId == Hollint)
    {
      if (id == CREATED)
      {
        if (player.getLevel() < 79)
        {
          st.exitCurrentQuest(true);
          return "30191-00.htm";
        }
        QuestState qs = player.getQuestState(_192_SevenSignSeriesOfDoubt.class);
        if ((qs == null) || !qs.isCompleted())
        {
          st.exitCurrentQuest(true);
          return "noquest";
        }
        return "30191-01.htm";
      }
      else if (cond == 1)
      {
        return "30191-03.htm";
      }
    }
    else if (npcId == Cain)
    {
      if (cond == 1)
      {
        return "32569-01.htm";
      }
      else if (cond == 2)
      {
        return "32569-06.htm";
      }
      else if (cond == 3)
      {
        return "32569-07.htm";
      }
      else if (cond == 4)
      {
        Integer obj_id = spawns.get(player.getObjectId());
        NpcInstance mob = obj_id != null ? GameObjectsStorage.getNpc(obj_id) : null;
        if ((mob == null) || mob.isDead())
        {
          return "32569-08.htm";
        }
View Full Code Here

  {
    if (!item.isEquipable())
    {
      return;
    }
    Player player = (Player) actor;
    boolean remove = false;
    List<Skill> removeSkillId1 = new ArrayList<>();
    List<Skill> removeSkillId2 = new ArrayList<>();
    List<Skill> removeSkillId3 = new ArrayList<>();
    ArmorSet armorSet = ArmorSetsHolder.getInstance().getArmorSet(item.getItemId());
    if (armorSet == null)
    {
      return;
    }
    if (armorSet.containItem(slot, item.getItemId()))
    {
      remove = true;
      removeSkillId1 = armorSet.getSkillsToRemove();
      removeSkillId2 = armorSet.getShieldSkills();
      removeSkillId3 = armorSet.getEnchant6skills();
    }
    else if (armorSet.containShield(item.getItemId()))
    {
      remove = true;
      removeSkillId2 = armorSet.getShieldSkills();
    }
    boolean update = false;
    if (remove)
    {
      for (Skill skill : removeSkillId1)
      {
        player.removeSkill(skill, false);
        update = true;
      }
      for (Skill skill : removeSkillId2)
      {
        player.removeSkill(skill);
        update = true;
      }
      for (Skill skill : removeSkillId3)
      {
        player.removeSkill(skill);
        update = true;
      }
    }
    List<Skill> skills = armorSet.getSkills(armorSet.getEquipedSetPartsCount(player));
    for (Skill skill : skills)
    {
      player.addSkill(skill, false);
      update = true;
    }
    if (update)
    {
      if (!player.getInventory().isRefresh)
      {
        if (!player.getOpenCloak() && (player.getInventory().setPaperdollItem(Inventory.PAPERDOLL_BACK, null) != null))
        {
          player.sendPacket(SystemMsg.YOUR_CLOAK_HAS_BEEN_UNEQUIPPED_BECAUSE_YOUR_ARMOR_SET_IS_NO_LONGER_COMPLETE);
        }
      }
      player.sendPacket(new SkillList(player));
      player.updateStats();
    }
  }
View Full Code Here

  @Override
  public String onKill(NpcInstance npc, QuestState st)
  {
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    Player player = st.getPlayer();
    if (player == null)
    {
      return null;
    }
    if ((npcId == ShilensEvilThoughts) && (cond == 4))
    {
      Integer obj_id = spawns.get(player.getObjectId());
      if ((obj_id != null) && (obj_id.intValue() == npc.getObjectId()))
      {
        spawns.remove(player.getObjectId());
        st.setCond(5);
        st.playSound(SOUND_ITEMGET);
        st.giveItems(SculptureofDoubt, 1);
      }
    }
View Full Code Here

 
  @Override
  public String onTalk(NpcInstance npc, QuestState st)
  {
    String htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>";
    Player player = st.getPlayer();
    Clan clan = player.getClan();
    if ((player.getClan() == null) || !player.isClanLeader())
    {
      st.exitCurrentQuest(true);
      htmltext = "31331-0.htm";
    }
    else if (player.getClan().getLevel() < 5)
    {
      st.exitCurrentQuest(true);
      htmltext = "31331-0.htm";
    }
    else
    {
      int cond = st.getCond();
      int id = st.getState();
      if ((id == CREATED) && (cond == 0))
      {
        htmltext = "31331-1.htm";
      }
      else if ((id == STARTED) && (cond == 1))
      {
        long count = st.getQuestItemsCount(CLAW);
        if (count == 0)
        {
          htmltext = "31331-4.htm";
        }
        else if (count >= 1)
        {
          htmltext = "31331-7.htm";
          st.takeItems(CLAW, -1);
          int pointsCount = CLAN_POINTS_REWARD * (int) count;
          if (count > 10)
          {
            pointsCount += (count % 10) * 118;
          }
          int increasedPoints = clan.incReputation(pointsCount, true, "_510_AClansReputation");
          player.sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_SUCCESSFULLY_COMPLETED_A_CLAN_QUEST_S1_POINTS_HAVE_BEEN_ADDED_TO_YOUR_CLAN_REPUTATION_SCORE).addNumber(increasedPoints));
        }
      }
    }
    return htmltext;
  }
View Full Code Here

      ExSubPledgeSkillAdd packet = new ExSubPledgeSkillAdd(_type, newSkill.getId(), newSkill.getLevel());
      for (UnitMember temp : _clan)
      {
        if (temp.isOnline())
        {
          Player player = temp.getPlayer();
          if (player != null)
          {
            player.sendPacket(packet);
            if (player.getPledgeType() == _type)
            {
              addSkill(player, newSkill);
            }
          }
        }
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.