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 


Help adding time delay in my script

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

Joined: 29 May 2018
Posts: 2

PostPosted: Tue May 29, 2018 3:16 pm    Post subject: Help adding time delay in my script Reply with quote

I have my script here it checks for the right hex value in the game thin at the bottom execute the address to the right decimal value. when it does it's checked and falls it do the checks again but do it so fast it lags my pc I want to add a time delay between each check so it will not lag out my pc.

globalalloc(speedPower,1000)
CREATETHREAD(speedPower)

speedPower:
mov eax,[ePSXe.exe+88117C]
cmp eax, 0C
cmp eax, 15
cmp eax, 2C
cmp eax, 3D
je gamestats
jmp speedPower

gamestats:
mov eax, [ePSXe.exe+8821E8]
cmp eax, 00
je controllerInput
jmp speedPower

controllerInput:
mov eax, [ePSXe.exe+8823C0]
cmp eax, 80
je code
jmp speedPower

code:
mov word ptr[ePSXe.exe+8841DC],#1
push #5000
call sleep
jmp speedPower
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Tue May 29, 2018 7:54 pm    Post subject: Reply with quote

You are looping a thread without any sleep. This is causing your thread to spam the CPU for cycles, which will spike the CPU usage 90%+.

Add a call to the Sleep API at the start of your loop.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
scott12330
How do I cheat?
Reputation: 0

Joined: 29 May 2018
Posts: 2

PostPosted: Tue May 29, 2018 8:33 pm    Post subject: Reply with quote

atom0s wrote:
You are looping a thread without any sleep. This is causing your thread to spam the CPU for cycles, which will spike the CPU usage 90%+.

Add a call to the Sleep API at the start of your loop.


all great this work out just find
globalalloc(speedPower,100)
CREATETHREAD(speedPower)

speedPower:
push #1000
call sleep
mov eax,[ePSXe.exe+88117C]
cmp eax, 0C
cmp eax, 15
cmp eax, 2C
cmp eax, 3D
je gamestats
jmp speedPower

gamestats:
mov eax, [ePSXe.exe+8821E8]
cmp eax, 00
je controllerInput
jmp speedPower

controllerInput:
mov eax, [ePSXe.exe+8823C0]
cmp eax, 80
je code
jmp speedPower

code:
mov word ptr[ePSXe.exe+8841DC],#1
jmp speedPower

now I just need help to find out how to set up the DISABLE section
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