View previous topic :: View next topic |
Author |
Message |
Ejay1984 Newbie cheater Reputation: 0
Joined: 16 Nov 2017 Posts: 24
|
Posted: Sun Dec 03, 2017 8:28 am Post subject: Help with subtracting a value |
|
|
Hi
I've been compiling scripts for Shovel Knight as a tutorial. Right now I want to add a value to the Y coordinate to give me an air walk ability. The reason for adding is that the Y coordinate varies from level to level.
I came up with the script below;
Code: | [ENABLE]
aobscanmodule(Airwalk,ShovelKnight.exe,D9 41 10 D9 5C 24 10 D9 44 24 14 D9 5C 24 78) // should be unique
alloc(newmem,$1000)
alloc(var,1000)
label(code)
label(awalk_on)
label(air_walk)
label(return)
registersymbol(awalk_on)
registersymbol(var)
var:
dd (float)15
newmem:
cmp [awalk_on],1
je air_walk
code:
fld dword ptr [ecx+10]
fstp dword ptr [esp+10]
jmp return
air_walk:
fld dword ptr [ecx+10]
fadd dword ptr [var]
fstp dword ptr [esp+10]
jmp return
awalk_on:
dd 0
Airwalk:
jmp newmem
nop
nop
return:
registersymbol(Airwalk)
[DISABLE]
Airwalk:
db D9 41 10 D9 5C 24 10
unregistersymbol(Airwalk)
unregistersymbol(awalk_on)
unregistersymbol(var)
dealloc(newmem)
dealloc(var) |
The original code is fld dword ptr [ecx+10]
Inserting fadd doesn't give me the desired result as my character walks on the normal Y plane.
Any advice as to what I'm doing wrong?
Cheers
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Dec 03, 2017 9:29 am Post subject: |
|
|
Well, I'm not sure what the game then does with [esp+10].
Maybe it doesn't store that back into your address?
Could try adding a FST.
Code: | fld dword ptr [ecx+10]
fadd dword ptr [var]
fst dword ptr [ecx+10]
fstp dword ptr [esp+10] |
|
|
Back to top |
|
|
Ejay1984 Newbie cheater Reputation: 0
Joined: 16 Nov 2017 Posts: 24
|
Posted: Sun Dec 03, 2017 10:21 am Post subject: |
|
|
Zanzer wrote: | Well, I'm not sure what the game then does with [esp+10].
Maybe it doesn't store that back into your address?
Could try adding a FST.
Code: | fld dword ptr [ecx+10]
fadd dword ptr [var]
fst dword ptr [ecx+10]
fstp dword ptr [esp+10] |
|
I've tried it but it took my hero off screen. Could it be that I'd need to do an AOB to another opcodes accessed by the address. I got about 15 addresses and I used one that looked like it was the right one and had nothing accessing it.
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sun Dec 03, 2017 11:00 pm Post subject: |
|
|
nothing accessing it?
then i dont believe its the right one!
havent you tried to modify the value before picking it up, just do it test these addresses til you find the right one.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
Ejay1984 Newbie cheater Reputation: 0
Joined: 16 Nov 2017 Posts: 24
|
Posted: Mon Dec 04, 2017 12:55 am Post subject: |
|
|
OldCheatEngineUser wrote: | nothing accessing it?
then i dont believe its the right one!
havent you tried to modify the value before picking it up, just do it test these addresses til you find the right one. |
My apologies, I should've said one address was accessing it. The other addresses had a few number accessing it so I'll try them.
|
|
Back to top |
|
|
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Mon Dec 04, 2017 5:07 am Post subject: |
|
|
How about adding globalalloc and edit Y value manually with hotkeys?
Should be able to control the height if add Increase Decrease hotkeys.
|
|
Back to top |
|
|
Ejay1984 Newbie cheater Reputation: 0
Joined: 16 Nov 2017 Posts: 24
|
Posted: Mon Dec 04, 2017 1:26 pm Post subject: |
|
|
Betcha wrote: | How about adding globalalloc and edit Y value manually with hotkeys?
Should be able to control the height if add Increase Decrease hotkeys. |
My apologies I'm not familiar with the globalalloc command, other than it being related to alloc
|
|
Back to top |
|
|
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Mon Dec 04, 2017 4:32 pm Post subject: |
|
|
aobscanmodule(Airwalk,ShovelKnight.exe,D9 41 10 D9 5C 24 10 D9 44 24 14 D9 5C 24 78)
alloc(newmem,$1000)
alloc(var,1000)
globalalloc(ValueY,8) // add this line
And your original code is fld dword ptr [ecx+10]
Write above it mov [ValueY],ecx
Then Add address manually by checking pointer, write in there ValueY offset 10.
Once script is active it should generate Y value for you on pointer you just made.
Add increase and decrease value hotkeys and see if can control manually your height.
|
|
Back to top |
|
|
Ejay1984 Newbie cheater Reputation: 0
Joined: 16 Nov 2017 Posts: 24
|
Posted: Tue Dec 05, 2017 3:01 am Post subject: |
|
|
Betcha wrote: | aobscanmodule(Airwalk,ShovelKnight.exe,D9 41 10 D9 5C 24 10 D9 44 24 14 D9 5C 24 7
alloc(newmem,$1000)
alloc(var,1000)
globalalloc(ValueY, // add this line
And your original code is fld dword ptr [ecx+10]
Write above it mov [ValueY],ecx
Then Add address manually by checking pointer, write in there ValueY offset 10.
Once script is active it should generate Y value for you on pointer you just made.
Add increase and decrease value hotkeys and see if can control manually your height. |
Would I still need the air_walk label?
|
|
Back to top |
|
|
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Tue Dec 05, 2017 3:45 am Post subject: |
|
|
You can leave everything as it is, just add that globalalloc in there.
Pointer you make will show in table whats going on with your Y value.
From there can optimize script, or disable var who adds float 15.
And do same manipulation with hotkeys on exact value of coordinate Y.
Last edited by Betcha on Fri Jan 26, 2018 8:46 am; edited 1 time in total |
|
Back to top |
|
|
Ejay1984 Newbie cheater Reputation: 0
Joined: 16 Nov 2017 Posts: 24
|
Posted: Tue Dec 05, 2017 8:02 am Post subject: |
|
|
Thanks a lot , much appreciated
|
|
Back to top |
|
|
|