I'm trying to make a aimbot and failed.
I'm using Delphi 7 code is as follows:
in expos eyPos, ezPos. = Floats on the position of the enemy.
xPos, yPos, ZPOS. = My position
I have a OPK And it works very well, but failed to understand the aimbot.
Code:
var
xPos,yPos,zPos,yawY,pitchX,exPos,eyPos,ezPos,distance:single;
begin
distance: = sqrt (
((Expos - xPos) * (Expos - xPos)) +
((eyPos - yPos) * (eyPos - yPos)) +
((ezPos - ZPOS) * (ezPos - ZPOS))
);
if (distance> 0.0) then
begin
pitchX: = Math.Arcsin ((ezPos - ZPOS) / distance) * 180 / PI;
baseaddress = $ 1029344; // mouseY
WriteProcessMemory (HandleWindow, ptr (baseaddress)pitchX, 4, write);
yawY: = -Math.ArcTan2 (expos - xPos, eyPos - yPos)/ Pi * 180 + 180;
baseaddress = $ 1029340; // mouseX
WriteProcessMemory (HandleWindow, ptr (baseaddress)yawY, 4, write);
end;
end;
Coordinates, when I point my enemy
Code:
MouseX = Integer: 1079445544, Float: 3,359872818;// POSITION Mouse x Target one Enemy
MouseY = Integer: 0, Float: 0; // POSITION Mouse y Target one Enemy
EnemyX = Integer: 1120850412, Float: 103,4100037
EnemyY = Integer: 1126465556, Float: 164,5003052
EnemyZ = Integer: 3292002386, Float: -735,8800049
MiPJx = Integer: 1123293499, Float: 122,0492783
MiPJy = Integer: 1130397716, Float: 224,5003052
MiPJz = Integer: 3290636758, Float: -652,5286865
------------------------------------------------------
MouseX = Integer: 1025723346, Float: 0,03986722976;// POSITION Mouse x Target one Enemy
MouseY = Integer: 0, Float: 0; // POSITION Mouse y Target one Enemy
EnemyX = Integer: 1120850412, Float: 103,4100037
EnemyY = Integer: 1126465556, Float: 164,5003052
EnemyZ = Integer: 3292002386, Float: -735,8800049
MiPJx = Integer: 1107750724, Float: 33,73365784
MiPJy = Integer: 1150324739, Float: 1156,500366
MiPJz = Integer: 3275330451, Float: -185,5764618