Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Lance

Pages: 1 [2] 3
16
JavaOp Support Archive / Garbage Collector
« on: August 04, 2008, 04:43:39 pm »
I am looking for a way to make my huge JavaOP2 plugin (and JavaOP2 overall, without modifying source) more efficient. I do not know exactly how the Garbage Collector works and when to invoke it. Can someone shed some light on this for me? Thanks.

17
General Programming / Get Checksum of W3X map
« on: July 28, 2008, 11:54:26 am »
How can I do it? I've already figured out how to get the mapsize and crc32.

18
General Programming / [Java] Buffer Problems (Again)
« on: July 17, 2008, 11:02:53 pm »
I have JavaOP2 receive packets (non-battle.net ones). I am currently modifying the core to meet my needs.

This works:
Code: [Select]
byte []packet = new byte[127];
                    input.read(packet);
but I have to specify the size which is completely inaccurate and it throws off my data by adding lots of 0x00's. I need a solution to this problem ;(

The traditional
Code: [Select]
int len1 = (input.read() & 0x000000FF);
                    int len2 = (input.read() & 0x000000FF) << 8;

int length = len1 | len2;

byte []packet = new byte[length];

for(int i = 0; i < packet.length; i++)
                        packet[i] = (byte)input.read();
results in my incoming packets not processing for some reason.

Ron said something about looping through each byte but I am still pretty new to java :p

Thanks :)

19
General Programming / [Java] Reading from an already open socket
« on: July 14, 2008, 12:58:04 pm »
How can I listen to a socket opened by another program? Let's say I just logged on BNET with JavaOP2 and I received the ENTERCHAT packet. I want to view the contents of that packet in my program x3

20
JavaOp Support Archive / JavaOP Logon Sequence Modification
« on: July 12, 2008, 02:19:43 pm »
I have JavaOP2 loaded into eclipse.
I would like to change the packets that are sent to the server when a successful connection is made (I don't want 0x01) (Experimenting with some stuff -- and this will not be connecting to a BATTLE.NET server) and change how JavaOP2 responds to what the server sends. But I'm interested more in the sending part :P.

In what package can I find the classes to change this stuff? Thanks

21
Trash Can / <Delete>
« on: July 12, 2008, 12:37:04 am »
Another one of my silly questions. Delete please  :-[ and thanks  :)

22
General Programming / [Java] Incorrect Buffer Output
« on: July 11, 2008, 07:06:35 pm »
I have a Java application that connects to a server.
Upon a successful connection, it sends data.

For some reason, values in the character buffer like 0x9c will be turned into 3f (as seen in wireshark) and the result will be a buffer with incorrect data. I am using PrintWriter.write so there is no encoding. Anyone know what's causing this or how to fix this? Thanks.

23
JavaOp Support Archive / Wildcard kick and ban
« on: July 08, 2008, 02:04:17 pm »
Let's say "somenoob" is in the channel.
If I -kick some I'd like it to kick anyone's name that starts with some (kicking "somenoob")
How can this be coded? I'd like to use that type of string function for other things too.
Thanks

24
JavaOp Support Archive / Socket Server Plugin
« on: July 07, 2008, 02:16:00 pm »
How can I run a socket server in a JavaOP plugin to receive commands without it freezing up? It is the only way I can link my bots at the moment.

Here is my server method:
Code: [Select]
public void run() throws IOException {

        ServerSocket serverSocket = null;
        try {
            serverSocket = new ServerSocket(4167);
        } catch (IOException e) {
            System.err.println("Could not listen on port.");
            System.exit(1);
        }

        Socket clientSocket = null;
        try {
            clientSocket = serverSocket.accept();
        } catch (IOException e) {
            System.err.println("Accept failed.");
            System.exit(1);
        }

        PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
        BufferedReader in = new BufferedReader(
new InputStreamReader(
clientSocket.getInputStream()));
        String inputLine;
       
        while ((inputLine = in.readLine()) != null) {
             out.sendText(inputLine);
        }
        out.close();
        in.close();
        clientSocket.close();
        serverSocket.close();
    }

}

25
How can I find the line in the plugin that is causing this? Thanks.

26
JavaOp Support Archive / 1.22a Patch (WAR3/W3XP FIX)
« on: June 30, 2008, 11:21:52 pm »
Open _GameData.txt file in your .javaop folder

Find this block of code (where <drive> (usually C:) is the drive the hashes are installed on and <user> is the Windows username of the account that the bot configured to run on) [use CTRL+F in notepad and search for "w3xp" (without quotes)]:
Code: [Select]
[w3xp]
file1=<drive>:\Documents and Settings\<user>/.hashes/WAR3/war3.exe
file2=<drive>:\Documents and Settings\<user>/.hashes/WAR3/Storm.dll
file3=<drive>:\Documents and Settings\<user>/.hashes/WAR3/game.dll
has2keys=true
version byte=15
version hash=01001027

[war3]
file1=<drive>:\Documents and Settings\<user>/.hashes/WAR3/war3.exe
file2=<drive>:\Documents and Settings\<user>/.hashes/WAR3/Storm.dll
file3=<drive>:\Documents and Settings\<user>/.hashes/WAR3/game.dll
has2keys=false
version byte=15
version hash=01001027

Replace BOTH version byte's with 16

Place the updated hashes in their respective folder (<drive>:\Documents and Settings\<user>\.hashes\WAR3 on win32 systems)

Reload JavaOP2.

27
This happens once every other day... I lose my CDKey User Pass and Server -- like JavaOP was freshly installed.
Last night, I got the orange socket closed message. When I check on it this morning, the Battle.Net plugin is reset.........
Also, when I enable some other plugins (which I can't remember), the Battle.Net plugin resets itself.
Help and thanks!

28
JavaOp Support Archive / Unhandled Packet
« on: June 17, 2008, 12:32:16 pm »
How do I hide:

Code: [Select]
[12:30:46.656] Unknown packet received:
[12:30:46.656] Buffer contents:
ff 00 04 00                                      ....
Length: 4

It appears every 2 seconds and kind of spams up my screen ;(

29
JavaOp Support Archive / Massload Prevention
« on: June 16, 2008, 08:27:15 am »
How can I prevent being loaded & flooded out from JavaOP2? My bot auto-bans someone without flags (meaning it tries to ban the loads) and it drops. If I turn on antiflood commands take a long time to work but loading is my main concern.

30
After running the bot for a few days, I get this:
Code: [Select]
WARNING: Keepalive failed to send: java.net.SocketException: Socket closed

When I try to send a chat message I get:
Code: [Select]
ERROR: Unable to send packet: java.net.SocketException: Socket closed

Pages: 1 [2] 3