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 


How I make a loop and wait function

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
SrmsReis
How do I cheat?
Reputation: 0

Joined: 28 Feb 2021
Posts: 7
Location: Brazil

PostPosted: Sun Feb 28, 2021 9:10 pm    Post subject: How I make a loop and wait function Reply with quote

I am very new to cheat engine
so I wanna make a script to change the value of a mov every 5 seconds
like change the value to 1 wait 5 seconds and change to 2 and loop it
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Mon Mar 01, 2021 4:32 pm    Post subject: Reply with quote

Increment and move a value every 5 seconds from xycopy to xycopy+4.


Code:
[ENABLE]
globalalloc(xycopymem,1000)

label(xycopy)
registersymbol(xycopy)

CREATETHREAD(xycopymem)

xycopymem:
mov rcx,100             // 64 bit
// push 500             // 32 bit
call sleep
rdtsc
cmp edx,[xycopy+8]
jb xycopymem
add edx,5
mov [xycopy+8],edx
mov eax,[xycopy]
mov [xycopy+4],eax
inc [xycopy]
cmp [flcntr],0
je short xycopymem
call ExitThread
@@:
jmp xycopymem

align 4
xycopy:
dq 0 0
flcntr:
dq 0


[DISABLE]

xycopy:
dq 0 0
flcntr:
dd 1 0
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 programming 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