Beispiel #1
0
 private void openDoor(QuestState st, L2PcInstance player, int doorId) {
   st.unset("correct");
   final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(player.getInstanceId());
   if (tmpworld instanceof NornilsWorld) {
     openDoor(doorId, tmpworld.getInstanceId());
   }
 }
Beispiel #2
0
  @Override
  public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) {
    final QuestState st = getQuestState(player, false);
    if (st == null) {
      return null;
    }

    for (int _gk[] : _gatekeepers) {
      if (npc.getId() == _gk[0]) {
        // Drop key
        npc.dropItem(player, _gk[1], 1);

        // Check if gatekeeper should open bridge, and open it
        if (_gk[2] > 0) {
          final InstanceWorld tmpworld =
              InstanceManager.getInstance().getWorld(player.getInstanceId());
          if (tmpworld instanceof NornilsWorld) {
            openDoor(_gk[2], tmpworld.getInstanceId());
          }
        }
      }
      if (npc.getId() == 18355) {
        spawn2(npc);
      }
    }
    return super.onKill(npc, player, isSummon);
  }
Beispiel #3
0
 private void exitInstance(L2PcInstance player) {
   final InstanceWorld inst = InstanceManager.getInstance().getWorld(player.getInstanceId());
   if (inst instanceof NornilsWorld) {
     final NornilsWorld world = ((NornilsWorld) inst);
     world.removeAllowed(player.getObjectId());
     teleportPlayer(player, EXIT_PPL, 0);
   }
 }