samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Tue Jul 03, 2007 5:02 pm Post subject: [Help] Minesweeper Script |
|
|
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.
So I did the same, except for the Y, and got this address:
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. -.-
|
|