August 4th, 2005

Note: This article is a few years old. The program that this article is about is outdated and not available anymore. Please don’t ask me for the source code.

This was my first project to be released to the public. The program was a 3rd party program for the game Ragnarok Online.

I haven’t really made it to get advantages in the game but to learn about DLL injection and network programming. There were two different versions using two different methods.

Version one

Ragnarok Online had to be changed to connect to your local machine using the port RCT was listening on. As soon as the connection was established, RCT connected to the real Ragnarok server pretending to be the Ragnarok Online client. Then it forwarded packets from each side to the other.
It was important to modify specific packets containing ip addresses to keep Ragnarok Online to connect to RCT instead of the server.
Using this method it was possible to intercept, modify and view every packet which gives a lot of possibilities. But furthermore you could send your own packets to both the client and the server. Given this option you could do nearly everything.

Here is a list of features:

  • Display monster’s HP below each monster
  • Show gained exp after each kill and calculation how many you have to kill until level up
  • Calculate routes through maps and display them with “Safety Walls”
  • Show walking paths of the monster you have attacked last making vertical firewalls easier
  • Communication between IRC and Ragnarok Online

Example: monster HP

I used a database containing all information about the monsters and made RCT notice every packet about a monster.
To display the HP I used the health bars of party members and because you can’t attach them to monsters I had to send fake packets to Ragnarok Online to make it think that at the very same position as the monster there is an invisible player. Fortunately you can make invisible characters (yes invisible GMs are noticed by your client, they just don’t show up!) and thus I could attach the HP bar to them. I then subtracted all damage the monster received because the server doesn’t send the actual HP but you have to calculate it on your own. This has some minor problems like miscalculation if the monster hadn’t had full HP when it came on your screen.

Version two

Version two used a more complex but more reliable system: DLL injection. Because I didn’t know anything about it, I used the DLLs that the Kore bot uses. Although I got the basic functions to work there were still serious problems: When I sent a packet to Ragnarok Online, the game lagged for a second making it impossible to play. My packets however were received successfully but I never found a way to fix this problem. But I thought of other features because I was at a point where you kill monsters way too fast or partied all the time making the monster HP completely useless.

Here are some examples of features I implemented in the different versions of RCT (which were all private):

  • WoE warning system (^^): this is one weird feature you might think. As soon as someone who is not from your guild enters a castle the program makes a loud sound.
    Yes, there is a use for this. You can watch TV and do WoE at the same time! :)
  • EXP monitor: EXP/h, time until level up, EXP gained in one session and a nice diagram
Category: Programming