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] Minesweeper Script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Jul 03, 2007 5:02 pm    Post subject: [Help] Minesweeper Script Reply with quote

Ok, well I'm trying to write a script for Minesweeper so that no matter which square you click, it always pushes down a certain one. I also want this to be customizable by the user.

So what I did was went to the settings of CE, and configured some hotkeys to allow me to search without having to click the 'Next Scan' button--if I didn't do that, I'd have one hell of a time.

So, first I went to the first square on the top and the left (with the coordinates 1,1), and I already had "1" filled in the box, so I pressed the hotkey to do a New Scan - Exact Value, and then went over one to the right, while holding down the mouse, and searched for increased value, and did so until I got one address.

Code:

01005118


So I did the same, except for the Y, and got this address:

Code:

0100511C


Next, I did "Find What Writes to this Address" for both, and came up with these results:

Code:

X Results:

01002068 - 83 0D 18 51 00 01 FF - OR DWORD PTR [01005118],FF
01003205 - 89 15 18 51 00 01 - MOV [01005118],EDX

Y Results:

0100206F - 83 0D 1C 51 00 01 FF - OR DWORD PTR [0100511C],FF
0100320B - 89 3D 1C 51 00 01 - MOV [0100511C],EDI


And with that dawned my script:

Code:

[enable]

alloc(XCoord,256)
alloc(YCoord,256)
alloc(X,4)
alloc(Y,4)
label(XReturn)
label(YReturn)
registersymbol(X)
registersymbol(Y)

X:
dd 01

Y:
dd 01

01002068:
jmp XCoord
nop
nop
XReturn:

0100206F:
jmp YCoord
nop
nop
YReturn:

XCoord:
push edx
mov edx,[X]
mov [01005118],edx
pop edx
jmp XReturn

YCoord:
push edi
mov edi,[Y]
mov [0100511C],edi
pop edi
jmp YReturn

[disable]

dealloc(XCoord,256)
dealloc(YCoord,256)
dealloc(X,4)
dealloc(Y,4)
unregistersymbol(X)
unregistersymbol(Y)

01002068:
or dword ptr [01005118],FF

0100206F:
or dword ptr [0100511C],FF


I also tried doing it with the addresses with the "mov edx,[whatever]" opcodes, but both crashed Minesweeper. I would be most greatful for any help.

Edit:

Ok, wtf? I KNOW I put this in the Game Hacking Tutorials section. I hardly even come to this part of the forum. -.-
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