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 


A Formula computer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
Nemexia55
Expert Cheater
Reputation: 0

Joined: 28 Jan 2014
Posts: 160

PostPosted: Thu Jun 30, 2016 1:59 pm    Post subject: A Formula computer Reply with quote

hi i have 2 addresses:
x: 0008CC38
y: 0008CC3C
both are 4byte
i want to make cheat engine calculate this formula for me:

6.5*x^2+atan(y)

how can i do it?
if cheatengine cant do it, can i use c++ to do it for me?

p.s: i found a way at the lua engine:
Code:

x=readInteger(0x0008cc38)
y=readInteger(0x0008cc3c)

a=6.5*x^2+math.atan(y)

writeDouble(0x27e0000,a)


but i should keep pressing execute button, any solution?

_________________
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Thu Jun 30, 2016 3:31 pm    Post subject: Reply with quote

If you're trying to do this in some code injection...
Code:
alloc(newmem,1024)
alloc(num1,8)
newmem:
  fild [0008cc38]
  fmul st(0),st(0)
  fmul qword ptr[num1]
  sub esp,8
  fild [0008cc3c]
  fstp qword ptr[esp]
  call msvcrt.atan
  add esp,8
  faddp
// result is now in st(0)
  fstp qword ptr[027e0000]
  jmp return

num1:
  dq (double)6.5

If you want CE to constantly calculate that value in Lua, just use a timer.

_________________
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
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions 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