Package lineage2.gameserver.model.entity.boat

Examples of lineage2.gameserver.model.entity.boat.ClanAirShip$FuelAndDeleteTask


  @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

    {
      if ((target == null) || target.isDead() || !target.isPlayer() || !target.isInBoat() || !target.getPlayer().getBoat().isClanAirShip())
      {
        continue;
      }
      ClanAirShip airship = (ClanAirShip) target.getPlayer().getBoat();
      airship.setCurrentFuel(airship.getCurrentFuel() + (int) _power);
    }
    if (isSSPossible())
    {
      activeChar.unChargeShots(isMagic());
    }
View Full Code Here

    Player player = getClient().getActiveChar();
    if ((player == null) || (player.getBoat() == null) || !player.getBoat().isClanAirShip())
    {
      return;
    }
    ClanAirShip airship = (ClanAirShip) player.getBoat();
    if (airship.getDriver() == player)
    {
      switch (_moveType)
      {
        case 4:
          airship.addTeleportPoint(player, _param1);
          break;
        case 0:
          if (!airship.isCustomMove())
          {
            break;
          }
          airship.moveToLocation(airship.getLoc().setX(_param1).setY(_param2), 0, false);
          break;
        case 2:
          if (!airship.isCustomMove())
          {
            break;
          }
          airship.moveToLocation(airship.getLoc().changeZ(100), 0, false);
          break;
        case 3:
          if (!airship.isCustomMove())
          {
            break;
          }
          airship.moveToLocation(airship.getLoc().changeZ(-100), 0, false);
          break;
      }
    }
  }
View Full Code Here

      if (!player.getClan().isHaveAirshipLicense())
      {
        player.sendPacket(SystemMsg.AN_AIRSHIP_CANNOT_BE_SUMMONED_BECAUSE_EITHER_YOU_HAVE_NOT_REGISTERED_YOUR_AIRSHIP_LICENSE_OR_THE_AIRSHIP_HAS_NOT_YET_BEEN_SUMMONED);
        return;
      }
      ClanAirShip dockedAirShip = getDockedAirShip();
      ClanAirShip clanAirship = player.getClan().getAirship();
      if (clanAirship != null)
      {
        if (clanAirship == dockedAirShip)
        {
          player.sendPacket(SystemMsg.THE_CLAN_OWNED_AIRSHIP_ALREADY_EXISTS);
        }
        else
        {
          player.sendPacket(SystemMsg.YOUR_CLANS_AIRSHIP_IS_ALREADY_BEING_USED_BY_ANOTHER_CLAN_MEMBER);
        }
        return;
      }
      if (dockedAirShip != null)
      {
        Functions.npcSay(this, NpcString.IN_AIR_HARBOR_ALREADY_AIRSHIP_DOCKED_PLEASE_WAIT_AND_TRY_AGAIN, ChatType.SHOUT, 5000);
        return;
      }
      if (Functions.removeItem(player, ENERGY_STAR_STONE, 5) != 5)
      {
        player.sendPacket(new SystemMessage2(SystemMsg.AN_AIRSHIP_CANNOT_BE_SUMMONED_BECAUSE_YOU_DONT_HAVE_ENOUGH_S1).addItemName(ENERGY_STAR_STONE));
        return;
      }
      ClanAirShip dockedShip = new ClanAirShip(player.getClan());
      dockedShip.setDock(_dock);
      dockedShip.setPlatform(_platform);
      dockedShip.setHeading(0);
      dockedShip.spawnMe(_platform.getSpawnLoc());
      dockedShip.startDepartTask();
      Functions.npcSay(this, NpcString.AIRSHIP_IS_SUMMONED_IS_DEPART_IN_5_MINUTES, ChatType.SHOUT, 5000);
    }
    else if (command.equalsIgnoreCase("register"))
    {
      if ((player.getClan() == null) || !player.isClanLeader() || (player.getClan().getLevel() < 5))
View Full Code Here

   * @return ClanAirShip
   */
  @Override
  protected ClanAirShip getDockedAirShip()
  {
    ClanAirShip ship = _dockedShipRef.get();
    if ((ship != null) && ship.isDocked())
    {
      return ship;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.boat.ClanAirShip$FuelAndDeleteTask

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.