Register for your free account! | Forgot your password?

You last visited: Today at 05:25

  • Please register to post and access all features, it's quick, easy and FREE!

 

Making a bot

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 49
Received Thanks: 19
Making a bot

Hello i was wondering if anyone could point me in the direction of some tutorials and information relating to making a gw2 bot i am relatively new to coding but am taking an interest to make some simple bots for easy tasks during holiday events.



Dwink is offline  
Old   #2


 
elite*gold: 2826
Join Date: Mar 2009
Posts: 4,258
Received Thanks: 6,099


buFFy! is offline  
Old   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 49
Received Thanks: 19
Auto it is a bit basic i was thinking more along the lines of using c++ injecting a dll that directly reads and writes to memory the only problem i have found is there is no bot sources that i can reverse engineer to learn more about how an application interacts with the gw2 executable.
Dwink is offline  
Old   #4
 
elite*gold: 50
Join Date: May 2008
Posts: 2,216
Received Thanks: 1,821
Quote:
Originally Posted by Dwink View Post
Auto it is a bit basic i was thinking more along the lines of using c++ injecting a dll that directly reads and writes to memory the only problem i have found is there is no bot sources that i can reverse engineer to learn more about how an application interacts with the gw2 executable.
AutoIT can do all that aswell.

Memory Editing is nothing that is C++ specific, its all about the Windows API you use, they provide anything about this.

MSDN Functions by Category


To use that in AutoIT you are totally fine using the dll for reading and writing that is a piece of windows OS.

NomadMemory.au3 is a common file to use this Memory related functions in AutoIT, not needed, but its basic stuff and does all the trick you commonly need.


Same deal doing it in Java, you can use JNI or JNA (i prefer JNA) to use the windows dll like kernel32 and user32 , they provide anything in that regard. If you want to make your code working on Mac, Linux and Windows, you have to provide different libraries for Memory, as thats a totally OS specific thing.


You do not require a GW2 bot for that, just look at a bot of your choice thats free, they pretty much all work after 3 methods.

Either totally Macro based, without memory readings ; maybe with Pixelsearches to read the screen. Has the advantage that you are not dependend on the Memory at all, if a patch changes that, it will still work unless the GUI of the game is changed.

A Package based bot will read from packages instead of memory, as you are only intrested in the stuff the server sends you anyway, and you might manipulate that informations to move your character. Advantage is that you totally free of a client, you do not even have to run the game in a theoretical bot like that, if you can build a bot thats totally package based, its something that can scale insanely (but often quite difficult, as packages are encrypted and often server sided checks make it more difficult, also, providing any client side interface is difficult, especially with huge games).

Memory based bots are the most common, as its actual the "easiest" given that you allready have a working Memory interface to work with and one that is updated. The most important start is to not use a Memory Address that will change with every start. People use Pointers as a first step. Patches will change this pointers quite likely, so to save time searching them again and again each time, you better use a Pattern Search. However, memory based bots can be quite problematic. Injecting a DLL is quite easy to detect by the game, if the game checks that at all. It can see if you edit stuff and server sided checks can also mess with you. However, most games do not use such protection, its expensive and as said, Memory based bots are not the only problem.


To start i would still beginn with AutoIT and NomadMemory , a lot of really good examples exist for basic games, like "hacking" Solitair or Minesweeper, thats totally fine to get an idea what you are doing. Invest like a week in this and you know everything you need to make a bot Memory Based.

Reverse Engineering is something thats A LOT more difficult and requires a lot more knowledge.


TheOnlyOne652089 is offline  
Old   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 49
Received Thanks: 19
However with autoit is it possible to make the bot follow a specific path not based on keystrokes so say if I get into combat and move off path will it move back to the co ordinates I have set?
Dwink is offline  
Old   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,196
Received Thanks: 5,302
Quote:
Originally Posted by Dwink View Post
However with autoit is it possible to make the bot follow a specific path not based on keystrokes so say if I get into combat and move off path will it move back to the co ordinates I have set?
You could code it I'm sure but honestly there's fairly little reason to go with autoit imo if you plan to go a memory or packet based route.

Personally I've always preferred a hook based packet approach to botting but there's fairly few resources on the topic available for gw2 so you may have a difficult time if you're not at all experienced with reverse engineering and packet structuring.

As mentioned, memory based bots can be quite effective but I really do prefer being able to just hook the send and receive functions of a client vs looking for a million different functions inside the client to continually manipulate.

Macro and pixel based bots are... well... bad for virtually all uses. They are clunky, cannot be run in the background and tend to have much higher resource requirements (again... with far worse actual gameplay performance).

If you're serious about trying to make a bot, I'd look into hooking the client (in the language of your choice. The source for gzoom might be nice just so you have an idea of how to start) and then work your way up to actual bot features.

PS: If you are not super comfortable with some of the skills needed, there's nothing wrong with starting on a different (free) game so that any mistakes you make along the way do not risk the accounts you test with that actually cost money.
pro4never is offline  
Old   #7
 
elite*gold: 50
Join Date: May 2008
Posts: 2,216
Received Thanks: 1,821
Quote:
Originally Posted by Dwink View Post
However with autoit is it possible to make the bot follow a specific path not based on keystrokes so say if I get into combat and move off path will it move back to the co ordinates I have set?
In that example here it makes absolute no difference what kind of language you use.

Actual it makes nearly never a difference, as all of them will use the Windows API, they are all the same in that regard.


So you get the same information, you read the memory and either your Coords are different than what they should be or not. Dependend on that you move around.

Your choice "how" you move.

A lot of options exist.

Either you send the Keystrokes, by simpel Send, or you send them with ControlSend only to the Window / Handle of the game, which means all that works in background mode aswell, Pixelsearch does not necessary require that your window is actual visible.

Or package based you send the package that you "moved" , the server will think you moved and your actual position will change aswell, as the server will try to "synch" with your computer, which the package actual "fakes".

Memory is easy if you allready have the specific Memory for your coords and some areas in the Memory that are responsible for moving around, then you can force the the character to move at that position if the game has no crazy protection to avoid that.



In your easy example that would simply be in pseudo code:

Code:
While true DO

coordsXYZ = _readCoords(fromMemory);

if coordsXYZ NOT WITHIN definedBounds then
 
either:
 _writeMemoryToMove
 OR _sendKeyToMove
 OR _sendPackageToMove

EndIf
EndWhile
As easy as that.

Which language you use doesnt matter, it works with all of them as long as they have access to the Windows API, which actual "all" reasonable language have.

Mostly used are Script languages like AutoIT for simpel stuff you quickly write out of the box. Macros and such is perfect for AutoIT and you avoid a ton of potential bugs.

For stuff with heavy memory editing C++ is more optimized, but nearly no bot is on that level, so its mostly overkill and has a ridiculous amount of potential bugs, especially for a "newbie" programmer, most bots in C++ quickly get overly complex for what could actual be much easier and much easier to update and extend. (If you really know what you are doing, C++ is fine, but not much do).

C# is more Java like, prefer it actual to C++ to make some Bots, as said, they are normally quite simpel in comparision to really time critical stuff were C++ might shine.

I enjoy Java a lot more, works aswell and the added bonus is it works on a Linux server the same, while you still have to edit OS specific stuff, like memory (which is a big pain and a topic for itself, if you have a working memory API to start with, either with a cheat table or whatever source, it saves you a ton of time). Bots that interact in groups or servers are fairly easy to manage with java, but it requires a fair amount of time to get the Memory Section working (as its quite uncommon to find finished Java bots, they nearly never get released as they are overkill for a normal private person anyway).


Writing bots is actual super easy, the most annoying part is getting all the stuff going around it, like Memory Sections and bypass any protection a game throws at you (if it has one to start with, like server sided checks).
TheOnlyOne652089 is offline  
Old   #8
 
elite*gold: 0
Join Date: May 2011
Posts: 49
Received Thanks: 19
Quote:
Originally Posted by pro4never View Post
You could code it I'm sure but honestly there's fairly little reason to go with autoit imo if you plan to go a memory or packet based route.

Personally I've always preferred a hook based packet approach to botting but there's fairly few resources on the topic available for gw2 so you may have a difficult time if you're not at all experienced with reverse engineering and packet structuring.

As mentioned, memory based bots can be quite effective but I really do prefer being able to just hook the send and receive functions of a client vs looking for a million different functions inside the client to continually manipulate.

Macro and pixel based bots are... well... bad for virtually all uses. They are clunky, cannot be run in the background and tend to have much higher resource requirements (again... with far worse actual gameplay performance).

If you're serious about trying to make a bot, I'd look into hooking the client (in the language of your choice. The source for gzoom might be nice just so you have an idea of how to start) and then work your way up to actual bot features.

PS: If you are not super comfortable with some of the skills needed, there's nothing wrong with starting on a different (free) game so that any mistakes you make along the way do not risk the accounts you test with that actually cost money.
What free game would you suggest that would be closest to gw2 since i cant think of anything off the top of my head?
Dwink is offline  
Old   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,196
Received Thanks: 5,302
Any free game would let you gain some basic experience with reverse engineering, packet structuring and writing bot logic. Choose one you're somewhat familiar with or has a decent amount of public hacking resources for it (take a look at some of the epvp sections for them)

Personally almost all my programming experience is for a trashy mmo called conquer online but it and gw2 are... quite different.

Keep in mind that private servers also make a great starting point for hacking as you're not risking any of your real accounts.


pro4never is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Making a bot
Any one know how to make a bot. Am starting to learning java, so i hope the end of this year i can make some :mofo::mofo: ...
15 Replies - DarkOrbit
bot making
I want 2 start making bots for mmorpg games( im curently playing DK) but im a newb programer can anyone point me 2 some guides.
0 Replies - General Gaming Discussion
Making a new map?
As the title has said. Is it possbile to create an entire new map?
7 Replies - CO2 PServer - Discussions / Questions
Bot making help in VB.
Hello, all. I'm rather new to the world of Visual Basic. I would like to use it to make some little bots, I'm more interested in learning little...
8 Replies - CO2 Main - Discussions / Questions



All times are GMT +2. The time now is 05:25.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.