|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
chochang262 Newbie cheater Reputation: 0
Joined: 31 May 2012 Posts: 20 Location: United States
|
Posted: Fri Dec 15, 2017 3:05 pm Post subject: [HELP] Auto Assembler Specifics??? |
|
|
Sorry ahead of time if this would be the wrong section for this post.
Okay So Just to jump right in though I'm gonna paste my AA Script then explain some things about the game and finally see if someone can either point out my retardation or explain to me why my code is not working.(I'm just sticking with the basic Templates right now until I can manage getting this working.....)
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(Damage)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
cmp [esi+558],0
jne Damage
mov [esi+000005D0],999
jmp returnhere
Damage:
mov [esi+000005D0],0
jmp returnhere
"FFX.exe"+38E3BF:
jmp newmem
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"FFX.exe"+38E3BF:
mov [esi+000005D0],eax
//Alt: db 89 86 D0 05 00 00 |
(Apologies for code sloppiness) Esi contains the entitys base and if you add 5d0 to that, you'll get the entity health. 588 appears to be an identifier towards the team. 0 being the friendly team and an oddball large number(that always is the same) for the enemy team.
My issue I believe is that I have found when simply adding 5d0 to the entity base, I get the proper health address. When i say, try to make a new pointer with the address of the entity base and 5d0 offset it lands me in the wrong place entirely. So im pretty sure i just need a way to write ---
cmp [esi+558],0
without with out esi being looked at as a pointer.
I'm Quite sure that is in fact the issue because if I change jne to je it kills whoever takes damage regardless of team telling me that the compare is not comparing the right address.(leaving it at jne gives 0x999 health regardless of team aswell)
I Have used the structure spider to confirm that the value at 588 remains constant through even a full PC Restart by taking the 3 players that I have on the field on my team and by getting into an encounter with 3 enemys. friendly team is always 0 and enemy team is always "some constant large #"
Any help is appreciated, as is any scolding and whip cracking
also, if a topic has already been started about something like this or just a general bit of information already been posted in a tutorial, I was unable to
find it as I had no idea what to specifically search for regarding this matter.
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Dec 15, 2017 3:54 pm Post subject: |
|
|
Code: | cmp byte ptr [esi+558],0 |
|
|
Back to top |
|
|
chochang262 Newbie cheater Reputation: 0
Joined: 31 May 2012 Posts: 20 Location: United States
|
Posted: Fri Dec 15, 2017 4:32 pm Post subject: |
|
|
Okay, I definitely deserve the whip for this. I messed up the calculation for the offset because I'm Using a very large TV so I misread the numbers. I do appreciate the reply however and if you have the time would you be able to explain what the "byte ptr" does. I actually did not need it for this, but would like to know for future computational conquests. If you'd rather not , I wholeheartedly understand. I'm sure I'll find it with enough google. I just never once saw that while searching before...
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Fri Dec 15, 2017 5:13 pm Post subject: |
|
|
byte ptr
word ptr
dword ptr
qword ptr
to specify the data length you want to compare.
'0' is accepted in every situation, there is exceptions for numbers higher than '0'
what i mean is when you are dealing with single/double floating point value, for example if you have a floating point value of 1 that you wanna compare:
- cmp dword ptr [reg+x],01 // .. this is wrong
correct ones:
- cmp dword ptr [reg+x],(float)1.0 // .. 1.0 or 1 is the same but i do it this way
- cmp dword ptr [reg+x],3F800000 // .. this is also accepted which means 1 float
in some cases that you might get into that you have a 4 byte value lets take the value 2147483647
the difference between you and you enemies is the last two digits you are 47 and your enemy 37 so instead of telling:
cmp dword ptr [reg+x],7FFFFFFF
or
cmp dword ptr [reg+x],#2147483647
or
cmp dword ptr [reg+x],(int)2147483647
you can just compare the last two digits by:
cmp byte ptr [reg+x],2F // .. which is 47
of course you might need to know the length of the values too:
byte = BYTE = 0 to 255 // .. unsigned
2 byte = WORD = 0 to 65535 // .. unsigned
4 byte = DWORD = 0 to 2147483647 // .. signed
8 byte = QWORD = 0 to 9223372036854775807 // .. signed
single-precision / double-precision
floating-point value can have:
DWORD data length
QWORD data length
well of course application mode is also important, single-floating point value in 32-bit mode is dword
double-floating point value in 32-bit mode can be dword in some cases, but most of the time qword
in 64-bit mode most likely they gonna be qword or have a qword length data.
so you have different things to take a look at, its important to know these things if you wanna step from a level to another.
additional info:
there is:
half-precision floating-point values which are 16-bit long.
single-precision floating-point values which are 32-bit long.
double-precision floating-point values which are 64-bit long.
long-double-precision floating-point values which are 80-bit long.
TBYTE = long-double, can be loaded into x87 FPU registers.
note:
it also support integer data type.
_________________
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 |
|
|
chochang262 Newbie cheater Reputation: 0
Joined: 31 May 2012 Posts: 20 Location: United States
|
Posted: Sat Dec 16, 2017 6:42 am Post subject: |
|
|
Wow! I actually copied and saved all of that to my PC for Instructional reference. That was above and beyond what I was expecting and for that I am truly grateful. Thank You for your time.
|
|
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
|
|