Faster script activating

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
patka
Table Makers
Table Makers
Posts: 212
Joined: Sun Jul 05, 2020 11:09 am
Reputation: 229

Faster script activating

Post by patka »

Hi!
I wrote a script for the Elden Ring whose job is to detect if I have an Crossbow and don’t need to reload it. It works properly, the only problem is that it activates very slowly. It takes about 1.5 to 2 minutes. How can I speed up this process?
Could someone help me?

This is the script:

Code: Select all

[ENABLE]
aobscan(arraystart,?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 ?? 00 00 00 00 00 00 00 00 88 72 ?? ?? ?? 7F 00 00 ?? 00 00 00 ?? 00 00 00 ?? 00 00 00 ?? 00 00 00 ?? 00 00 00 ?? 00 00 00 ?? 00 00 00 ?? ?? 80 80 ?? ?? ?? 80 ?? ?? 80 80 ?? ?? 80 80 ?? ?? ?? 80 ?? ?? ?? 80 ?? ?? 80 80 ?? ?? 80 80 ?? ?? 80 80 ?? ?? 80 80 00 00 00 00 00 00 00 00 ?? ?? 80 90 ?? ?? 80 90 ?? ?? 80 90 ?? ?? 80 90 00 00 00 00 ?? ?? 00 ?? ?? ?? 00 ?? ?? ?? 00 ?? 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 80 F0 FA 02 ?? ?? ?? 03 C0 8C FB 02 ?? ?? 1A 03 FF FF FF FF FF FF FF FF 90 23 0B 00 ?? ?? ?? 00 ?? ?? ?? 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF)
registersymbol(_special)
label(_special)

arraystart+100:
_special:
 
[DISABLE]
unregistersymbol(_special)

User avatar
LeFiXER
LeFixer
LeFixer
Posts: 479
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 242

Re: Faster script activating

Post by LeFiXER »

aobscanregion and use a smaller AOB.

User avatar
patka
Table Makers
Table Makers
Posts: 212
Joined: Sun Jul 05, 2020 11:09 am
Reputation: 229

Re: Faster script activating

Post by patka »

I don't know how aobscanregion work

User avatar
BabyGroot
Table Makers
Table Makers
Posts: 1307
Joined: Sun Mar 29, 2020 1:39 pm
Reputation: 2125

Re: Faster script activating

Post by BabyGroot »

patka wrote:
Sat Apr 16, 2022 9:37 pm
I don't know how aobscanregion work
read this : [Link]

User avatar
SunBeam
Administration
Administration
Posts: 4704
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4287

Re: Faster script activating

Post by SunBeam »

Instead of using scanners that query the entire memory, why don't you learn to debug and find out how to reach your spot without scanning?.. Like I said, learn to debug and trace code, then make logical deductions, establish pointer paths and correlations between various structures. Then you won't need to scan for shit..

User avatar
patka
Table Makers
Table Makers
Posts: 212
Joined: Sun Jul 05, 2020 11:09 am
Reputation: 229

Re: Faster script activating

Post by patka »

Thanks for the help, but I’m a pretty beginner and I’m not very good at things like that

SarashJessicaParker
Expert Cheater
Expert Cheater
Posts: 59
Joined: Sat Sep 21, 2019 4:21 pm
Reputation: 41

Re: Faster script activating

Post by SarashJessicaParker »

Here is an example of aobScanRegion all you need is your array name(array1) the starting address(21EE08BFC2C) and the ending address (2FFFFFFFFFF) followed by your array of bytes.(00 00 00 00 10 3C 5D 33 21 00 00 00 88 FC 5D 33) I personally love this method because it does make enabling the script faster, but if it's not inbetween those addresses it wont enable at all. So pay attention to maybe the first 2 or 3 digits of the addresses you have on your table and see if they look simialr. That should help you out tremendously. lets say we have 3 address they are all 8 digits long and they all beginning with 431 this would make your strarting address(43100000) and your ending address(431FFFFF)
[ENABLE]
aobScanRegion(array1, 21EE08BFC2C, 2FFFFFFFFFF, 00 00 00 00 10 3C 5D 33 21 00 00 00 88 FC 5D 33)
registersymbol(cheats1234)
label(cheats1234)

array1+2AC:
cheats1234:

[DISABLE]
unregistersymbol(cheats1234)

User avatar
patka
Table Makers
Table Makers
Posts: 212
Joined: Sun Jul 05, 2020 11:09 am
Reputation: 229

Re: Faster script activating

Post by patka »

SarashJessicaParker wrote:
Mon Apr 25, 2022 10:32 pm
Here is an example of aobScanRegion all you need is your array name(array1) the starting address(21EE08BFC2C) and the ending address (2FFFFFFFFFF) followed by your array of bytes.(00 00 00 00 10 3C 5D 33 21 00 00 00 88 FC 5D 33) I personally love this method because it does make enabling the script faster, but if it's not inbetween those addresses it wont enable at all. So pay attention to maybe the first 2 or 3 digits of the addresses you have on your table and see if they look simialr. That should help you out tremendously. lets say we have 3 address they are all 8 digits long and they all beginning with 431 this would make your strarting address(43100000) and your ending address(431FFFFF)
[ENABLE]
aobScanRegion(array1, 21EE08BFC2C, 2FFFFFFFFFF, 00 00 00 00 10 3C 5D 33 21 00 00 00 88 FC 5D 33)
registersymbol(cheats1234)
label(cheats1234)

array1+2AC:
cheats1234:

[DISABLE]
unregistersymbol(cheats1234)
Thank You very much!!! This method is working very well

User avatar
SunBeam
Administration
Administration
Posts: 4704
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4287

Re: Faster script activating

Post by SunBeam »

^ And if someone else wants to use that code and their address is not in that region.. they have to always change the code, right? This seems like a one time solution for 1 single user and their 1 installation of the game on a specific OS which maps the code to that specific region. The reproducibility of this logic for other people or OSes is close to zero.

hcapinjr
Novice Cheater
Novice Cheater
Posts: 15
Joined: Wed Oct 21, 2020 11:27 am
Reputation: 4

Re: Faster script activating

Post by hcapinjr »

I agree with SunBeam.. Try using the cheat engine tutorials.. Not so often seen but they are educational when first learning game hacks and reverse engineering a game in general.

Post Reply

Who is online

Users browsing this forum: No registered users