Page 1 of 1

MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 4:14 am
by lisa
Ok I don't know if I did something wrong but it really seems like when you have more than 1 offset in the readPtr it stops working.

Code: Select all

local stam = process.readPtr(proc, "int", (0x1AAB0000 + 0x5C1B8), {0x68}) -- 0x68, 0x210,0x5C8, 0x0, 0x464
		if stam then printf("0x%X\n",stam) else printf("stam not working\n") end
That print works fine as it is.
stam1.png

Code: Select all

local stam = process.readPtr(proc, "int", (0x1AAB0000 + 0x5C1B8), {0x68 ,0x210}) -- 0x68, 0x210,0x5C8, 0x0, 0x464
		if stam then printf("0x%X\n",stam) else printf("stam not working\n") end
That fails.
stam2.png
stam2.png (28.12 KiB) Viewed 10242 times
In the first pick you can see cheat engine on the side and the values it should be, the first offset works fine but when I add in another offset it fails, even just adding 0x0 it still fails

I tried
{0x68,0x210}
{0x68 , 0x210}
{0x68 ,0x210}
{0x68, 0x210}
Just in case for some reason the space was messing with it lol

Doing this works fine.

Code: Select all

local stam = process.readPtr(proc, "int", (0x1AAB0000 + 0x5C1B8), {0x68}) -- 0x68, 0x210,0x5C8, 0x0, 0x464
		stam = process.read(proc, "int", stam+0x210)
		stam = process.read(proc, "int", stam+0x5C8)
		stam = process.read(proc, "int", stam+0x0)
		stam = process.read(proc, "float", stam+0x464)
		if stam then printf("%d\n",stam) else printf("stam not working\n") end

Re: MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 6:36 am
by BlubBlab
This is admins version ?

Admin may check out the lua_next besides that I can't see any thing that can go wrong and I need sleep^^

Re: MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 2:49 pm
by Administrator
Trying to investigate this and stumbled upon an issue. Windows 10 has decided to corrupt the owner of micromacro.exe, preventing me from re-compiling it. Or deleting it. Or... anything. I can't even reset the owner to myself (even though it is inherited from a folder that I own). This is making it pretty difficult to actually do any testing.


Anyone seen this before? Have a fix for it that doesn't require me to reboot into Linux in order to fix the NTFS drive?

Re: MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 3:38 pm
by lisa
Sorry Admin, I don't have windows 10 so I couldn't say.

Re: MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 4:20 pm
by Administrator
Here's a fix that (should) work. I've only included the binaries; both 32 and 64 bit.

Re: MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 5:05 pm
by BlubBlab
Can you say what went wrong ?

Re: MM2 1.92.46 readptr

Posted: Mon Dec 07, 2015 5:25 pm
by Administrator
Logic error. It was due to the order of adding offset in. It was reading the address with each offset in sequence, should have been reading the address and then adding the offset to the result.

https://github.com/elverion/micromacro/ ... d831dfe91f

Re: MM2 1.92.46 readptr

Posted: Tue Dec 08, 2015 8:30 am
by lisa
Thanks I'll give it a test, unfortunately the pointers I had didn't hold up but yeah I'll give it a test anyway on another pointer.

--=== Added ===--
Tested micromacro.exe and it works fine =)