示例#1
0
 @Override
 public final String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon) {
   if ((npc.getId() == _herb_jar) && !npc.isDead()) {
     dropHerb(npc, attacker, HP_HERBS_DROPLIST);
     dropHerb(npc, attacker, MP_HERBS_DROPLIST);
     npc.doDie(attacker);
   } else if ((npc.getId() == 18362) && (npc.getInstanceId() > 0)) {
     spawn1(npc);
   }
   return null;
 }
示例#2
0
  private void spawn2(L2Npc npc) {
    final InstanceWorld inst = InstanceManager.getInstance().getWorld(npc.getInstanceId());
    if (inst instanceof NornilsWorld) {
      final NornilsWorld world = ((NornilsWorld) inst);
      if (!world.spawned_2) {
        world.spawned_2 = true;

        for (int mob[] : _group_2) {
          addSpawn(mob[0], mob[1], mob[2], mob[3], mob[4], false, 0, false, world.getInstanceId());
        }
      }
    }
  }