private boolean isDeadGod() {
   Npc marcutan = getNpc(856023);
   Npc kaisinel = getNpc(856020);
   if (isDead(marcutan) || isDead(kaisinel)) {
     AI2Actions.useSkill(this, 20983);
     return true;
   }
   return false;
 }
예제 #2
0
 private void checkEntryConditions(Player player, int dialogId, int questId) {
   if (dialogId == 10000) {
     if (player.getInventory().decreaseByItemId(186000246, 1)) {
       switch (player.getRace()) {
         case ASMODIANS:
           SkillEngine.getInstance().applyEffectDirectly(21139, player, player, 160000 * 3);
           break;
         case ELYOS:
           SkillEngine.getInstance().applyEffectDirectly(21138, player, player, 160000 * 3);
           break;
       }
       PacketSendUtility.sendBrightYellowMessageOnCenter(
           player, MuiService.getInstance().getMessage("DEFENCE_BASTION"));
       stopMove(player);
       AI2Actions.deleteOwner(this);
     } else {
       PacketSendUtility.sendBrightYellowMessageOnCenter(
           player, MuiService.getInstance().getMessage("DEFENCE_BASTION_NO"));
       PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), 0, 0));
     }
   } else {
     PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), dialogId, questId));
   }
 }
예제 #3
0
 @Override
 public void run() {
   AI2Actions.deleteOwner(DeliveryManAI2.this);
 }
 @Override
 protected void handleDied() {
   cancelTask();
   super.handleDied();
   AI2Actions.deleteOwner(this);
 }