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 wait function ?

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

Joined: 26 Dec 2012
Posts: 5

PostPosted: Wed Dec 26, 2012 10:18 am    Post subject: A wait function ? Reply with quote

I started to learn AA like 1 Month Ago and i'm stuck on a problem,i want to make my script wait,but i can't see any function to do that :

Ex:

00B83C3A:
jmp counter
nop
sp_control_ret:

counter:
inc [spanw_step]

cmp [spanw_step],01
je do_sp_control

cmp [spanw_step],02
je do_sp_control_1

cmp [spanw_step],03
je do_sp_control_2

jmp sp_control_ret


do_sp_control:
mov ebp, [spawn_x]
mov ecx, [spawn_y]
jmp wait


do_sp_control_1:
mov ebp, [spawn_x_1]
mov ecx, [spawn_y_1]
jmp wait

do_sp_control_2:
mov [spanw_step],00
mov ebp, [spawn_x_2]
mov ecx, [spawn_y_2]
jmp wait

wait:
sleep(10000) //Wait 10 Seconds (Obviously don't work)
jmp sp_counter_ret
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

Joined: 09 May 2003
Posts: 25870
Location: The netherlands

PostPosted: Wed Dec 26, 2012 11:33 am    Post subject: Reply with quote

Sleep uses the stdcall calling mechanism
So
Code:

Push #10000
Call sleep

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
7centdu74
How do I cheat?
Reputation: 0

Joined: 26 Dec 2012
Posts: 5

PostPosted: Wed Dec 26, 2012 12:48 pm    Post subject: Reply with quote

Thanks for replying Smile But i don't understand this script

i use it like this ? :

wait:
push #10000
Call sleep
jmp sp_counter_ret
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Wed Dec 26, 2012 3:01 pm    Post subject: Reply with quote

7centdu74 wrote:
Thanks for replying Smile But i don't understand this script

i use it like this ? :

wait:
push #10000
Call sleep
jmp sp_counter_ret



Yes, but first save the registers before pushing to stack anything,use this

Code:

Wait:
pushad
pushfd
push #10000
Call Kernel32.Sleep (or just sleep)
popfd
popad
jmp sp_counter_ret
Back to top
View user's profile Send private message
7centdu74
How do I cheat?
Reputation: 0

Joined: 26 Dec 2012
Posts: 5

PostPosted: Wed Dec 26, 2012 3:51 pm    Post subject: Reply with quote

Thank you very much !! Very Happy

Edit : Why do i obtain an error : This adress specier is not valid ? Shocked
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

Joined: 09 May 2003
Posts: 25870
Location: The netherlands

PostPosted: Wed Dec 26, 2012 5:11 pm    Post subject: Reply with quote

Make sure you are attached to the process when executing that script

Also, try just "call sleep"

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Wed Dec 26, 2012 5:21 pm    Post subject: Reply with quote

Just as Dark Byte said, open the process in cheat engine first.
Back to top
View user's profile Send private message
7centdu74
How do I cheat?
Reputation: 0

Joined: 26 Dec 2012
Posts: 5

PostPosted: Wed Dec 26, 2012 5:57 pm    Post subject: Reply with quote

The process is attached when executing the script ,but still this error :
This adress specifier is not valid :/

EDIT : Resolved (Just a little problem,i forgot that function names are Case sensitive :facepalm:)

Adit x2 :
Last question :

is that is correct ?

Blablablah:
dd -000003B1
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

Joined: 09 May 2003
Posts: 25870
Location: The netherlands

PostPosted: Wed Dec 26, 2012 6:33 pm    Post subject: Reply with quote

It will probably assemble, but what purpose ?

-000003b1=FFFFFC4F (-945)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
7centdu74
How do I cheat?
Reputation: 0

Joined: 26 Dec 2012
Posts: 5

PostPosted: Wed Dec 26, 2012 6:47 pm    Post subject: Reply with quote

It's for X and Y coords in a game :

X158 Y-689
X301 Y-316
X361 Y16

-3B1 was -689 No ? Surprised
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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