• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 12
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Jabberwock's Avatar
      Join Date
      Sep 2012
      Posts
      19
      Thanks (-->)
      8
      Thanks (<--)
      0

      Making an aimbot and calculating coordinates

      John Kittz
      Hi guys, it's me again.

      I need help in the calculations of an aimbot.(A memory aimbot)

      I have all the addresses I just have trouble calculating the hack itself. So here are the types:

      The player coordinates x, y and z are float type.
      The cursor coordinates x and y are WORD type.

      I have tried a tutorial here.

      But for some reason the cursor jumps all over and behaves weirdly.
      Some help appreciated. Thanks in advance.

    2. #2
      Nick
      Learning to hack games!
       
      Feeling Normal
       
      ndani14's Avatar
      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      Hey Jabberwock,

      Just need to clear a few things up before I can help.

      The things you need for the aimbot are:

      Player:
      position (x, y, z)
      direction you're looking (usually in Euler angles)

      And a position to look at. (Enemies head position.. )

      Do you have the direction the player is looking?

    3. Thanks Jabberwock thanked for this post
    4. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Jabberwock's Avatar
      Join Date
      Sep 2012
      Posts
      19
      Thanks (-->)
      8
      Thanks (<--)
      0
      If I freeze the values of the cursor coordinates the direction I look also freezes so I think I do have them.

    5. #4
      Nick
      Learning to hack games!
       
      Feeling Normal
       
      ndani14's Avatar
      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      ok cool,

      You're going to need to check if the cursor coordinates are in degrees or radians. (if it's not either then please post what game it is or what they are set to when you look up, look down, look straight and a few others)

      Also you may need to check what coordinate system is being used.
      Most games I've seen have X - right, Z - forward, Y - up

      Y Z
      | /
      |/_ _ X

      O - The players position
      P - Position to look at

      // get the relative coordinates
      float dx = P.x - O.x;
      float dy = P.y - O.y;
      float dz = P.z - O.z;

      // the length of the vector
      float m = sqrt(dx*dx + dy*dy + dz*dz);

      if(m < 0.000001) // if this is true then the position you want to look at is too close to you
      return; // be careful not to divide by zero...

      // normalise the vector
      dx = dx / m;
      dy = dy / m;
      dz = dz / m;

      if(fabs(dz) > 0.9999999) { // special case
      if(dz < 0) {
      // look down
      // just set the mouseY to be down degress (-90) radians (-PI/2)
      } else {
      // look up
      // just set the mouseY to be down degress (90) radians (PI/2)
      }

      return;
      }


      . /|
      a/ |dz
      /__|
      dx

      float a = sqrt(1 - dy*dy);

      float mouseX = acos(dx/a);

      . /|
      1/ |dy
      /__|
      a

      float mouseY = asin(dy);

      // some games also have strange things where they add/minus an extra 90 degrees to the mouseX

      // if the game is in radians you should be able to just set mouseX and mouseY now

      // if the game is in degrees just convert it to degrees by

      mouseX *= 180.0f / PI;
      mouseY *= 180.0f / PI;

      // now set them

      Not sure if this explains it very well but it may help you figure out what you need
      Last edited by ndani14; 10-08-2012 at 09:28 PM.

    6. Thanks Jabberwock, Mork, [D]opeDog thanked for this post
    7. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Jabberwock's Avatar
      Join Date
      Sep 2012
      Posts
      19
      Thanks (-->)
      8
      Thanks (<--)
      0
      Wow, thank you very much. Finally someone who explains it well!

      The mouse coordinates are WORD type and they are not in degrees or radians.

      The mouse Y:
      straight = 0.
      down = 50535.
      up = 15000

      The mouse X:

      When setting to 0 and going to that direction the x coordinate get higher.
      When setting to 32768 and going to that direction the x coordinate get lower.
      When setting to 16384 and going to that direction the y coordinate get higher.
      When setting to 49152 and going to that direction the y coordinate get lower.

      Also I might made a mistake and swapped between the z and y. From my understanding when going up a ladder in the game the z coordinate is the one that grow right?

      Thank you very much for helping me!

    8. #6
      Nick
      Learning to hack games!
       
      Feeling Normal
       
      ndani14's Avatar
      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      wow those are some strange values lol. what game is it?

    9. Thanks Jabberwock thanked for this post
    10. #7
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Jabberwock's Avatar
      Join Date
      Sep 2012
      Posts
      19
      Thanks (-->)
      8
      Thanks (<--)
      0
      Alliance of Valiant Arms (AVA).

    11. #8
      Nick
      Learning to hack games!
       
      Feeling Normal
       
      ndani14's Avatar
      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      Try these out, they should be close

      [mouseX and mouseY are from before] (the radian versions)

      short newMouseY = (short)(15000 * mouseY / (PI / 2));
      short newMouseX = (short)(32767 * mouseX / PI);

    12. Thanks Jabberwock thanked for this post
    13. #9
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Jabberwock's Avatar
      Join Date
      Sep 2012
      Posts
      19
      Thanks (-->)
      8
      Thanks (<--)
      0
      Now it acts weirdly but it does react to the movement of the player.

      Just to be sure that I'm right about the x, y and z. When going up a ladder in the game which one of them will increase? The z or the y? In some graphs I see the y and others the z...

    14. #10
      Nick
      Learning to hack games!
       
      Feeling Normal
       
      ndani14's Avatar
      Join Date
      Aug 2012
      Location
      Australia
      Posts
      53
      Thanks (-->)
      11
      Thanks (<--)
      25
      Cheats'n'Trainers
      with the coordinate system i'm using y should increase.

      also the newMouseX may need to 32767 to be change i just guessed that one.

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Source Code] Find DMA Addy - How To Pointer C++
      By [GH]Rake in forum Tutorials and Snippets
      Replies: 6
      Last Post: 05-20-2017, 06:17 PM
    2. [Help] Aimbot using Screen Coordinates & SendInput
      By [GH]Rake in forum Hacking Help
      Replies: 5
      Last Post: 03-10-2016, 02:06 AM
    3. [Help] Making an aimbot
      By Regelion in forum Hacking Help
      Replies: 4
      Last Post: 02-28-2016, 05:14 PM
    4. [Help] Making Aimbot..
      By Loset in forum Hacking Help
      Replies: 2
      Last Post: 01-15-2016, 03:39 PM