Cheat Engine
The Official Site of Cheat Engine

Author Message
Der5t
Newbie cheater
Reputation: 0

Joined: 10 Mar 2014
Posts: 14

Posted: Sun Aug 28, 2016 11:05 am    Post subject: Fix Aimbot accuracy for third person game

So I tried my hand at making an aimbot for Vice City.Here's a part of my lua code.

 Code: local CompleteCircleAngle = math.pi*2   local West= math.pi*2 --West is 0. pi * 2 is max value of the X mouse Axis   local East=math.pi   local North=math.pi+(math.pi/2)   local South=math.pi-(math.pi/2)   if EnemyX > MyX and EnemyY > MyY then     Quadrant = 1 --North-East     local deltaX = EnemyX-MyX     local deltaY = EnemyY-MyY     local AngleX = math.atan2(deltaY,deltaX) * 180/math.pi --Convert to degrees     local AngleXPercentage = AngleX/360 --Get percentage of the angle     local ToWriteAngleX = East + (CompleteCircleAngle * AngleXPercentage)     writeFloat(PlayerMouseX, ToWriteAngleX)   elseif EnemyX < MyX and EnemyY > MyY then     Quadrant = 2 --North-West     local deltaX = MyX-EnemyX     local deltaY = EnemyY-MyY     local AngleX = math.atan2(deltaY,deltaX) * 180/math.pi     local AngleXPercentage = AngleX/360     local ToWriteAngleX = West - (CompleteCircleAngle * AngleXPercentage)     writeFloat(PlayerMouseX, ToWriteAngleX)   elseif EnemyX < MyX and EnemyY < MyY then     Quadrant = 3 --South-West     local deltaX = MyX-EnemyX     local deltaY = MyY-EnemyY     local AngleX = math.atan2(deltaY,deltaX) * 180/math.pi     local AngleXPercentage = AngleX/360     local ToWriteAngleX = West + (CompleteCircleAngle * AngleXPercentage)     writeFloat(PlayerMouseX, ToWriteAngleX)   else--if EnemyX > MyX and EnemyY < MyY then     Quadrant = 4 --South-East     local deltaX = EnemyX-MyX     local deltaY = MyY-EnemyY     local AngleX = math.atan2(deltaY,deltaX) * 180/math.pi     local AngleXPercentage = AngleX/360     local ToWriteAngleX = East - (CompleteCircleAngle * AngleXPercentage)     writeFloat(PlayerMouseX, ToWriteAngleX)   end 2dDistance = math.sqrt(math.pow(EnemyX - MyX,2) + math.pow(readFloat(EnemyY) - readFloat(MyY),2))   if EnemyZ > MyZ then     local deltaZ = EnemyZ - (MyZ)     local AngleY = math.atan2(deltaZ, 2dDistance) * 180/math.pi     local AngleYPercentage = AngleY/360     local ToWriteAngleY = 0 + (CompleteCircleAngle * AngleYPercentage)     writeFloat(PlayerMouseY, ToWriteAngleY)   else     local deltaZ = (MyZ) - EnemyZ     local AngleY = math.atan2(deltaZ, 2dDistance) * 180/math.pi     local AngleYPercentage = AngleY/360     local ToWriteAngleY = 0 - (CompleteCircleAngle * AngleYPercentage)     writeFloat(PlayerMouseY, ToWriteAngleY)   end

When I execute it, my X mouse lands exactly on the player.But Y mouse is inaccurate (I tried some ways to fix it but it didn't work).
The problem is with my distance from enemy.The close/further I move, My Y mouse changes (by aimbot) but it does so inaccurately.

Some notes:

The game is third person.
The closer I get to the player, the lower the aim should get.
The camera rotates around the player in a circular path when I move mouse up/down.
X mouse axis increases when I turn counter clockwise.

Filipe_Br
Expert Cheater
Reputation: 2

Joined: 07 Jan 2016
Posts: 233
Location: My house

Posted: Wed Aug 31, 2016 3:42 pm    Post subject: Re: Fix Aimbot accuracy for third person game

Well I have some difficulty to understand script, more to the game counter strike I made this script.
 Code: Camera_X = getAddress('cstrike.exe+19DC408') Camera_Y = getAddress('cstrike.exe+19DC404') bot = {'[cstrike.exe+1101CFC]+3AC','[cstrike.exe+1101CFC]+3B0','[cstrike.exe+1101CFC]+3B4'} player = {'[cstrike.exe+1101CFC]+88','[cstrike.exe+1101CFC]+8C','[cstrike.exe+1101CFC]+90'} function aimbot()          calcX=readFloat(player[2])-readFloat(bot[2])          calcY=readFloat(player[1])-readFloat(bot[1])          calcZ=readFloat(player[3])-readFloat(bot[3])+5 --control Y mouse          ZXdistance=math.sqrt(math.pow(calcX, 2)+math.pow(calcY, 2))          angleX=math.deg(math.atan2(calcX, calcY))-180 --control X mouse          angleY=math.deg(math.atan2(calcZ, ZXdistance))          if (isKeyPressed(VK_V)) then             writeFloat(Camera_X, angleX)             writeFloat(Camera_Y, angleY)          end end if t then t.destroy(); t=nil end t=createTimer(nil) timer_setInterval(t, 1) timer_onTimer(t, aimbot)
Der5t
Newbie cheater
Reputation: 0

Joined: 10 Mar 2014
Posts: 14

Posted: Thu Sep 01, 2016 4:54 am    Post subject:

My code is doing pretty much the same what yours is.But I don't understand how I can get the Y Camera Aim.

Here are two diagrams.

Third Person.png
Description:
 My Game Aim
Filesize:  24.44 KB
Viewed:  5642 Time(s)

First Person.png
Description:
 First Person Aim
Filesize:  7.88 KB
Viewed:  5642 Time(s)

Bl4D3
How do I cheat?
Reputation: 0

Joined: 02 Aug 2017
Posts: 1

 Posted: Wed Aug 02, 2017 3:51 am    Post subject: Hello did you get successful in making aimbot for vice city ?
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 6 Hours Page 1 of 1

 Jump to: Select a forum Cheat Engine----------------Cheat EngineCheat Engine Lua ScriptingCheat Engine TutorialsGeneral GamehackingAuto Assembler tutorialsPointer tutorialsGame specific tutorialsWebbrowser stuff related tutorialsConsole ModdingLUA TutorialsLua Extensions General Discussions----------------General DiscussionsArtComputer TalkRandom spamArt RequestsArt TutorialsWillekeurige RotzooiGuestsHorse Excrement Cheat Requests----------------Single player cheat request Cheat Engine Downloads----------------TablesTrainersAuto Assemble scripts Coding----------------Cheat Engine SourceCETC Server and ClientsDBVMPlugin developmentGeneral programmingBinariesCrackmesGeneral programming+Game Development2D Graphics3D ModelingGameplay designWeb Development Games----------------Flash GamesGaia OnlineStick Arena
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum