Jump to content

lord_rex

VIP Member
  • Content Count

    560
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

lord_rex last won the day on February 10 2016

lord_rex had the most liked content!

Community Reputation

4 Neutral

About lord_rex

  • Rank
    Baron

Contact Methods

  • MSN
    lordrex34@hotmail.com
  • Website URL
    https://www.l2neverending.com
  • Skype
    lord.rex

Profile Information

  • Current Mood
    Devilish
  • Gender
    Male
  • Country
    Hungary
  • Location
    Hell, 9th circle, centre

Recent Profile Visitors

712 profile views
  1. Amateur? ME?! You are the nab who cannot even create a proper bridge between MMOCore and Olympiad Games. See the code snippet and LEARN from the professionals! public abstract class MMOController<T extends MMOConnection<T, RP, SP>, RP extends ReceivablePacket<T, RP, SP>, SP extends SendablePacket<T, RP, SP>> { // ... lots of code is here @Inject private OlympiadGamesService olympiadGamesService; /** * An easy way to apply any special limitations on incoming connections. At default it contains * a flood protection.<br> * Overriding implementations should call the super method before anything else gets checked.<br> * <br> * NOTE: Uses a special way of logging to avoid console flood. * * @param sc the inbound connection from a possible client * @return true if the connection is valid, and should be allowed, no otherwise */ protected boolean acceptConnectionFrom(SocketChannel sc) { if (olympiadGamesService.isLoser((L2PcInstance) sc)) { _log.warn("Player who lost olympiad games should not be able to connect!"); return false; } final String host = sc.socket().getInetAddress().getHostAddress(); final Result isFlooding = _accepts.isFlooding(host, true); switch (isFlooding) { case REJECTED: { _log.warn("Rejected connection from " + host); return false; } case WARNED: { _log.warn("Connection over warn limit from " + host); return true; } default: return true; } } /** * An easy way to apply any special limitations on incoming packets. At default it contains a * flood protection.<br> * Overriding implementations should call the super method before anything else gets checked.<br> * <br> * NOTE: Uses a special way of logging to avoid console flood. * * @param client the associated client * @param opcode the opcode of the potential packet (for debugging purposes) * @return true if the client can be allowed to receive a packet, no otherwise */ protected boolean canReceivePacketFrom(T client, int opcode) { if (olympiadGamesService.isLoser(client.getPlayer()) { _log.warn("Player who lost olympiad games should not be able to receive packets from the server!"); return false; } final String key = client.getValidUID(); switch (Result.max(_packets.isFlooding(key, true), _errors.isFlooding(key, false))) { case REJECTED: { _log.warn("Rejected packet (0x" + Integer.toHexString(opcode) + ") from " + client); return false; } case WARNED: { _log.warn("Packet over warn limit (0x" + Integer.toHexString(opcode) + ") from " + client); return true; } default: return true; } } }
  2. public final class Server { public static void main(String[] args) { final Server server = new Server(); server.setClassic(true); server.start(); } } You are welcome.
  3. You are doing it wrong guys. First of all you have to create an interface in the MMOCore and implement it's functions in the drop list system. In short: when an NPC happen to have bad drop, the MMOCore should stop the packet communication for all players. Additionally you can include System.exit(-1); to grand boss drops.
×