Developing a bot for the community, need a little help. menu

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 15 of 46
  1. #1
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Developing a bot for the community, need a little help.

    The current status of this project can be found within the first 3 posts.

    First, a little history. You can skip this part if you really want to. I wrote a bot in AutoIt several months ago, before wrath, called Healbot AI. The concept was simple. The bot would check health values, and heal who needed it. While functional, It was decent at best. It didn't do everything I wanted it to do, though, and it was limited in what it could do by how I chose to get data from in the game... I wrote an addon in game that would use LUA to get information like UnitHealth, UnitMaxHealth, etc... The addon would convert the data to a percentage of total, and then change the color of a pixel on the screen. An AutoIt script I wrote would read the color of the pixel and then convert that data back to a health value... Then it would go through a long series of processes before finally deciding what to do. Sit on your thumbs, or cast a heal, basically.

    I soon discovered there were a lot of limitations to the language I was using, and a lot of problems with how the pixels were read. First off, the whole process was slow. For as many conversions and calculations that were needed, the health wasn't being checked quickly enough for all the units, and ultimately I put the project on hold.

    About 3 weeks ago I decided to approach the ideas I had from a different angle. I determined that to make the bot do everything I wanted it to do, it needed to be written in a more powerful language. I already knew that C++ was a very powerful language, so I set to work collecting information and pouring over it for hours and hours each day. In time, after several practice projects, I decided I was going to start work on coding the bot with the basics that I knew so far, and pick up the rest as I went.

    I developed a list of things that the bot needed to do, in the order they needed to be done in. Here's the list:

    Key: X = Complete, -> = Current Project, ? = Haven't started yet.

    X Main Window Created and all components added.
    X Child windows created and components added.
    X Write a function that will randomize the title bar to lower detectability.
    X Write a function that will index the system processes for later use.
    X Write a function that will index all running instances of WoW.
    -> Write a function that will fetch the name, health, level, alive/dead, threat, in range, buff/debuff data for all party/raid members.
    -> Write a function that will fetch the mana, class, race, hasfullcontrol data for the player.

    ? Implement the logging of bot activities into the important functions.
    ? Make a child window that will allow me to select which instance of WoW I want to use by player name.
    ? Add the ability to select between Aggressive and Normal healing modes (Aggressive would be for heroics / raids)
    ? Add a function that will cycle through all units, checking health, prioritizing heals to low HP units, and units with agro.
    ? Add the Druid's healing code that will select which spell to use based on hot timers, cooldowns, and unit HP.
    ? Add the Priest's healing code that will select which spell to use based on hot timers, cooldowns, and unit HP.
    ? Add the Paladin's healing code that will select which spell to use based on cooldowns and unit HP.
    ? Add the Shaman's healing code that will select which spell to use based on cooldowns and unit HP.
    ? Add a function that will allow the bot to cast a spell in a minimized WoW instance. (allows for multiboxing with a healer on follow)
    ? Add the ability for the bot to drink / rez when out of combat, and mana potion if in combat and low mana.
    ? Add the ability for the bot to buff and cure debuffs on group members.
    ? Add intelligent follow code, using coordinates of X unit, distance to X unit, and map these coordinates in memory.
    ? Add code that will optionally center the bot in the middle of the group / raid (to be in range of as many units as possible).
    ? Add the ability for the bot to loot corpses whose loot belongs to it.
    ? INTRODUCE A CLOSED BETA FOR TESTING PURPOSES.
    ? Collect feedback, take suggestions, fix bugs, add features.
    ? INTRODUCE AN OPEN BETA.
    ? Collect feedback, take suggestions, fix bugs, add features.
    ? Initial release.


    Credit for the help I've received so far goes to the following contributors: arighty, Apoc, lanman92, Nesox, Cypher, Shynd, bobbysing

    Right now, I'm at the point where I read WoW's memory and I get some information. Okay, fine. A lot of information.

    First thing I should mention is that I planned for the bot to distinguish between multiple instances of WoW. Up to 5 on one computer, actually. I've already got that taken care of though. This is done by checking all the processes on the computer, then figures out how many of those are WoW, saving the PIDs of all WoW instances to an array of structures. Inside each structure, I need to put the player name for ALL instances of WoW. This will let me select which instance of WoW contains the healer.

    Then I need to go into that instance's memory and get the following information:

    UnitHealth, UnitHealthMax, UnitLevel, UnitDetailedThreatSituation, UnitName, UnitExists, UnitInParty/Raid, UnitIsDeadOrGhost
    for player, pet, focus, party1-4, partypet1-4 raid1-40, raidpet1-40

    UnitClass, UnitRace, UnitMana, UnitManaMax, HasFullControl, GetSpellBonusHealing, UnitCastingInfo
    for player
    Last edited by Geminix86; 12-25-2008 at 09:27 AM. Reason: Updated 12/25/08

    Developing a bot for the community, need a little help.
  2. #2
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    reserved for updates
    Last edited by Geminix86; 12-24-2008 at 07:50 AM. Reason: forgot to make mah text blue! =P

  3. #3
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    reserved for updates

  4. #4
    arigity's Avatar Banned
    Reputation
    49
    Join Date
    Dec 2007
    Posts
    548
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #1: How did you find the g_clientConnection address? I've seen what it is, and I think I understand correctly when I say that's where memory reading starts (after PID, obviously, but that's cake), but I want to know how to find that myself.

    once you know a static address it's quite easy to re-find it. look up FindPattern() theres a ton of examples in any language you care to use.

    #2: What do clientConnection and curMgr represent? I mean what are they? If you were to explain to me what purpose those serve.

    clientConnection provides an easy-to-use pointer to the curMgr (the alternative being the tls method.) and curMgr manages the objects in wow.

    #3: After I determine clientConnection and curMgr, I add the GUID offset (is there a list of those somewhere? I didn't see it in your sticky) to the curMgr for X unit, and then add the UNIT_FIELD_ offset for the appropriate piece of data? Could you revise this / make corrections if I'm wrong?


    someone wrote this to get health in another thread.
    DWORD *FirstObj = (DWORD *)(curMgr + 0xAC);

    DWORD *Descriptor = (DWORD *)(FirstObj + 0x0;

    int HP = *(int *)(Descriptor + UNIT_FIELD_HEALTH * 4);

  5. #5
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    About those object offsets...

    Originally Posted by arigity View Post
    someone wrote this to get health in another thread.
    DWORD *FirstObj = (DWORD *)(curMgr + 0xAC);

    DWORD *Descriptor = (DWORD *)(FirstObj + 0x0;

    int HP = *(int *)(Descriptor + UNIT_FIELD_HEALTH * 4);
    Woot, I wasn't far off! Thanks for posting this.

    Hmm... According to my understanding, FirstObj is the offset for Player? And Descriptor could be something like UNIT_FIELD_HEALTH ?
    Do we have the offset information lying around for any units besides player? 'cause I need offsets for my whole raid, as you can see, heh.
    Last edited by Geminix86; 12-24-2008 at 11:26 AM.

  6. #6
    ~Jagris's Avatar Contributor
    Reputation
    154
    Join Date
    Apr 2007
    Posts
    1,479
    Thanks G/R
    2/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IF your a priest/shaman/druid/pally/any healing class, you will want it to find Debuffs and active buffs on the target so it can buff and un debuff.


  7. #7
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at the sticky carefully. Read the whole 6-7 pages. You'll find almost everything you need. Search the forums for info you need. It's ALL in here.

    EDIT: I'm not so sure about threat though. You're gonna have to use some LUA to figure that one out. Shouldn't be too hard though.

  8. #8
    arigity's Avatar Banned
    Reputation
    49
    Join Date
    Dec 2007
    Posts
    548
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Geminix86 View Post
    About those object offsets...



    Woot, I wasn't far off! Thanks for posting this.

    Hmm... According to my understanding, FirstObj is the offset for Player? And Descriptor could be something like UNIT_FIELD_HEALTH ?
    Do we have the offset information lying around for any units besides player? 'cause I need offsets for my whole raid, as you can see, heh.
    FirstObj is not the offset for player, its the offset to the FirstObj in the list. it doesn't HAVE to be the player it could be any object. after you have the first object there is another offset that will take you to the next one and you can loop through til their are no more objects.

    what you want can easily be found via lua functions you might want to start there. or you can simply call them yourself without needing to worry about the specific details of how they work.

  9. #9
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Damn. You just single postedly shattered my understanding of how I though this worked. Oh well, at least I didn't get too carried away with my misinformation, so thanks for saving me the time lost =P

    I'm actually sorta familiar with LUA. I had to write a couple addons for my previous bot that would display this info in the game. But how do I "Call them myself" from the bot?
    Last edited by Apoc; 12-24-2008 at 01:47 PM.

  10. #10
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Geminix86 View Post
    Damn. You just single postedly shattered my understanding of how I though this worked. Oh well, at least I didn't get too carried away with my misinformation, so thanks for saving me the time lost =P

    I'm actually sorta familiar with LUA. I had to write a couple addons for my previous bot that would display this info in the game. But how do I "Call them myself" from the bot?
    Learn how to reverse, and understand WoW's internals before you attempt to create a bot. As Cypher says; "You need to walk before you can run."

    P.S: For some reason quote decided to edit your post. <_<

  11. #11
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everyone has to start somewhere. I'm taking all of this in, soaking it up like a sponge. I don't have the benefit of being able to take classes on this stuff. I learn what I can from who I can. I would be very grateful if you would help me figure this stuff out.

  12. #12
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just read around this forum some more. You'll figure it out. But trust me, don't try to write a bot until you understand all of it. A bot (a decent one at least...) is not easy to write.

  13. #13
    arigity's Avatar Banned
    Reputation
    49
    Join Date
    Dec 2007
    Posts
    548
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  14. #14
    Geminix86's Avatar Member
    Reputation
    1
    Join Date
    Sep 2006
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Just read around this forum some more. You'll figure it out. But trust me, don't try to write a bot until you understand all of it. A bot (a decent one at least...) is not easy to write.
    But... but... It has a random title bar generator... and ...and... I already have half the AI written =(

    You're right about it not being easy, though. But I'd like to tell you something about me that may change your mind about whether or not I should be doing this. If you don't mind, add me on yahoo? My ID is johnshaddox.
    Last edited by Geminix86; 12-26-2008 at 06:44 AM.

  15. #15
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't have yahoo, and I never plan to install it.

    Get MSN, its much better. :P

Page 1 of 4 1234 LastLast

Similar Threads

  1. I need a SAFE bot for the Ravenholt boxes
    By rocambole in forum WoW Bots Questions & Requests
    Replies: 4
    Last Post: 02-20-2013, 01:43 AM
  2. [Bot] WRobot - Need beta tester (private bot for the moment)
    By RivaLfr in forum World of Warcraft Bots and Programs
    Replies: 113
    Last Post: 01-18-2013, 10:41 AM
  3. [Release] -AIO Bot- for the US *lvl 1-80 FULL questing*
    By AIO Bot in forum World of Warcraft Bots and Programs
    Replies: 159
    Last Post: 12-21-2009, 04:58 AM
  4. Anger for the past. Need help.
    By Kakucis in forum WoW Scams Help
    Replies: 4
    Last Post: 12-26-2008, 03:02 PM
  5. Making glider profiles for the community :)
    By richardsonc in forum WoW Bot Maps And Profiles
    Replies: 17
    Last Post: 11-25-2008, 03:55 PM
All times are GMT -5. The time now is 04:35 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search