Package lineage2.gameserver.model.entity.events.objects

Examples of lineage2.gameserver.model.entity.events.objects.SpawnExObject


    {
      return;
    }
    if (command.equalsIgnoreCase("request_nightzaken"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(nightZakenIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(nightZakenIzId))
      {
        ReflectionUtils.enterReflection(player, new ZakenNight(), nightZakenIzId);
      }
    }
    else if (command.equalsIgnoreCase("request_dayzaken"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(dayZakenIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(dayZakenIzId))
      {
        ReflectionUtils.enterReflection(player, new ZakenDay(), dayZakenIzId);
      }
    }
    else if (command.equalsIgnoreCase("request_ultrazaken"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(ultraZakenIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(ultraZakenIzId))
      {
        ReflectionUtils.enterReflection(player, new ZakenDay83(), ultraZakenIzId);
View Full Code Here


    }
    if (allDead)
    {
      if (_oldOwner != null)
      {
        SpawnExObject spawn = getFirstObject(FortressSiegeEvent.MERCENARY);
        NpcInstance npc = spawn.getFirstSpawned();
        if ((npc == null) || npc.isDead())
        {
          return;
        }
        Functions.npcShout(npc, NpcString.THE_COMMAND_GATE_HAS_OPENED_CAPTURE_THE_FLAG_QUICKLY_AND_RAISE_IT_HIGH_TO_PROCLAIM_OUR_VICTORY);
View Full Code Here

     */
    @Override
    public void onSpawn(NpcInstance actor)
    {
      FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
      SpawnExObject siegeCommanders = siegeEvent.getFirstObject(FortressSiegeEvent.SIEGE_COMMANDERS);
      if (siegeCommanders.isSpawned())
      {
        siegeEvent.broadcastTo(SystemMsg.THE_BARRACKS_FUNCTION_HAS_BEEN_RESTORED, SiegeEvent.ATTACKERS, SiegeEvent.DEFENDERS);
      }
    }
View Full Code Here

   * Method getNpc.
   * @return NpcInstance
   */
  public NpcInstance getNpc()
  {
    SpawnExObject obj = getFirstObject(MANAGER);
    return obj.getFirstSpawned();
  }
View Full Code Here

   */
  @Override
  public void initEvent()
  {
    super.initEvent();
    SpawnExObject exObject = getFirstObject(SIEGE_COMMANDERS);
    _barrackStatus = new boolean[exObject.getSpawns().size()];
    int lvl = getResidence().getFacilityLevel(Fortress.DOOR_UPGRADE);
    List<DoorObject> doorObjects = getObjects(UPGRADEABLE_DOORS);
    for (DoorObject d : doorObjects)
    {
      d.setUpgradeValue(this, d.getDoor().getMaxHp() * lvl);
 
View Full Code Here

  {
    long endTime = getResidence().getOwnDate().getTimeInMillis() + (60 * 60 * 1000L);
    long diff = endTime - System.currentTimeMillis();
    if ((diff > 0) && (getResidence().getContractState() == Fortress.NOT_DECIDED))
    {
      SpawnExObject exObject = getFirstObject(ENVOY);
      if (exObject.isSpawned())
      {
        info("Last siege: " + TimeUtils.toSimpleFormat(getResidence().getLastSiegeDate()) + ", own date: " + TimeUtils.toSimpleFormat(getResidence().getOwnDate()) + ", siege date: " + TimeUtils.toSimpleFormat(getResidence().getSiegeDate()));
      }
      spawnAction(ENVOY, true);
      _envoyTask = ThreadPoolManager.getInstance().schedule(new EnvoyDespawn(), diff);
View Full Code Here

          showChatWindow(player, "residence2/clanhall/game_manager007.htm");
          return;
        }
      }
      int index = siegeClans.indexOf(siegeClan);
      SpawnExObject spawnEx = miniGameEvent.getFirstObject("arena_" + index);
      Location loc = (Location) spawnEx.getSpawns().get(0).getCurrentSpawnRange();
      for (Player member : party.getPartyMembers())
      {
        siegeClan.addPlayer(member.getObjectId());
        member.teleToLocation(Location.coordsRandomize(loc, 100, 200));
      }
View Full Code Here

   */
  private RainbowGourdInstance getGourd(int index)
  {
    final ClanHallMiniGameEvent miniGameEvent = getActor().getEvent(ClanHallMiniGameEvent.class);
   
    final SpawnExObject spawnEx = miniGameEvent.getFirstObject("arena_" + index);
   
    return (RainbowGourdInstance) spawnEx.getSpawns().get(1).getFirstSpawned();
  }
View Full Code Here

    final ClanHallSiegeEvent siegeEvent = actor.getEvent(ClanHallSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    final SpawnExObject spawnExObject = siegeEvent.getFirstObject(ClanHallSiegeEvent.BOSS);
    final NpcInstance lidiaNpc = spawnExObject.getFirstSpawned();
    if (lidiaNpc.getCurrentHpRatio() == 1.)
    {
      lidiaNpc.setCurrentHp(lidiaNpc.getMaxHp() >> 1, true);
    }
  }
View Full Code Here

      if (attackers.get(i) == siegeClanObject)
      {
        continue;
      }
      String arenaName = "arena_" + i;
      SpawnExObject spawnEx = miniGameEvent.getFirstObject(arenaName);
      RainbowYetiInstance yetiInstance = (RainbowYetiInstance) spawnEx.getSpawns().get(0).getFirstSpawned();
      yetiInstance.teleportFromArena();
      miniGameEvent.spawnAction(arenaName, false);
    }
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.events.objects.SpawnExObject

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.