• 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
  • Results 1 to 5 of 5
    1. #1
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      NubTIK's Avatar
      Join Date
      Dec 2012
      Posts
      61
      Thanks (-->)
      1
      Thanks (<--)
      40

      Smile [HL2 / CSS] Triggerbot tutorial.

      John Kittz

      Hello and welcome to my triggerbot tutorial, It will be alot easier to follow along with this tutorial if you have watched the How to Make a Memory TriggerBot Hack C++ TUTORIAL series by Fleep.

      However, This triggerbot will be based on the players bone position (Head, Neck, Spine) etcetera. (Calculating the FOV between your aim angles & players bone position.)

      Unfortunately, There will not be alot of shown sourcecode in this tutorial, basically just an explination on how you can do it, let's get started.


      [Step 1] - Getting the players bone position.

      To get the other players bone positions you first need the "Bone Base", Witch is located in C_BaseEntity. so how do you find it? Open up hl2.exe in ollydbg, go into client.dll, and search for the string "C_BaseAnimating::SetupBones", Doubleclick it and reverse the function.
      Currently the working offset is
      Code:
       
      5CCEC8C1   33C9             XOR ECX,ECX
      5CCEC8C3   898E 70050000    MOV DWORD PTR DS:[ESI+570],ECX
      5CCEC8C9   898E 74050000    MOV DWORD PTR DS:[ESI+574],ECX
      That's C_BaseEntity + 0x570.

      Keep in mind that it will NOT look the same for other versions of CSS.
      Also makesure you write these addresses down in a notepad to remember them.

      Now when you've got the BoneBase offset, Go into your project (assuming you have been following Fleeps triggerbot tutorial, Or perhaps using my aimbot source) Add a new line in the GetInformation function for the player loop.
      Code:
      ReadProcessMemory(Process, (PBYTE*)(C_BaseEntity + 0x570), &BoneBase, sizeof(DWORD), 0);
      Now you got the bone base, now all you need to do is get the X, Y, Z positions from each bone (Or the bone you want to use).

      To do this, Create a float array where you wanna store the positions in.

      So you would have to do something like this:
      Code:
      ReadProcessMemory(Process, (PBYTE*)(BoneBase + 0x30 *BoneNumber + 0x0C), &FloatArray[0], 4, 0);  
      ReadProcessMemory(Process, (PBYTE*)(BoneBase + 0x30 *BoneNumber + 0x1C), &FloatArray[1], 4, 0);  
      ReadProcessMemory(Process, (PBYTE*)(BoneBase + 0x30 *BoneNumber + 0x2C), &FloatArray[2], 4, 0);
      The reason I am not just using 1 readprocessmemory and storing it into the array that way is because each position is not 4 bytes away. However I did make a function to be able to just use 1 ReadProcessMemory, Since that will give your cheat better performance.

      Code:
      float m_vecStoreboneData[3][4];  
      
      void GetBonePosition(int BoneNumber, float *FloatArray){ 
         ReadProcessMemory(fpd.hpr, (PBYTE*)(BoneBase + BoneNumber* 0x30), &m_vecStoreboneData, sizeof(m_vecStoreboneData), NULL);
         FloatArray[0] = m_vecStoreboneData[0][3]; 
         FloatArray[1] = m_vecStoreboneData[1][3]; 
         FloatArray[2] = m_vecStoreboneData[2][3]-59;    
      }
      The reason I set FloatArray[2] to be -=59 is because the Y position of a bone on a player is usally 64 "units?" higher then it actually is on the player, And the reason I didnt do -64 is because I think -59 is more accurate, for the head that is.
      "HL2 player's Horizontal Eye-Level is 64 units above floor-level when standing/walking (or 30 units when crouching). So a standing player cannot see a horizontal surface if it is 64 units above his floor-level." - https://developer.valvesoftware.com/...alk:Dimensions

      Now you can use it like this:
      Code:
      float Head[3];
      GetBonePosition(14, Head);
      Now you got the X, Y, Z Positions stored inside of the Head float array. and as you can see the bone number 14 is = head bone. Here is a list of all the bones (I have posted this in 1 of my other threads)

      Code:
      
      BoneNumber:[0] = [Pelvis]
      BoneNumber:[1] = [Left_Thigh]
      BoneNumber:[2] = [Left_Calf]
      BoneNumber:[4] = [Left_Toe0]
      BoneNumber:[5] = [Right_Thigh]
      BoneNumber:[6] = [Right_Calf]
      BoneNumber:[7] = [Right_Foot]
      BoneNumber:[8] = [Right_Toe0]
      BoneNumber:[9] = [Spine]
      BoneNumber:[10] = [Spine1]
      BoneNumber:[11] = [Spine2]
      BoneNumber:[12] = [Spine4]
      BoneNumber:[13] = [Neck1]
      BoneNumber:[14] = [Head1]
      BoneNumber:[15] = [Left_Clavicle]
      BoneNumber:[16] = [Left_UpperArm]
      BoneNumber:[17] = [Left_Forearm]
      BoneNumber:[18] = [Left_Hand]
      BoneNumber:[19] = [Left_Finger2]
      BoneNumber:[20] = [Left_Finger21]
      BoneNumber:[21] = [Left_Finger22]
      BoneNumber:[22] = [Left_Finger1]
      BoneNumber:[23] = [Left_Finger11]
      BoneNumber:[24] = [Left_Finger12]
      BoneNumber:[25] = [Left_Finger0]
      BoneNumber:[26] = [Left_Finger01]
      BoneNumber:[27] = [Left_Finger02]
      BoneNumber:[28] = [Right_Clavicle]
      BoneNumber:[29] = [Right_UpperArm]
      BoneNumber:[30] = [Right_Forearm]
      BoneNumber:[31] = [Right_Hand]
      BoneNumber:[32] = [Right_Finger2]
      BoneNumber:[33] = [Right_Finger21]  
      BoneNumber:[34] = [Right_Finger22]
      BoneNumber:[35] = [Right_Finger1]
      BoneNumber:[36] = [Right_Finger11]
      BoneNumber:[37] = [Right_Finger12]
      BoneNumber:[38] = [Right_Finger0]
      BoneNumber:[39] = [Right_Finger01]
      BoneNumber:[40] = [Right_Finger02]
      BoneNumber:[41] = [Right_Wrist]
      BoneNumber:[42] = [Left_Wrist]
      BoneNumber:[43] = [Left_Ulna]
      BoneNumber:[44] = [Right_Ulna]
      BoneNumber:[45] = [weapon_bone]
      BoneNumber:[46] = [weapon_bone_RightHand]
      BoneNumber:[47] = [weapon_bone_LleftHand]
      BoneNumber:[48] = [weapon_bone_Clip]
      
      [Step 2] - Making the triggerbot

      So now when you've got the player bone positions, what you need to do is calculate the fov between your angles and the bone.

      To get the fov, I will be using a function called GetFOV from who I beleive is aVitamin, not sure.

      Code:
      float GetFOV( float *Angles, float *Source, float *Dst, float Distance) 
         { 
      	float ang[3],aim[3]; 
      	float fov;  
      	CalcAngleDst(Source, Dst, ang, &Distance); 
      	MakeVector(Angles, aim); 
      	MakeVector(ang, ang);      
      	float mag_s = sqrt((aim[0]*aim[0]) + (aim[1]*aim[1]) + (aim[2]*aim[2])); 
      	float mag_d = sqrt((aim[0]*aim[0]) + (aim[1]*aim[1]) + (aim[2]*aim[2])); 
      	float u_dot_v = aim[0]*ang[0] + aim[1]*ang[1] + aim[2]*ang[2]; 
      	fov = acos(u_dot_v / (mag_s*mag_d)) * (180.0 / 3.14159265358979323846); 
      	return fov; 
         }
      The CalcAngleDst function is just like the CalcAngle function, but it calculates the distance for the player aswell, Using the normal CalcAngle function works fine aswell.


      Now lets calculate the fov using the GetFov function:
      Code:
      float Fov = GetFOV(MyViewangles, MyPosition, Head);
      Now all you need to do to check if you're aiming at the bone is:

      Code:
      if(Fov<0.6) 
      {
         Fire();
      }
      Now obviously before doing that you would want some sort of team check, and check if the enmy is dead but if you were following Fleeps tuts that would already be included.

      Im sorry that this tutorial was very sloppy, Really tired atm but I tried. I hope it helps.

      OUTCOME: https://www.youtube.com/watch?v=E2O5...ature=youtu.be


      Last edited by NubTIK; 08-12-2013 at 04:11 PM.
      ≧◔◡◔≦

    2. Thanks squeenie, kaz, BeesKnees, Liduen, Solaire thanked for this post
    3. #2
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      WiTH's Avatar
      Join Date
      May 2012
      Posts
      62
      Thanks (-->)
      1
      Thanks (<--)
      10
      another awesome tutorial, thanks

    4. #3
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      NubTIK's Avatar
      Join Date
      Dec 2012
      Posts
      61
      Thanks (-->)
      1
      Thanks (<--)
      40
      Quote Originally Posted by WiTH View Post
      another awesome tutorial, thanks
      Thanks for the nice response, ideas for other tuts?
      ≧◔◡◔≦

    5. #4
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      Quote Originally Posted by Crypt View Post
      i will give you another cookie if you make pro spread tut! :O
      If you mean non shaking nospread:
      Hook GetUserCMD from CInput @ Index 8 and set random_seet 165 and command number to 2087 (or dynamically calculate it for server side ac proffenz )

    6. #5
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      WiTH's Avatar
      Join Date
      May 2012
      Posts
      62
      Thanks (-->)
      1
      Thanks (<--)
      10
      Cheats'n'Trainers
      Quote Originally Posted by NubTIK View Post
      Thanks for the nice response, ideas for other tuts?
      Maybe some info about csgo or w2s or engine hooks

    Similar Game Hacker Threads

    1. [Tutorial] C++ How to Make a Counter Strike TriggerBot Hack TUTORIAL DIFFICULTY [3/10]
      By Fleep in forum GH Hack Video Tutorials
      Replies: 83
      Last Post: 05-17-2017, 07:26 PM
    2. Replies: 47
      Last Post: 08-26-2016, 07:54 AM
    3. [Help] Fleep's Triggerbot tutorial!
      By __Steven in forum Hacking Help
      Replies: 7
      Last Post: 07-28-2014, 09:04 AM
    4. Replies: 6
      Last Post: 01-31-2014, 07:56 AM
    5. Replies: 18
      Last Post: 03-02-2013, 02:30 PM

    Tags for this Thread