Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Mon Jul 23, 2018 11:32 am

All times are UTC




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sat Jun 25, 2011 10:57 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4523
Been thanked: 1186 time(s)
Has thanked: 132 time(s)
Contribution Points: 32830
You wont ever get to this line "Macro.Execute new("EVE", "EVE mine", "yes")" because there is a nested loop, and one break instruction inside the inner loop, meaning the inner loop will be broken once the colors are found, but the outer one will keep running forever.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sat Jun 25, 2011 1:41 pm 
New User
New User



Joined: Sun Aug 29, 2010 4:54 am
Posts: 27
Been thanked: 1 time(s)
Has thanked: 1 time(s)
Contribution Points: 198
That is so confusing ^^ Though I still haven't slept yet so my brain ain't ticking as it should be.

My code is pretty much identical to Bakt's. I have only changed the coordination's and RGB coords

Code:
 begin
     begin loop()
          if  Color.At coordinate is within (RGB range)("9", "29", "44", "0", "60", "988")
               // checks some spec color, that appears when your not docked
               begin
                    Macro.Break from loop()
               end
          if  Macro.Execution time of current global loop has exceeded("120000")
               // if it wont find it, it will restart dock, so it should try to undock you if it failed
               begin
                    Macro.Execute new("EVE", "EVE dock", "no")
                    Macro.Abort()
               end
     end
     Macro.Pause("5000")
     Mouse.Click at coordinate("167", "612", "right")
     // selecting warp location, its set to 1st bookmark in right click menu
     Macro.Pause("500")
     Mouse.Set coordinate("239", "624")
     Macro.Pause("500")
     Mouse.Click at coordinate("239", "624", "left")
     Macro.Pause("15000")
     begin loop()
          if  Color.At coordinate is within (RGB range)("82", "143", "196", "10", "873", "996")
               begin loop()
                    if  Color.At coordinate is within (RGB range)("155", "156", "156", "10", "871", "994")
                         begin
                              Macro.Pause("1000")
                              Macro.Break from loop()
                         end
                    Macro.Pause("500")
               end
          if  Macro.Execution time since last begin has exceeded("120000")
               begin
                    Macro.Restart("yes")
               end
          Macro.Pause("500")
     end
     Macro.Execute new("EVE", "EVE mine", "yes")
 end
 


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sat Jun 25, 2011 2:08 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4523
Been thanked: 1186 time(s)
Has thanked: 132 time(s)
Contribution Points: 32830
This is the loop that will never finish:

Code:
begin loop()
          if  Color.At coordinate is within (RGB range)("82", "143", "196", "10", "873", "996")
               begin loop()
                    if  Color.At coordinate is within (RGB range)("155", "156", "156", "10", "871", "994")
                         begin
                              Macro.Pause("1000")
                              Macro.Break from loop()
                         end
                    Macro.Pause("500")
               end
          if  Macro.Execution time since last begin has exceeded("120000")
               begin
                    Macro.Restart("yes")
               end
          Macro.Pause("500")
     end


You start one loop and then another:
Code:
begin loop()
          if  Color.At coordinate is within (RGB range)("82", "143", "196", "10", "873", "996")
               begin loop()


Then you have a conditional break:
Code:
 if  Color.At coordinate is within (RGB range)("155", "156", "156", "10", "871", "994")
                         begin
                              Macro.Pause("1000")
                              Macro.Break from loop()
                         end


This will break the inner loop, not the outer one, so this line will never be executed:
Code:
Macro.Execute new("EVE", "EVE mine", "yes")


By the way, if anyone is trying to reproduce this problem, the following line: "Macro.Break from loop()" would be "Macro.Break from loop("no") in BE version 2.4 and later.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sat Jun 25, 2011 2:13 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4523
Been thanked: 1186 time(s)
Has thanked: 132 time(s)
Contribution Points: 32830
Try the following:

Code:
 begin
     begin loop()
          if  Color.At coordinate is within (RGB range)("9", "29", "44", "0", "60", "988")
               // checks some spec color, that appears when your not docked
               begin
                    Macro.Break from loop("no")
               end
          if  Macro.Execution time of current global loop has exceeded("120000")
               // if it wont find it, it will restart dock, so it should try to undock you if it failed
               begin
                    Macro.Execute new("EVE", "EVE dock", "no")
                    Macro.Abort()
               end
     end
     Macro.Pause("5000")
     Mouse.Click at coordinate("167", "612", "right")
     // selecting warp location, its set to 1st bookmark in right click menu
     Macro.Pause("500")
     Mouse.Set coordinate("239", "624")
     Macro.Pause("500")
     Mouse.Click at coordinate("239", "624", "left")
     Macro.Pause("15000")
     begin loop()
          if  Color.At coordinate is within (RGB range)("82", "143", "196", "10", "873", "996")
               begin loop()
                    if  Color.At coordinate is within (RGB range)("155", "156", "156", "10", "871", "994")
                         begin
                              Macro.Pause("1000")
                              Macro.Execute new("EVE", "EVE mine", "yes")
                              Macro.Break from loop("no")
                         end
                    Macro.Pause("500")
               end
          if  Macro.Execution time since last begin has exceeded("120000")
               begin
                    Macro.Restart("yes")
               end
          Macro.Pause("500")
     end
 end
 


You will need to replace "Macro.Break from loop("no")" with "Macro.Break from loop()" if you are running BE version 2.3 or older.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sat Jun 25, 2011 4:21 pm 
New User
New User



Joined: Sun Aug 29, 2010 4:54 am
Posts: 27
Been thanked: 1 time(s)
Has thanked: 1 time(s)
Contribution Points: 198
Thanks for helping Gigus! I did that code earlier, it works but it keeps the macro running aswell as executing the new macro. I thought the
Code:
Macro.Execute new("EVE", "EVE mine", "yes")
code, with "yes" at the end would stop the current macro when the new one had been executed

Then problem with having the 1st macrostill running is
Code:
if  Macro.Execution time since last begin has exceeded("120000")
               begin
                    Macro.Restart("yes")("120000")


where it will then repeat the 1st macro again itself.


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sun Jun 26, 2011 12:11 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4523
Been thanked: 1186 time(s)
Has thanked: 132 time(s)
Contribution Points: 32830
Your welcome, I'm glad you got it working.

The third argument in Macro.Execute... Is to specify whether or not the current macro should pause until the new macro finished, passing "no" will continue execution of the current macro making the two macros running simultaneously, which is probably not what you want in this case.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sun Jun 26, 2011 6:50 pm 
New User
New User



Joined: Sun Aug 29, 2010 4:54 am
Posts: 27
Been thanked: 1 time(s)
Has thanked: 1 time(s)
Contribution Points: 198
How do I stop the current macro completely when the new one has been executed? I've tried the Macro.Abort macro named("EVE", "EVE warp") but it still continues to run


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Sun Jun 26, 2011 7:21 pm 
New User
New User



Joined: Sun Aug 29, 2010 4:54 am
Posts: 27
Been thanked: 1 time(s)
Has thanked: 1 time(s)
Contribution Points: 198
Ah! fixed that! Had to put the code in the first line of the executed macro!


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Mon Jun 27, 2011 1:00 am 
New User
New User



Joined: Sun Aug 29, 2010 4:54 am
Posts: 27
Been thanked: 1 time(s)
Has thanked: 1 time(s)
Contribution Points: 198
Right! finally finished! This macro is full afk, also included drones, so when NPC pirates attack you, your drones should sort them out then return back to your ship. This is BaKt's macro so all credit of course goes to him, I've just adjusted it to get it working.( Eve has changed slightly :P)

I've put alot of Macro.Pause("1000") and Macro.Pause("500") around the place because I was having trouble with the mouse going to correct coords (I think it was due to my pc lag, but either way I find it more fail safe having to wait a second )

I'm running my game in 1680x1050

This is the setup inside dock. (Yes you can a walk around in you station in eve :P)
Image

This is the outside setup
Image

"Eve dock" macro
Code:
 begin
     Macro.Abort macro named("EVE", "EVE warp 2")
     begin loop()
          if  Color.At coordinate is within (RGB range)("255", "205", "60", "0", "72", "985")
               begin
                    Macro.Pause("4000")
                    Mouse.Move to coordinate("186", "881")
                    Macro.Pause("1000")
                    Mouse.Hold button("right")
                    Macro.Pause("1000")
                    Mouse.Release button("right")
                    Macro.Pause("1000")
                    Mouse.Move to coordinate("248", "980")
                    Macro.Pause("1000")
                    Mouse.Hold button("left")
                    Macro.Pause("1000")
                    Mouse.Release button("left")
                    Macro.Pause("1000")
                    Mouse.Move to coordinate("174", "881")
                    Macro.Pause("1000")
                    Mouse.Hold button("left")
                    Mouse.Move to coordinate("523", "960")
                    Macro.Pause("1000")
                    Mouse.Release button("left")
                    Mouse.Move to coordinate("525", "960")
                    Macro.Pause("1000")
                    Macro.Pause("500")
                    Mouse.Click at coordinate("75", "985", "left")
                    Macro.Pause("500")
                    Mouse.Click at coordinate("75", "985", "left")
                    Macro.Pause("1000")
                    Macro.Execute new("EVE", "EVE warp", "no")
                    Macro.Break from loop()
//This grabs the loot from your ships cargo and puts it into your stations cargo. Then un-docks when complete.
               end
     end
     if  Macro.Execution time of current global loop has exceeded("120000")
          begin
               Macro.Execute new("EVE", "EVE warp 2", "no")
               Macro.Break from loop()
          end
 end
 




This is the "Eve warp" macro
Code:
 begin
     begin loop()
          if  Color.At coordinate is within (RGB range)("9", "29", "44", "0", "60", "988")
               // checks bottum left to see if the yellow arrow dock symbol has gone. Means you have undocked.
               begin
                    Macro.Break from loop()
               end
          if  Macro.Execution time of current global loop has exceeded("120000")
               // if it wont find it, it will restart dock, so it should try to undock you if it failed
               begin
                    Macro.Execute new("EVE", "EVE dock", "no")
                    Macro.Abort()
               end
     end
     Macro.Pause("5000")
     Mouse.Move to coordinate("215", "615")
     Macro.Pause("1000")
     Mouse.Hold button("right")
     Macro.Pause("1000")
     Mouse.Release button("right")
     Macro.Pause("1000")
     Mouse.Move to coordinate("253", "625")
     Macro.Pause("1000")
     Mouse.Hold button("left")
     Macro.Pause("1000")
     Mouse.Release button("left")
     Macro.Pause("15000")
//This selects the 2nd bookmark in your peaple/places, then right clicks and slects warp to
     begin loop()
          if  Color.At coordinate is within (RGB range)("82", "143", "196", "10", "873", "996")
//This check the end of the warp bar to see if it is full.
               begin loop()
                    if  Color.At coordinate is within (RGB range)("155", "156", "156", "10", "871", "994")
//This check the end of the warp bar to see when it goes down (means you have come out of warp)
                         begin
                              Macro.Pause("1000")
                              Macro.Execute new("EVE", "EVE mine", "yes")
                         end
                    Macro.Pause("500")
               end
          if  Macro.Execution time since last begin has exceeded("120000")
               begin
                    Macro.Restart("yes")
               end
          Macro.Pause("500")
     end
 end


"Eve mine" macro
Code:
 begin
     Macro.Abort macro named("EVE", "EVE warp")
     Macro.Pause("2000")
     Mouse.Move to coordinate("293", "302")
     Mouse.Hold button("right")
     Macro.Pause("500")
     Mouse.Release button("right")
     Macro.Pause("500")
     Mouse.Move to coordinate("313", "307")
     Macro.Pause("500")
     Mouse.Hold button("left")
     Macro.Pause("500")
     Mouse.Release button("left")
     Macro.Pause("1000")
     // This lanuches drones on arrival at asteroid belt site
     Mouse.Move to coordinate("1464", "69")
     Macro.Pause("500")
     Mouse.Hold button("right")
     Macro.Pause("500")
     Mouse.Release button("right")
     Macro.Pause("500")
     Mouse.Move to coordinate("1504", "120")
     Macro.Pause("500")
     Mouse.Hold button("left")
     Macro.Pause("500")
     Mouse.Release button("left")
     Macro.Pause("500")
     Mouse.Move to coordinate("1441", "84")
     Macro.Pause("500")
     Mouse.Hold button("right")
     Macro.Pause("500")
     Mouse.Release button("right")
     Macro.Pause("500")
     Mouse.Move to coordinate("1486", "134")
     Macro.Pause("500")
     Mouse.Hold button("left")
     Macro.Pause("500")
     Mouse.Release button("left")
     Macro.Pause("500")
     Mouse.Move to coordinate("1178", "228")
     Macro.Pause("500")
     Keyboard.Press key("{<f1>}")
     Macro.Pause("500")
     Mouse.Move to coordinate("547", "836")
     Macro.Pause("3000")
     Mouse.Hold button("left")
//this selects the 2nd asteroid rock next to  your cargo menu
     Macro.Pause("500")
     Mouse.Release button("left")
     Macro.Pause("500")
     Mouse.Move to coordinate("641", "785")
     Macro.Pause("500")
     Keyboard.Hold key("{<f2>}")
     Macro.Pause("500")
     Keyboard.Release key("{<f2>}")
     // this selects 2 targets from overview then presses f1/f2 to fire the alzers
     Macro.Pause("1000")
     begin loop()
          if  Color.At coordinate is within (RGB range)("4", "91", "121", "0", "374", "830")
               // checks the cargo bar, if its full, the mining is completed
               begin
                    Macro.Break from loop()
               end
          if  Macro.Execution time of current global loop has exceeded("600000")
               // if the cargo wont be full in 10min, theres something wrong, and it will end minging
               begin
                    Macro.Break from loop()
               end
          Macro.Pause("5000")
     end
     Macro.Pause("1000")
     Keyboard.Hold key("{<lshiftkey>}")
     Macro.Pause("500")
     Keyboard.Hold key("r")
     Macro.Pause("500")
     Keyboard.Release key("r")
     Macro.Pause("500")
     Keyboard.Release key("{<lshiftkey>}")
     Macro.Pause("500")
     Macro.Execute new("EVE", "EVE warp 2", "no")
 end
 


"Eve warp 2"
Code:
 begin
     Macro.Pause("500")
     Mouse.Move to coordinate("277", "593")
     Macro.Pause("500")
     Mouse.Hold button("right")
     Macro.Pause("500")
     Mouse.Release button("right")
     Macro.Pause("500")
     Mouse.Move to coordinate("323", "645")
     Macro.Pause("500")
     Mouse.Hold button("left")
     Macro.Pause("500")
     Mouse.Release button("left")
     Macro.Pause("15000")
//This selects the first bookmark and docks (make sure you get the bookmark of your station when your inside the station)
     begin loop()
          if  Color.At coordinate is within (RGB range)("79", "142", "195", "20", "873", "994")
               begin loop()
                    Macro.Do nothing()
                    if  Color.At coordinate is within (RGB range)("150", "151", "151", "20", "873", "994")
                         begin
                              Macro.Pause("5000")
                              Macro.Execute new("EVE", "EVE dock", "no")
                              Macro.Break from loop()
                         end
                    Macro.Pause("500")
               end
          if  Macro.Execution time of current global loop has exceeded("5000")
               // if the warp bar wont go full, the warp didnt start, so it will restart
               begin
                    Macro.Restart("yes")
               end
          Macro.Pause("500")
     end
 end
 


*Tip* When getting the asteroid belt bookmark, don't be so close to rocks (sometimes you can get stuck between rocks)


Top
 Profile  
Reply with quote  
 Post subject: Re: EVE Online Full Mining
Thanked: 0 time(s)  Unread post Posted: Mon Jun 27, 2011 7:04 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4523
Been thanked: 1186 time(s)
Has thanked: 132 time(s)
Contribution Points: 32830
Nice work :)

Thank you for the update - Good to see you got everything working!

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  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:  


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