@Override public void onBypassFeedback(Player player, String command) { if (!canBypassCheck(player, this)) { return; } if (command.startsWith("start1")) { // тут пропускам т.к. это первый этаж, и перемещение на него == вход в инстанс } else if (command.startsWith("start2")) { for (Player party : GameObjectsStorage.getAllPlayersForIterate()) { party.unsetVar("Altar1"); party.setVar("Altar2", "true", -1); party.teleToLocation(FLOOR2, player.getReflection()); } } else if (command.startsWith("start3")) { for (Player party : GameObjectsStorage.getAllPlayersForIterate()) { party.unsetVar("Altar2"); party.setVar("Altar3", "true", -1); party.teleToLocation(FLOOR3, player.getReflection()); } } else if (command.startsWith("exit")) { for (Player party : GameObjectsStorage.getAllPlayersForIterate()) { party.unsetVar("Altar3"); party.teleToLocation(OFF, 0); } } else { super.onBypassFeedback(player, command); } }
@Override public void onBypassFeedback(Player player, String command) { if (!canBypassCheck(player, this)) { return; } if (command.equalsIgnoreCase("start")) { Reflection r = player.getActiveReflection(); if (r != null) { if (player.canReenterInstance(VullockInstance)) { player.teleToLocation(r.getTeleportLoc(), r); } } else if (player.canEnterInstance(VullockInstance)) { ReflectionUtils.enterReflection(player, new AltarShilen(), VullockInstance); } } else { super.onBypassFeedback(player, command); } }
@Override public void onBypassFeedback(Player player, String command) { if (!canBypassCheck(player, this)) return; if (command.startsWith("tryenter")) { if (NaiaLock.isEntranceActive()) { // instance if (!player.isInParty()) { player.sendPacket(SystemMsg.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER); return; } if (!player.getParty().isLeader(player)) { player.sendPacket(SystemMsg.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER); return; } for (Player member : player.getParty().getPartyMembers()) { if (member.getLevel() < 80) { player.sendPacket( new SystemMessage( SystemMessage.C1S_LEVEL_REQUIREMENT_IS_NOT_SUFFICIENT_AND_CANNOT_BE_ENTERED) .addName(member)); return; } if (!member.isInRange(this, 500)) { player.sendPacket( new SystemMessage( SystemMessage .C1_IS_IN_A_LOCATION_WHICH_CANNOT_BE_ENTERED_THEREFORE_IT_CANNOT_BE_PROCESSED) .addName(member)); return; } } NaiaTowerManager.startNaiaTower(player); broadcastPacket(new MagicSkillUse(this, this, 5527, 1, 0, 0)); doDie(null); } else { broadcastPacket(new MagicSkillUse(this, this, 5527, 1, 0, 0)); doDie(null); } } else super.onBypassFeedback(player, command); }
@Override public void onBypassFeedback(Player player, String command) { if (!canBypassCheck(player, this)) return; if (command.startsWith("ExitSoloKama")) { Reflection r = getReflection(); if (r.getReturnLoc() != null) player.teleToLocation(r.getReturnLoc(), ReflectionManager.DEFAULT); else player.setReflection(ReflectionManager.DEFAULT); player.unsetVar("backCoords"); r.startCollapseTimer(1000); } else if (command.startsWith("ListPossible")) { if (getNpcId() == 32484 && Config.ALT_KAMALOKA_NIGHTMARES_PREMIUM_ONLY && !player.hasBonus()) { showChatWindow(player, "instance/soloKamaloka/32484-no.htm"); return; } // FIXME [G1ta0] исправить, когда будет реализованы индивидуальные параметры спавна DomainArea domain = MapRegionManager.getInstance().getRegionData(DomainArea.class, this); String htmlpath = "instance/soloKamaloka/" + getNpcId(); if (domain != null) switch (domain.getId()) { case 1: // Town of Gludio htmlpath += "-gludio"; break; case 2: // Town of Dion htmlpath += "-dion"; break; case 4: // Town of Oren htmlpath += "-oren"; break; case 6: // Heine htmlpath += "-heine"; break; case 8: // Rune Township htmlpath += "-rune"; break; case 9: // Town of Schuttgart htmlpath += "-schuttgart"; break; } htmlpath += ".htm"; showChatWindow(player, htmlpath); } else if (command.startsWith("ShowResults")) { String htmlpath = "instance/soloKamaloka/" + getNpcId(); switch (getRewardRank()) { case 0: htmlpath += "-F"; break; case 1: htmlpath += "-D"; break; case 2: htmlpath += "-C"; break; case 3: htmlpath += "-B"; break; case 4: htmlpath += "-A"; break; case 5: htmlpath += "-S"; break; case 6: if (getReflection().getInstancedZoneId() == INSTANCE_75LVL_ID) // G-Grade награда доступна только в соло камалоке 70-80 // уровней. htmlpath += "-G"; else htmlpath += "-S"; break; } htmlpath += ".htm"; showChatWindow(player, htmlpath); } else if (command.startsWith("SoloKamaReward")) { if (!_rewarded) { int[][] rewards = getRewardList(getRewardRank(), getReflection().getInstancedZone()); if (rewards != null) for (int[] item : rewards) if (item != null) { int id = item[0]; int count = item[1]; if (id > 0 && count > 0) Functions.addItem(player, id, count); } _rewarded = true; } showChatWindow(player, 1); } else if (command.startsWith("Chat")) try { int val = Integer.parseInt(command.substring(5)); showChatWindow(player, val); } catch (NumberFormatException nfe) { String filename = command.substring(5).trim(); if (filename.length() == 0) showChatWindow(player, "npcdefault.htm"); else showChatWindow(player, filename); } else if (command.startsWith("solo_kamaloka")) { int val = Integer.parseInt(command.substring(14)); Reflection r = player.getActiveReflection(); if (r != null) { if (player.canReenterInstance(val)) player.teleToLocation(r.getTeleportLoc(), r); } else if (player.canEnterInstance(val)) { ReflectionUtils.enterReflection(player, new KamalokaNightmare(player), val); } } else super.onBypassFeedback(player, command); }