 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
jakeyao83 How do I cheat?
Reputation: 0
Joined: 09 Sep 2020 Posts: 6
|
Posted: Thu Feb 17, 2022 9:29 pm Post subject: Why do two variables in the table work at the same time? |
|
|
Hello everyone, I have a question, in this script "movss xmm0,[rax+rcx*8+0C]" is accessed by many data.
I would like to add one more data (register r14=0326) to the script by referring to the script way on this forum.
I copied a command, but it didn't work. Please help me to modify this script, thanks.
I am a beginner of CE, I hope you can give some advice.
I have a question that has never been clear, why the two variables "weaponspeed" and "weaponpro.." in this script can work at the same time.
I copied this part and wanted to add the data associated with register r14=0326, but the script doesn't work properly.
label(code)
label(return)
label(weaponSpeed)
label(weaponProjectiles)
label(weaponcoo)
newmem:
mov rsi,weaponPtr
cmp [rsi+10],rax
jne code
cmp r14d,0133
jne @f
mov rsi,weaponSpeed
cmp dword ptr [rsi],0
je code
movss xmm0,[rsi]
jmp return
@@:
cmp r14d,0295
jne @f
mov rsi,weaponProjectiles
cmp dword ptr [rsi],0
je code
movss xmm0,[rsi]
jmp return
@@:
cmp r14d,0326
jne @f
mov rsi,weaponcoo
cmp dword ptr [rsi],0
je code
movss xmm0,[rsi]
jmp return
code:
movss xmm0,[rax+rcx*8+0C]
jmp return
align 10
weaponSpeed:
dd 0
align 10
weaponProjectiles:
dd 0
align 10
weaponcoo:
dd 0
bundle:
jmp newmem
nop
return:
registersymbol(bundle)
registersymbol(weaponSpeed)
registersymbol(weaponProjectiles)
registersymbol(weaponcoo)
[DISABLE]
bundle:
db F3 0F 10 44 C8 0C
unregistersymbol(bundle)
unregistersymbol(weaponSpeed)
unregistersymbol(weaponProjectiles)
unregistersymbol(weaponcoo)
dealloc(newmem)
|
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Fri Feb 18, 2022 7:40 am Post subject: Re: Why do two variables in the table work at the same time? |
|
|
| jakeyao83 wrote: | Hello everyone, I have a question, in this script "movss xmm0,[rax+rcx*8+0C]" is accessed by many data.
I would like to add one more data (register r14=0326) to the script by referring to the script way on this forum.
|
This isn't a question, it's a request. Although, personally I am finding it difficult to make sense of what you're requesting.
| jakeyao83 wrote: |
I copied a command, but it didn't work. Please help me to modify this script, thanks.
|
What command did you copy? It would help to go through the basis of Cheat Engine via the tutorial to ensure you have a firm grasp of the basics before trying to compile your own fully fledged scripts.
| jakeyao83 wrote: |
I am a beginner of CE, I hope you can give some advice.
|
As previously noted, it's wise to complete the basics as you also stated that you are a beginner. The tutorial can be found via the help menu within Cheat Engine.
| jakeyao83 wrote: |
I have a question that has never been clear, why the two variables "weaponspeed" and "weaponpro.." in this script can work at the same time.
|
A label is an identifier within a script that Cheat Engine can refer to when using logic within a script for example:
| Code: |
label(newcode)
label(mysection)
newcode:
cmp [register+offset],0
jne mysection
// instructions to execute should the value held at [register+offset] equal anything but zero.
mysection:
// instructions you want to execute if value held at [register+offset] equals zero
|
| jakeyao83 wrote: |
I copied this part and wanted to add the data associated with register r14=0326, but the script doesn't work properly.
|
I am not condoning theft of someone else's script, so I will only explain a bit about what's happening.
| Code: |
label(code)
label(return)
label(weaponSpeed)
label(weaponProjectiles)
label(weaponcoo)
newmem:
mov rsi,weaponPtr // Move the address weaponPtr into RSI
cmp [rsi+10],rax // Compare the value held at [RSI+10] to the value held in RAX
jne code // If the condition is not equal, jump to the code block
cmp r14d,0133 // Compare the value held in R14D with the value 0133 (hex)
jne @f // If not equal then jump forward to the next block (@@:)
mov rsi,weaponSpeed // Move the address weaponSpeed into RSI
cmp dword ptr [rsi],0 // Compare value held at [RSI]. If the value is 0 then
je code // Jump to the code block
movss xmm0,[rsi] // Otherwise move the value held at [RSI] into the xmm0 register
jmp return // Jump to return block
@@:
cmp r14d,0295 // Compare R14D with the value 0295 (hex)
jne @f // If the condition is not equal, jump forward to the next block (@@:)
mov rsi,weaponProjectiles // Move the address weaponProjectiles into RSI
cmp dword ptr [rsi],0 // Compare the value held at [RSI], if the value equals 0 then
je code // Jump to code block
movss xmm0,[rsi] // Otherwise move the value held at [RSI] into the xmm0 register
jmp return // Jump to return block
@@:
cmp r14d,0326 // Compare R14D with the value 0326 (hex)
jne @f // If not equal then jump forward to the next block (I am not sure if @f will jump to the code block or a "@@:" block has to be specified)
mov rsi,weaponcoo // Move the address weaponcoo into RSI
cmp dword ptr [rsi],0 // Compare value held at [RSI]. If the value is 0 then
je code // Jump to the code block
movss xmm0,[rsi] // Otherwise move the value held at [RSI] into the xmm0 register
jmp return // Jump to return block
code:
movss xmm0,[rax+rcx*8+0C] // Move value held at [RAX+RCX*8+0C] into xmm0 register
jmp return // Jump return
align 10
weaponSpeed:
dd 0
align 10
weaponProjectiles:
dd 0
align 10
weaponcoo:
dd 0
bundle:
jmp newmem
nop
return:
// Self-explanatory
registersymbol(bundle)
registersymbol(weaponSpeed)
registersymbol(weaponProjectiles)
registersymbol(weaponcoo)
[DISABLE]
bundle:
db F3 0F 10 44 C8 0C
unregistersymbol(bundle)
unregistersymbol(weaponSpeed)
unregistersymbol(weaponProjectiles)
unregistersymbol(weaponcoo)
dealloc(newmem)
|
[/quote]
|
|
| Back to top |
|
 |
|
|
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
|
|