Jump to content

Pauler

Legendary Member
  • Posts

    1,390
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Pauler

  1. Correct me if I'm wrong, but you can only CALL existing methods, not AFFECTING them. Giving the fact 99,9% of customs have to edit existing methods, the actual version is useless (version 0.00001a).

     

    Anyway, good luck to improve it.

     

    In this version, you can only call existing methods, but I am going to add some event listeners, to execute scripts on death, on login, etc.

     

    But still, the current version isn't useless, it just doesn't provide the promising functionality, yet.

  2.  

    This is the very early version of plugin system. It is something pretty much unknown to l2j community, but it has lots of potential. In a few words, this system gives tou the ability to add custom features to your server without re-compiling the whole project. You create your feature at a separated project, and you export it at the plugins folder. The video shows a really simple example, just to see if it works. You will be able to add stuff, from a simple voiced command handler to an advanced event engine, in the future.

  3. Έλα δεν έκανε και τίποτα το παλικάρι στο κάτω-κάτω, αφήστε το να καμαρώνει το vip του στο κανονικό του account.

  4. Damn, forgot to add port when you connect . im fking idiot

    so the jar was sending to other port this is why the server didn't respond.

    Updated the jar

    bq8s.png

    download : http://www.4shared.com/file/jMwT12D0/Telnet.html

    code : http://pastebin.com/gcH4J8Xz

     

    Also added a boolean check if connected to be more secured

     

    really sorry i dont know how i forgot to add the port

     

    Again, it is not secured. Once it gets to true, everyone would be able to connect by a custom client.
  5. Sorry, for keep messing with this one, but you reminded me to add a telnet system to pes, and while I was working on it I also realised that your client is not working too. But, the sample client that I coded worked fine.

     

    telnet

     

    package com.pauler;
    
    import java.io.IOException;
    import java.net.DatagramPacket;
    import java.net.DatagramSocket;
    import java.net.InetAddress;
    import java.net.SocketException;
    import java.net.UnknownHostException;
    
    public class TelnetClient {
    
    DatagramSocket socket;
    
    public TelnetClient() {
    	while (true) {
    		try {
    			socket = new DatagramSocket();
    		} catch (SocketException e1) {
    			// TODO Auto-generated catch block
    			e1.printStackTrace();
    		}
    
    		try {
    			sendData("wswsws".getBytes(), InetAddress.getByName("127.0.0.1"), 1234);
    		} catch (UnknownHostException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    
    		try {
    			Thread.sleep(3000);
    		} catch (InterruptedException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    	}
    }
    
    public static void main(String[] args) {
    	getInstance();
    }
    
    public static TelnetClient getInstance() {
    	return SingletonHandler._instance;
    }
    
    public void sendData(byte[] data, InetAddress ipAddress, int packetPort)
    {
    	DatagramPacket packet = new DatagramPacket(data, data.length, ipAddress, packetPort);
    	try
    	{
    		socket.send(packet);
    	}
    	catch (IOException e)
    	{
    		e.printStackTrace();
    	}
    	System.out.println("sent : " + new String(data));
    }
    
    private static class SingletonHandler {
    	protected static final TelnetClient _instance = new TelnetClient();
    }
    }
    
    

     

     

  6. Also, you MUST add some more server-side checks about the password, because in that way if someone codes his own gui, which doesn't ask for a password, he would be able to send commands normally.

     

    A good idea is that after password check, the server should accept packets only by the approved ip address.

  7. choose DatagramSockets because Sockets had a limitation in connection(only 1 client can connect)  because of  streams 

     

    In combination with threads you can connect to multiple clients. But, in this occasions, it seems that Datagrams are fine, by the time packet order doesn't matter.

     

    Also, you propably forgot to send the online data back to the client, at the online command.

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock