Hack Forums
[.NET] How should I approach this? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] How should I approach this? (/showthread.php?tid=4988368)



How should I approach this? - IAmAMFBeast - Sep 15, 2015

Hello,

I want to make a client that runs RuneScape and does automated actions.
How would I approach this? I've been looking, but can't find it.

Basically making it so that the client performs actions and that you as computer user can still perform actions too.


* - asdfghjklwertyuio345678 - Sep 15, 2015

You could make an application that uses the web browser control to do actions like a macro. I haven't played runescape, so I can't remember if you can play it in your browser.


* - Hawk HF - Sep 15, 2015

I'm pretty sure there are a few bot clients out there that allow you to code your own scripts that you'll be able to run on their client. I'm pretty sure that the scripts are written in java, but I'm not really sure. I haven't played RuneScape in years, but I think that's your best bet.


* - $uicidal - Sep 15, 2015

I couldn't even begin to fathom how you'd be able to do that in VB.NET since RuneScape is Java, you'd either have to make it completely external and read memory of RS or maybe use an API if someone has already made one
I think your best bet would be to work with Java, it's not very different (Visually) compared to VB.NET, shouldn't take long to get used to it if you're already fluent in VB.NET or C#


* - hankaf - Sep 15, 2015

Hey, I'm actually working on a Runescape client as well.

I suggest that you make a screen scraper bot. Forget about reflection or injection due to the possibility of getting banned. Since Runescape uses some method to detect client, you should probably use one of their official game clients. That gives you the option to either use a web browser that plays the beta HTML 5 game or the Jagex Launcher as a means of accessing the game. To use a web browser, you need to use one that supports OpenGL and many of the features that come with HTML 5, otherwise you simply won't be able to connect to the game. You should probably look for a browser that uses webkit. I tried awesomium at first, but it was a bigger pain than it was worth. There was lack of support, and I just gave up on using browsers.

The option that I used basically sets the Jagex Launcher as the child of a panel using SetParent. I made it look nice by removing the border using GetWindowLong, SetWindowLong, and SetWindowPos. Finally, I maximized the window using SendMessage. That takes care of getting the game onto your bot.

Next comes sending keyboard and mouse data to the game client. For this, I recommend SendMessage/PostMessage. You'll need to send mouse clicks, keyboard key presses, and mouse movement data.

To make a bot that doesn't get you banned, you need to make it as human as possible. Make measurements on how you use a computer. Determine how quickly you press buttons, move the mouse, etc and apply that to your bot. Make sure to randomize delays and mouse positions. The biggest thing you'll have to consider is human-like mouse movement. More well known bots gather data from real human mouse movements, and apply that into their bot. I personally don't have the resources for that, so instead I use a random bezier curve to generate the path the mouse should take.

Now for the real meat of the bot. Since it's not using reflection or injection to gather data, the only way you can gather any information from the game is from what you can see on the screen. This is the part that will determine how good your bot is. Very often, screen scrapers use very basic methods in order to gather data from screen. For example, they determine if a certain pixel is a certain color, if so it will perform some action. Forget that. If you want to make a good screen scraper bot, the best way to do it is by using computer vision. I personally am using EmguCV.

If you follow this path, your bot won't be as quick as reflection/injection bots, but you will be better protected against bans as long as you make movement as human-like as possible.

(Sep 15, 2015 01:07 AM)IAmAMFBeast Wrote:  Hello,

I want to make a client that runs RuneScape and does automated actions.
How would I approach this? I've been looking, but can't find it.

Basically making it so that the client performs actions and that you as computer user can still perform actions too.

I suggest that you use this method if you have enough experience with VB.net. You will likely have to do a lot of research in order to get all of this working properly. If you want a good bot, the results will be worth the time and effort you put in.

(Sep 15, 2015 10:16 AM)Lawlly Wrote:  I couldn't even begin to fathom

Now you can =)


* - Natalie Dormerr - Sep 16, 2015

Yeah it's called a bot. Good luck finding any sources.