Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Lua script DVBM search To find Accessed addresses automatic

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
willremovelocker
How do I cheat?
Reputation: 0

Joined: 22 Jun 2024
Posts: 3

PostPosted: Sun Jul 21, 2024 7:43 pm    Post subject: Lua script DVBM search To find Accessed addresses automatic Reply with quote

I want help again or not. In cheat engine i use cheat table script to have a preset address of 35710C4C165 or somthing and the script will monitor that address to see what addresses it accesses. Now i know theres a feture in cheat engine that using DVBM Find what addresses this instruction accesses, I want the script to do it automaticly and log it BUT the address has multible addresses it accesses BUT!!! i want it to only get the address with the most counts so i was thinking using LUA to DVBM that address over 10 frames and determine what address has the most counts and only log that one. I made a script to do this but never works EVER. Can someone give me an example or complete script if possible. NO AUTO ASSEMBLY Only Cheat table. Please.

Ive now been working for a 2 hours on this and still cannot get it to work, The code was getting WAY to complex so i went back to the start that worked but you have to input the addresses.

The first 3 addresses are what gets automaticly set by the DVBM using a reference to where the addresses are. There is suposed to be another set of addresses that are the 3 DVBM addresses that are monitord and set the first 3 addresses by the values detected from the DVBM addresses.
The ADDR2 is set manualy and doesnt need anything else.
The offset is how far off the ADDR2 addresses are to the ADDR1. ADDR2 IS SET MANUALY I do that.

This is the first iteration of the script that works but cannot set the new addresses to the ADDR1 X Y Z automaticly and have to be set manualy and when they change after a short amount of time i have to go back in and change it. The DVBM addresses NEVER change and automaticly access the right addresses for ADDR1 but under a DIFERENT ADDRESS. OK


[code]
-- Define the addresses (replace these with your actual addresses)
local addr1_X = 0x20082FBE8D0 -- Replace with actual address for first X
local addr1_Y = 0x20082FBE8D4 -- Replace with actual address for first Y
local addr1_Z = 0x20082FBE8D8 -- Replace with actual address for first Z
local addr2_X = 0x200836FE8E0 -- Replace with actual address for second X
local addr2_Y = 0x200836FE8E4 -- Replace with actual address for second Y
local addr2_Z = 0x200836FE8E8 -- Replace with actual address for second Z

-- Define the offsets
local offset_X = 4.0
local offset_Y = -2.1
local offset_Z = 27.0

-- Function to update the second set of coordinates based on the first set and the offsets
local function updateCoordinates()
local x1 = readFloat(addr1_X)
local y1 = readFloat(addr1_Y)
local z1 = readFloat(addr1_Z)

local x2 = x1 + offset_X
local y2 = y1 + offset_Y
local z2 = z1 + offset_Z

print(string.format("Original X: %.2f, Y: %.2f, Z: %.2f", x1, y1, z1))
print(string.format("Offset X: %.2f, Y: %.2f, Z: %.2f", x2, y2, z2))

writeFloat(addr2_X, x2)
writeFloat(addr2_Y, y2)
writeFloat(addr2_Z, z2)

print(string.format("Updated X: %.2f, Y: %.2f, Z: %.2f", readFloat(addr2_X), readFloat(addr2_Y), readFloat(addr2_Z)))
end

-- Timer to update the coordinates every 0.5 seconds
local timer = createTimer(nil, false)
timer.Interval = 50 -- 0.5 seconds
timer.OnTimer = updateCoordinates
timer.setEnabled(true)

-- Print a message to indicate the script is running
print("Script is running. Updating coordinates every 0.5 seconds...")

-- Function to stop the script
local function stopScript()
timer.setEnabled(false)
print("Script stopped.")
end

-- Register a hotkey to stop the script (F12 in this example)
createHotkey(stopScript, VK_F12)
[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites