News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RGB Auto-Shoot

Started by Ksbunker, March 28, 2006, 01:32:53 AM

Previous topic - Next topic

Ksbunker

Ok this is for a game im FPS game im currently playing.

What I would like to do is;

Whenever the mouse hovers over a pixel of a specific colour, the mouse gets clicked... and therefore shoots

My attempt at it was well, average... and failed miserably, i cant seem to figure out how to get it working. Heres the snippet;

Invoke GetCursorPos, ADDR pt

Invoke WindowFromPoint, pt.x, pt.y
Invoke GetPixel, hFW, pt.x, pt.y
.if eax == CR_COLOUR ;colour declared as constant
Invoke mouse_event, MOUSEEVENTF_LEFTDOWN, pt.x, pt.y, NULL, NULL
Invoke mouse_event, MOUSEEVENTF_LEFTUP, pt.x, pt.y, NULL, NULL ;simulate mouse press
.endif


This was in WM_TIMER

Mark Jones

Quote from: Ksbunker on March 28, 2006, 01:32:53 AM
Ok this is for a game im FPS game im currently playing.

What I would like to do is;

Whenever the mouse hovers over a pixel of a specific colour, the mouse gets clicked... and therefore shoots

My attempt at it was well, average... and failed miserably, i cant seem to figure out how to get it working. Heres the snippet;

Invoke GetCursorPos, ADDR pt

Invoke WindowFromPoint, pt.x, pt.y
Invoke GetPixel, hFW, pt.x, pt.y
.if eax == CR_COLOUR ;colour declared as constant
Invoke mouse_event, MOUSEEVENTF_LEFTDOWN, pt.x, pt.y, NULL, NULL
Invoke mouse_event, MOUSEEVENTF_LEFTUP, pt.x, pt.y, NULL, NULL ;simulate mouse press
.endif


This was in WM_TIMER

Hi Ksbunker. You want us to help you script your game?

Don't you consider that cheating? :lol

And what if that game can be played online? Kinda unfair to the other players, no? :eek
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Ksbunker

It's actually for a singleplayer game my friend that has no multiplayer mode.

My intentions were solely innocent. Im trying to make a program to beat my previous best single player score (which I cant do!), if you deem that cheating, so be it.

I'm just asking for a little help, why do you care what I do with the code? If it was for a cheat for a multiplayer game with dozens or millions who play then I can see your problem, but im not, im only but im cheating myself. So... the person cheating doesn't mind (me), the person being cheated doesn't mind (me).

I don't really see the problem.

Mark Jones

I wasn't trying to offend you, only was surprised that you'd openly ask how to script a game in a moderated forum. :bg

Fair point.

But nobody here can control how a scripting tool will be used. You may have completely benign reasons for this, but the capability for others to use it for malicious reasons simply deems it inappropriate material for this forum. The forum rules state that "no hacking techniques or related technology" are allowed.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

PBrennick

Nobody is going to help you write a cheat... we see these requests every now and then from people trying to find a way to patch the code so you can swamp the game with mouse clicks.  Go away.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ctt

Quote from: PBrennick on March 28, 2006, 08:13:54 PM
Nobody is going to help you write a cheat... we see these requests every now and then from people trying to find a way to patch the code so you can swamp the game with mouse clicks.  Go away.

Paul
<grin>  :U