Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Party


  public void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    super.onEvtDead(killer);
    actor.deleteMe();
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final NpcTemplate template = NpcHolder.getInstance().getTemplate(18602);
View Full Code Here


   * @param time String
   * @param shutdownMode int
   */
  public void schedule(String time, int shutdownMode)
  {
    SchedulingPattern cronTime;
    try
    {
      cronTime = new SchedulingPattern(time);
    }
    catch (InvalidPatternException e)
    {
      return;
    }
    int seconds = (int) ((cronTime.next(System.currentTimeMillis()) / 1000L) - (System.currentTimeMillis() / 1000L));
    schedule(seconds, shutdownMode);
  }
View Full Code Here

  {
    _instance = this;
    _serverStarted = time();
    _listeners = new GameServerListenerList();
    new File("./log/").mkdir();
    version = new Version(GameServer.class);
    _log.info("=================================================");
    _log.info("Revision: ................ " + version.getRevisionNumber());
    _log.info("Build date: .............. " + version.getBuildDate());
    _log.info("Compiler version: ........ " + version.getBuildJdk());
    _log.info("=================================================");
View Full Code Here

    _log.info("=================================================");
    Config.load();
    checkFreePorts();
    Class.forName(Config.DATABASE_DRIVER).newInstance();
    DatabaseFactory.getInstance().getConnection().close();
    IdFactory _idFactory = IdFactory.getInstance();
    if (!_idFactory.isInitialized())
    {
      _log.error("Could not read object IDs from DB. Please Check Your Data.");
      throw new Exception("Could not initialize the ID factory");
    }
    CacheManager.getInstance();
View Full Code Here

    {
      teleportHome();
      return false;
    }
    clearTasks();
    Creature target = prepareTarget();
    if (target == null)
    {
      return false;
    }
    if (!BaiumManager.getZone().checkIfInZone(target))
View Full Code Here

      if (!player.isInParty())
      {
        player.sendPacket(Msg.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER);
        return;
      }
      Party party = player.getParty();
      if (!party.isLeader(player))
      {
        player.sendPacket(Msg.ONLY_A_PARTY_LEADER_CAN_TRY_TO_ENTER);
        return;
      }
      for (Player p : party.getPartyMembers())
      {
        if (!this.isInRange(p, 500))
        {
          player.sendPacket(Msg.ITS_TOO_FAR_FROM_THE_NPC_TO_WORK);
          return;
        }
      }
      for (int i = 0; i < medals.length; i++)
      {
        if (!hasItem(party, medals[i]))
        {
          player.sendMessage("In order to enter the Anomic Foundry your party should be carrying all 5 medals of Tully");
          return;
        }
      }
      party.Teleport(new Location(25512, 247240, -2656));
    }
    else
    {
      super.onBypassFeedback(player, command);
    }
View Full Code Here

 
  @Override
  public String onKill(NpcInstance npc, QuestState st)
  {
    int cond = st.getCond();
    Party party = st.getPlayer().getParty();
    if (cond == 1)
    {
      if (npc.getNpcId() == _IstinaHard)
      {
        if (party == null)
        {
          st.setCond(2);
          st.giveItems(_topShilensMark, 1);
          st.playSound(SOUND_MIDDLE);
        }
        else
        {
          for (Player pmember : party.getPartyMembers())
          {
            QuestState pst = pmember.getQuestState(_149_PrimalMotherIstina.class);
            if ((pst != null) && (pst.getCond() == 1))
            {
              pst.setCond(2);
View Full Code Here

  {
    if (pc.getParty() == null)
    {
      return 0;
    }
    Party party = pc.getParty();
    if (party.getMemberCount() < 5)
    {
      return 0;
    }
    for (Player p : party)
    {
      if ((p.getLevel() < 80) || !p.isInZone(zone))
      {
        return 0;
      }
    }
    double points = 0;
    int count = party.getMemberCount();
    for (Player p : party)
    {
      points += weight.get(p.getClassId());
    }
    return (int) Math.max(0, Math.min(3, Math.round(points * getCoefficient(count))));
 
View Full Code Here

      captain.addStatFunc(new FuncMul(Stats.MAGIC_DEFENCE, 0x30, this, 5));
      captain.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, player, Rnd.get(1, 100));
    }
    if (teleto != null)
    {
      Party party = player.getParty();
      if (party != null)
      {
        for (Player partyMember : party.getPartyMembers())
        {
          partyMember.teleToLocation(teleto);
        }
      }
      else
View Full Code Here

  {
    if (id != COMMAND_IDS[0])
    {
      return false;
    }
    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);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Party

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.