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 


How do I speed up the code change while cheating?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Mon Feb 26, 2018 11:21 am    Post subject: How do I speed up the code change while cheating? Reply with quote

I use simple Scripts for code exchange.
Sometimes there can be 5-6 codes in a single Script.
Below is an example.
How can I speed up the code change?
For this; Is there a Lua for Timer, SpeedHack or Autorun?

Code:
[ENABLE]
LuaCall(Aobswap("?? ?? ?? ?? 0? 04 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
LuaCall(Aobswap("?? ?? ?? ?? 0? 05 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
LuaCall(Aobswap("?? ?? ?? ?? 0? 06 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
LuaCall(Aobswap("?? ?? ?? ?? 0? 07 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
LuaCall(Aobswap("?? ?? ?? ?? 0? 08 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
LuaCall(Aobswap("?? ?? ?? ?? 0? 10 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
LuaCall(Aobswap("?? ?? ?? ?? 0? 0E 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?", "?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63"))
[DISABLE]



There must be a 5-6 code change with one button.
And is it possible to accelerate this change?
Thank you in advance for your answers and participation.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon Feb 26, 2018 11:59 am    Post subject: Reply with quote

Don't use Lua; use the AA aobscan. It'll add all signatures to a list and do a single-pass scan for all of them at once (IIRC).

If you insist on Lua, you could restrict the search regions (e.g. range / memory protection / alignment) and use a better signature.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Mon Feb 26, 2018 12:58 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Don't use Lua; use the AA aobscan. It'll add all signatures to a list and do a single-pass scan for all of them at once (IIRC).

If you insist on Lua, you could restrict the search regions (e.g. range / memory protection / alignment) and use a better signature.


Thanks Master.

Would you give an example AA that contains the codes above?
I do not code in Lua. All codes are enabled in AAScript.
If the master can create an AA record with these 6 codes,
the example would be more appropriate.
or how can this example cover all of the code?


Code:
define(bytes, ?? ?? ?? ?? 0? 04 00 00 00 01 00 00 00 ??)

[ENABLE]
aobScan(aobMovesHook, ?? ?? ?? ?? 0? 04 00 00 00 01 00 00 00 ?? 00 00 00 00 00 00 00 ?? ?C ?? ?? 0?)
define(injMovesHook, aobMovesHook)
assert(injMovesHook, bytes)
registerSymbol(injMovesHook)


injMovesHook:
   db ?? ?? ?? ?? ?? ?? 00 00 00 01 00 00 00 63



[DISABLE]

injMovesHook:
   db bytes

unregisterSymbol(injMovesHook)

In that case,
there should be a sample template that can be multi-encoded. Rolling Eyes

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon Feb 26, 2018 1:11 pm    Post subject: Reply with quote

Just put multiple calls to aobscan in the same script.
Code:
[ENABLE]
aobscan(sym1,00 01 00 00)
aobscan(sym2,00 02 00 00)
aobscan(sym3,00 03 00 00)
aobscan(sym4,00 04 00 00)
aobscan(sym5,00 05 00 00)
aobscan(sym6,00 06 00 00)

registerSymbol(sym1)
// etc...

sym1:
  db replaceBytes1
// etc...

[DISABLE]
sym1:
  db originalBytes1
// etc...

unregisterSymbol(sym1)
// etc...

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Mon Feb 26, 2018 2:38 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Just put multiple calls to aobscan in the same script.
Code:
[ENABLE]
aobscan(sym1,00 01 00 00)
aobscan(sym2,00 02 00 00)
aobscan(sym3,00 03 00 00)
aobscan(sym4,00 04 00 00)
aobscan(sym5,00 05 00 00)
aobscan(sym6,00 06 00 00)

registerSymbol(sym1)
// etc...

sym1:
  db replaceBytes1
// etc...

[DISABLE]
sym1:
  db originalBytes1
// etc...

unregisterSymbol(sym1)
// etc...


The script unfortunately did not work.
I tried the codes manually, it works.
But he does not act as a script.

The example address I used.
What is your advice, master? Smile


Code:
[ENABLE]
aobscan(sym1,02 00 00 00 02 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 01)
aobscan(sym2,03 00 00 00 03 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 01)
aobscan(sym3,04 00 00 00 04 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 01)
aobscan(sym4,05 00 00 00 05 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 01)
aobscan(sym5,06 00 00 00 06 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 01)
aobscan(sym6,07 00 00 00 07 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 00 01)

registerSymbol(sym1)
registerSymbol(sym2)
registerSymbol(sym3)
registerSymbol(sym4)
registerSymbol(sym5)
registerSymbol(sym6)


sym1:
  db DC 05 00 00 DC 05
sym2:
  db DC 05 00 00 DC 05
sym3:
  db DC 05 00 00 DC 05
sym4:
  db DC 05 00 00 DC 05
sym5:
  db DC 05 00 00 DC 05
sym6:
  db DC 05 00 00 DC 05


[DISABLE]
sym1:
  db ?? ?? ?? ?? ?? ?? ?? ??
sym2:
  db ?? ?? ?? ?? ?? ?? ?? ??
sym3:
  db ?? ?? ?? ?? ?? ?? ?? ??
sym4:
  db ?? ?? ?? ?? ?? ?? ?? ??
sym5:
  db ?? ?? ?? ?? ?? ?? ?? ??
sym6:
  db ?? ?? ?? ?? ?? ?? ?? ??
unregisterSymbol(sym1)
unregisterSymbol(sym2)
unregisterSymbol(sym3)
unregisterSymbol(sym4)
unregisterSymbol(sym5)
unregisterSymbol(sym6)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon Feb 26, 2018 7:57 pm    Post subject: Reply with quote

Aylin wrote:
The script unfortunately did not work.

Make sure every signature is unique (i.e. scanning all memory should only return 1 result for each pattern). Other than that, you'll need to be more specific.


Also, in the disable section, you should undo what you did in the enable section. Otherwise, it won't find those values again.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Mon Feb 26, 2018 9:40 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Aylin wrote:
The script unfortunately did not work.

Make sure every signature is unique (i.e. scanning all memory should only return 1 result for each pattern). Other than that, you'll need to be more specific.


Also, in the disable section, you should undo what you did in the enable section. Otherwise, it won't find those values again.



The problem is there, Master. Smile
1) Each code above has 1000 results.
2) Taking back the changed results again confuses other risky codes.
That's why there are 6 codes and 6000 results.
I need to accelerate this change.
In the example I gave at the top, the change lasts for about 1 minute.
and it's impossible for codes to go back.
6 code, when combined in the same figure,
I do not think I can distribute the single figure to 6. Wink

Thank you for your time, master.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon Feb 26, 2018 10:08 pm    Post subject: Reply with quote

The AA aobscan assumes the signature is unique, so that just leaves Lua.

As I said previously, you can change the memory protection flags and alignment to suit your needs. That signature looks like values to me, so you can probably use "+W-C" and an alignment of 4 (or higher). If you know the memory region the values must be in, you can use a memscan to specify that.

Use Google to find examples- there are plenty on CEF.

If you don't actually need to change all of those thousands of values, you should not scan and replace all of them. Instead, find a pointer to the right value(s) or use code injection.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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