Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player


    }

    @Override
    public void onZoneLeave(Zone zone, Creature cha)
    {
      Player player = cha.getPlayer();
      if(player == null || !cha.isPlayer())
        return;

      raidplayers.decrementAndGet();
    }
View Full Code Here


    if ((objectTarget == null) || !objectTarget.isPlayer() || !objectTarget.getPlayer().isNoble())
    {
      activeChar.sendPacket(SystemMsg.THIS_COMMAND_CAN_ONLY_BE_USED_BY_A_NOBLESSE);
      return true;
    }
    Player playerTarget = objectTarget.getPlayer();
    SystemMessage2 sm = new SystemMessage2(SystemMsg.FOR_THE_CURRENT_GRAND_OLYMPIAD_YOU_HAVE_PARTICIPATED_IN_S1_MATCHES_S2_WINS_S3_DEFEATS_YOU_CURRENTLY_HAVE_S4_OLYMPIAD_POINTS);
    sm.addInteger(Olympiad.getCompetitionDone(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getCompetitionWin(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getCompetitionLoose(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getNoblePoints(playerTarget.getObjectId()));
    activeChar.sendPacket(sm);
    int[] ar = Olympiad.getWeekGameCounts(playerTarget.getObjectId());
    sm = new SystemMessage2(SystemMsg.YOU_HAVE_S1_MATCHES_REMAINING_THAT_YOU_CAN_PARTICIPATE_IN_THIS_WEEK_S2_1_VS_1_CLASS_MATCHES_S3_1_VS_1_MATCHES__S4_3_VS_3_TEAM_MATCHES);
    sm.addInteger(ar[0]);
    sm.addInteger(ar[1]);
    sm.addInteger(ar[2]);
    sm.addInteger(ar[2]);
View Full Code Here

    Party playerParty = activeChar.getParty();
    if (!activeChar.isInParty())
    {
      return false;
    }
    Player partyLeader = playerParty.getPartyLeader();
    if (partyLeader == null)
    {
      return false;
    }
    int memberCount = playerParty.getMemberCount();
    int lootDistribution = playerParty.getLootDistribution();
    activeChar.sendPacket(Msg._PARTY_INFORMATION_);
    switch (lootDistribution)
    {
      case Party.ITEM_LOOTER:
        activeChar.sendPacket(Msg.LOOTING_METHOD_FINDERS_KEEPERS);
        break;
      case Party.ITEM_ORDER:
        activeChar.sendPacket(Msg.LOOTING_METHOD_BY_TURN);
        break;
      case Party.ITEM_ORDER_SPOIL:
        activeChar.sendPacket(Msg.LOOTING_METHOD_BY_TURN_INCLUDING_SPOIL);
        break;
      case Party.ITEM_RANDOM:
        activeChar.sendPacket(Msg.LOOTING_METHOD_RANDOM);
        break;
      case Party.ITEM_RANDOM_SPOIL:
        activeChar.sendPacket(Msg.LOOTING_METHOD_RANDOM_INCLUDING_SPOIL);
        break;
    }
    activeChar.sendPacket(new SystemMessage(SystemMessage.PARTY_LEADER_S1).addString(partyLeader.getName()));
    activeChar.sendMessage(new CustomMessage("scripts.commands.user.PartyInfo.Members", activeChar).addNumber(memberCount));
    activeChar.sendPacket(Msg.__DASHES__);
    return true;
  }
View Full Code Here

  }
 
  @Override
  public String onEvent(String event, QuestState st, NpcInstance npc)
  {
    Player player = st.getPlayer();
    String htmltext = event;
    if (event.equalsIgnoreCase("priest_wood_q10292_1.htm"))
    {
      st.setCond(1);
      st.setState(STARTED);
      st.playSound(SOUND_ACCEPT);
    }
    else if (event.equalsIgnoreCase("priest_wood_q10292_4.htm"))
    {
      enterInstance(player, 145);
    }
    else if (event.equalsIgnoreCase("witness_of_dawn_q10292_2.htm"))
    {
      st.setCond(2);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("elcadia_abyssal_saintess_q10292_2.htm"))
    {
      st.setCond(3);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("elcadia_abyssal_saintess_q10292_9.htm"))
    {
      st.setCond(7);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("hardin_q10292_1.htm"))
    {
      st.setCond(8);
      st.playSound(SOUND_MIDDLE);
    }
    else if (event.equalsIgnoreCase("spawnTestMobs"))
    {
      int reflectId = player.getReflectionId();
      st.set("CreatureOfTheDusk1", 1);
      st.set("CreatureOfTheDusk2", 1);
      addSpawnToInstance(CREATURE_OF_THE_DUSK_1, 89416, -237992, -9632, 0, 0, reflectId);
      addSpawnToInstance(CREATURE_OF_THE_DUSK_2, 89416, -238136, -9632, 0, 0, reflectId);
      return null;
View Full Code Here

  {
    String htmltext = "noquest";
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    st.getState();
    Player player = st.getPlayer();
    if (player.getBaseClassId() != player.getActiveClassId())
    {
      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
          {
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

  @Override
  protected void thinkAttack()
  {
    if (!_activated)
    {
      final Player player = (Player) actor.getAggroList().getMostHated();
      final Reflection ref = actor.getReflection();
      ThreadPoolManager.getInstance().schedule(new TaskSetBlue(actor, player, ref), (timeToBlue + Rnd.get(maxRandomTimeBlue)) * 1000);
      _activated = true;
    }
    if (!_poisoned)
    {
      final Player player = (Player) actor.getAggroList().getMostHated();
      if (player.getParty() != null)
      {
        for (Playable playable : player.getParty().getPartyMembersWithPets())
        {
          if ((playable != null) && (actor.getDistance(playable.getLoc()) <= distanceToDebuff))
          {
            actor.doCast(SkillTable.getInstance().getInfo(poisonId, poisonLevel), playable, true);
          }
View Full Code Here

   */
  @Override
  protected void onDeath(Creature killer)
  {
    super.onDeath(killer);
    Player player = killer.getPlayer();
    if (player != null)
    {
      giveCup(player);
    }
    if (_onDeadEventTask != null)
View Full Code Here

    else if (CharacterDAO.getInstance().getObjectIdByName(_name) > 0)
    {
      sendPacket(CharacterCreateFail.REASON_NAME_ALREADY_EXISTS);
      return;
    }
    Player newChar = Player.create(_classId, _sex, getClient().getLogin(), _name, _hairStyle, _hairColor, _face);
    if (newChar == null)
    {
      return;
    }
    sendPacket(CharacterCreateSuccess.STATIC);
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player activeChar = getClient().getActiveChar();
    if ((activeChar == null) || !activeChar.isInParty() || !activeChar.getParty().isInCommandChannel())
    {
      return;
    }
    Player target = World.getPlayer(_name);
    if (target == null)
    {
      activeChar.sendPacket(Msg.THAT_PLAYER_IS_NOT_CURRENTLY_ONLINE);
      return;
    }
    if (activeChar == target)
    {
      return;
    }
    if (!target.isInParty() || !target.getParty().isInCommandChannel() || (activeChar.getParty().getCommandChannel() != target.getParty().getCommandChannel()))
    {
      activeChar.sendPacket(Msg.INVALID_TARGET);
      return;
    }
    if (activeChar.getParty().getCommandChannel().getChannelLeader() != activeChar)
    {
      activeChar.sendPacket(Msg.ONLY_THE_CREATOR_OF_A_CHANNEL_CAN_ISSUE_A_GLOBAL_COMMAND);
      return;
    }
    target.getParty().getCommandChannel().getChannelLeader().sendPacket(new SystemMessage(SystemMessage.S1_PARTY_HAS_BEEN_DISMISSED_FROM_THE_COMMAND_CHANNEL).addString(target.getName()));
    target.getParty().getCommandChannel().removeParty(target.getParty());
    target.getParty().broadCast(Msg.YOU_WERE_DISMISSED_FROM_THE_COMMAND_CHANNEL);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Player

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.