@Override
  public boolean onKillEvent(final QuestEnv env) {
    final Player player = env.getPlayer();
    final int instanceId = player.getInstanceId();
    final QuestState qs = player.getQuestStateList().getQuestState(questId);
    if (qs == null || qs.getStatus() != QuestStatus.START) return false;

    final Npc npc = (Npc) env.getVisibleObject();

    switch (env.getTargetId()) {
      case 216531:
        if (qs.getQuestVarById(0) == 14 || qs.getQuestVarById(0) == 15) {
          QuestService.addNewSpawn(
              300160000, instanceId, 730229, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading());
          qs.setQuestVarById(0, 15);
          updateQuestStatus(env);
          return true;
        }
    }
    return false;
  }
 @Override
 public void onDie(Npc npc) {
   final List<Player> playerList = instance.getPlayersInside();
   switch (npc.getNpcId()) {
     case 231050:
       spawn(730868, 317f, 489.04999f, 607.64343f, (byte) 0);
       break;
     case 230413:
       sendMsg(1401904);
       spawn(230417, 476.74689f, 523.6272f, 598.8186f, (byte) 13); // Disabled GENERATEUR POST
       despawnNpc(npc);
       Powerdevice++;
       if (Powerdevice == 4) {
         spawn(701644, 435.42862f, 496.41296f, 604.8871f, (byte) 1);
       }
       break;
     case 230417:
       spawn(230413, 476.74689f, 523.6272f, 598.8186f, (byte) 13); // Balaur GENERATEUR POST
       despawnNpc(npc);
       break;
     case 230414:
       sendMsg(1401905);
       spawn(230418, 524.53607f, 427.29379f, 621.82062f, (byte) 15); // Disabled GENERATEUR NORD
       despawnNpc(npc);
       Powerdevice++;
       if (Powerdevice == 4) {
         spawn(701644, 435.42862f, 496.41296f, 604.8871f, (byte) 1);
       }
       break;
     case 230418:
       spawn(230414, 524.53607f, 427.29379f, 621.82062f, (byte) 15); // balaur GENERATEUR NORD
       despawnNpc(npc);
       break;
     case 230415:
       sendMsg(1401906);
       spawn(230419, 602.40997f, 556.41998f, 592.16406f, (byte) 113); // Disabled GENERATEUR SUD
       despawnNpc(npc);
       Powerdevice++;
       if (Powerdevice == 4) {
         spawn(701644, 435.42862f, 496.41296f, 604.8871f, (byte) 1);
       }
       break;
     case 230419:
       spawn(230415, 602.40997f, 556.41998f, 592.16406f, (byte) 113); // balaur GENERATEUR SUD
       despawnNpc(npc);
       break;
     case 230416:
       sendMsg(1401907);
       spawn(230420, 666.76001f, 474.20999f, 601.1673f, (byte) 117); // Disabled GENERATEUR Defense
       despawnNpc(npc);
       Powerdevice++;
       if (Powerdevice == 4) {
         spawn(701644, 435.42862f, 496.41296f, 604.8871f, (byte) 1);
       }
       break;
     case 230420:
       echec += 1;
       doors.get(47).setOpen(false);
       spawn(230416, 666.76001f, 474.20999f, 601.1673f, (byte) 117); // balaur GENERATEUR Defense
       despawnNpc(npc);
       break;
     case 233320:
       startFinalTimer();
       despawnNpc(npc);
       if (npc.getX() == 751.5975f || npc.getY() == 518.4685f || npc.getZ() == 578.5f) {
         if (!isStartTimer) {
           isStartTimer = true;
           startTime = System.currentTimeMillis();
           ThreadPoolManager.getInstance()
               .schedule(
                   new Runnable() {
                     @Override
                     public void run() {
                       for (Player player : playerList) {
                         PacketSendUtility.sendPacket(player, new SM_SYSTEM_MESSAGE(1401884));
                       }
                       attackgenerator(
                           getNpc(230420),
                           (Npc) spawn(233319, 697.05707f, 467.85675f, 599.68396f, (byte) 55));
                       attackgenerator(
                           getNpc(230420),
                           (Npc) spawn(231189, 695.08307f, 471.75702f, 599.80f, (byte) 55));
                       attackgenerator(
                           getNpc(230420),
                           (Npc) spawn(231190, 693.59186f, 462.29324f, 599.875f, (byte) 55));
                     }
                   },
                   300000);
         }
       }
       break;
   }
 }