Package lineage2.gameserver.model.entity.events.impl

Examples of lineage2.gameserver.model.entity.events.impl.KrateisCubeEvent


  @Override
  public void onReload()
  {
    for (String element : ZONES)
    {
      Zone zone = ReflectionUtils.getZone(element);
      zone.removeListener(_zoneListener);
    }
    if (_buffTask != null)
    {
      _buffTask.cancel(false);
      _buffTask = null;
View Full Code Here


    @Override
    public void runImpl()
    {
      for (String element : ZONES)
      {
        Zone zone = ReflectionUtils.getZone(element);
        NpcInstance npc = getKasha(zone);
        if ((npc != null) && (zone != null))
        {
          int curseLvl = 0;
          int yearningLvl = 0;
          int despairLvl = 0;
          for (Creature c : zone.getObjects())
          {
            if (c.isMonster() && !c.isDead())
            {
              if (getRealNpcId((NpcInstance) c) == mobs[0])
              {
                curseLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[1])
              {
                yearningLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[2])
              {
                despairLvl++;
              }
            }
          }
          if ((yearningLvl > 0) || (curseLvl > 0) || (despairLvl > 0))
          {
            for (Creature cha : zone.getInsidePlayables())
            {
              boolean casted = false;
              if (curseLvl > 0)
              {
                addEffect(npc, cha.getPlayer(), SkillTable.getInstance().getInfo(_buffs[0], curseLvl), true);
View Full Code Here

  private void init()
  {
    _zoneListener = new ZoneListener();
    for (String s : zones)
    {
      Zone zone = ReflectionUtils.getZone(s);
      zone.addListener(_zoneListener);
    }
  }
View Full Code Here

   * Method init.
   */
  private void init()
  {
    _zoneListener = new ZoneListener();
    Zone zone = ReflectionUtils.getZone(ZONE_NAME);
    if (zone != null)
    {
      zone.addListener(_zoneListener);
    }
  }
View Full Code Here

    {
      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

      else if (Rnd.chance(50))
      {
        nextId = getNextVoid(npcId);
      }
    }
    final Reflection r = actor.getReflection();
    boolean spawnPossible = true;
    if (r instanceof KamalokaNightmare)
    {
      final KamalokaNightmare kama = (KamalokaNightmare) r;
      kama.addKilledKanabion(type);
View Full Code Here

      Player pk = (Player) killer;
      if (isInZone(ZoneType.SIEGE))
      {
        return;
      }
      DuelEvent duelEvent = getEvent(DuelEvent.class);
      if ((owner.getPvpFlag() > 0) || owner.atMutualWarWith(pk))
      {
        pk.setPvpKills(pk.getPvpKills() + 1);
      }
      else if (((duelEvent == null) || (duelEvent != pk.getEvent(DuelEvent.class))) && (getKarma() <= 0))
View Full Code Here

    public void runImpl()
    {
      _seconds -= 1;
      if (_seconds == 0)
      {
        KrateisCubeEvent cubeEvent = _player.getEvent(KrateisCubeEvent.class);
        List<Location> waitLocs = cubeEvent.getObjects(KrateisCubeEvent.WAIT_LOCS);
        _ressurectTask = null;
        _player.teleToLocation(Rnd.get(waitLocs));
        _player.doRevive();
      }
      else
View Full Code Here

    final Player player = killer.getPlayer();
    if (player == null)
    {
      return;
    }
    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

      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

TOP

Related Classes of lineage2.gameserver.model.entity.events.impl.KrateisCubeEvent

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.