To start off, I would like to say my utmost thanks to bias for showing me his codes, which allows me to revise this guide to ensure you readers a 100% working macro. However, although significantly less than the previous version, this still requires a little work.
The same downside applies to this simple version: if everybody decided to ditch the room, you'll still be in the waiting room. I will give thorough explanation for this simple version. However, at the very end, I will give you guys a sneak peek into my elaborate macro. You guys are free to try to replicate it with minimum explanation from me.
Say hello to one of the awesomest features of BlueEyeMacro: Investigate! If you already know how make use of Investigate, skip to part 2.
1. How to use Investigate.Click the "Investigate" button found on your BlueEyeMacro. It should then bring you to a window with a blank page in the middle. Go back to Aika, and take a screenshot at whatever you want. If you check the Investigate window, your screenshot will be automatically be saved there. Then, you can check, pixel by pixel, loads and loads of information, including RGB codes and x & y axis.
But the one that we will make use of is the save picture function. Right click and drag any area that you want within the screenshot on your investigate window, and a menu with "Save as image" and "Copy to clipboard" will show. Click "Save as image," choose a location folder, hit save, and that area you selected will be saved.
2. Saving the Required Pictures.For this simple macro, you will need 2 pictures:
1. A picture of your name on the waiting room, BEFORE you click ready. (dark background)
2. A picture of the "Ready" button.
How to do:
1. Run Investigate from your BlueEyeMacro
2. Go to Aika and go join a Battle Field room
3. Once inside, quickly press screenshot BEFORE pressing ready. Also, make sure that your mouse is NOT hovering over the ready button, which will cause it to glow.
4. You can press ready after you have taken the screenshot and leave your character to farm for the next round, while you get busy with this macro.
5. Go to Investigate window, and right click and drag your name (EDIT thanks to feedbacks: level and class logo is NOT NECESSARY). Make sure you right click and drag INSIDE the outline. Click "Save as image," and save it as "name" (without the quotes. after you click save, it should show up in your folder as name.png) in a directory that you will remember.
6. The picture should look like this:
(notice how I did not include the outline of the box. If your name is longer than the box, don't bother taking your whole name. (EDIT: once again, level and class logo is NOT NECESSARY)
7. Again, in the same investigate window, save the picture of the ready button. Just like last time, do not include the outline of the button. The image should look like this:
8. Save the image into the same folder as the previous, and name it "ready". (again, without the quotes. It should show up in your folder as ready.png)
3. Putting it Together.Here's the main code:
Code:
if Image.Can be located on screen("C:\...\YourFolder\name.png", "100")
begin
Macro.Pause("1000")
Mouse.Click at image("C:\...\YourFolder\ready.png", "100", "Left")
Macro.Pause("500")
Mouse.Move to coordinate("0", "0")
end
The rest are simple editing. Change the directory listed in the code to where you saved both the picture files earlier, check the infinite loop button, set start and end trigger if you want to (recommended), give it a nice name and save it under the category Aika, and you're done.
4. Codes Explained.When the macro detects that your name is on the waiting room and it is not ready, the macro will move your mouse and left-click the ready button. The pauses are designed to make the macro more reliable against possible lags. Moving the mouse to coordinate 0, 0 is necessary so that your mouse will not be hovering over the ready button. If you notice, if this happens, the ready button would look totally different, causing the macro to be unable to recognize the button.
One more time, I want to remind you the downside of this simple macro: once everybody leaves, you'll be stuck.
5. FAQs.Q: The code is not working!A: This is only possible if you took the wrong pictures, probably too big, or your directory is wrong. Try going to Design View instead of Code View when you're editing your macro. If you delete the written directory, the will be an option to browse for the file. After you select the file, your directory would be automatically be recorded by your macro. This might be an easier way instead of typing down your directory.
Also, remember, don't include the outlines of the pictures. The macro will have to detect the picture as 100% the same.
Q: Can I use Mouse.Click at coordinate instead?A: You sure can. The only reason why I did it this way is because of my more complicated macro which I will show you in a minute, and also detecting picture is more reliable as you can move the waiting room window around without having to worry if your mouse would go to the right place or not.
Q: Can my code be used for both full screen mode and windowed mode?A: I am still unsure if resolution affects the picture detection. I will answer this once I've tried, or if someone can answer it for me, please do.
6. My Code.Okay, I will not explain to you how this works. Just because...
Good luck.
Code:
begin
Function.Execute("checkroom")
Function.Execute("enterroom")
Function.Execute("checkname")
Function.Execute("checkbuff")
Function.Execute("emptyroom")
end
function("checkroom")
if Image.Can not be located on screen("C:\Users\Owner\Desktop\BFFarm\24peeps.png", "100")
and
Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\refresh.png", "100")
begin
Mouse.Move to image("C:\Users\Owner\Desktop\BFFarm\refresh.png", "100")
begin loop()
Mouse.Click("left")
Mouse.Click("left")
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\24peeps.png", "100")
begin
Macro.Break from loop("no")
end
end
end
function
function("enterroom")
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\24peeps.png", "100")
begin
Mouse.Move to image("C:\Users\Owner\Desktop\BFFarm\24peeps.png", "100")
begin loop()
Mouse.Click("left")
Mouse.Click("left")
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\name.png", "100")
begin
Macro.Break from loop("no")
end
end
end
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\changeteam.png", "100")
begin
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\cancel.png", "100", "Left")
Macro.Pause("500")
end
function
function("checkname")
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\name.png", "100")
begin
Macro.Pause("1000")
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\ready.png", "100", "Left")
Macro.Pause("500")
Mouse.Move to coordinate("0", "0")
end
function
function("checkbuff")
if Image.Can not be located on screen("C:\Users\Owner\Desktop\BFFarm\PoDactive.png", "100")
and
Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\PoD.png", "100")
begin
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\PoD.png", "100", "Right")
Macro.Pause("1000")
end
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\bfbuff.png", "100")
begin
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\bfbuff.png", "100", "Right")
Macro.Pause("1000")
end
function
function("emptyroom")
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\dusk0.png", "100")
and
Image.Can not be located on screen("C:\Users\Owner\Desktop\BFFarm\name.png", "100")
begin
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\ready.png", "100", "left")
Macro.Pause("1000")
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\leave.png", "100", "left")
Macro.Pause("1000")
end
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\dawn0.png", "100")
and
Image.Can not be located on screen("C:\Users\Owner\Desktop\BFFarm\name.png", "100")
begin
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\ready.png", "100", "left")
Macro.Pause("1000")
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\leave.png", "100", "left")
Macro.Pause("1000")
end
if Image.Can be located on screen("C:\Users\Owner\Desktop\BFFarm\start.png", "100")
begin
Mouse.Click at image("C:\Users\Owner\Desktop\BFFarm\leave.png", "100", "left")
Macro.Pause("1000")
end
function
24peeps.png =
dusk0.png =
dawn0.png =
start.png =
refresh.png =
leave.png =
PoD.png =
PoDactive.png =