 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
kagato1980 Cheater
Reputation: 0
Joined: 30 Oct 2020 Posts: 30 Location: The netherlands
|
Posted: Fri Oct 01, 2021 4:07 am Post subject: Lua script for DosBox changing mem? |
|
|
For the game Mechwarrior 2 in dosbox, I've made some inifnite ammo cheats.
Problem is, with every restart or different career, the location of the missiles in memory keeps moving around.
I know some relative distances between values, for instance I wil always start with a setup where there are 2 missile slots with each having an ammo count of 120 (2 byte value), and those have a fixed offset from eachother in memory.
Could I make a Lua script that scans for these values/offsets in memory and fill the proper addresses in my addresslist?
I'm using a Lua script I found to get the current working mem location, but I don't have any experience with Lua.
Code: |
{$Lua}
if syntaxcheck then return end
[ENABLE]
for i,v in ipairs(enumMemoryRegions()) do
if v.RegionSize>=0x1001000 and v.AllocationProtect==4 then
unregisterSymbol('GameMemoryStart')
registerSymbol('GameMemoryStart',v.BaseAddress+0x20)
end
end
[DISABLE]
unregisterSymbol('GameMemoryStart')
|
|
|
Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3324
|
Posted: Fri Oct 01, 2021 7:52 am Post subject: |
|
|
Talk to these guys.
Personally, for DOS games, I use GameWizard32Pro.
|
|
Back to top |
|
 |
kagato1980 Cheater
Reputation: 0
Joined: 30 Oct 2020 Posts: 30 Location: The netherlands
|
Posted: Fri Oct 01, 2021 8:34 am Post subject: |
|
|
Csimbi wrote: | Talk to these guys.
Personally, for DOS games, I use GameWizard32Pro. |
Thanks, I'll check it out
|
|
Back to top |
|
 |
|
|
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
|
|