Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Wed Nov 21, 2018 5:44 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Fri Nov 28, 2014 5:30 am 
Active User
Active User



Joined: Sat Jul 14, 2012 7:12 am
Posts: 33
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 160
I've been screwing around trying to make a bot for WGT and clicking the swing meter. I haven't been having great success with accuracy. I've been using the WoW Fishing bot script as a start and trimmed some off of it but not much luck. I've tried writing my own but then it doesn't work at all :lol: All I want it to do is click on a certain position at the precise moment that spot changes from pure white to a specific green color.

Image

The meter speed changes depending on how hard you swing, but the basic "white to green" transition is always the same. Any suggestions?


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Fri Nov 28, 2014 4:07 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
Wow, I got excellent with the first drive...but I will say that the different clubs seem to have different speeds for the green progress bar which is going to affect it. So, for long term use I would create different macros for each set of clubs (driver, woods, irons, putter).

Anyway, here's how I set it up. I told the macro to check for "green" around the red circle below and then click:
Attachment:
WGT.PNG
WGT.PNG [ 58.54 KiB | Viewed 1613 times ]
- Driver: excellent; dead on
- Woods: slightly past, but still good shots
- Irons: slightly past, still good tho
**I only played one hole though; I just want to check it out to provide you some feedback
***This is the spot you need to change for each club (speed)
****It may be just like you said and depends on how hard you swing, but I thought I did all of those at max

The macro I used was:
Code:
 begin
     When  Color.At coordinate is within (RGB range)("131", "203", "100", "15", "1104", "789")
          begin
               Mouse.Click("Left")
          end
 end
Good Luck!

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 1:21 am 
Active User
Active User



Joined: Sat Jul 14, 2012 7:12 am
Posts: 33
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 160
Syrifina wrote:
Wow, I got excellent with the first drive...but I will say that the different clubs seem to have different speeds for the green progress bar which is going to affect it. So, for long term use I would create different macros for each set of clubs (driver, woods, irons, putter).

Anyway, here's how I set it up. I told the macro to check for "green" around the red circle below and then click:
Attachment:
WGT.PNG
- Driver: excellent; dead on
- Woods: slightly past, but still good shots
- Irons: slightly past, still good tho
**I only played one hole though; I just want to check it out to provide you some feedback
***This is the spot you need to change for each club (speed)
****It may be just like you said and depends on how hard you swing, but I thought I did all of those at max

The macro I used was:
Code:
 begin
     When  Color.At coordinate is within (RGB range)("131", "203", "100", "15", "1104", "789")
          begin
               Mouse.Click("Left")
          end
 end
Good Luck!


There is a speed constant, but that constant is based on the clubs your using. Some clubs have a 3.5 "club speed", others have 5.0, and so on. You can purposfully purchase clubs that are all the same speed to reduce variance, but there still remains a shot that is less than 100% - the meter will move slower. I think it's every 20% the speed changes. Perhaps if I can find the time to get better at this, I can add checking for "when the mouse is clicked" and "when the meter is green" for the program to adjust the X coordinate that it's looking for the color transition.

Were you doing this full screen? I play windowed generally. I'll have to test more. Im getting variance with your line of code playing windowed.


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 4:03 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
Quote:
Were you doing this full screen? I play windowed generally. I'll have to test more. Im getting variance with your line of code playing windowed.
Yes windowed and yes you will get a variance.

But it's close enough to be fun! ...and it should give you a working starting point that you can build upon.

Have fun and good luck!

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 4:10 am 
Active User
Active User



Joined: Sat Jul 14, 2012 7:12 am
Posts: 33
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 160
Windowed I can fine tune it to be close but not perfect each time.

It seems that each 10% of club swing is roughly a 5 pixel difference using your method.

Perhaps the "scan time" could be improved to make it more accurate? Is that possible? Is it scanning the whole screen or only looking at the specific pixel I pointed it to? I've lowered the available settings, and set the CPU priority to real time, and it improved accuracy but it's still not perfect.


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 4:57 am 
Active User
Active User



Joined: Sat Jul 14, 2012 7:12 am
Posts: 33
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 160
I've been working with a timer based swing (since we are focusing on 100% swings) and have had better success. There still seems to be inconsistencies though, though far less for the most part.

Code:
 when  Mouse.Left and right button is not down()
     and
     Color.Near coordinate is (RGB)("227", "217", "80", "769", "1004", "20")
     and
     Color.Near coordinate is not within (RGB range)("214", "214", "214", "5", "538", "1019", "3")
          begin
               Macro.Pause("1158")
               Mouse.Click("Left")
          end
 


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 5:17 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
As you stated in one of your previous posts, if you can get the meter speed to be constant then a simple timer will work like in you example.

I was thinking of an algorithm to calculate speed and velocity that will give the time at which to click. So, it would work basically like what you posted except instead of a static pause for 1158ms it would be variable. Therefore it wouldn't matter what club your using, or golf ball, or how hard of swing used.

And like you stated you can adjust the delays in the settings tab of BEM. You can also limit the area of interest, but if your using "at coordinate", then it's only looking at that coordinate.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 5:28 am 
Active User
Active User



Joined: Sat Jul 14, 2012 7:12 am
Posts: 33
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 160
Syrifina wrote:
As you stated in one of your previous posts, if you can get the meter speed to be constant then a simple timer will work like in you example.

I was thinking of an algorithm to calculate speed and velocity that will give the time at which to click. So, it would work basically like what you posted except instead of a static pause for 1158ms it would be variable. Therefore it wouldn't matter what club your using, or golf ball, or how hard of swing used.

And like you stated you can adjust the delays in the settings tab of BEM. You can also limit the area of interest, but if your using "at coordinate", then it's only looking at that coordinate.


The problem with "at coordinate" is the nature of playing in windowed mode >.<

If I was some sort of genius I would do like you said and design the program to calculate the delay needed before the click. I've thought about it but don't know how to do it. The best way my brain works is "if at X percent, set timer to this, else if at Y percent, set timer to this, else if..." but there is so much evaluation time in that, that it could make the macro worse instead of better.


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 8:34 am 
Active User
Active User



Joined: Sat Jul 14, 2012 7:12 am
Posts: 33
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 160
There must be a way to make the color thing work...


Top
 Profile  
Reply with quote  
 Post subject: Re: World Golf Tour
Thanked: 0 time(s)  Unread post Posted: Tue Dec 02, 2014 4:07 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
Quote:
The problem with "at coordinate" is the nature of playing in windowed mode
Not sure what you mean by that.

For the best performance in windowed mode, I would limit the area of interest to the game window, then use relative coordinates to limit the area of interest further and set the coordinates around the meter bar:
Code:
     Color.Limit area of interest to window("Notepad - Untitled", "yes")
     Color.Limit area of interest to coordinates("100", "100", "250", "250")
That way you can move the window around and not have to get your coordinates again. This greatly increases performance because it's only taking screen dumps of the area inside of one window and only analyzing the portion of the window that you specify.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group