Package lineage2.gameserver.model.entity

Examples of lineage2.gameserver.model.entity.Reflection


    return null;
  }
 
  private void enterInstance(Player player, int type)
  {
    Reflection r = player.getActiveReflection();
    if (r != null)
    {
      if (player.canReenterInstance(INCSTANCED_ZONE_ID))
      {
        player.teleToLocation(r.getTeleportLoc(), r);
      }
    }
    else if (player.canEnterInstance(INCSTANCED_ZONE_ID))
    {
      ReflectionUtils.enterReflection(player, INCSTANCED_ZONE_ID);
      Reflection ref = ReflectionUtils.enterReflection(player, INCSTANCED_ZONE_ID);
      World world = new World();
      world.rewarded = new ArrayList<>();
      world.instanceId = ref.getId();
      world.bosses = 5;
      worlds.put(ref.getId(), world);
      for (Player member : player.getParty().getPartyMembers())
      {
        if (member != player)
        {
          newQuestState(member, STARTED);
        }
      }
      if (type == 1)
      {
        runEmeraldAndSteamFirstRoom(world);
        ref.openDoor(DOOR1);
        ref.openDoor(DOOR2);
      }
      else if (type == 2)
      {
        runCoralGardenHall(world);
        ref.openDoor(CORAL_GARDEN_GATEWAY);
      }
    }
  }
View Full Code Here


    if(!canBypassCheck(player, this))
      return;

    if(command.equalsIgnoreCase("teredorenterinst"))
    {
      Reflection r = player.getActiveReflection();
      if(r != null)
      {
        if(player.canReenterInstance(teredorInstanceId))
          player.teleToLocation(r.getTeleportLoc(), r);
      }
      else if(player.canEnterInstance(teredorInstanceId))
        ReflectionUtils.enterReflection(player, new TeredorCavern(),teredorInstanceId);
    }
    else
View Full Code Here

    world.DarnelRoom = new Room();
    world.DarnelRoom.npclist = new HashMap<>();
    NpcInstance newNpc;
    newNpc = addSpawnToInstance(DARNEL, new Location(152759, 145949, -12588, 21592), 0, world.instanceId);
    world.DarnelRoom.npclist.put(newNpc, false);
    Reflection r = ReflectionManager.getInstance().get(world.instanceId);
    r.openDoor(DOOR3);
    r.openDoor(DOOR4);
  }
View Full Code Here

    public void onBypassFeedback(Player player, String command) {
        if (!canBypassCheck(player, this))
            return;

        if (command.startsWith("request_vallock")) {
            Reflection r = player.getActiveReflection();
            if (r != null) {
                if (player.canReenterInstance(VullockInstance))
                    player.teleToLocation(r.getTeleportLoc(), r);
            } else if (player.canEnterInstance(VullockInstance)) {
                ReflectionUtils.enterReflection(player, new Vullock(), VullockInstance);
            }
        } else if (command.equalsIgnoreCase("request_Baylor")) {
            Reflection r = player.getActiveReflection();
            if (r != null) {
                if (player.canReenterInstance(BaylorInstance))
                    player.teleToLocation(r.getTeleportLoc(), r);
            } else if (player.canEnterInstance(BaylorInstance)) {
                ReflectionUtils.enterReflection(player, new Baylor(), BaylorInstance);
            }
        }else
            super.onBypassFeedback(player, command);
View Full Code Here

    {
      return;
    }
    if (command.equalsIgnoreCase("Call_Hermuncus"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(INSTANCE_ID))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(INSTANCE_ID))
      {
        ReflectionUtils.enterReflection(player, new MemoryOfDisaster(player), INSTANCE_ID);
View Full Code Here

   * @param arg Object[]
   */
  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    Reflection r = getReflection();
    if (r.isDefault() || used)
    {
      return;
    }
    for (NpcInstance npc : getAroundNpc(1000, 100))
    {
View Full Code Here

   * Method getBoss.
   * @return NpcInstance
   */
  private NpcInstance getBoss()
  {
    final Reflection r = getActor().getReflection();
    if (!r.isDefault())
    {
      for (NpcInstance n : r.getNpcs())
      {
        if ((n.getNpcId() == 25542) && !n.isDead())
        {
          return n;
        }
View Full Code Here

    {
      return;
    }
    if (command.equalsIgnoreCase("elcardia_enter"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(elcardiaIzId))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(elcardiaIzId))
      {
        ReflectionUtils.enterReflection(player, elcardiaIzId);
View Full Code Here

          }
        }, 500);
      }
    }
    final double actor_hp_precent = actor.getCurrentHpPercents();
    final Reflection r = actor.getReflection();
    switch (_stage)
    {
      case 0:
        if (actor_hp_precent < 90)
        {
          r.addSpawnWithoutRespawn(pirates_zombie_captain_b, actor.getLoc(), 300);
          _stage++;
        }
        break;
      case 1:
        if (actor_hp_precent < 80)
        {
          r.addSpawnWithoutRespawn(doll_blader_b, actor.getLoc(), 300);
          _stage++;
        }
        break;
      case 2:
        if (actor_hp_precent < 70)
        {
          r.addSpawnWithoutRespawn(vale_master_b, actor.getLoc(), 300);
          r.addSpawnWithoutRespawn(vale_master_b, actor.getLoc(), 300);
          _stage++;
        }
        break;
      case 3:
        if (actor_hp_precent < 60)
        {
          for (int i = 0; i < 5; i++)
          {
            r.addSpawnWithoutRespawn(pirates_zombie_b, actor.getLoc(), 300);
          }
          _stage++;
        }
        break;
      case 4:
        if (actor_hp_precent < 50)
        {
          for (int i = 0; i < 5; i++)
          {
            r.addSpawnWithoutRespawn(doll_blader_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(pirates_zombie_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(vale_master_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(pirates_zombie_captain_b, actor.getLoc(), 300);
          }
          _stage++;
        }
        break;
      case 5:
        if (actor_hp_precent < 40)
        {
          for (int i = 0; i < 6; i++)
          {
            r.addSpawnWithoutRespawn(doll_blader_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(pirates_zombie_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(vale_master_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(pirates_zombie_captain_b, actor.getLoc(), 300);
          }
          _stage++;
        }
        break;
      case 6:
        if (actor_hp_precent < 30)
        {
          for (int i = 0; i < 7; i++)
          {
            r.addSpawnWithoutRespawn(doll_blader_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(pirates_zombie_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(vale_master_b, actor.getLoc(), 300);
            r.addSpawnWithoutRespawn(pirates_zombie_captain_b, actor.getLoc(), 300);
          }
          _stage++;
        }
        break;
      default:
View Full Code Here

   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final Reflection r = actor.getReflection();
    r.setReenterTime(System.currentTimeMillis());
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, actor.getObjectId(), actor.getLoc()));
    super.onEvtDead(killer);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.Reflection

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.