Skip to content

Commit

Permalink
update docs with sig_scan example
Browse files Browse the repository at this point in the history
  • Loading branch information
Loomeh committed Jul 14, 2024
1 parent 2376ebb commit 164a019
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/auto-splitters.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,30 @@ Returns:
* Note: Until the address is found, sig_scan returns a 0.
* Note: Signature scanning is an expensive action. So, once an address has been found, it's recommended to reassign the sig_scan variable with the result of the sig_scan function to stop the scanning.


Mini example script with the game SPRAWL:
```lua
process('Sprawl-Win64-Shipping.exe')

local featuretest = 0

function state()
-- Perform the signature scan to find the initial address
featuretest = sig_scan("89 5C 24 ?? 89 44 24 ?? 74 ?? 48 8D 15", 4)

if featuretest == 0 then
print("Signature scan did not find the address.")
else
-- Read an integer value from the found address
local readValue = readAddress('int', 'Sprawl-Win64-Shipping.exe', featuretest)
print("Feature test address: ", featuretest)
print("Read value: ", readValue)
end
end
```



## getPID
* Returns the current PID

Expand Down

0 comments on commit 164a019

Please sign in to comment.