Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Youtuber Life Float Script Question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun Mar 05, 2017 3:12 pm    Post subject: Youtuber Life Float Script Question Reply with quote

This is my code for Money:

Code:
[ENABLE]

aobscan(aobMoney,D9 9F 90 00 00 00 83)
alloc(newmem,$100)

label(code)
label(return)

newmem:

code:
  fstp dword ptr [edi+00000090]
  jmp return

aobMoney:
  jmp newmem
  nop
return:
registersymbol(aobMoney)

[DISABLE]

aobMoney:
  db D9 9F 90 00 00 00

unregistersymbol(aobMoney)
dealloc(newmem)


I want to move a new value of let's say 9999999 - HEX or DEC I don't mind, how exactly should I do it ?

I mean common sense will be:

mov [edi+00000090],(int)9999999

But is that right, I don't know if It will mess up with other stuff.


EDIT: It's a float my bad, I'm dumb (float)9999999
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 05, 2017 3:55 pm    Post subject: Re: Youtuber Life Float Script Question Reply with quote

Code:
newmem:
mov [edi+90],(float)9999999.0
code:
fstp dword ptr [edi+00000090]
jmp return


KalasWD wrote:
But is that right, I don't know if It will mess up with other stuff.
-In memory viewer, right-click on the instruction and check to see what addresses it is accessing. Return to the game and play for a bit. If you see any other addresses populate the list (besides the address that you are wanting to manipulate), then you may need to segregate that code so that none of the unwanted addresses are affected.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Sun Mar 05, 2017 4:04 pm    Post subject: Reply with quote

Putting the fstp after the mov will negate the effects of the mov. Either put it before the mov or replace its operand with st(0).
Code:
fstp st(0)
mov [edi+90],(float)9999999.0
jmp return

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 05, 2017 4:20 pm    Post subject: Reply with quote

Sigh. I wasn't paying attention. I just woke up. Very Happy
Thanks, ParkourPenguin.
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun Mar 05, 2017 4:35 pm    Post subject: Reply with quote

Wait so

Code:
fstp dword ptr [edi+00000090]
mov [edi+90],(float)9999999.0
jmp return


Like that?

Oh never mind I understand,

I will just out the mov after the fstp.
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Sun Mar 05, 2017 4:36 pm    Post subject: Reply with quote

No
fstp st(0)
mov [edi+90],(float)9999999.0

by doing this, you're popping twice
fstp dword ptr [edi+00000090]
fstp st(0)

LIFO or FILO

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun Mar 05, 2017 4:51 pm    Post subject: Reply with quote

Wait so:

Code:
fstp dword ptr [edi+00000090]
mov [edi+90],(float)9999999.0
jmp return


This is not right?

Code:
fstp st(0)
mov [edi+90],(float)9999999.0
jmp return


This is right?
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Sun Mar 05, 2017 5:18 pm    Post subject: Reply with quote

Both are correct in what you're trying to achieve. In the second one, you write to top of stack. The FSTP instruction performs the same operation as the FST instruction and then pops the register stack. To pop the register stack, the processor marks the ST(0) register as empty and increments the stack pointer (TOP) by 1. So you're pretty much writing nowhere as top of stack will now be pointing to what st(1) was.
_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun Mar 05, 2017 5:19 pm    Post subject: Reply with quote

Aww ok thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites