Sign in to follow this  
Followers 0
AzKay

Great... Just what I need...

17 posts in this topic

#1 ·  Posted (edited)

Oke, I finnaly, I was thinking about it, and I knew EXACTLY how I was going to do this, Then, I went and clicked on something, 2 minutes later, I forgot, everything, about how I was going to do it xP

this is what ive so far..

Opt("PixelCoordMode", 2)
    $GetPos = WinGetPos("http://www.gaiaonline.com - Gaia Fishing :: Gambino - Mozilla Firefox")
    $CenterX = 374
    $CenterY = 340
    $Floater = PixelSearch($GetPos[0], $GetPos[1], $GetPos[2], $GetPos[3], 0xE13232)

Yes, Its not much.

This is what I want to do.

Search window for the pixel, Then, keep track of it while it moves, If it moves left from the center by 10px it will mousemove enough for the floater to go back to the middle, same for the right. But, now, Ive completly forgot how I wanted to do this..

Can someone "push" me into the right direction?

Oh, and what would be a "suitable" way to keep tracking the "floater", Because, Erm, Its so small, and I think the pixels change while it moves closer to you ><

PS. This is a fishing game, Ill post a screeny.

Screeny1

Screeny2

Screeny3

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



I guess I can bump? Its been 11hours ^^;


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I registered on the website just for you :whistle:. After figuring out how to fish manually, I can say I think this would be a difficult thing to automate... but not impossible.

I dont see where you are really having your troubles though. Pixelsearch the area between the two red lines that come up (not the whole screen), and you will have your x,y value for the fish. Then, depending where that position is in relation to the two red lines, have it MouseDrag to the left or to the right until it is near center (x coordinate) again.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Thanks, But, "PixelSearch the area between the 2 red lines" Wouldnt that be my floater? Isnt the rest just blue?

Oh, or do you mean, make the "search" region, just inside of the lines? So it only searchs for tred where the floater is?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Thanks, But, "PixelSearch the area between the 2 red lines" Wouldnt that be my floater? Isnt the rest just blue?

Oh, or do you mean, make the "search" region, just inside of the lines? So it only searchs for tred where the floater is?

Yes, make the search region just inside the lines. It will be much more efficient and less chance of picking up something with the same color. And yea, it is your floater, that is what we are tracking.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Yes, make the search region just inside the lines. It will be much more efficient and less chance of picking up something with the same color. And yea, it is your floater, that is what we are tracking.

But, in the floater, dont all the pixels change while it moves closer? or is that where searching "shades" comes in?

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

But, in the floater, dont all the pixels change while it moves closer? or is that where searching "shades" comes in?

Yea, since the floater is a distinct color from the water and there isnt a lot of intereference if you just do inside the lines, use a shade variation.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

So, then, I would do, um, something like, if the pixel goes left from the center, mousemove until its back to the center?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

So, then, I would do, um, something like, if the pixel goes left from the center, mousemove until its back to the center?

MouseDrag.. but yea. If it is offset to one side or the other, mouse drag until it is corrected and the x value of the bobber is within an acceptable range.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Whats the difference in using mousedrag or mousemove? does one like, scroll across? And the other, "jump"?

EDIT::

And, How do I make it search, just the window? Because, im pixelsearching this:

$Floater = PixelSearch(316, 282, 442, 436, 0xFF000, 50) But, its returning 1, So, obviously, its not scaning the fishing window, its scanning that region on the fullscreen.

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Whats the difference in using mousedrag or mousemove? does one like, scroll across? And the other, "jump"?

EDIT::

And, How do I make it search, just the window? Because, im pixelsearching this:

$Floater = PixelSearch(316, 282, 442, 436, 0xFF000, 50) But, its returning 1, So, obviously, its not scaning the fishing window, its scanning that region on the fullscreen.

Would I have something like,

If $Floater[0] > $CenterX Then

MouseMove(Default - 50, Default)

EndIF

Or something like that? Thats not tested, cause, erm, the pixelsearch isnt working right... I dont know how to make it search in the certain window.. And I can find MouseDrag, only MouseClickDrag, but I dont need it to "click"


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Would I have something like,

If $Floater[0] > $CenterX Then

MouseMove(Default - 50, Default)

EndIF

Or something like that? Thats not tested, cause, erm, the pixelsearch isnt working right... I dont know how to make it search in the certain window.. And I can find MouseDrag, only MouseClickDrag, but I dont need it to "click"

Bumping off the 2nd page :whistle:

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Would I have something like,

If $Floater[0] > $CenterX Then

MouseMove(Default - 50, Default)

EndIF

Or something like that? Thats not tested, cause, erm, the pixelsearch isnt working right... I dont know how to make it search in the certain window.. And I can find MouseDrag, only MouseClickDrag, but I dont need it to "click"

I got online and played your fishing game. I needed to click and hold click down inorder to manipulate the fishing rod. So, MouseClickDrag is what you would need. As far as the specifics for the script, try and write it and post your problems after you have made a complete attempt. You know the basic structure should be:

1. Pixelsearch inside the two red lines, possibly even do a pre-pixel search looking for the red lines to show up, indicating you have hooked something. The pixelsearch will have a shade variation because of the slight color changes in the bobber.

2. Once you have the coodinates for the bobber you will know where it is in relation to the two red lines it can not cross. Have it MouseClickDrag in a loop until the bobber's X position is back in the center. So, your script should be MouseClickDragging back and forth quite often while you are reeling it in.

As far as you having trouble pixelsearching the window, I suggest you go back to some basics and try and polish your skills a little. With your pixelcoord mode properly set, it should be relative to the active window... so setting up the search coordinates should be easy. We arent going to write this for you from scratch. Get at least a partially working script and then post your questions/errors in the forums. Good luck, I look forward to trying out what you make.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

I got online and played your fishing game. I needed to click and hold click down inorder to manipulate the fishing rod. So, MouseClickDrag is what you would need. As far as the specifics for the script, try and write it and post your problems after you have made a complete attempt. You know the basic structure should be:

1. Pixelsearch inside the two red lines, possibly even do a pre-pixel search looking for the red lines to show up, indicating you have hooked something. The pixelsearch will have a shade variation because of the slight color changes in the bobber.

2. Once you have the coodinates for the bobber you will know where it is in relation to the two red lines it can not cross. Have it MouseClickDrag in a loop until the bobber's X position is back in the center. So, your script should be MouseClickDragging back and forth quite often while you are reeling it in.

As far as you having trouble pixelsearching the window, I suggest you go back to some basics and try and polish your skills a little. With your pixelcoord mode properly set, it should be relative to the active window... so setting up the search coordinates should be easy. We arent going to write this for you from scratch. Get at least a partially working script and then post your questions/errors in the forums. Good luck, I look forward to trying out what you make.

Yeah, I know your not going to write it for me, I only posted, for someone to help me, like, to "start it" So, I know which direction I should be going. But, now, Ill try again.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Oke, I did this.

#include <Misc.au3>
Opt("MouseCoOrdMode", 2)
Opt("PixelCoOrdMode", 2)
$Floater = PixelSearch(316, 282, 442, 436, 0xFF000, 50)

While 1
If _IsPressed("27") Then
    MsgBox(0, "", $Floater[0] & $Floater[0])
EndIf
WEnd

That errors when It gets to the $Floater

C:\Documents and Settings\Asus\Desktop\FishingBot.au3 (10) : ==> Subscript used with non-Array variable.: 
MsgBox(0, "", $Floater[0] & $Floater[1]) 
MsgBox(0, "", $Floater^ ERROR

I also tryed with just $Floater ( No array ), But it returns 1. What am I doing wrong?

EDIT::

I noticed it should be:

0xFF0000 But, that didnt make a difference.

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I also tryed with just $Floater ( No array ), But it returns 1. What am I doing wrong?

EDIT::

I noticed it should be:

0xFF0000 But, that didnt make a difference.

Helpfile ?

Return Value

Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y)

Failure: Sets @error to 1 if color is not found.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ive read the help file, too many times ><, I know 1 means the colour is not found, but, I dont know what im doing wrong, its the right coordinates, the colour is there, but it cant find it...


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0