Page 1 of 1

Faster script activating

Posted: Sat Apr 16, 2022 8:53 pm
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)

Re: Faster script activating

Posted: Sat Apr 16, 2022 9:18 pm
by LeFiXER
aobscanregion and use a smaller AOB.

Re: Faster script activating

Posted: Sat Apr 16, 2022 9:37 pm
by patka
I don't know how aobscanregion work

Re: Faster script activating

Posted: Sun Apr 17, 2022 2:15 am
by BabyGroot
patka wrote:
Sat Apr 16, 2022 9:37 pm
I don't know how aobscanregion work
read this : [Link]

Re: Faster script activating

Posted: Fri Apr 22, 2022 10:07 pm
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..

Re: Faster script activating

Posted: Sun Apr 24, 2022 7:51 am
by patka
Thanks for the help, but I’m a pretty beginner and I’m not very good at things like that

Re: Faster script activating

Posted: Mon Apr 25, 2022 10:32 pm
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)

Re: Faster script activating

Posted: Wed Apr 27, 2022 8:28 am
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

Re: Faster script activating

Posted: Sat Jun 11, 2022 8:23 am
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.

Re: Faster script activating

Posted: Sat Jul 23, 2022 5:45 am
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.