PokeMMO bot - Code injection

Posts 114 of 14 · Page 1 of 1
PokeMMO bot - Code injection
I have been trying to create a bot for this game for years now and without any success. I was wondering if it was even possible so I started looking up java code injection and came across several RuneScape bots. I found something about reflection and injection and I don't know really where to start right now? The game seems to be encrypted as an executable file because all of its .class is assigned random letters both capital and lowercase. I want my bot to use the in-game variables and methods and Cheat Engine doesn't seem to work in this case. So I need someone to put me on the right path.
If you figure it out let me know. I wrote one in autoit using image searching. It works but I was always wanting to try and read the values in game in C++. People pointed me in the right direction but I didn't know much about C++ when they told me.
Quote Originally Posted by InunoTaishou View Post
If you figure it out let me know. I wrote one in autoit using image searching. It works but I was always wanting to try and read the values in game in C++. People pointed me in the right direction but I didn't know much about C++ when they told me.
This'd be the wrong section if you wanted to make one in C++...

Anyways @ OP, if you're hoping to be reading addresses from a game, you'll want to use C++, as Java doesn't have any pretty way of RPM/WPM without a bunch of hassle...

I can help you with RPM if you'd like, just shoot me a PM
Quote Originally Posted by liquidsystem View Post


This'd be the wrong section if you wanted to make one in C++...

Anyways @ OP, if you're hoping to be reading addresses from a game, you'll want to use C++, as Java doesn't have any pretty way of RPM/WPM without a bunch of hassle...

I can help you with RPM if you'd like, just shoot me a PM
My goal was to do some function hooking in C++ to try and read the values from the game. The only problem with doing this game is it's a Java emulator, emulating some rom files.

I've tried looking into packet sniffing for Java but there's no real way to packet sniff java.
OllyDB doesn't work on Java
Cheat engine won't give you a static pointer to the memory address.
Quote Originally Posted by InunoTaishou View Post
Cheat engine won't give you a static pointer to the memory address.
Have you tried it and found that you can't get a static address? If I remember correctly you can easily get stuff from a Java oriented program...
is an online game ?. check the actions of the packages with the WPE-PRO
Tried recording packets a long time ago and it didn't work.

Regarding the RPM/WPM I might want to do some research about this subject first before PMing you any questions, liquidsystem.

It might be better to stick with the AutoIt scripts, because it might take a long time getting anything simple and functional to work in this stupid game.
Quote Originally Posted by NoobiBot View Post
Tried recording packets a long time ago and it didn't work.

Regarding the RPM/WPM I might want to do some research about this subject first before PMing you any questions, liquidsystem.

It might be better to stick with the AutoIt scripts, because it might take a long time getting anything simple and functional to work in this stupid game.
I'll take a look at the game and see what I can do, but yeah, feel free to pm me and I'll help you as much as I can


EDIT: After making a simple account, I've already been able to find information through Cheat Engine... Are you sure you tried to use it?

Try finding a static pointer

I think I spent two days trying to get a static pointer and offsets to the PP of move 1 for the first Pokemon and could not get it.
Quote Originally Posted by InunoTaishou View Post
Try finding a static pointer

I think I spent two days trying to get a static pointer and offsets to the PP of move 1 for the first Pokemon and could not get it.
Well there's your issue...


Java has references, but not pointers

But, what Java does have is references, which are different from pointers. Here are some of the differences between references in Java and pointers in C++:


Code:
1.  References store an address.  That address is the address 
in memory of the object.  So, when a class is declared like so: 
"PersonClass y = new PersonClass();", the "y" variable actually 
stores an address in memory.  If you were to look at that 
address in memory you would see the details of the 
PersonClass object.  Pointers in C++, however, point directly 
to the object.

2.  You can not perform arithmetic operations on references.  
So, adding 1 to a pointer is not possible, but is possible
 in C++.
You probably could have looked this up before asking your question here, as it appears you can still use any of those values to modify stuff, but I'd like to assume that they store most if not all of this information on the server, so altering your PP for a move may or may not work. I'd be happy to try and figure out a method to get it working, but I have no guarantee that it will.
Quote Originally Posted by liquidsystem View Post


Well there's your issue...




You probably could have looked this up before asking your question here, as it appears you can still use any of those values to modify stuff, but I'd like to assume that they store most if not all of this information on the server, so altering your PP for a move may or may not work. I'd be happy to try and figure out a method to get it working, but I have no guarantee that it will.
That's exactly the point I was trying to make... My attempts to read the memory of this java emulated game were fruitless because it does not have static pointers to read from.

I had no problem finding addresses in the game.
Quote Originally Posted by InunoTaishou View Post
That's exactly the point I was trying to make... My attempts to read the memory of this java emulated game were fruitless because it does not have static pointers to read from.

I had no problem finding addresses in the game.
What... You can just decompile the code then...? If you're willing to make an attempt to hack a game, be ready to actually do some work instead of just sitting there waiting to be force-fed...

EDIT: To clarify you from assuming I'm being a dick, let's get a few things straight:
1. You claimed Java used pointers, which I specifically stated there weren't any.
2. After I told you what you were asking, you claimed you already knew this, so if you already knew this, why would you complain about it not using pointers?

I realize you're not the OP, so I can safely say that if you have more knowledge of a language than I, please feel free to set me straight, as I am still learning new things myself. I'm only trying to have you broaden your horizons and learn something new.
Quote Originally Posted by liquidsystem View Post


What... You can just decompile the code then...? If you're willing to make an attempt to hack a game, be ready to actually do some work instead of just sitting there waiting to be force-fed...

EDIT: To clarify you from assuming I'm being a dick, let's get a few things straight:
1. You claimed Java used pointers, which I specifically stated there weren't any.
2. After I told you what you were asking, you claimed you already knew this, so if you already knew this, why would you complain about it not using pointers?

I realize you're not the OP, so I can safely say that if you have more knowledge of a language than I, please feel free to set me straight, as I am still learning new things myself. I'm only trying to have you broaden your horizons and learn something new.
The game uses string obfuscation, so I am trying to look up how RuneScape's source code is decompiled. I can't seem to find anything useful out there, only a few broken links.
You could use JNA, to run native code in Java if you wish so.
Posts 114 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?