@Override
 protected void handleSpawned() {
   super.handleSpawned();
   towerCenter = getPosition().getWorldMapInstance().getNpc(831130);
   AI2Actions.targetCreature(AwakenedGuardianTombGhostAI2.this, towerCenter);
   getAggroList().addHate(towerCenter, 100000);
 }
示例#2
0
 @Override
 protected void handleAttack(Creature creature) {
   super.handleAttack(creature);
   if (Rnd.get(1, 100) < 3) {
     spawnServant();
   }
 }
 @Override
 protected void handleBackHome() {
   canThink = true;
   cancelPhaseTask();
   deleteHelpers();
   isHome.set(true);
   super.handleBackHome();
 }
  @Override
  protected void handleAttack(Creature creature) {
    super.handleAttack(creature);

    if (Rnd.get(1, 100) < 1) {
      spawnClone();
    }
  }
 @Override
 protected void handleMoveArrived() {
   super.handleMoveArrived();
   if (getSpawnTemplate().getWalkerId() != null) {
     getSpawnTemplate().setWalkerId(null);
     WalkManager.stopWalking(this);
   }
 }
 @Override
 protected void handleDied() {
   cancelPhaseTask();
   if (getNpcId() == 217309) {
     sendMsg(1500390);
     spawn(217310, 238.160f, 598.624f, 178.480f, (byte) 0);
     deleteHelpers();
     AI2Actions.deleteOwner(this);
   } else {
     sendMsg(1500391);
     final WorldMapInstance instance = getPosition().getWorldMapInstance();
     if (instance != null) {
       final Npc ariana = instance.getNpc(799668);
       if (ariana != null) {
         ariana.getEffectController().removeEffect(19921);
         ThreadPoolManager.getInstance()
             .schedule(
                 new Runnable() {
                   @Override
                   public void run() {
                     ariana.getSpawn().setWalkerId("30028000016");
                     WalkManager.startWalking((NpcAI2) ariana.getAi2());
                   }
                 },
                 1000);
         NpcShoutsService.getInstance().sendMsg(ariana, 1500415, ariana.getObjectId(), 0, 4000);
         NpcShoutsService.getInstance().sendMsg(ariana, 1500416, ariana.getObjectId(), 0, 13000);
         ThreadPoolManager.getInstance()
             .schedule(
                 new Runnable() {
                   @Override
                   public void run() {
                     if (instance != null) {
                       SkillEngine.getInstance()
                           .getSkill(ariana, 19358, 60, ariana)
                           .useNoAnimationSkill();
                       instance.getDoors().get(145).setOpen(true);
                       deleteNpcs(instance.getNpcs(701156));
                       ThreadPoolManager.getInstance()
                           .schedule(
                               new Runnable() {
                                 @Override
                                 public void run() {
                                   if (ariana != null && !NpcActions.isAlreadyDead(ariana)) {
                                     NpcActions.delete(ariana);
                                   }
                                 }
                               },
                               13000);
                     }
                   }
                 },
                 13000);
       }
     }
   }
   super.handleDied();
 }
 @Override
 protected void handleAttack(Creature creature) {
   super.handleAttack(creature);
   checkPercentage(getLifeStats().getHpPercentage());
   attackCount++;
   if (attackCount == 20) {
     AggroEventHandler.onAggro(this, creature);
   }
 }
 @Override
 public void handleAttack(Creature creature) {
   super.handleAttack(creature);
   if (isHome.compareAndSet(true, false)) {
     if (getNpcId() == 217309) {
       sendMsg(1500388);
       startPhaseTask(this);
     } else {
       startPhase2Task();
     }
   }
 }
 @Override
 protected void handleSpawned() {
   super.handleSpawned();
   ThreadPoolManager.getInstance()
       .schedule(
           new Runnable() {
             @Override
             public void run() {
               startLifeTask();
             }
           },
           1000);
 }
示例#10
0
  @Override
  protected void handleSpawned() {
    super.handleSpawned();
    avatar_scan =
        ThreadPoolManager.getInstance()
            .scheduleAtFixedRate(
                new Runnable() {
                  @Override
                  public void run() {
                    if (SiegeConfig.SIEGE_IDA_ENABLED) {
                      getOwner()
                          .getKnownList()
                          .doOnAllPlayers(
                              new Visitor<Player>() {
                                @Override
                                public void visit(Player player) {
                                  if (player.getAbyssRank().getRank().getId()
                                      > AbyssRankEnum.STAR4_OFFICER.getId()) {
                                    boolean inform = false;
                                    EffectController controller = player.getEffectController();
                                    for (Effect eff : controller.getAbnormalEffects()) {
                                      if (eff.isDeityAvatar()) {
                                        eff.endEffect();
                                        getOwner().getEffectController().clearEffect(eff);
                                        inform = true;
                                      }
                                    }

                                    if (inform) {
                                      String message =
                                          "The power of incarnation removes "
                                              + player.getName()
                                              + " morph state.";
                                      PacketSendUtility.broadcastPacket(
                                          getOwner(),
                                          new SM_MESSAGE(
                                              getObjectId(),
                                              getOwner().getName(),
                                              message,
                                              ChatType.BRIGHT_YELLOW_CENTER));
                                    }
                                  }
                                }
                              });
                    }
                  }
                },
                10000,
                10000);
  }
示例#11
0
  @Override
  protected void handleSpawned() {
    super.handleSpawned();
    ThreadPoolManager.getInstance()
        .schedule(
            new Runnable() {

              @Override
              public void run() {
                SkillEngine.getInstance()
                    .getSkill(getOwner(), 19937, 46, getOwner())
                    .useNoAnimationSkill();
                startLifeTask();
              }
            },
            1000);
  }
示例#12
0
  @Override
  protected void handleSpawned() {
    super.handleSpawned();
    ThreadPoolManager.getInstance()
        .schedule(
            new Runnable() {

              @Override
              public void run() {
                if (!isAlreadyDead()) {
                  SkillEngine.getInstance()
                      .getSkill(getOwner(), 19126, 46, getOwner())
                      .useNoAnimationSkill();
                }
              }
            },
            2000);
  }
  @Override
  protected void handleSpawned() {
    super.handleSpawned();
    if (getNpcId() == 282744) {
      startSpawnTask();
    } else {
      SkillEngine.getInstance().getSkill(getOwner(), 20213, 60, getOwner()).useNoAnimationSkill();
      task =
          ThreadPoolManager.getInstance()
              .schedule(
                  new Runnable() {

                    @Override
                    public void run() {
                      if (!isAlreadyDead()) {
                        AI2Actions.deleteOwner(GoldenTatarParalysisEyeAI2.this);
                      }
                    }
                  },
                  2000);
    }
  }
示例#14
0
 @Override
 protected void handleSpawned() {
   NpcShoutsService.getInstance().sendMsg(getOwner(), 1500741, getObjectId(), 0, 1000);
   addPercent();
   super.handleSpawned();
 }
示例#15
0
 @Override
 protected void handleSpawned() {
   NpcShoutsService.getInstance().sendMsg(getOwner(), 390005, getObjectId(), 0, 0);
   super.handleSpawned();
 }
 @Override
 protected void handleDespawned() {
   cancelPhaseTask();
   super.handleDespawned();
 }
 @Override
 protected void handleSpawned() {
   DaggerBless(3000);
   DaggerBless(4000);
   super.handleSpawned();
 }
示例#18
0
 @Override
 protected void handleBackHome() {
   super.handleBackHome();
   despawnServant();
 }
 @Override
 protected void handleDied() {
   percents.clear();
   super.handleDied();
 }
 @Override
 protected void handleAttack(Creature creature) {
   super.handleAttack(creature);
   isDeadGod();
 }
示例#21
0
 @Override
 protected void handleDied() {
   super.handleDied();
   AI2Actions.deleteOwner(this);
 }
 @Override
 protected void handleActivate() {
   super.handleActivate();
   towerCenter = getPosition().getWorldMapInstance().getNpc(831130);
   AI2Actions.targetCreature(AwakenedGuardianTombGhostAI2.this, towerCenter);
 }
 @Override
 protected void handleBackHome() {
   addPercent();
   super.handleBackHome();
 }
示例#24
0
 @Override
 public void handleSpawned() {
   super.handleSpawned();
   markTarget();
 }
示例#25
0
 @Override
 protected void handleDied() {
   super.handleDied();
   despawnServant();
 }
 @Override
 protected void handleSpawned() {
   addPercent();
   VritraBless();
   super.handleSpawned();
 }
示例#27
0
 @Override
 protected void handleDespawned() {
   super.handleDespawned();
   avatar_scan.cancel(true);
 }
 @Override
 protected void handleAttack(Creature creature) {
   super.handleAttack(creature);
   checkPercentage(getLifeStats().getHpPercentage());
 }