Package lineage2.gameserver.templates

Examples of lineage2.gameserver.templates.InstantZone$ZoneInfo


    {
      return "gludio_prison_keeper_q0512_01a.htm";
    }
    if (player.canEnterInstance(INSTANCE_ZONE_ID))
    {
      InstantZone iz = InstantZoneHolder.getInstance().getInstantZone(INSTANCE_ZONE_ID);
      Prison prison = null;
      if (!_prisons.isEmpty())
      {
        prison = _prisons.get(castle.getId());
        if ((prison != null) && prison.isLocked())
        {
          player.sendPacket(new SystemMessage(SystemMessage.C1_MAY_NOT_RE_ENTER_YET).addName(player));
          return null;
        }
      }
      prison = new Prison(castle.getId(), iz);
      _prisons.put(prison.getCastleId(), prison);
      Reflection r = ReflectionManager.getInstance().get(prison.getReflectionId());
      r.setReturnLoc(player.getLoc());
      for (Player member : player.getParty().getPartyMembers())
      {
        if (member != player)
        {
          newQuestState(member, STARTED);
        }
        member.setReflection(r);
        member.teleToLocation(iz.getTeleportCoord());
        member.setVar("backCoords", r.getReturnLoc().toXYZString(), -1);
        member.setInstanceReuse(iz.getId(), System.currentTimeMillis());
      }
      player.getParty().setReflection(r);
      r.setParty(player.getParty());
      r.startCollapseTimer(iz.getTimelimit() * 60 * 1000L);
      player.getParty().broadCast(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(iz.getTimelimit()));
      prison.initSpawn(type1[Rnd.get(type1.length)], true);
    }
    return null;
  }
View Full Code Here


    }
    player.setTarget(null);
    player.setIsInOlympiadMode(true);
    player.leaveParty();
    Reflection ref = _game.getReflection();
    InstantZone instantZone = ref.getInstancedZone();
    Location tele = Location.findPointToStay(instantZone.getTeleportCoords().get(_side - 1), 50, 50, ref.getGeoIndex());
    player._stablePoint = _returnLoc;
    player.teleToLocation(tele, ref);
    if (_type == CompType.TEAM)
    {
      player.setTeam(_side == 1 ? TeamType.BLUE : TeamType.RED);
View Full Code Here

   * @param name String
   */
  @Override
  public void teleportPlayers(String name)
  {
    InstantZone instantZone = InstantZoneHolder.getInstance().getInstantZone(1);
   
    Reflection reflection = new Reflection();
    reflection.init(instantZone);
   
    List<DuelSnapshotObject> team = getObjects(BLUE_TEAM);
   
    for (int i = 0; i < team.size(); i++)
    {
      DuelSnapshotObject $member = team.get(i);
     
      $member.getPlayer().addEvent(this);
      $member.getPlayer()._stablePoint = $member.getLoc();
      $member.getPlayer().teleToLocation(instantZone.getTeleportCoords().get(i), reflection);
    }
   
    team = getObjects(RED_TEAM);
   
    for (int i = 0; i < team.size(); i++)
    {
      DuelSnapshotObject $member = team.get(i);
     
      $member.getPlayer().addEvent(this);
      $member.getPlayer()._stablePoint = $member.getLoc();
      $member.getPlayer().teleToLocation(instantZone.getTeleportCoords().get(9 + i), reflection);
    }
  }
View Full Code Here

  public OlympiadGame(int id, CompType type, List<Integer> opponents)
  {
    _type = type;
    _id = id;
    _reflection = new Reflection();
    InstantZone instantZone = InstantZoneHolder.getInstance().getInstantZone(Rnd.get(147, 150));
    _reflection.init(instantZone);
    _team1 = new OlympiadTeam(this, 1);
    _team2 = new OlympiadTeam(this, 2);
    for (int i = 0; i < (opponents.size() / 2); i++)
    {
View Full Code Here

    {
      return "gludio_fort_a_campkeeper_q0511_01a.htm";
    }
    if (player.canEnterInstance(INSTANCE_ZONE_ID))
    {
      InstantZone iz = InstantZoneHolder.getInstance().getInstantZone(INSTANCE_ZONE_ID);
      Prison prison = null;
      if (!_prisons.isEmpty())
      {
        prison = _prisons.get(fort.getId());
        if ((prison != null) && prison.isLocked())
        {
          player.sendPacket(new SystemMessage(SystemMessage.C1_MAY_NOT_RE_ENTER_YET).addName(player));
          return null;
        }
      }
      prison = new Prison(fort.getId(), iz);
      _prisons.put(prison.getFortId(), prison);
      Reflection r = ReflectionManager.getInstance().get(prison.getReflectionId());
      r.setReturnLoc(player.getLoc());
      for (Player member : player.getParty().getPartyMembers())
      {
        if (member != player)
        {
          newQuestState(member, STARTED);
        }
        member.setReflection(r);
        member.teleToLocation(iz.getTeleportCoord());
        member.setVar("backCoords", r.getReturnLoc().toXYZString(), -1);
        member.setInstanceReuse(iz.getId(), System.currentTimeMillis());
      }
      player.getParty().setReflection(r);
      r.setParty(player.getParty());
      r.startCollapseTimer(iz.getTimelimit() * 60 * 1000L);
      player.getParty().broadCast(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(iz.getTimelimit()));
      prison.initSpawn(type1[Rnd.get(type1.length)], true);
    }
    return null;
  }
View Full Code Here

  @Override
  protected void onCreate()
  {
    super.onCreate();

    InstantZone iz = getInstancedZone();
    if(iz != null)
    {
      int time_limit = iz.getTimelimit() * 1000 * 60;
      delay_after_spawn = time_limit / 3;
      startPathfinderTimer(time_limit - delay_after_spawn);
    }
  }
View Full Code Here

          Player p = (Player) GameObjectsStorage.findObject(getPlayerId());
          if(p != null)
          {
            p.getPlayer().sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(delay_after_spawn / 60000));

            InstantZone iz = KamalokaNightmare.this.getInstancedZone();
            if(iz != null)
            {
              String loc = iz.getAddParams().getString("pathfinder_loc", null);
              if(loc != null)
              {
                PathfinderInstance npc = new PathfinderInstance(IdFactory.getInstance().getNextId(), NpcHolder.getInstance().getTemplate(PATHFINDER));
                npc.setSpawnedLoc(Location.parseLoc(loc));
                npc.setReflection(KamalokaNightmare.this);
View Full Code Here

   * Method start.
   */
  private static void start()
  {
    final int instancedZoneId = 504;
    final InstantZone iz = InstantZoneHolder.getInstance().getInstantZone(instancedZoneId);
    if (iz == null)
    {
      _log.warn("GvG: InstanceZone : " + instancedZoneId + " not found!");
      return;
    }
View Full Code Here

   * @param id int
   * @return SchedulingPattern
   */
  private SchedulingPattern getResetReuseById(int id)
  {
    InstantZone zone = getInstantZone(id);
    return zone == null ? null : zone.getResetReuse();
  }
View Full Code Here

  protected void onDeath(Creature killer)
  {
    Reflection r = getReflection();
    r.setReenterTime(System.currentTimeMillis());
    super.onDeath(killer);
    InstantZone iz = r.getInstancedZone();
    if (iz != null)
    {
      String tele_device_loc = iz.getAddParams().getString("tele_device_loc", null);
      if (tele_device_loc != null)
      {
        KamalokaGuardInstance npc = new KamalokaGuardInstance(IdFactory.getInstance().getNextId(), NpcHolder.getInstance().getTemplate(TELE_DEVICE_ID));
        npc.setSpawnedLoc(Location.parseLoc(tele_device_loc));
        npc.setReflection(r);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.templates.InstantZone$ZoneInfo

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.