Hello.
I have a problem with writing a script.
The problem is with saving and restoring bytes - I don't know how to do it.
I have static green address, but in this address the bytes are constantly changing after every restart the game so I can't make normal AOB or CJ script because after resetting the game, they bytes will be totally new and my script will not find anymore the bytes.
If anyone can share any example and explain it, i will be very thankful.
Best regards,
Marta
How to save and restore constantly changing bytes in static address?
-
- Expert Cheater
- Posts: 312
- Joined: Sat Oct 06, 2018 3:19 pm
- Reputation: 137
-
- Expert Cheater
- Posts: 852
- Joined: Fri Oct 12, 2018 10:25 pm
- Reputation: 896
Re: How to save and restore constantly changing bytes in static address?
You can always try (if you didn't already) to do an AOB of nearby bytes that are not changing.
-
- Expert Cheater
- Posts: 312
- Joined: Sat Oct 06, 2018 3:19 pm
- Reputation: 137
Re: How to save and restore constantly changing bytes in static address?
You don't understand. I must use the address with changing dynamic Bytes. I just wanna know how to save Bytes to restore them after disable script
Re: How to save and restore constantly changing bytes in static address?
alloc some bytes+registersymbol and use [Link] to this symbol, also readMem this symbol at [DISABLE]
-
- Expert Cheater
- Posts: 312
- Joined: Sat Oct 06, 2018 3:19 pm
- Reputation: 137
Re: How to save and restore constantly changing bytes in static address?
Can you share any example? I need to see full script
Re: How to save and restore constantly changing bytes in static address?
Code: Select all
aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8) // should be unique
alloc(newmem,$1000)
alloc(origSet,6)
registersymbol(origSet)
label(code)
label(return)
origSet:
readmem(aobSetEff,6)
newmem:
code:
db 23 8D
readmem(aobSetEff+2,4)
jmp return
aobSetEff:
jmp newmem
nop
return:
registersymbol(aobSetEff)
[DISABLE]
aobSetEff:
readmem(origSet,6)
unregistersymbol(aobSetEff)
dealloc(newmem)
-
- Expert Cheater
- Posts: 312
- Joined: Sat Oct 06, 2018 3:19 pm
- Reputation: 137
Re: How to save and restore constantly changing bytes in static address?
Ok, thanks for the example. I have 2 questions
You have in your example: aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8)
and also you have: readmem(aobSetEff+2,4) <---- this means that it will save 4 BYTES in place in memory = aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8) + 2 BYTES next? Am I right?
If you will have for example : readmem(aobSetEff+4F,23) <--- this will mean that it will save 23 BYTES in place in memory = aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8) + 79 BYTES next? Am I right? [79 bytes because it is the same number like 4F in HEX)
You have in your example: aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8)
and also you have: readmem(aobSetEff+2,4) <---- this means that it will save 4 BYTES in place in memory = aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8) + 2 BYTES next? Am I right?
If you will have for example : readmem(aobSetEff+4F,23) <--- this will mean that it will save 23 BYTES in place in memory = aobscanmodule(aobSetEff,noita.exe,23 8D ?? ?? ?? ?? 3B C8) + 79 BYTES next? Am I right? [79 bytes because it is the same number like 4F in HEX)
Re: How to save and restore constantly changing bytes in static address?
readmem(aobSetEff+2,4)
copies 4 bytes to the allocated mem to restore the stolen bytes
aobSetEff = 23
aobSetEff+1 = 8D
aobSetEff+2 = ?? - - - > first byte copie
definition of readMem:
readMem(Address, Size)
the first parameter is the address to start reading(and you can give an offset+) , second one is size.
aob_address+4F = start 79 bytes next to it yes.
Edit : readmem will only work if the address is absolute.
if its something like jump equal / jump not equal +5 then it wont work coz you are jumping in the allocated memory.
but for cases like this you can use [Link] or with an another aob to find the address to recreate the jump.
copies 4 bytes to the allocated mem to restore the stolen bytes
aobSetEff = 23
aobSetEff+1 = 8D
aobSetEff+2 = ?? - - - > first byte copie
yesAm I right? [79 bytes because it is the same number like 4F in HEX)
definition of readMem:
readMem(Address, Size)
the first parameter is the address to start reading(and you can give an offset+) , second one is size.
aob_address+4F = start 79 bytes next to it yes.
Edit : readmem will only work if the address is absolute.
if its something like jump equal / jump not equal +5 then it wont work coz you are jumping in the allocated memory.
but for cases like this you can use [Link] or with an another aob to find the address to recreate the jump.
Who is online
Users browsing this forum: No registered users