Package lineage2.commons.configuration

Examples of lineage2.commons.configuration.ExProperties


  /**
   * Method loadEventsSettings.
   */
  public static void loadEventsSettings()
  {
    ExProperties eventSettings = load(EVENTS_CONFIG_FILE);
    EVENT_CofferOfShadowsPriceRate = eventSettings.getProperty("CofferOfShadowsPriceRate", 1.);
    EVENT_CofferOfShadowsRewardRate = eventSettings.getProperty("CofferOfShadowsRewardRate", 1.);
    EVENT_LastHeroItemID = eventSettings.getProperty("LastHero_bonus_id", 57);
    EVENT_LastHeroItemCOUNT = eventSettings.getProperty("LastHero_bonus_count", 5000.);
    EVENT_LastHeroTime = eventSettings.getProperty("LastHero_time", 3);
    EVENT_LastHeroRate = eventSettings.getProperty("LastHero_rate", true);
    EVENT_LastHeroChanceToStart = eventSettings.getProperty("LastHero_ChanceToStart", 5);
    EVENT_LastHeroItemCOUNTFinal = eventSettings.getProperty("LastHero_bonus_count_final", 10000.);
    EVENT_LastHeroRateFinal = eventSettings.getProperty("LastHero_rate_final", true);
    EVENT_TvTItemID = eventSettings.getProperty("TvT_bonus_id", 57);
    EVENT_TvTItemCOUNT = eventSettings.getProperty("TvT_bonus_count", 5000.);
    EVENT_TvTTime = eventSettings.getProperty("TvT_time", 3);
    EVENT_TvT_rate = eventSettings.getProperty("TvT_rate", true);
    EVENT_TvTChanceToStart = eventSettings.getProperty("TvT_ChanceToStart", 5);
    EVENT_CtFItemID = eventSettings.getProperty("CtF_bonus_id", 57);
    EVENT_CtFItemCOUNT = eventSettings.getProperty("CtF_bonus_count", 5000.);
    EVENT_CtFTime = eventSettings.getProperty("CtF_time", 3);
    EVENT_CtF_rate = eventSettings.getProperty("CtF_rate", true);
    EVENT_CtFChanceToStart = eventSettings.getProperty("CtF_ChanceToStart", 5);
    EVENT_TFH_POLLEN_CHANCE = eventSettings.getProperty("TFH_POLLEN_CHANCE", 5.);
    EVENT_GLITTMEDAL_NORMAL_CHANCE = eventSettings.getProperty("MEDAL_CHANCE", 10.);
    EVENT_GLITTMEDAL_GLIT_CHANCE = eventSettings.getProperty("GLITTMEDAL_CHANCE", 0.1);
    EVENT_L2DAY_LETTER_CHANCE = eventSettings.getProperty("L2DAY_LETTER_CHANCE", 1.);
    EVENT_CHANGE_OF_HEART_CHANCE = eventSettings.getProperty("EVENT_CHANGE_OF_HEART_CHANCE", 5.);
    EVENT_APIL_FOOLS_DROP_CHANCE = eventSettings.getProperty("AprilFollsDropChance", 50.);
    EVENT_BOUNTY_HUNTERS_ENABLED = eventSettings.getProperty("BountyHuntersEnabled", true);
    EVENT_SAVING_SNOWMAN_LOTERY_PRICE = eventSettings.getProperty("SavingSnowmanLoteryPrice", 50000);
    EVENT_SAVING_SNOWMAN_REWARDER_CHANCE = eventSettings.getProperty("SavingSnowmanRewarderChance", 2);
    EVENT_TRICK_OF_TRANS_CHANCE = eventSettings.getProperty("TRICK_OF_TRANS_CHANCE", 10.);
    EVENT_MARCH8_DROP_CHANCE = eventSettings.getProperty("March8DropChance", 10.);
    EVENT_MARCH8_PRICE_RATE = eventSettings.getProperty("March8PriceRate", 1.);
    ENCHANT_CHANCE_MASTER_YOGI_STAFF = eventSettings.getProperty("MasterYogiEnchantChance", 66);
    ENCHANT_MAX_MASTER_YOGI_STAFF = eventSettings.getProperty("MasterYogiEnchantMaxWeapon", 28);
    SAFE_ENCHANT_MASTER_YOGI_STAFF = eventSettings.getProperty("MasterYogiSafeEnchant", 3);
    TMEVENTINTERVAL = eventSettings.getProperty("TMEventInterval", 0);
    TMTIME1 = eventSettings.getProperty("TMTime1", 120000);
    TMWAVE1COUNT = eventSettings.getProperty("TMWave1Count", 2);
    TMWAVE2 = eventSettings.getProperty("TMWave2", 18855);
  }
View Full Code Here


  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

    }
    catch (Exception e)
    {
      _log.error("Unable to create ai of doorId " + _id, e);
    }
    return new DoorAI(door);
  }
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 (param.length < 4)
    {
      throw new IllegalArgumentException();
    }
    final Player player = getSelf();
    if (player == null)
    {
      return;
    }
    final long price = Long.parseLong(param[param.length - 1]);
    if (!NpcInstance.canBypassCheck(player, player.getLastNpc()))
    {
      return;
    }
    if ((price > 0) && (player.getAdena() < price))
    {
      player.sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
      return;
    }
    if (player.getMountType() == 2)
    {
      player.sendMessage("Телепортаци�? верхом на виверне невозможна.");
      return;
    }
    if (player.getLastNpc() != null)
    {
      final int npcId = player.getLastNpc().getNpcId();
      switch (npcId)
      {
        case 30483:
          if (player.getLevel() >= Config.CRUMA_GATEKEEPER_LVL)
          {
            show("teleporter/30483-no.htm", player);
            return;
          }
          break;
        case 32864:
        case 32865:
        case 32866:
        case 32867:
        case 32868:
        case 32869:
        case 32870:
          if (player.getLevel() < 80)
          {
            show("teleporter/" + npcId + "-no.htm", player);
            return;
          }
          break;
      }
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final int castleId = (param.length > 4) ? Integer.parseInt(param[3]) : 0;
    if (player.getReflection().isDefault())
    {
      final Castle castle = (castleId > 0) ? ResidenceHolder.getInstance().getResidence(Castle.class, castleId) : null;
      if ((castle != null) && castle.getSiegeEvent().isInProgress())
      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
  }
View Full Code Here

  {
    if (param.length < 5)
    {
      throw new IllegalArgumentException();
    }
    final Player player = getSelf();
    if (player == null)
    {
      return;
    }
    final long count = Long.parseLong(param[3]);
    final int item = Integer.parseInt(param[4]);
    if (!NpcInstance.canBypassCheck(player, player.getLastNpc()))
    {
      return;
    }
    if (count > 0)
    {
      if (!player.getInventory().destroyItemByItemId(item, count))
      {
        player.sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_REQUIRED_ITEMS);
        return;
      }
      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

  {
    if (param.length < 5)
    {
      throw new IllegalArgumentException();
    }
    final Player player = getSelf();
    if (player == null)
    {
      return;
    }
    player.setReflection(Integer.parseInt(param[4]));
    Gatekeeper(param);
  }
View Full Code Here

TOP

Related Classes of lineage2.commons.configuration.ExProperties

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.