|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Alamer99 Expert Cheater Reputation: 1
Joined: 04 Jan 2015 Posts: 136
|
Posted: Sun Jan 04, 2015 6:52 am Post subject: Changing a Value's Address Using script? |
|
|
Hey Everyone So This Is my first post around here hopefully someone would help me
i was wondering if i can change a value's address (stored in the ct table description is health for example) constantly or at least after a fight is over using lua
if you ask why is that needed just find a pointer?
then the game (actually ps2 game emulated through ps2 emulator) has no pointer for a value so
every single address for every single fighter in every single chapter
that means atleast 100 addresses lol
i found a semi-pointer thingy (aob scan result)+offset= current character health so a lua script to change/update result?
edit: after some searching i did this but its not adding the address to the list?
Code: | function aobs()
dh=createMemScan()
memscan_firstScan(dh,soExactValue,vtByteArray,rtTruncated,"4F 50 52 54 0? 00","" , "21860000", "21A2FFFF", "", fsmNotAligned, "", true, false, false, false)
memscan_waitTillDone(dh)
dhfl=createFoundList(dh)
foundlist_initialize(dhfl)
local count=foundlist_getCount(dhfl)
if (count<1) then
local p1static=foundlist_getAddress(dhfl, 0)
local p2static=foundlist_getAddress(dhfl, 1)
local p1slot=p1static.."+ac+2f4"
local p2slot=p2static.."+ac+2f4"
print("Adding Health Address to the list")
end
local al=getAddressList()
local mr=addresslist_createMemoryRecord(al)
memoryrecord_setDescription(mr,"Health P1")
memoryrecord_setAddress(mr, p1static.."+ac+a4*"..p1slot)
memoryrecord_setType(mr, vtDword)
end |
no errors but no address is added to the list
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun Jan 04, 2015 2:28 pm Post subject: |
|
|
1: that's really old syntax (it's now dh.firstScan(soExactValue,..... etc...)
2: you're checking if count is smaller than 1 (so 0). You probably want >
3: you do +ac+2f4 why not +3a0 ?
Did you intend on using it like a pointer ?
If so, you may want to set the record up as a pointer instead
Code: |
mr=getAddressList().createMemoryRecord()
mr.Address=p1static
mr.OffsetCount=2
mr.Offset[1]=0xac
mr.Offset[2]=0x2f4
mr.Description="Health P1"
|
It may be easier to just have a pre-existing entry in the addresslist where you just edit the baseaddress. (just change mr.Address to the new p1static)
if it is a dynamic offset, you may want to use readInteger to read the value (or readBytes if it's a 2 byte)
4: You declare the function aobs. Do you call it as well ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Alamer99 Expert Cheater Reputation: 1
Joined: 04 Jan 2015 Posts: 136
|
|
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
|
|