How to Write a Bot for World of Warcraft menu

These ads disappear when you log in.

Results 1 to 10 of 10
  1. #1
    mbearson's Avatar Member
    Reputation
    2
    Join Date
    Nov 2017
    Posts
    2
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)

    How to Write a Bot for World of Warcraft

    Hi guys,

    I'm going to write a simple bot for WOW on C++(maybe another language - now I'm looking best language for that). So, could you give an advice, how to do that better? Should I analize screen or I can catch packages to server, parce this packages and in my programm work with data from packages?
    Also on this forum, I saw a lot of messages about memory. Is it also a way, what I can use?

    I thought about neural network for bot. I think, in this case - bot can be pretty intelligent. What do you think?

    Please, share your thoughts about this process. And I will very grateful, if you can give me advice, how to start this process, steps or technologies.

    Thanks a lot.

  2. Thanks Parog (1 members gave Thanks to mbearson for this useful post)
  3. #2
    Jadd's Avatar 🐸 CoreCoins User
    Reputation
    1391
    Join Date
    May 2008
    Posts
    2,337
    Thanks G/R
    76/240
    Trade Feedback
    0 (0%)
    This question has been asked a million times before so it's normally an automatic deletion, but by the way you've posed your question I feel you're more interested in inciting a discussion rather than simply getting one answer. So get ready for a discussion, because I could talk about bot development for hours.

    At the time of writing this post is currently in the Bots Questions & Requests forum - I'm going to move this to the Memory Editing section and sticky it. I think this serves as a good example of how a constructive question is asked (however basic or brief it may be) and it shows you have a genuine interest to learn. I also think this is a good opportunity to assemble our thoughts as a community in one place and hopefully it can provide newcomers with enough information to get the ball rolling with no additional questions asked.

    If you are committed to learning bot creation, you'll pretty quickly find that the knowledge and experience can create so many new opportunities for you. Not just game hacking software. On the contrary, you can venture into development of your own games; anti-cheat software; data protection/encryption schemes, and the list goes on. Personally, I make a living from it. But I also know people who began their journey on this very forum that - with enough commitment and effort - have ended up joining a development team for AAA games, or have gone to lead the way in malware protection, just to name a few. The possibilities are endless - if you're serious about it, I promise that you will be rewarded in one way or another.

    To the regulars of this forum: please share your thoughts about the development of bots and hacks (not strictly in regards to World of Warcraft) as well as any advice you have for someone who is new to programming, memory editing or bot development. I think it would also be very useful to suggest what you think is a reasonable, attainable goal for someone who is just starting!

    As a caveat, the remainder of this post is me expressing myself as a member of the community, not as a moderator. You should value the opinion of any member in this section by their merits and experience, and not by their rank. This is important to acknowledge because while the authority of my posts as a moderator are definitive, it should not dictate the value of my opinions. Conversely, there are some members of the community with lower forum reputation/rank whose opinions and advice I've always personally found to be invaluable.

    -----------------------------------

    First and foremost, welcome! Don't be afraid to ask questions - just search before you ask and don't ask to be spoonfed. The idea of the forum is to learn, teach one another, and collectively share ideas and solve problems - *not* have someone else do your work for you. If you don't understand the working process to get the result you wish to achieve, then the more appropriate question to ask would be about the process, not the result.

    For example, don't ask: "how do I get a list of objects around me?"
    When you could instead ask: "how does the game store and access objects?"

    You might get an answer to the first question, but you probably won't learn anything from it. The second question elicits much more information, you will learn something new, and you should be able to draw your own conclusions from it and get the result you were looking for. It may take a few extra steps and a few more questions, but it will always be worth it in the long run.

    As for your question specifically: I personally would not take the pixel colour or packet analysis route. You will make some progress with enough work, but will eventually be quite limited in terms of automation and maintaining a consistently effective and extensible bot. Some people will disagree, but I've yet to see any worthy contenders to a traditional bot (although namreeb's clientless bot is pretty fucking cool but looks like it took a LOT of work and skill...) Definitely take the memory manipulating path. It will give you a good understanding of how process execution works, how memory is stored and accessed and an abundance of insight between.

    With that said: Blizzard recently introduced obfuscation techniques which are included on all clients since patch 7.3.0. It's still possible to create bots, however it requires a good understanding of reverse engineering and is probably not a great starting point for newcomers. Overlooking the fact that the client is packed, there is good chance that by tinkering with the game client you'll trigger some detection vector hidden amongst the obfuscated portions of code. Personally, I'm not even running a conventional bot (not simulating movements or anything like that) and even I'm paranoid about them adding new detection code that goes unnoticed in each coming patch. It's not a great time for botting on live servers right now, regardless of how you're doing it.

    Instead I would recommend checking out private servers, specifically vanilla version 1.12.1. There's plenty of resources available for it, you can easily set up your own server with no anti-cheat enabled, and tampering with the client is about as straightforward as you could ask for.

    Where to go from here? I've always considered a simple fishing bot as a great introduction to creating a bot. The process is clear-cut and is has the perfect parameters for a beginner: it has a small number of variables; gives us some insight into how in-game entities are managed internally; and is a good introduction to memory reading, understanding assembly, running code remotely and re-using Blizzard's own functions at our discretion.

    There should be enough resources you can find while searching OwnedCore. For a while now I have wanted to do a series of guides for introductory bot development, but have just been to busy. If the interest is there, I might actually get off my ass (figuratively) but for now the following steps should at least guide you through the research you'll need to do:

    1. Object management - memory reading.
    1.1. Finding our local player instance.
    1.2. Check if the local player instance is channelling a spell (fishing).
    1.3. Iterating the object manager (list of object pointers.)
    1.4. Checking each object if the 'ID' is that of a fishing bobber.
    1.5. Checking each fishing bobber if the 'creator' is our local player.
    1.6. Check if our fishing bobber has the 'splashed' animation ID.

    2. Automation/interaction - memory writing; executing functions in a remote process.
    2.X. Note: this includes 2 functions: spell cast (to start fishing); and interacting with an object ("using" the fishing bobber when it splashes.)
    2.1. Devising some simple assembly to invoke these two functions.
    2.2. Writing the assembly into the game client.
    2.3. Execute our assembly code.

    3. Logic - putting our framework to good use.
    3.1. If we aren't channelling a spell, cast fishing.
    3.2. Find the fishing bobber associated with our player.
    3.3. Wait until it splashes. If it doesn't splash, restart the logic loop.
    3.4. "Use" the fishing bobber. For now we won't worry about loot, just use the auto-loot in-game option. Repeat.

    -----------------------------------

    Again, feel free to ask questions. Feel free to message me. Feel free to pester me. It sounds counter-intuitive when I tell people to come annoy me, but truthfully I love it when anyone shows an interest and asks questions about something I'm passionate about. Although now that I'm making an example out of your initial post, you might want to make a new thread!

    I realise I've probably put more effort into the preface of this post, rather than answering your question. I've decided this thread is going to make a good introductory post that OwnedCore should have always had, but didn't. So for that, I'm sorry.

  4. #3
    Willy's Avatar Moderator
    CoreCoins User Authenticator enabled
    Reputation
    477
    Join Date
    Mar 2007
    Posts
    685
    Thanks G/R
    145/123
    Trade Feedback
    0 (0%)
    To add on to what Jadd already said, there's a great thread containing suggested reading stickied in the memory editing section: Bookthread

    A book that I'd personally recommend is "Game Hacking: Developing Autonomous Bots for Online Games", you should be able to find it as a pdf somewhere.

  5. Thanks Corthezz, Gentoo, IChangedMyUsername (3 members gave Thanks to Willy for this useful post)
  6. #4
    Corthezz's Avatar Elite User CoreCoins User Authenticator enabled
    Reputation
    376
    Join Date
    Nov 2011
    Posts
    313
    Thanks G/R
    117/93
    Trade Feedback
    0 (0%)
    Back then I wrote a blog about WoW memory manipulation: Zzuk's stuff
    Also created two bots for 1.12.1 WoW: GitHub - Zz9uk3/ZzukBot_v1: ZzukBot_v1 GitHub - Zz9uk3/ZzukBot_V3: A bot for World of Warcraft. Visit https://forum.zzukbot.com/index.php?/forum/68-core-development/

    Personally I can agree with Jadd and advice you to start with an older version of WoW. No obfuscation, no updates, unlimited free accounts, anticheat which doesnt matter anymore once you removed most features of it etc.
    With retail you constantly have to look out for new detections aswell keep your code updated.With older versions you can start reversing, take a break until you feel like continuing, come back and continue working like nothing happened. Very cool for people who dont have that much spare time. Once you feel confident stepping up to retail could be the next step.

    Also I cant stress enough to respect other people and their work. I learned so much from different members over here and every contact I stil write with today is worth a lot to me. Leaking code destroys those bridges you build and fucks up your reputation. In general I advice to stick to the section rules and dont ask for spoonfeed to much - I have to admit I messed up with a few people back then by asking for way to much.

    Also start with tiny goals and build up on them (trying to reverse a function with another 100 function calls inside was very intimidating for me when I started so I never even tried. But once I started to split work up into tiny tasks it became very easy. Start with one part of the function. Rename parameters and local variables and work yourself through it and soon you notice that the function doesnt look that complicated anymore):
    • Find a pointer for something like HP => check
    • Take a look where the HP address value is modified from => check
    • The function you found probably explains you how the object the HP property belongs to is accessed etc.


    Personally it was always easier for me to start finding things which are related to something I can see (for example I can see that my character has 56 hp but I cant see that a packet just arrived at the client etc.).
    Also take a look at IDA, ollyDBG, x32DBG and cheat engine.
    Check my blog: https://zzuks.blogspot.com

  7. Thanks Willy, Eryxon, Jadd, jaffycake, pogob (5 members gave Thanks to Corthezz for this useful post)
  8. #5
    jaffycake's Avatar Member CoreCoins User
    Reputation
    7
    Join Date
    Oct 2015
    Posts
    7
    Thanks G/R
    4/1
    Trade Feedback
    0 (0%)
    Hi guys, I'm not a member of the community but I figure I need to start meeting other developers if I want to progress. I'd like to share my story and see what you think of my work. I've never had any proper outside help, I did this all through years of figuring out things for myself and it has been very difficult but I've learnt so much.

    I have been developing my own bot for about 7 years now for an mmorpg that you probably don't know, it is called Myth of Soma.

    I started out with Blue Eye Macro, I knew I didn't want to hack clients as it is a recipe for getting banned because I don't know how to do it, so I simply emulated humans. I placed a coloured dot on the sprites of each player and mob and used pixel detection to hit the mobs. It was crude, buggy, but it worked really well for a long time and the devs couldn't do a thing to stop it since it emulated clicks and movement so well.

    I eventually decided I wanted more from the bot so I jump in at the deep end with Autoit. I created about 5 different bots with autoit, I learnt how to create GUIs and I even made my own script creator that other players could use to create their own scripts for the game.

    All in all my bot became about 5,000 lines long and I never wrote to the memory, used packet editing or edited the client assembly. The whole thing ran off of reading the memory values.

    Eventually it was banned by detecting Autoit libraries and my hard work went to waste. However, this only started a fire underneath me, Autoit seemed quite slow, the bot has some major bugs and I still couldn't do everything I wanted.

    So then I picked up Python and wow the change has been incredible, not only is the code easier to read, the libraries can't be detected as easily as with Autoit and the bot is much much faster.

    I developed the bot from the ground up again, fixed the major bugs and I can do almost anything in replicating humans now.

    I have a few questions about bot development in general, I've never seen other people's bots or code before so I have no foundation or benchmark to go off of.

    1) Everyone talks about editing the client, I created my bot to stay away from being detected, so I run it all from reading memory values. Is this normal? Have I been doing it the hard way all this time? Should I try and crack the encryption on the client to make it easier?

    2) I don't know any object orientated programming, all of my code is simple function calls in a large script which runs continuously.

    3) I developed my own code structure and theory about how my bots will work, such as having a main loop which dumps all entities into arrays and I modify them/add flags such as for "Monster has owner" to stop mob stealing etc, then I go through various functions calls which check the state of the bot and reacts. I have never seen any posts about the theory behind how to create a bot and the kind of strategy for how to layout the code. I don't know if the way I code my bot is totally backwards or not. Are there any good posts about the theory or strategy behind how a bot will function?

    4) I have made a small amount of money by selling the bots privately(considering the amount of time I put in, it is almost nothing). The game I create bots for has about 100-150 daily players. I was wondering if it is realistic for me to go to other games and make a living creating bots. I enjoy programming quite a lot, possibly because I have highly suspected Asperger's and I want to make a living from my passion. I prefer MMORPG bots but I would consider private paid hacks for FPS games too. I mainly love automation(Factorio is like crack to me!). So yeah, is it realistic to think I could make maybe 1,000 per month if I find other games with demand?

  9. Thanks Eryxon (1 members gave Thanks to jaffycake for this useful post)
  10. #6
    lolp1's Avatar Contributor CoreCoins User Authenticator enabled
    Reputation
    185
    Join Date
    Feb 2013
    Posts
    198
    Thanks G/R
    42/72
    Trade Feedback
    0 (0%)
    EDIT: For what it is worth, this is pretty much the day I began to pursue writing this stuff.

    Coding practices?

    As some one who wanted to write 3rd party software for games as a consumer of the same kinds of software for almost ten years, having finally reached the point I have a large framework that is maintainable and where I feel comfortable I'll share things I wish I did along the way.

    General guidance..
    - Follow a C tutorial. If it is a two day or ten day one,the pointer arithmetic and knowledge you learn about basic memory will last forever. Do not be like me and write half a bot and not understand pointers, structs, etc at all.
    - No short cuts exist. Writing the most basic software from scratch and building upon it will be your friend. I learned the basics from re-writing ZenLulz MemorySharp project from the ground up to be more modular GitHub - lolp1/Process.NET: A C# class ibrary for interacting with processes. vs GitHub - ZenLulz/MemorySharp: A C# based memory editing library targeting Windows applications, offering various functions to extract and inject data and codes into remote processes to allow interoperability.
    - Design matters. Learn about actual concepts to computer science and software design despite how much you want to avoid it. I re-wrote my core project three times. Maybe more..
    - Look at code, don't copy and paste it in.

    Hacking/reversing guidance..
    - Open IDA and find a function. Reverse it to the point you implemented it in your own code 1:1. Do this again, then again, then again. At some point you will get a good feel of things and begin to be able to make some assumptions and speed things up greatly.
    - Learn to use a debugger and to review assembly code. If you want to do your own work, it is simply not an option.
    - Most of the time google and searching returns better results then what people can answer you directly with from your questions.

    Most important... this is hard work. So is anything worth doing. If it was not, I'd have done it 10 years ago. Enjoy the ups, endure the downs. It is life long skills valuable far beyond writing bots or hacks.
    Last edited by lolp1; 11-25-2017 at 11:53 PM.

  11. Thanks jaffycake, pogob (2 members gave Thanks to lolp1 for this useful post)
  12. #7
    mbearson's Avatar Member
    Reputation
    2
    Join Date
    Nov 2017
    Posts
    2
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Hi guys,

    thanks a lot for your advances.

    Jadd, thanks, you gave me great steps, what I have to do.... Actually I saw a lot of topics about 'Memory Editing', but I thought, that some of them outdated. Maybe I made wrong decision. I've never worked with memory, but I believe, that situation like that is possible: If client was updated, we have to update our bot too, because previous functionality will not work. Am I correct?

    And the main goal of my question was exactly - how to create a bot manually. I want to understand algorithms and think about future steps, like, how to add intellect for the program. So, I like to think and create that by myself, and I definitely don't want get ready solution here.

    Willy, great point, thanks. I downloaded the book, and I started reading. I believe this book gives me understanding of the process and how to work with memory better.

    Corthezz, I saw your bots before, but looks like, that now you are writing bots on C#. And before I saw bot on C++. Why did you change language?

    One more time, thanks everybody for responses. Now I know, what first steps I have to do.
    But I have a questions about langugage. On my job, usually I work with Java and Python. And I've got some experience with C++, but I've never worked with memory. So, what is your opinion about best language for bot? I don't want to 'reinvent the wheel', I believe, that some language can give me best possibilities for that
    Also I must analyze a lot of topics on this forum and only after that I will ask a new questions.

    Thanks!!

  13. #8
    jaffycake's Avatar Member CoreCoins User
    Reputation
    7
    Join Date
    Oct 2015
    Posts
    7
    Thanks G/R
    4/1
    Trade Feedback
    0 (0%)
    Originally Posted by mbearson View Post
    Hi guys,

    snip

    Thanks!!
    I really think Python is the best language for creating a bot, C is quite complex and harder to read/write when you want to do something simple such as control the mouse. There are Python Libs that are very good. I find the Python syntax too good to pass up.

    When I created my bot I did everything in stages. So first I just needed to control the mouse, once I got that working I looked into how to read the memory value for coordinates for my character, then I did the same for the coordinates of enemies, eventually I found that all enemies are in a list of memory addresses which are 4 bytes apart and if I cycle through them in a loop, I could save the data to an array which is continually updated.

    I just kept adding and adding. Eventually I start all over again, each time the code is cleaner, the performance gets better and I learn new things.

    The great thing about memory bots is that they seem a tiny bit harder to detect and as you said, if the game updates, you usually don't have to alter anything in your bot(maybe a memory address changes sometimes).

    For making bots, libraries are the way to go, don't try and write your own memory editing functions, download a library to handle it for you instead.

    That is, unless you are botting a highly protected game, in which case you might have to write your own stuff.

  14. #9
    Zazazu's Avatar Contributor CoreCoins User
    Reputation
    191
    Join Date
    Jun 2016
    Posts
    390
    Thanks G/R
    5/143
    Trade Feedback
    0 (0%)
    Originally Posted by jaffycake View Post
    C is quite complex and harder to read/write when you want to do something simple such as control the mouse.
    Realy? In C/C++ easy way to read/write into memory or use keyboard/mouse events. And C more performance than other none-compiled language (C#, Piton). C/C++ hardest to create visual styles (like Forms. C# in this case better and easy). By my opinion better use C/C++ lib with C# wrapper. Y got performance from one and easy visual constructor from other.
    Originally Posted by jaffycake View Post
    don't try and write your own memory editing functions, download a library to handle it for you instead.
    "Memory editing" library its few function, what y need write Ofc better get 3th party library for easy access and easy detect by WoW [sarcasm-mode on]Ofc its better! [sarcasm-mode off]
    Last edited by Zazazu; 11-29-2017 at 01:07 PM.

  15. #10
    jaffycake's Avatar Member CoreCoins User
    Reputation
    7
    Join Date
    Oct 2015
    Posts
    7
    Thanks G/R
    4/1
    Trade Feedback
    0 (0%)
    Originally Posted by Zazazu View Post
    Realy? In C/C++ easy way to read/write into memory or use keyboard/mouse events. And C more performance than other none-compiled language (C#, Piton). C/C++ hardest to create visual styles (like Forms. C# in this case better and easy). By my opinion better use C/C++ lib with C# wrapper. Y got performance from one and easy visual constructor from other.

    "Memory editing" library its few function, what y need write Ofc better get 3th party library for easy access and easy detect by WoW [sarcasm-mode on]Ofc its better! [sarcasm-mode off]
    I am no expert, but with the Python libraries I can make mouse movements with one line of code and the syntax is much easier on the eyes. With C you have added layers of complexity since it can do a lot of stuff. I compile my code into .exes with Python using pyinstaller and it is easily fast enough for botting. (I think it rocks for performance actually).

    I don't know how to write a memory editing library which is why I use a diff one, but I did say that if people use a downloadable library with a high security game they are taking risks.

Similar Threads

  1. How to inject text into a World of Warcraft chat?
    By ev0 in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 02-06-2015, 02:52 AM
  2. [Guide] How to draw a dick in World of Warcraft (Visual funstuff)
    By Plauge in forum World of Warcraft Guides
    Replies: 10
    Last Post: 12-23-2014, 02:10 PM
  3. How to change character name in World of Warcraft for free
    By oMSQo in forum WoW EMU Exploits & Bugs
    Replies: 36
    Last Post: 06-01-2011, 06:46 PM
  4. How to run a proxy with world of warcraft?
    By Brolly in forum WoW Scams Help
    Replies: 8
    Last Post: 08-28-2008, 12:43 PM
All times are GMT -5. The time now is 09:10 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search