Перейти к содержанию

[Ghost Recon 2001] как сделать аймбот?


Рекомендуемые сообщения

Вот к примеру я нашел указатель своей позиции и позиции камеры, нашел инструкцию координат врагов, а как работать с массивом координат, через инструкцию?Или есть другие способы?

Ссылка на комментарий
Поделиться на другие сайты

За луа не скажу, а на плюсах ты в идеале должен найти "координаты камеры", потом найти "координаты головы противника", вычислить дистанцию и вычесть из "координат камеры" эту самую дистанцию. Как-то так. 

 

Ссылка на комментарий
Поделиться на другие сайты

Я не до конца понимаю, какие именно тебе инструкции нужны. Если ассамблерные, то я в них слишком слаб, а если C++ и так далее, то это обычный синтаксис языка, типа arr[x][y]. Ничего сложного не вижу в этом. 

Ссылка на комментарий
Поделиться на другие сайты

В 24.07.2020 в 19:50, KRYPTOPUNK сказал:

Я не до конца понимаю, какие именно тебе инструкции нужны.

Скорее всего он нашёл 3 инструкции для каждой из координат и эти инструкции обращаются к координатам врагов
Я думаю, тут можно с инъекцией кода сделать или просто по указателям

Ссылка на комментарий
Поделиться на другие сайты

Спойлер

<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="26">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Aimbot"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}

-- Offsets
local FLAG_TEAM = 0x32C
local HEALTH = 0xF8
local NEXT_PLAYER = 0x4 -- The offset of the structure from one player to another
local COORDINATE_X = 0x34
local COORDINATE_Y = 0x38
local COORDINATE_Z = 0x3C
local ANGLE_X = 0x40
local ANGLE_Y = 0x44

local BASE_PLAYERS = getAddress('[ac_client.exe+0010F4F8]')
local BASE_MY_PLAYER = getAddress('[ac_client.exe+0010F4F4]')

-- Declaration of other variables
local player -- Structure with all my data
local enemy -- Structure with the enemy players, the targets.
local amount_players -- Number of players
local my_team -- Contains the necessary information to know who is on my team.


local MAX_ATTEMPTS = 1000 -- Help the "UpdatePlayersData" function not to enter an infinite loop.
-- To understand why this is necessary, you need to study how the player structures work in the Assalt Cube game.


-- Function that updates my player information
local function UpdateMyData()
    player = {x = readFloat(BASE_MY_PLAYER + COORDINATE_X),
              y = readFloat(BASE_MY_PLAYER + COORDINATE_Y),
              z = readFloat(BASE_MY_PLAYER + COORDINATE_Z),
              viewMatrix = {x = BASE_MY_PLAYER + ANGLE_X,
                            y = BASE_MY_PLAYER + ANGLE_Y
              }
    }
    my_team = readInteger(BASE_MY_PLAYER + FLAG_TEAM)
end


--Function that updates information about players
--And it's different from my team.
local function UpdatePlayersData()
    amount_players = readInteger("ac_client.exe+10A22C")-1
    enemy = {}

    local OFFSET = NEXT_PLAYER -- This variable contains the offset value of the current player being processed
    local current_player = 0 -- Contains the player base in process
    local counter = 0
    local countPlayer = 0
    while(countPlayer &lt;= amount_players) do
        counter = counter + 1
        if counter &gt; MAX_ATTEMPTS then print(#enemy) return end

        current_player = readInteger(BASE_PLAYERS + OFFSET)
        if readInteger(current_player + HEALTH) then
            countPlayer = countPlayer + 1
            if readInteger(current_player + HEALTH) &gt;= 1 and readInteger(current_player + HEALTH) &lt;= 1000 then -- The player exists and is alive.
                if readInteger(current_player + FLAG_TEAM) ~= my_team then -- If the player is my enemy
                    enemy[#enemy+1] = {}
                    enemy[#enemy].x = readFloat(current_player + COORDINATE_X)
                    enemy[#enemy].y = readFloat(current_player + COORDINATE_Y)
                    enemy[#enemy].z = readFloat(current_player + COORDINATE_Z)
                end
            end
        end
        OFFSET = OFFSET + NEXT_PLAYER
    end
end

function Aimbot()

    if #enemy == 0 then return end -- Returns if no address could be obtained.

    local differenceX = {}
    local differenceY = {}
    local differenceZ = {}
    local lenght = {}
    local lenghtXY = {}
    local targetX = 0
    local targetY = 0

    for    i=1, #enemy do
        differenceX = enemy.x - player.x
        differenceY = enemy.y - player.y
        differenceZ = enemy.z - player.z
        lenght =   math.sqrt(differenceX ^ 2 + differenceY ^ 2 + differenceZ ^ 2)
        lenghtXY = math.sqrt(differenceX ^ 2 + differenceY ^ 2)
    end

    local temp = lenght[1]
    local idx_bot = 1
    for i=2,#lenght do
        if lenght &lt; temp then
            idx_bot = i
            temp = lenght
        end
    end

    targetX = math.deg(math.atan2(differenceY[idx_bot], differenceX[idx_bot]))
    targetY = math.deg(math.atan2(differenceZ[idx_bot], lenghtXY[idx_bot]))

    writeFloat(player.viewMatrix.x, targetX + 90)
    writeFloat(player.viewMatrix.y, targetY)

end

function checkKeyAimbot()
    if isKeyPressed( VK_Q ) then
        if not readInteger('[ac_client.exe+0010F4F8]') then return end--The function returns if the address does not exist.
        UpdateMyData()
        UpdatePlayersData()
        Aimbot()
    end
end

if t1 then t1.destroy(); t1=nil end
t1 = createTimer()
t1.Interval = 1
t1.onTimer = checkKeyAimbot
{$asm}
[DISABLE]
{$lua}
if t1 then t1.destroy(); t1=nil end
{$asm}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>28</ID>
      <Description>"ESP"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
local window_name = "AssaultCube"
local screen_width, screen_height = 0, 0
if form then form.destroy(); form=nil end
form = createForm(false)
form.DoubleBuffered = true
form.Caption = "EspHack"
form.FormStyle = "fsSystemStayOnTop"
form.BorderStyle = "bsNone"
form.Color = 0x000001
form.setLayeredAttributes(0x000001, 0xFF, LWA_COLORKEY | LWA_ALPHA )
form.Show()
pic = createPicture()
local img = createImage(form)

local canvas = pic.Bitmap.Canvas

-- Removes window interaction with user
autoAssemble([[
alloc(mem, 100)
createthread(mem)
label(win_name)

mem:
 push esi
 push win_name
 push 00
 call USER32.FindWindowA
 mov esi,eax
 push -14
 push esi
 call USER32.GetWindowLongA
 push 00080020
 push -14
 push esi
 call USER32.SetWindowLongA
 pop esi
 ret

win_name:
 db 'EspHack',0
]], true)

autoAssemble([[
alloc(code, 100)
registersymbol(code)
]])

--Defines the position and size of the ESP hack window.
local function UpdatePos()
    local function UpdateForm()
        if t_upd_frm then t_upd_frm.destroy(); t_upd_frm=nil end

        local left = readInteger(getAddress("left"))
        local top = readInteger(getAddress("top"))
        local right = readInteger(getAddress("right"))
        local bottom = readInteger(getAddress("bottom"))
        local width = right - left
        local height = bottom - top

        screen_width = width
        screen_height = height

        form.Top = top + 22
        form.Left = left + 3
        form.Width = width - 6
        form.Height = height - 25

        pic.Bitmap.Width = form.Width
        pic.Bitmap.Height = form.Height

        img.Width = form.Width
        img.Height = form.Height
    end

    --Get information about the game window.
    autoAssemble([[
    createthread(code)
    label(win_name)
    label(target)
    label(left)
    label(top)
    label(right)
    label(bottom)
    registersymbol(left)
    registersymbol(top)
    registersymbol(left)
    registersymbol(right)
    registersymbol(bottom)

    code:
     push win_name
     push 00
     call FindWindowA
     push target
     push eax
     call GetWindowRect
     xor eax,eax
     ret

    win_name:
     db ']] .. window_name .. [[',0

    target:
     left:
      dd 0
     top:
      dd 0
     right:
      dd 0
     bottom:
      dd 0]])

      if t_upd_frm then t_upd_frm.destroy(); t_upd_frm=nil end
      t_upd_frm = createTimer()
      t_upd_frm.interval = 1000
      t_upd_frm.OnTimer = UpdateForm
end
UpdatePos()
--------------------------------------------------------------------------------

-- Offsets
local FLAG_TEAM = 0x32C
local HEALTH = 0xF8
local NEXT_PLAYER = 0x4
local COORDINATE_X = 0x34
local COORDINATE_Y = 0x38
local COORDINATE_Z = 0x3C
local ANGLE_X = 0x40
local ANGLE_Y = 0x44

local BASE_PLAYERS = getAddress('[ac_client.exe+0010F4F8]')
local BASE_MY_PLAYER = getAddress('[ac_client.exe+0010F4F4]')

local player -- Structure with all my data
local enemy -- Structure with the enemy players, the targets.
local amount_players -- Number of players
local my_team -- Contains the necessary information to know who is on my team.


local MAX_ATTEMPTS = 1000

-- Function that updates my player information
local function UpdateMyData()
    player = {x = readFloat(BASE_MY_PLAYER + COORDINATE_X),
              y = readFloat(BASE_MY_PLAYER + COORDINATE_Y),
              z = readFloat(BASE_MY_PLAYER + COORDINATE_Z),
              viewMatrix = {x = BASE_MY_PLAYER + ANGLE_X,
                            y = BASE_MY_PLAYER + ANGLE_Y
              }
    }
    my_team = readInteger(BASE_MY_PLAYER + FLAG_TEAM)
end


--Function that updates information about players
--And it's different from my team.
local function UpdatePlayersData()
    amount_players = readInteger("ac_client.exe+10A22C")-1
    enemy = {}

    local OFFSET = NEXT_PLAYER -- This variable contains the offset value of the current player being processed
    local current_player = 0 -- Contains the player base in process
    local counter = 0
    local countPlayer = 0
    while(countPlayer &lt;= amount_players) do
        counter = counter + 1
        if counter &gt; MAX_ATTEMPTS then print(#enemy) return end

        current_player = readInteger(BASE_PLAYERS + OFFSET)
        if readInteger(current_player + HEALTH) then
            countPlayer = countPlayer + 1
            if readInteger(current_player + HEALTH) &gt;= 1 and readInteger(current_player + HEALTH) &lt;= 1000 then -- The player exists and is alive.
                if readInteger(current_player + FLAG_TEAM) ~= my_team then -- If the player is my enemy
                    enemy[#enemy+1] = {}
                    enemy[#enemy].x = readFloat(current_player + COORDINATE_X)
                    enemy[#enemy].y = readFloat(current_player + COORDINATE_Y)
                    enemy[#enemy].z = readFloat(current_player + COORDINATE_Z)
                end
            end
        end
        OFFSET = OFFSET + NEXT_PLAYER
    end
end

local function ESP()

    --Clean screen
    canvas.Brush.Color = 0x000001
    canvas.fillRect(0, 0, 1000, 1000)

    if #enemy == 0 then return end -- Returns if no address could be obtained.

    for    i=1, #enemy do
        local differenceX = enemy.x - player.x
        local differenceY = enemy.y - player.y
        local differenceZ = -(enemy.z - player.z)
        local lenght = math.sqrt(differenceX ^ 2 + differenceY ^ 2, differenceZ ^ 2)
        local lenghtXY = math.sqrt(differenceX ^ 2 + differenceY ^ 2)
        local targetX = math.deg(math.atan2(differenceY, differenceX))
        local targetY = math.deg(math.atan2(differenceZ, lenghtXY))


        local tx = targetX
        local ty = targetY
        local mx = readFloat(player.viewMatrix.x)-90
        local my = -readFloat(player.viewMatrix.y)
        local dx = 0
        local dy = 0

        -- Convert an angle ranging from 0 -&gt; 360. To an angle ranging from -180 -&gt; 180.
        if mx &gt; 180 then
            mx = -(360 - mx)
        end

        -- Calculate dx (destiny X)
        if (tx &lt; 0 and mx &lt; 0) or (tx &gt;= 0 and mx &gt;= 0) then
            dx = -(tx - mx)
        elseif tx &lt; 0 and mx &gt; 0 then
            if player.x &gt; enemy.x and player.y &gt; enemy.y then
                dx = -(360+(tx - mx))
            else
                dx = -(tx - mx)
            end
        elseif tx &gt; 0 and mx &lt; 0 then
            if player.x &gt; enemy.x and player.y &lt; enemy.y then
                dx = 360-(tx - mx)
            else
                dx = -(tx - mx)
            end
        end
        -- Calculate dy (destiny Y)
        dy = ty - my
        dx = -dx

        --Draw nothing if the enemy is behind me.
        if dx &lt; -90 or dx &gt; 90 then goto continue end
        if dy &lt; -90 or dy &gt; 90 then goto continue end

        --Strange calculation, to transform the differences between angles, in the coordinates of the screen.
        --I used values 37 and 74 for AssaultCube because the hack worked better this way. In Counter Strike I used 45 and 90.
        dy = dy + 37
        dy = dy*(screen_height / 74)
        dx = dx + 37
        dx = dx*(screen_width / 74)
        -- draw in picture
        canvas.Brush.Color = 0xFF
        canvas.Pen.Color = 0xFF
        canvas.line(form.Width / 2, form.Height / 2, dx, dy)
        canvas.textOut(dx-10, dy-5, math.ceil(lenght / 4) .. "m")
        ::continue::
    end
    --Displays on the screen.
    img.Picture = pic

end

local function checkKeyESP()
    UpdateMyData()
    UpdatePlayersData()
    ESP()
end

if t_ESP then t_ESP.destroy(); t_ESP=nil end
t_ESP = createTimer()
t_ESP.Interval = 100
t_ESP.onTimer = checkKeyESP
{$asm}
[DISABLE]
{$lua}
if t_ESP then t_ESP.destroy(); t_ESP=nil end
if form then form.destroy(); form=nil end
pic.destroy()
{$asm}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>9</ID>
      <Description>"Teleport Bot (In front of you)"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}

-- Offsets
local FLAG_TEAM = 0x32C
local HEALTH = 0xF8
local NEXT_PLAYER = 0x4 -- The offset of the structure from one player to another
local COORDINATE_X = 0x34
local COORDINATE_Y = 0x38
local COORDINATE_Z = 0x3C
local ANGLE_X = 0x40
local ANGLE_Y = 0x44

local BASE_PLAYERS = getAddress('[ac_client.exe+0010F4F8]')
local BASE_MY_PLAYER = getAddress('[ac_client.exe+0010F4F4]')

-- Declaration of other variables
local player -- Structure with all my data
local enemy = {}-- Structure with the enemy players, the targets.
local amount_players -- Number of players
local my_team -- Contains the necessary information to know who is on my team.


local MAX_ATTEMPTS = 1000 -- Help the "UpdatePlayersData" function not to enter an infinite loop.
-- To understand why this is necessary, you need to study how the player structures work in the Assalt Cube game.


-- Function that updates my player information
local function UpdateMyData()
    player = {x = readFloat(BASE_MY_PLAYER + COORDINATE_X),
              y = readFloat(BASE_MY_PLAYER + COORDINATE_Y),
              z = readFloat(BASE_MY_PLAYER + COORDINATE_Z),
              viewMatrix = {x = readFloat(BASE_MY_PLAYER + ANGLE_X)-90,
                            y = readFloat(BASE_MY_PLAYER + ANGLE_Y)
              }
    }
    my_team = readInteger(BASE_MY_PLAYER + FLAG_TEAM)
end


--Function that updates information about players
--And it's different from my team.
local function UpdatePlayersData()
    amount_players = readInteger("ac_client.exe+10A22C")-1
    enemy = {}

    local OFFSET = NEXT_PLAYER -- This variable contains the offset value of the current player being processed
    local current_player = 0 -- Contains the player base in process
    local counter = 0
    local countPlayer = 0
    while(countPlayer &lt; amount_players) do
        counter = counter + 1
        if counter &gt; MAX_ATTEMPTS then print(#enemy) return end

        current_player = readInteger(BASE_PLAYERS + OFFSET)
        if readInteger(current_player + HEALTH) then
            countPlayer = countPlayer + 1
            if readInteger(current_player + HEALTH) &gt;= 1 and readInteger(current_player + HEALTH) &lt;= 1000 then -- The player exists and is alive.
                if readInteger(current_player + FLAG_TEAM) ~= my_team then -- If the player is my enemy
                    enemy.x = current_player + COORDINATE_X
                    enemy.y = current_player + COORDINATE_Y
                    enemy.z = current_player + COORDINATE_Z
                    return
                end
            end
        end
        OFFSET = OFFSET + NEXT_PLAYER
    end
end

local function TeleportBot()

    local destinyX
    local destinyY
    local destinyZ
    local max_lenght
    local lenght = 10

    destinyZ = math.sin(math.rad(player.viewMatrix.y)) * lenght
    max_lenght = math.cos(math.rad(player.viewMatrix.y)) * lenght
    destinyY = math.sin(math.rad(player.viewMatrix.x)) * max_lenght
    destinyX = math.cos(math.rad(player.viewMatrix.x)) * max_lenght

    writeFloat(enemy.x, player.x + destinyX)
    writeFloat(enemy.y, player.y + destinyY)
    writeFloat(enemy.z, player.z + destinyZ)

end

local function CheckKeyTeleportBot()
    if isKeyPressed( VK_F ) then
        if not readInteger('[ac_client.exe+0010F4F8]') then return end--The function returns if the address does not exist.
        UpdateMyData()
        UpdatePlayersData()
        TeleportBot()
    end
end

if t2 then t2.destroy(); t2=nil end
t2 = createTimer()
t2.Interval = 1
t2.onTimer = CheckKeyTeleportBot
{$asm}
[DISABLE]
{$lua}
if t2 then t2.destroy(); t2=nil end
{$asm}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>10</ID>
      <Description>"Fly Mode"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}

-- Offsets
local COORDINATE_X = 0x34
local COORDINATE_Y = 0x38
local COORDINATE_Z = 0x3C
local ANGLE_X = 0x40
local ANGLE_Y = 0x44

local BASE_MY_PLAYER = getAddress('[ac_client.exe+0010F4F4]')

-- Declaration of other variables
local player -- Structure with all my data

-- Function that updates my player information
local function UpdateMyData()
    player = {x = BASE_MY_PLAYER + COORDINATE_X,
              y = BASE_MY_PLAYER + COORDINATE_Y,
              z = BASE_MY_PLAYER + COORDINATE_Z,
              viewMatrix = {x = readFloat(BASE_MY_PLAYER + ANGLE_X)-90,
                            y = readFloat(BASE_MY_PLAYER + ANGLE_Y)
              }
    }
end

local speed_forward = 0
local speed_back = 0
local speed_left = 0
local speed_right = 0
local direction1 = "none"
local direction2 = "none"
local speed_transaction = 0.02
local speed = 0.6

function FlyMode()

    --if not readInteger('[ac_client.exe+0010F4F8]') then return end--The function returns if the address does not exist.
    UpdateMyData()

    local destinyX
    local destinyY
    local destinyZ
    local max_lenght

    destinyZ = math.sin(math.rad(player.viewMatrix.y))
    max_lenght = math.cos(math.rad(player.viewMatrix.y))
    destinyY = math.sin(math.rad(player.viewMatrix.x)) * max_lenght
    destinyX = math.cos(math.rad(player.viewMatrix.x)) * max_lenght

    if direction1 == "forward" then
           writeFloat(player.x, readFloat(player.x) + destinyX * speed_forward)
           writeFloat(player.y, readFloat(player.y) + destinyY * speed_forward)
           writeFloat(player.z, readFloat(player.z) + destinyZ * speed_forward)
    elseif direction1 == "back" then
           writeFloat(player.x, readFloat(player.x) - destinyX * speed_back)
           writeFloat(player.y, readFloat(player.y) - destinyY * speed_back)
           writeFloat(player.z, readFloat(player.z) - destinyZ * speed_back)
    end

    if direction2 == "left" then
           writeFloat(player.x, readFloat(player.x) + destinyY * speed_left)
           writeFloat(player.y, readFloat(player.y) - destinyX * speed_left)
    elseif direction2 == "right" then
           writeFloat(player.x, readFloat(player.x) - destinyY * speed_right)
           writeFloat(player.y, readFloat(player.y) + destinyX * speed_right)
    end
end

local function CheckKeyFlyMode()
    if isKeyPressed(VK_W) then
        if speed_back &gt; 0 then
            speed_back = speed_back - speed_transaction * 2
        else
            if speed_forward &lt; speed then
                speed_forward = speed_forward + speed_transaction
            end
            direction1 = "forward"
        end
    elseif isKeyPressed(VK_S) then
        if speed_forward &gt; 0 then
            speed_forward = speed_forward - speed_transaction * 2
        else
            if speed_back &lt; speed then
                speed_back = speed_back + speed_transaction
            end
            direction1 = "back"
        end
    else
        if speed_forward &lt;= 0 and speed_back &lt;= 0 then
            direction1 = "none"
        end
        if speed_forward &gt; 0 then
            speed_forward = speed_forward - speed_transaction * 2
        end
        if speed_back &gt; 0 then
            speed_back = speed_back - speed_transaction * 2
        end
    end

    if isKeyPressed(VK_A) then
        if speed_right &gt; 0 then
            speed_right = speed_right - speed_transaction * 2
        else
            if speed_left &lt; speed then
                speed_left = speed_left + speed_transaction
            end
            direction2 = "left"
        end
    elseif isKeyPressed(VK_D) then
        if speed_left &gt; 0 then
            speed_left = speed_left - speed_transaction * 2
        else
            if speed_right &lt; speed then
                speed_right = speed_right + speed_transaction
            end
            direction2 = "right"
        end
    else
        if speed_left &lt;= 0 and speed_right &lt;= 0 then
            direction2 = "none"
        end
        if speed_left &gt; 0 then
            speed_left = speed_left - speed_transaction * 2
        end
        if speed_right &gt; 0 then
            speed_right = speed_right - speed_transaction * 2
        end
    end
    FlyMode()
end

if t3 then t3.destroy(); t3=nil end
t3 = createTimer()
t3.Interval = 1
t3.onTimer = CheckKeyFlyMode
{$asm}
[DISABLE]
{$lua}
if t3 then t3.destroy(); t3=nil end
{$asm}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>1</ID>
      <Description>"No Recoil"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
ac_client.exe+5BAA2:
 db 90 90 90
 
[DISABLE]
ac_client.exe+5BAA2:
 db D8 4B 50
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>8</ID>
      <Description>"Rapid Fire"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
ac_client.exe+637E4:
 db 90 90

[DISABLE]
ac_client.exe+637E4:
 db 89 0A
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>7</ID>
      <Description>"Infinite Ammo"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
ac_client.exe+637E9:
 db 90 90

[DISABLE]
ac_client.exe+637E9:
  db FF 0E
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>15</ID>
      <Description>"Infinite Health / One Hit Kill"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
alloc(health, 100)
label(enemy)
label(exit)
label(return)

health:
 push eax
 push ecx
 mov ecx,ac_client.exe
 mov eax,[ecx+0010F4F4]
 add eax,F8
 add ebx,4
 cmp eax,ebx
 jne enemy
 jmp exit

enemy:
 mov [ebx],0

exit:
 sub ebx,4
 pop ecx
 pop eax
 jmp return


ac_client.exe+29D1F:
jmp health

return:

[DISABLE]
dealloc(health)

ac_client.exe+29D1F:
 db 29 7B 04 8B C7
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>27</ID>
      <Description>"Infinite grenade"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
ac_client.exe+63378:
 db FF 00
 
[DISABLE]
ac_client.exe+63378:
 db FF 08
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>29</ID>
      <Description>"Teleport Bot Position"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}

-- Offsets
local FLAG_TEAM = 0x32C
local HEALTH = 0xF8
local NEXT_PLAYER = 0x4 -- The offset of the structure from one player to another
local COORDINATE_X = 0x34
local COORDINATE_Y = 0x38
local COORDINATE_Z = 0x3C
local ANGLE_X = 0x40
local ANGLE_Y = 0x44

local BASE_PLAYERS = getAddress('[ac_client.exe+0010F4F8]')
local BASE_MY_PLAYER = getAddress('[ac_client.exe+0010F4F4]')

-- Declaration of other variables
local player = {}-- Structure with all my data
local enemy = {}-- Structure with the enemy players, the targets.
local amount_players -- Number of players
local my_team -- Contains the necessary information to know who is on my team.


local MAX_ATTEMPTS = 1000 -- Help the "UpdatePlayersData" function not to enter an infinite loop.
-- To understand why this is necessary, you need to study how the player structures work in the Assalt Cube game.


-- Function that updates my player information
local function UpdateMyData()
    player.x = BASE_MY_PLAYER + COORDINATE_X
    player.y = BASE_MY_PLAYER + COORDINATE_Y
    player.z = BASE_MY_PLAYER + COORDINATE_Z

    my_team = readInteger(BASE_MY_PLAYER + FLAG_TEAM)
end


--Function that updates information about players
--And it's different from my team.
local function UpdatePlayersData()
    amount_players = readInteger("ac_client.exe+10A22C")-1

    local OFFSET = NEXT_PLAYER -- This variable contains the offset value of the current player being processed
    local current_player = 0 -- Contains the player base in process
    local counter = 0
    local countPlayer = 0
    while(countPlayer &lt; amount_players) do
        counter = counter + 1
        if counter &gt; MAX_ATTEMPTS then print(#enemy) return end

        current_player = readInteger(BASE_PLAYERS + OFFSET)
        if readInteger(current_player + HEALTH) then
            countPlayer = countPlayer + 1
            if readInteger(current_player + HEALTH) &gt;= 1 and readInteger(current_player + HEALTH) &lt;= 1000 then -- The player exists and is alive.
                if readInteger(current_player + FLAG_TEAM) ~= my_team then -- If the player is my enemy
                    enemy.x = readFloat(current_player + COORDINATE_X)
                    enemy.y = readFloat(current_player + COORDINATE_Y)
                    enemy.z = readFloat(current_player + COORDINATE_Z)
                    t=true
                    return
                end
            end
        end
        OFFSET = OFFSET + NEXT_PLAYER
    end
    t = false
end

local function TeleportBotPosition()
    if not t then return end
    writeFloat(player.x, enemy.x)
    writeFloat(player.y, enemy.y)
    writeFloat(player.z, enemy.z)
end

local function CheckKeyTeleportBot()
        if not readInteger('[ac_client.exe+0010F4F8]') then return end--The function returns if the address does not exist.
        UpdateMyData()
        UpdatePlayersData()
        TeleportBotPosition()
end

if t2 then t2.destroy(); t2=nil end
t2 = createTimer()
t2.Interval = 1
t2.onTimer = CheckKeyTeleportBot
{$asm}
[DISABLE]
{$lua}
if t2 then t2.destroy(); t2=nil end
{$asm}
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <CheatCodes>
    <CodeEntry>
      <Description>Change of dec [esi]</Description>
      <Address>004637E9</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>637E9</ModuleNameOffset>
      <Before>
        <Byte>E9</Byte>
        <Byte>17</Byte>
        <Byte>C8</Byte>
        <Byte>57</Byte>
        <Byte>01</Byte>
      </Before>
      <Actual>
        <Byte>FF</Byte>
        <Byte>0E</Byte>
      </Actual>
      <After>
        <Byte>57</Byte>
        <Byte>8B</Byte>
        <Byte>7C</Byte>
        <Byte>24</Byte>
        <Byte>14</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of mov [edx],ecx</Description>
      <Address>004637E4</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>637E4</ModuleNameOffset>
      <Before>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>8B</Byte>
        <Byte>56</Byte>
        <Byte>18</Byte>
      </Before>
      <Actual>
        <Byte>89</Byte>
        <Byte>0A</Byte>
      </Actual>
      <After>
        <Byte>8B</Byte>
        <Byte>76</Byte>
        <Byte>14</Byte>
        <Byte>FF</Byte>
        <Byte>0E</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of mov [ebp+00000210],ebx</Description>
      <Address>0045F5C6</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5F5C6</ModuleNameOffset>
      <Before>
        <Byte>01</Byte>
        <Byte>75</Byte>
        <Byte>EE</Byte>
        <Byte>5F</Byte>
        <Byte>5E</Byte>
      </Before>
      <Actual>
        <Byte>89</Byte>
        <Byte>9D</Byte>
        <Byte>10</Byte>
        <Byte>02</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>5D</Byte>
        <Byte>C3</Byte>
        <Byte>CC</Byte>
        <Byte>CC</Byte>
        <Byte>A1</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of mov [edx],ebx</Description>
      <Address>019E0005</Address>
      <ModuleName/>
      <ModuleNameOffset>0</ModuleNameOffset>
      <Before>
        <Byte>BB</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Before>
      <Actual>
        <Byte>89</Byte>
        <Byte>1A</Byte>
      </Actual>
      <After>
        <Byte>8B</Byte>
        <Byte>56</Byte>
        <Byte>08</Byte>
        <Byte>E9</Byte>
        <Byte>25</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of add [eax],000000FA</Description>
      <Address>004636CA</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>636CA</ModuleNameOffset>
      <Before>
        <Byte>03</Byte>
        <Byte>00</Byte>
        <Byte>8B</Byte>
        <Byte>46</Byte>
        <Byte>18</Byte>
      </Before>
      <Actual>
        <Byte>81</Byte>
        <Byte>00</Byte>
        <Byte>FA</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
        <Byte>00</Byte>
      </Actual>
      <After>
        <Byte>8B</Byte>
        <Byte>56</Byte>
        <Byte>08</Byte>
        <Byte>89</Byte>
        <Byte>9A</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of sub [ebx+04],edi</Description>
      <Address>00429D1F</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>29D1F</ModuleNameOffset>
      <Before>
        <Byte>05</Byte>
        <Byte>09</Byte>
        <Byte>00</Byte>
        <Byte>2B</Byte>
        <Byte>F8</Byte>
      </Before>
      <Actual>
        <Byte>29</Byte>
        <Byte>7B</Byte>
        <Byte>04</Byte>
      </Actual>
      <After>
        <Byte>8B</Byte>
        <Byte>C7</Byte>
        <Byte>5F</Byte>
        <Byte>5E</Byte>
        <Byte>8B</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of fmulp st(1),st(0)</Description>
      <Address>0045BAA5</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5BAA5</ModuleNameOffset>
      <Before>
        <Byte>D9</Byte>
        <Byte>CB</Byte>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>50</Byte>
      </Before>
      <Actual>
        <Byte>DE</Byte>
        <Byte>C9</Byte>
      </Actual>
      <After>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>4C</Byte>
        <Byte>D8</Byte>
        <Byte>43</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of fmul st(3),st(0)</Description>
      <Address>0045BA9E</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5BA9E</ModuleNameOffset>
      <Before>
        <Byte>05</Byte>
        <Byte>44</Byte>
        <Byte>E4</Byte>
        <Byte>4E</Byte>
        <Byte>00</Byte>
      </Before>
      <Actual>
        <Byte>DC</Byte>
        <Byte>CB</Byte>
      </Actual>
      <After>
        <Byte>D9</Byte>
        <Byte>CB</Byte>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>50</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of fmul dword ptr [ebx+50]</Description>
      <Address>0045BAA2</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5BAA2</ModuleNameOffset>
      <Before>
        <Byte>00</Byte>
        <Byte>DC</Byte>
        <Byte>CB</Byte>
        <Byte>D9</Byte>
        <Byte>CB</Byte>
      </Before>
      <Actual>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>50</Byte>
      </Actual>
      <After>
        <Byte>DE</Byte>
        <Byte>C9</Byte>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>4C</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of fmul dword ptr [ebx+4C]</Description>
      <Address>0045BAA7</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5BAA7</ModuleNameOffset>
      <Before>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>50</Byte>
        <Byte>DE</Byte>
        <Byte>C9</Byte>
      </Before>
      <Actual>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>4C</Byte>
      </Actual>
      <After>
        <Byte>D8</Byte>
        <Byte>43</Byte>
        <Byte>44</Byte>
        <Byte>D9</Byte>
        <Byte>5B</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of fadd dword ptr [ebx+44]</Description>
      <Address>0045BAAA</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5BAAA</ModuleNameOffset>
      <Before>
        <Byte>DE</Byte>
        <Byte>C9</Byte>
        <Byte>D8</Byte>
        <Byte>4B</Byte>
        <Byte>4C</Byte>
      </Before>
      <Actual>
        <Byte>D8</Byte>
        <Byte>43</Byte>
        <Byte>44</Byte>
      </Actual>
      <After>
        <Byte>D9</Byte>
        <Byte>5B</Byte>
        <Byte>44</Byte>
        <Byte>D9</Byte>
        <Byte>05</Byte>
      </After>
    </CodeEntry>
    <CodeEntry>
      <Description>Change of fstp dword ptr [ebx+44]</Description>
      <Address>0045BAAD</Address>
      <ModuleName>ac_client.exe</ModuleName>
      <ModuleNameOffset>5BAAD</ModuleNameOffset>
      <Before>
        <Byte>4B</Byte>
        <Byte>4C</Byte>
        <Byte>D8</Byte>
        <Byte>43</Byte>
        <Byte>44</Byte>
      </Before>
      <Actual>
        <Byte>D9</Byte>
        <Byte>5B</Byte>
        <Byte>44</Byte>
      </Actual>
      <After>
        <Byte>D9</Byte>
        <Byte>05</Byte>
        <Byte>80</Byte>
        <Byte>E4</Byte>
        <Byte>4E</Byte>
      </After>
    </CodeEntry>
  </CheatCodes>
  <UserdefinedSymbols/>
</CheatTable>


 

Это таблица на Cheat engine для игры AssaultCube

Аим работает 100%

Я написал свой на СИ , кидать лайнокод соромно.

Короче работает так:

1)Ищешь кол-во игроков включая себя.

2)В этот игре Указатели на структуры идут по списку то есть смещение по 4.

3)Ищешь адреса координат по X,Y,Z у них одинаковые смещение от начала структуры.

4)Так же ищешь угол поворота камеры по X,Y.

5)Сравниваешь дистанцию от себя до врага циклом и выбираешь ближайшего 

6)Вычисляешь  сколько надо повернуть до врага и записываешь значение.

Вроде такая хурма

 

 

 

 

 

 

 

 

 

Изменено пользователем NubZilla
исправил
Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...

Важная информация

Находясь на нашем сайте, Вы автоматически соглашаетесь соблюдать наши Условия использования.