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 


[solved] How do i put these pointers into CE Table ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Zaladine
Expert Cheater
Reputation: 3

Joined: 14 Oct 2012
Posts: 129
Location: Djokdja, Indonesia

PostPosted: Tue Nov 12, 2013 7:11 am    Post subject: [solved] How do i put these pointers into CE Table ? Reply with quote

Hello...

In an Strategy-RPG game, i have this pointers trail for my char's HP Regen address:
[[["GameModule.exe"+AB7788]+0xC]+0x2FB94]+0x7C

The 0x2FB94 offset, by debugging, was actually got from (eax*8 )+4 of which eax = 0x5F72, so the pointer was in fact:
[[["GameModule.exe"+AB7788]+0xC]+(0x5F72*0x8)+0x4]+0x7C

This 0x5F72 variable, however, was obtainable by another following pointers trail:
[["GameModule.exe"+A9A858]+0x238]+0xA0

.......

So, in conclusion, the Multi-level Pointers Trail to point to my HP Regen address is:
[[["GameModule.exe"+AB7788]+0xC]+([[["GameModule.exe"+A9A858]+0x238]+0xA0]*0x8)+0x4]+0x7C

My question is: how do i put that multi-level pointers trail in CE table?

FYI, I'm using CE 6.3 and have never had difficulties to make a pointer-based table entry. However, i only know very
limited ASM and scripting. So, i prefer and expect simple CE table solution if possible.

Thank you very much in advance for any helps...

_________________
... to boldly go where no eagle has gone before ...


Last edited by Zaladine on Tue Nov 12, 2013 10:21 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Tue Nov 12, 2013 8:35 am    Post subject: Reply with quote

It doesn't really fit in a cheat table entry

What you can do is use a code injection, or lua script

for lua script something like this could work in a timer:
Code:

offset=readInteger('[["GameModule.exe"+A9A858]+0x238]+0xA0')*8+4; --calculate the offset (result is an integer)
offsetstring=string.format("%x", offset)  --convert the integer to hexadecimal notation

addressString='[[["GameModule.exe"+AB7788]+0xC]+'..offsetstring..']+0x7C'  --build the addressString

currentAddress=getAddress(addressString)


And then use currentAddress to either update a specific entry in the table, or use writeInteger/writeFloat yourself

_________________
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
View user's profile Send private message MSN Messenger
Zaladine
Expert Cheater
Reputation: 3

Joined: 14 Oct 2012
Posts: 129
Location: Djokdja, Indonesia

PostPosted: Tue Nov 12, 2013 9:55 am    Post subject: Reply with quote

Thanks for fast reply, Dark Byte.

Though limited, I'm quite familiar with code-injection that i may be able to
resolve it. Yet, i know next to nothing about LUA and its integration to CE.

So could you or anyone please point me to the right direction for newbies?
I mean: where do i start scripting, and what the output would be? A table
entry constructed using LUA or else? Any link to its tutorial will do...

I guess this is a good time to start learning about LUA scripting with CE.

Again, thank you very much in advance.

_________________
... to boldly go where no eagle has gone before ...
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Nov 12, 2013 10:16 am    Post subject: Reply with quote

http://www.lua.org/manual/5.1/manual.html
http://forum.cheatengine.org/viewforum.php?f=125
http://forum.cheatengine.org/viewforum.php?f=126
http://forum.cheatengine.org/viewtopic.php?t=566876 (simple Lua debugger, very limited debugger)

Advise, always test your Lua script with "print" function.

_________________


Last edited by mgr.inz.Player on Tue Nov 12, 2013 10:21 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Zaladine
Expert Cheater
Reputation: 3

Joined: 14 Oct 2012
Posts: 129
Location: Djokdja, Indonesia

PostPosted: Tue Nov 12, 2013 10:21 am    Post subject: Reply with quote

Alright... Gonna visit those link soon... Thanks a lot.
For now my problem can be considered as solved.

Smile

_________________
... to boldly go where no eagle has gone before ...
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Nov 12, 2013 10:23 am    Post subject: Reply with quote

I forgot to mention, open main.lua file inside CheatEngine, it is a document file (list of CE specific functions and variables).

Don't hesitate to ask questions, me, DaSpamer and others surely can help.

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Tue Nov 12, 2013 10:33 am    Post subject: This post has 1 review(s) Reply with quote

here's a small example I put together. It can be made nicer, but I hope you get the idea.

When the table loads, and you execute the lua code in it, it will launch a timer that will evaluate the pointers and update the address of the entry named "bla" (if the address is valid)

The script can be found in table->show cheat table lua script

There is currently a bug in ce where setting the address will have a delay of up to 10 seconds before it takes effect



example.ct
 Description:

Download
 Filename:  example.ct
 Filesize:  1.79 KB
 Downloaded:  626 Time(s)


_________________
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
View user's profile Send private message MSN Messenger
Zaladine
Expert Cheater
Reputation: 3

Joined: 14 Oct 2012
Posts: 129
Location: Djokdja, Indonesia

PostPosted: Tue Nov 12, 2013 10:46 am    Post subject: Reply with quote

mgr.inz.Player wrote:
I forgot to mention, open main.lua file inside CheatEngine, it is a document file (list of CE specific functions and variables).
Don't hesitate to ask questions, me, DaSpamer and others surely can help.


Many thanks, mgr.inz.Player.

I'll learn LUA soon since it seems (surely) offers limitless possibility in hacking games. At which i won't hesitate to ask questions...


Dark Byte wrote:
here's a small example I put together. It can be made nicer, but I hope you get the idea.

Big thanks, Dark Byte.

It could be the very first thing i need to get the basic idea of LUA usage in CE...

Smile

_________________
... to boldly go where no eagle has gone before ...
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 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