Bot dev: waypoints menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Viitapiru's Avatar Member
    Reputation
    2
    Join Date
    Jan 2007
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bot dev: waypoints

    Greetings everyone. I started to program world of warcraft bot, and I have been going fine this far. Bot can read x,y,z coordinates from memory. I just got one little snag on this;

    How I can get bot moving from coordinate ex. 45,56,33 ( x,y,z) to 55,65,43? I get the base idea; Make feature that auto adds coordinates to text file when moving. Then start bot and it reads those pre defined coordinates from file and compares them to current coordinates in World of Warcraft's memory.

    Correct me if I'm wrong.

    I think I'm just missing that moving part. I think I'm simulating key strokes with functions from winapi like keybd_event().

    So something I need is example of waypoint system or something to help me out. I'm not asking for direct answer, just way how it's done.

    Thank you already.

    Oh, here is some of my code:

    Code:
    #define X_VALUE 0x00DA4638
    #define Y_VALUE 0x00DA463C
    #define Z_VALUE 0x00DA4640
    ...
    
    fstream coords("coords.txt",ios::out | ios::app);
    
    ReadProcessMemory(kahva, (LPVOID) X_VALUE, &x, sizeof(x), NULL);
    ReadProcessMemory(kahva, (LPVOID) Y_VALUE, &y, sizeof(y), NULL);
    ReadProcessMemory(kahva, (LPVOID) Z_VALUE, &z, sizeof(z), NULL);
    
                  coords << x << endl;
                  coords << y << endl;
                  coords << z << endl;
    ...

    Bot dev: waypoints
  2. #2
    ferocity's Avatar Member
    Reputation
    13
    Join Date
    Sep 2008
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's relatively simple, what you would have to do is get the angle from your current location to the location you're moving to, when the angle is received, adjust current angle to the specified angle, after that it's pretty much set, just spoof key W being pressed.

  3. #3
    Viitapiru's Avatar Member
    Reputation
    2
    Join Date
    Jan 2007
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for fast answer.

    So, I have to locate memory area where camera / player angle values are. Gotta try it
    I'm gonna post my success here later.

  4. #4
    Neffarian's Avatar Member
    Reputation
    -5
    Join Date
    Sep 2006
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i forgot where but someone made a simple alg to calculate your current position via Pi

    if i find it ill post it.

  5. #5
    Viitapiru's Avatar Member
    Reputation
    2
    Join Date
    Jan 2007
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was able to find memory area that holds info how character is facing. Its saved as radians and I wrote function that converts it to degrees and truncates decimal part off.

    So now I can use it like:
    Code:
    While(Angle(value) != ValueWeWant) {
    PressKeyToTurnCharacterAround();
    ReadMemoryProcess(handle, charfacing, ValueWeWant ... ); // To read current value
    }
    You got the idea. So character turns around until it's facing to way we want it to. That works pretty well, I will still implement it.

    But now I ran into problems again; Coordinate values ( x,y,z ) that I read from memory are negative. They are like:

    X-Value: -10044.5
    Y-Value: -3065.41
    Z-Value: -707.753

    All of them are float datatypes.

    Code:
    float x, y, z;
    
    ReadProcessMemory(kahva, (LPVOID) X_VALUE, &x, sizeof(x), NULL);
    ReadProcessMemory(kahva, (LPVOID) Y_VALUE, &y, sizeof(y), NULL);
    ReadProcessMemory(kahva, (LPVOID) Z_VALUE, &z, sizeof(z), NULL);
    So, whats wrong then? Well, when I'm making an while loop like this:

    Code:
    while(x != -10124)
    {
                                                 
    ReadProcessMemory(kahva, (LPVOID) X_VALUE, &x, sizeof(x), NULL);        
    cout << x << endl;
    
    keybd_event( 0x57,0,KEYEVENTF_EXTENDEDKEY | 0,0 ); // W Down
    Sleep(1000);
    keybd_event( 0x57,0,KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0 ); // W Up
    }
    Then I manually walk with my character to X-value: -10124; nothing happens 0.o May this be caused becouse size of value X in memory is too big for Float datatype or what?

    Hopefully someone is interested enough to help
    Last edited by Viitapiru; 10-23-2008 at 02:48 PM.

  6. #6
    ferocity's Avatar Member
    Reputation
    13
    Join Date
    Sep 2008
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't see how negative values would affect the outcome...

    (Oh, and btw, for easier programming id make a point class, with methods for setting Z, getting Z...)

    Anyways... Try this function, it's a little different from your code, but it should work all the same if you just change the variables.

    Code:
    Atan2(CurrentLoc.GetY-Waypoint.GetY, CurrentLoc.GetX-Waypoint.GetX)
    That should return a radian, which means you will get to skip your radian to degree step.

    Edit: By the way, I don't think you'd want to do the while loop until it find an exact value, that could cause the bot to spin a few times around, just make it look for a value that's relatively close to it.
    Last edited by ferocity; 10-23-2008 at 06:03 PM.

    Don't forget to rep if someone helps you!

  7. #7
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is easy, Get your rotation and convert it; Then do simple trig to find the rotation to turn and write memory.

    Once this is done, you can simply run to your nearest waypoint (The one you turned to) by sending key events or writing memory to make WoW think your running.


  8. #8
    Kekke's Avatar Member
    Reputation
    10
    Join Date
    Jan 2009
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am also trying to do this and I have a question.

    How do I make it know that the camera angle is the correct angle to get to the next waypoint?

    e.g.
    I have 2 waypoints and I start at the first, how do I get the right angle to make my bot move to the next waypoint?

    Even if I save the angle when recording the positions I can't be sure that I strafed or did anything else so the angle could be completly wrong or am I missing something here?


    EDIT:
    Problem Solved.
    Last edited by Kekke; 01-12-2009 at 01:34 PM.

Similar Threads

  1. My Theory on how bot devs can fix the soft ban
    By faatnntaaf in forum Pokemon GO Hacks|Cheats
    Replies: 19
    Last Post: 08-12-2016, 12:59 PM
  2. Thanks to all the bot devs
    By droman123 in forum Pokemon GO Chat
    Replies: 0
    Last Post: 08-08-2016, 02:39 PM
  3. Alterac AFK Bot with Waypoints
    By Flos in forum World of Warcraft Bots and Programs
    Replies: 885
    Last Post: 01-21-2016, 11:43 AM
  4. [BOT][Question] Waypoints
    By dannymitza in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 10-15-2014, 08:27 AM
  5. New Offsets - for bot devs!
    By KefkaBot in forum Final Fantasy XIV
    Replies: 2
    Last Post: 10-15-2013, 11:57 AM
All times are GMT -5. The time now is 12:16 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