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

Examples of lineage2.gameserver.model.entity.events.objects.KrateisCubePlayerObject$RessurectTask


   * @param player Player
   * @param teleport boolean
   */
  public void exitCube(Player player, boolean teleport)
  {
    KrateisCubePlayerObject krateisCubePlayer = getParticlePlayer(player);
    krateisCubePlayer.stopRessurectTask();
   
    getObjects(PARTICLE_PLAYERS).remove(krateisCubePlayer);
   
    player.sendPacket(ExPVPMatchCCRetire.STATIC);
    player.removeEvent(this);
View Full Code Here


      if (cubeEvent2 != KrateisCubeEvent.this)
      {
        return;
      }
     
      KrateisCubePlayerObject winnerPlayer = getParticlePlayer((Player) actor);
     
      winnerPlayer.setPoints(winnerPlayer.getPoints() + 5);
      updatePoints(winnerPlayer);
     
      KrateisCubePlayerObject looserPlayer = getParticlePlayer((Player) victim);
     
      looserPlayer.startRessurectTask();
    }
View Full Code Here

    final KrateisCubeEvent cubeEvent = getActor().getEvent(KrateisCubeEvent.class);
    if (cubeEvent == null)
    {
      return;
    }
    final KrateisCubePlayerObject particlePlayer = cubeEvent.getParticlePlayer(player);
    particlePlayer.setPoints(particlePlayer.getPoints() + 3);
    cubeEvent.updatePoints(particlePlayer);
  }
View Full Code Here

    {
      KrateisCubeRunnerEvent runnerEvent = EventHolder.getInstance().getEvent(EventType.MAIN_EVENT, 2);
      for (KrateisCubeEvent cubeEvent : runnerEvent.getCubes())
      {
        List<KrateisCubePlayerObject> list = cubeEvent.getObjects(KrateisCubeEvent.REGISTERED_PLAYERS);
        KrateisCubePlayerObject krateisCubePlayer = cubeEvent.getRegisteredPlayer(player);
        if (krateisCubePlayer != null)
        {
          list.remove(krateisCubePlayer);
        }
      }
      showChatWindow(player, 4);
    }
    else if (command.startsWith("Kratei_TryRegister"))
    {
      KrateisCubeRunnerEvent runnerEvent = EventHolder.getInstance().getEvent(EventType.MAIN_EVENT, 2);
      if (runnerEvent.isRegistrationOver())
      {
        if (runnerEvent.isInProgress())
        {
          showChatWindow(player, 3);
        }
        else
        {
          showChatWindow(player, 7);
        }
      }
      else
      {
        if (player.getLevel() < 70)
        {
          showChatWindow(player, 2);
        }
        else
        {
          showChatWindow(player, 5);
        }
      }
    }
    else if (command.startsWith("Kratei_SeeList"))
    {
      if (player.getLevel() < 70)
      {
        showChatWindow(player, 2);
      }
      else
      {
        showChatWindow(player, 5);
      }
    }
    else if (command.startsWith("Kratei_Register"))
    {
      if (Olympiad.isRegistered(player) || HandysBlockCheckerManager.isRegistered(player))
      {
        player.sendPacket(SystemMsg.YOU_CANNOT_BE_SIMULTANEOUSLY_REGISTERED_FOR_PVP_MATCHES_SUCH_AS_THE_OLYMPIAD_UNDERGROUND_COLISEUM_AERIAL_CLEFT_KRATEIS_CUBE_AND_HANDYS_BLOCK_CHECKERS);
        return;
      }
      if (player.isCursedWeaponEquipped())
      {
        player.sendPacket(SystemMsg.YOU_CANNOT_REGISTER_WHILE_IN_POSSESSION_OF_A_CURSED_WEAPON);
        return;
      }
      StringTokenizer t = new StringTokenizer(command);
      if (t.countTokens() < 2)
      {
        return;
      }
      t.nextToken();
      KrateisCubeEvent cubeEvent = EventHolder.getInstance().getEvent(EventType.PVP_EVENT, Integer.parseInt(t.nextToken()));
      if (cubeEvent == null)
      {
        return;
      }
      if ((player.getLevel() < cubeEvent.getMinLevel()) || (player.getLevel() > cubeEvent.getMaxLevel()))
      {
        showChatWindow(player, 2);
        return;
      }
      List<KrateisCubePlayerObject> list = cubeEvent.getObjects(KrateisCubeEvent.REGISTERED_PLAYERS);
      KrateisCubePlayerObject krateisCubePlayer = cubeEvent.getRegisteredPlayer(player);
      if (krateisCubePlayer != null)
      {
        showChatWindow(player, 6);
        return;
      }
      if (list.size() >= 25)
      {
        showChatWindow(player, 9);
      }
      else
      {
        cubeEvent.addObject(KrateisCubeEvent.REGISTERED_PLAYERS, new KrateisCubePlayerObject(player));
        showChatWindow(player, 8);
      }
    }
    else
    {
View Full Code Here

    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;
      }
    }
View Full Code Here

    public void onZoneEnter(Zone zone, Creature cha)
    {
      if (zone.getParams() == null || !cha.isPlayer())
        return;

      Castle castle = ResidenceHolder.getInstance().getResidence(zone.getTemplate().getIndex());

      if (castle != null)
      { 
        if(_side.ordinal()==1 || _side.ordinal()==0)
        {
View Full Code Here

   * Method enter_dc.
   */
  public void enter_dc()
  {
    final Player player = getSelf();
    final NpcInstance npc = getNpc();
    if ((player == null) || (npc == null))
    {
      return;
    }
    if (!NpcInstance.canBypassCheck(player, npc))
View Full Code Here

   * Method exit_dc.
   */
  public void exit_dc()
  {
    final Player player = getSelf();
    final NpcInstance npc = getNpc();
    if ((player == null) || (npc == null))
    {
      return;
    }
    if (!NpcInstance.canBypassCheck(player, npc))
View Full Code Here

   * @return boolean
   */
  @Override
  protected boolean thinkActive()
  {
    final NpcInstance actor = getActor();
    if (actor == null)
    {
      return true;
    }
    for (Player player : World.getAroundPlayers(actor, 200, 200))
View Full Code Here

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if (_firstTimeAttacked)
    {
      _firstTimeAttacked = false;
      if (Rnd.chance(25))
      {
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.events.objects.KrateisCubePlayerObject$RessurectTask

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.