Package lineage2.commons.threading

Examples of lineage2.commons.threading.RunnableImpl


  {
    super.onCreate();
    tumorRespawnTime = 3 * 60 * 1000L;
    wagonRespawnTime = 60 * 1000L;
    coffinsCreated = 0;
    ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        conquestBegins();
      }
View Full Code Here


    spawnByGroup("soi_hoi_defence_mob_6");
    spawnByGroup("soi_hoi_defence_tumors");
    spawnByGroup("soi_hoi_defence_wards");
    getDoor(14240102).openMe();
    preawakenedEchmus = addSpawnWithoutRespawn(29161, new Location(-179534, 208510, -15496, 16342), 0);
    coffinSpawnTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        if(!conquestEnded)
          for(NpcInstance npc : getAllByNpcId(DeadTumor, true))
            spawnCoffin(npc);
      }
    }, 1000L, 60000L);
    aliveTumorSpawnTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        if(!conquestEnded)
        {
          despawnByGroup("soi_hoi_defence_tumors");
          spawnByGroup("soi_hoi_defence_alivetumors");
          handleTumorHp(0.5);
          for(Player p : getPlayers())
            p.sendPacket(new ExShowScreenMessage(NpcString.THE_TUMOR_INSIDE_S1_HAS_COMPLETELY_REVIVED__, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "#" + NpcString.HEART_OF_IMMORTALITY.getId()));
          invokeDeathListener();
        }
      }
    }, tumorRespawnTime);
    wagonSpawnTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        addSpawnWithoutRespawn(SoulWagon, new Location(-179544, 207400, -15496), 0);
      }
View Full Code Here

        final NpcInstance deadTumor = addSpawnWithoutRespawn(DeadTumor, self.getLoc(), 0);
        wagonRespawnTime += 10000L;
        self.deleteMe();
        for(Player p : getPlayers())
          p.sendPacket(new ExShowScreenMessage(NpcString.THE_TUMOR_INSIDE_S1_HAS_BEEN_DESTROYED_NTHE_SPEED_THAT_EKIMUS_CALLS_OUT_HIS_PREY_HAS_SLOWED_DOWN, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "#" + NpcString.HEART_OF_IMMORTALITY.getId()));
        ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
          @Override
          public void runImpl() throws Exception
          {
            deadTumor.deleteMe();
            addSpawnWithoutRespawn(AliveTumor, deadTumor.getLoc(), 0);
View Full Code Here

    SpawnExObject spawnEx = miniGameEvent.getFirstObject(arenaName);
    Spawner spawner = spawnEx.getSpawns().get(0);
    Location loc = (Location) spawner.getCurrentSpawnRange();
    miniGameEvent.removeBanishItems();
    final NpcInstance npc = NpcUtils.spawnSingle(35600, loc.x, loc.y, loc.z, 0);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        List<Player> around = World.getAroundPlayers(npc, 750, 100);
View Full Code Here

      for (int i = 0; i < 3; i++)
      {
        final NpcInstance npc = obj.getSpawns().get(i).getFirstSpawned();
        Functions.npcSay(npc, ((_34SiegeGuard) npc).teleChatSay());
        npc.broadcastPacket(new MagicSkillUse(npc, npc, 4235, 1, 10000, 0));
        _teleportTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
        {
          @Override
          public void runImpl()
          {
            Location loc = Location.findAroundPosition(177134, -18807, -2256, 50, 100, npc.getGeoIndex());
View Full Code Here

      return;
    }
    final Creature aimTarget = target;
    player.broadcastPacket(new MagicSkillUse(player, aimTarget, skill.getDisplayId(), skill.getDisplayLevel(), skill.getHitTime(), 0));
    player.disableSkill(skill, delay * 1000L);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final List<Creature> targets = new ArrayList<>(1);
View Full Code Here

      return;
    }
    final Creature aimTarget = target;
    player.broadcastPacket(new MagicSkillUse(player, target, skill.getDisplayId(), skill.getDisplayLevel(), skill.getHitTime(), 0));
    player.disableSkill(skill, delay * 1000L);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final List<Creature> targets = new ArrayList<>(1);
View Full Code Here

      return;
    }
    final Creature aimTarget = target;
    player.broadcastPacket(new MagicSkillUse(player, target, skill.getDisplayId(), skill.getDisplayLevel(), skill.getHitTime(), 0));
    player.disableSkill(skill, delay * 1000L);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final List<Creature> targets = new ArrayList<>(1);
View Full Code Here

    {
      return;
    }
    player.broadcastPacket(new MagicSkillUse(player, player, skill.getDisplayId(), skill.getDisplayLevel(), skill.getHitTime(), 0));
    player.disableSkill(skill, delay * 1000L);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final List<Creature> targets = new ArrayList<>(1);
View Full Code Here

  public void onStart()
  {
    super.onStart();
    if (forceSkillId > 0)
    {
      startEffectTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          updateAura();
View Full Code Here

TOP

Related Classes of lineage2.commons.threading.RunnableImpl

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.