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 


Add an address to the table via script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
iafale
How do I cheat?
Reputation: 0

Joined: 11 May 2020
Posts: 2

PostPosted: Mon May 11, 2020 1:04 am    Post subject: Add an address to the table via script Reply with quote

Hello everyone! I'm a new user and i'm also new with script (unfortunately).

I can easily find the address i need (the value is encrypted and the only way is changed/unchanged value a lot of times).
Try to find a static address is not a valid way (the game work with lua and the address change without restart the application (if i understand correctly... Rolling Eyes )).
But, i found an alternative way to find the address immediately:
place a break point on

mov [ecx],eax

ecx is the address i am looking for, eax is the new value. Obviously is a shared code, and if I give as a condition on the break point:

EBP==0xFFFFFFFB and EDI-ESI==0x6C

Here we are

Now, the question is:
is there a way to do all this through a script and directly add the address (ecx) to the cheat engine table?


I hope i explained myself correctly and sorry for my english. Thanks in advance to all those who will reply.
Back to top
View user's profile Send private message
blankTM
Cheater
Reputation: 1

Joined: 03 May 2020
Posts: 49

PostPosted: Mon May 11, 2020 9:50 am    Post subject: Re: Add an address to the table via script Reply with quote

Replace 0x05C03953 with mov [ecx], the address where eax is located



Code:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="31">
  <CheatEntries>
    <CheatEntry>
      <ID>11</ID>
      <Description>"initialization"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{$lua}
if syntaxcheck then return end
[ENABLE]
debug_setBreakpoint(0x05C03953,function()
  if EBP ==0xFFFFFFFB and EDI-ESI == 0X6C then
   _value=ECX
  end
end)


[DISABLE]
debug_removeBreakpoint(0x05C03953)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>12</ID>
          <Description>"value"</Description>
          <VariableType>4 Bytes</VariableType>
          <Address>_value</Address>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
Back to top
View user's profile Send private message
iafale
How do I cheat?
Reputation: 0

Joined: 11 May 2020
Posts: 2

PostPosted: Mon May 11, 2020 1:35 pm    Post subject: Reply with quote

Hi blankTM Smile thank you so much for your answer.
I tried your code and it works great. if i can take advantage of your kindness, would you have any good books to recommend?
I found "Programming in Lua, fourth edition by Roberto Ierusalimschy"
And I'd like to have an opinion

Thanks again

Edit:
keep in mind that i am a novice
Back to top
View user's profile Send private message
blankTM
Cheater
Reputation: 1

Joined: 03 May 2020
Posts: 49

PostPosted: Mon May 11, 2020 7:08 pm    Post subject: Reply with quote

iafale wrote:
Hi blankTM Smile thank you so much for your answer.
I tried your code and it works great. if i can take advantage of your kindness, would you have any good books to recommend?
I found "Programming in Lua, fourth edition by Roberto Ierusalimschy"
And I'd like to have an opinion

Thanks again

Edit:
keep in mind that i am a novice


I can't send the address
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 Lua Scripting 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