Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 23, 2017 1:59 am

All times are UTC




Post new topic Reply to topic  [ 153 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next
Author Message
 Post subject: Anti - Macro protector script (by Davy)
Thanked: 30 time(s)  Unread post Posted: Mon Apr 18, 2016 10:32 am 
Gold Contributor
Gold Contributor
User avatar



Joined: Fri Oct 30, 2015 5:02 am
Posts: 299
Been thanked: 89 time(s)
Has thanked: 29 time(s)
Contribution Points: 948
Hi everyone ;)

Many of you have requested an Anti-Macro Protector/Anti-Auto, so I decided to open this thread. I hope we can exchange ideas as time goes by.

I've updated the script since, and now it's a lot more accurate :ugeek:
09/2016 : I've readjusted the script and enhanced the ability o the script in detecting / answering the Macro-Protector => 9 spots for RGB detection rather than just 5

Please don't just download the attached files without reading carefully this post till the end, as the information I'm giving will help a lot

Anti-Macro Protector script
You will find in the "Anti-Macro Protector (By Davy).txt" attached down below, the script I'm using every day... and night.
Attachment:


How to use the Anti-Macro Protector script
The script is composed of one function, so it's pretty easy to integrate to your own very personal bot script:

1) Add the Anti-Macro Protector script to your bot script
- download Anti-Macro Protector (By Davy).txt file >> open it in notepad
- copy all the content
- get to your script in BEM >> right-click on it and Edit Macro
- paste all the content from the Anti-Macro Protector (By Davy).txt at the bottom of your bot script

2) Add the Function.Execute command for the Anti-Macro Protector
Insert the following line in you bot script's main loop, and more importantly in every other loops that involve battling a digimon (either attack normal mobs or the aggressive ones)
Code:
Function.Execute("Anti-Macro Protector")

like this:
Attachment:
Image 4.jpg
Image 4.jpg [ 155.91 KiB | Viewed 19256 times ]

Special note: if you feel like the Macro.Pause("3000") (3 seconds) is too long, lower the value "3000" to anything you think is fast enough.
Code:
                         begin
                              Mouse.Move to coordinate("{Xicon4}", "{Yrow2}")
                              Macro.Pause("3000")  <<<<<<<<<<<<<<<<<<<<<<<<<< YOU CAN REDUCE THE PAUSE DURATION (ex: 2000 / 1000 / 100...)
                              Mouse.Click at coordinate("{Xicon4}", "{Yrow2}", "left")
                         end



HyBoi's script + Anti-Macro Protector:
If you're looking for a ready for use script backbone with an Anti-Macro Protector, here is a bot script adapted from HyBoi's. I've already integrated the Anti-Macro Protector function in it (HyBoi's script - part 2). In the 'part 2' script you'll be able to see where the command line " Function.Execute("Anti-Macro Protector") " has been inserted. Note that the RGBs are not set yet. Actually, I've chosen Hyboi's script because it's very adaptable and easy to use. Please follow the link at the bottom of this post to learn how to edit the RGBs.
Attachment:
HyBoi's script - Part 1.txt [905 Bytes]
Downloaded 1430 times

Attachment:

Attachment:
HyBoi's script part 3.txt [274 Bytes]
Downloaded 1088 times


Talking about Screen Resolution
As far as I have experimented, this script is compatible with the following screen resolutions:
1024x768, 1366x768, 1280x768, 1920x1080 >>> in both full screen and window mode
(I've received many other requests for other screen resolutions, but those were the most common ones)

In fact, here is how the macro works: the macro checks for the Anti-Auto window's time bar (it checks anywhere on the screen), once the Anti-Auto is detected, the locations of all the icons (the digimon's faces within the Anti-Auto window) are calculated <<and here is were I want to draw your attention>> As I was trying to adapt the Anti-Macro Protector script to other screen resolutions (always using BEM's investigator), I found out that the size of every elements of the Anti-Auto window remains the same (pixel-wise) from one screen resolution to another. Let me elaborate: if you measure the size (length and width/height) of one digimon pic in 1024x768, you will get the same measurements across all screen resolutions. The same way, the distances between every elements of the Anti-Auto window remain the same from one screen resolution to another...

Conclusion: the Anti-Macro Protector is compatible with all screen resolution

[/b]Anyway, this is where MY own experimentations led me ; you can make your own and we can always discuss the outcomes. The goal of this thread is to get the best out of the Anti-Macro Protector script ;)
Also, if you're not convinced or you don't feel confident around my script, it's okay, there is a link you can check down below that leads to Morpheus' s topic dedicated to the "Anti-Auto (Resolutions)" and another one that shows how to build it:
viewtopic.php?f=304&t=25073
viewtopic.php?f=304&t=25029
(there are plenty others but that's all I could come up with at the moment)


BONUS :) (it's optional)
For those of you who won't let the bot unattended :) here's a little trick. This script will alarm you whenever someone is launching a Macro Protector at you. This way, you won't have to keep an eye on the screen constantly, allowing you to enjoy TV, diner... or you BF/GF :3 ...
From the section "How to use the Anti-Macro Protector script", here are the next steps:
1. CREATE a new macro for the warning alarm:
- In BEM > Developer > Create > Code View : paste the lines below
Code:
 if  Color.Pixel pattern can be located on screen("207,173,0,5,0,207,173,0,0,5,199,163,7,0,5,236,192,32,0,5,253,241,50,0,5,255,217,12,-5,0,255,218,12,0,-5,253,241,50,0,-5,235,192,32,0,-5,198,163,7", "4")
     begin
          Speech.Say("WARNING - Macro protector spoted", "yes")
          Macro.Abort()
     end

- name the script: "Macro Protector Warning"
- category: "Warning"
- Save/Close.

2. RESHAPE your script:
- Add this function to your script, to check for the Macro Protector and activate both the alarm and the Anti-Macro Protector :)
Code:
function("Check Macro Protector")
     if  Color.Pixel pattern can be located on screen("207,173,0,5,0,207,173,0,0,5,199,163,7,0,5,236,192,32,0,5,253,241,50,0,5,255,217,12,-5,0,255,218,12,0,-5,253,241,50,0,-5,235,192,32,0,-5,198,163,7", "4")
          begin
               Macro.Execute new("Warning", "Macro Protector Warning", "No")
               Function.Execute("Anti-Macro Protector")
          end
function



- Now, we'll get back a little bit to the section "How to use the Anti-Macro Protector script - step 2", but instead of inserting " Function.Execute("Anti-Macro Protector") " in your loops, here is what you're gonna insert:
Code:
Function.Execute("Check Macro Protector")


example:
Attachment:

Attachment:
Macro Protector Warning.txt [410 Bytes]
Downloaded 328 times



Notes and Credits
The original script was written by "Syrifina", and then was adapted by "BEMbotter"... from the link below, you can follow how the script has evolved through time, and especially how I adapted it for my own use (starting page 7 of the thread), you will also find some usefull tutorials I posted, they might inspire you somehow ;) please read them well.
viewtopic.php?f=304&t=22422

"BEMbotter" 's anti-macro protector tuto-video
https://www.youtube.com/watch?v=wzHHWmA_h6g
HyBoi 's script:
viewtopic.php?f=304&t=2837
HyBoi 's video tutorial:
https://www.youtube.com/watch?v=4F6FjCq ... e=youtu.be

_________________
Anti - Macro protector script (by Davy) & Macro protector Warning Alarm
viewtopic.php?f=304&t=27497


Last edited by Davy on Thu Sep 22, 2016 4:52 am, edited 36 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 0 time(s)  Unread post Posted: Tue Apr 19, 2016 4:28 am 
New User
New User
User avatar



Joined: Thu Oct 29, 2015 7:09 pm
Posts: 25
Been thanked: 0 time(s)
Has thanked: 4 time(s)
Contribution Points: 34
thank you, gonna try it on my bot :D

_________________
Seize My Castle! :)
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 2 time(s)  Unread post Posted: Tue Apr 19, 2016 8:04 am 
Gold Contributor
Gold Contributor
User avatar



Joined: Fri Oct 30, 2015 5:02 am
Posts: 299
Been thanked: 89 time(s)
Has thanked: 29 time(s)
Contribution Points: 948
Kamui wrote:
thank you, gonna try it on my bot :D

good, let me know if you're facing any issue, I'll do my best to help

_________________
Anti - Macro protector script (by Davy) & Macro protector Warning Alarm
viewtopic.php?f=304&t=27497


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 0 time(s)  Unread post Posted: Tue Apr 19, 2016 1:59 pm 
Gold Contributor
Gold Contributor
User avatar



Joined: Mon Mar 10, 2014 1:50 pm
Posts: 270
Location: File Island Waterfront
Been thanked: 18 time(s)
Has thanked: 7 time(s)
Contribution Points: 12
Thanks i will try then :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 1 time(s)  Unread post Posted: Tue Apr 19, 2016 3:05 pm 
New User
New User



Joined: Fri Oct 16, 2015 9:03 am
Posts: 9
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 14
its works on BEM? i cant edit this script of this bot - viewtopic.php?f=304&t=27497


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 0 time(s)  Unread post Posted: Tue Apr 19, 2016 3:19 pm 
Gold Contributor
Gold Contributor
User avatar



Joined: Fri Oct 30, 2015 5:02 am
Posts: 299
Been thanked: 89 time(s)
Has thanked: 29 time(s)
Contribution Points: 948
almog610 wrote:
its works on BEM? i cant edit this script of this bot - viewtopic.php?f=304&t=27497


- download the scipts (they are ".txt" files, not ".bem" files)
- open in "Notepad"
- copy the contents
- open BEM > Developer > Create > Code View > paste the contents and edit at wish

if you are trying to use the adapted version of HyBoi's script, then you might need to read the tuto on his thread: viewtopic.php?t=2837

_________________
Anti - Macro protector script (by Davy) & Macro protector Warning Alarm
viewtopic.php?f=304&t=27497


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 0 time(s)  Unread post Posted: Thu Apr 21, 2016 4:00 am 
New User
New User
User avatar



Joined: Thu Oct 29, 2015 7:09 pm
Posts: 25
Been thanked: 0 time(s)
Has thanked: 4 time(s)
Contribution Points: 34
is there a way to make it answer faster? cause seems like it's a bit slow to answer :(

_________________
Seize My Castle! :)
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 0 time(s)  Unread post Posted: Thu Apr 21, 2016 7:41 am 
Gold Contributor
Gold Contributor
User avatar



Joined: Fri Oct 30, 2015 5:02 am
Posts: 299
Been thanked: 89 time(s)
Has thanked: 29 time(s)
Contribution Points: 948
Kamui wrote:
is there a way to make it answer faster? cause seems like it's a bit slow to answer :(


Actually, the slow answer was made on purpose ^_^ but only for the tests. I wanted to see the macro in action, to be able to see what icon the macro would pick, and eventually be able to react in time in case the macro failed. But if you feel confident enough, here are two ways to fasten the process:

1. Reduce the "Macro.pause" duration:
if Macro.Pause("3000") (3 seconds duration) is too long for you, you can reduce it: from 3000 -> 300 (or whatever you feel is fast enough). Do this for every section you see in the script ;)
Code:
                         
                         begin
                              Mouse.Move to coordinate("{Xicon...}", "{Yrow...}")
                              Macro.Pause("3000")   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< CHANGE THIS TO  "300"
                              Mouse.Click at coordinate("{Xicon...}", "{Yrow...}", "left")
                         end



2. No Pause at all
you can literally delete the lines: " Mouse.Move to coordinate("") " and " Macro.Pause("") ", and that will make the macro respond as soon as the Anti-Auto is spotted on the screen.

I would recommend the first option :) simply reduce the Macro.Pause duration

_________________
Anti - Macro protector script (by Davy) & Macro protector Warning Alarm
viewtopic.php?f=304&t=27497


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 0 time(s)  Unread post Posted: Mon Apr 25, 2016 12:54 am 
New User
New User



Joined: Thu Apr 21, 2016 4:42 pm
Posts: 2
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
Hey, where can I find main loop? When I put the command Function.Execute("Anti-Macro Protector"), occurs the following error:
A function called 'Function.Execute("Anti-Macro Protector")' does not exist
Help me please.


Top
 Profile  
Reply with quote  
 Post subject: Re: Anti - Macro protector script (by Davy)
Thanked: 1 time(s)  Unread post Posted: Mon Apr 25, 2016 7:13 pm 
Gold Contributor
Gold Contributor
User avatar



Joined: Fri Oct 30, 2015 5:02 am
Posts: 299
Been thanked: 89 time(s)
Has thanked: 29 time(s)
Contribution Points: 948
killerfear wrote:
Hey, where can I find main loop? When I put the command Function.Execute("Anti-Macro Protector"), occurs the following error:
A function called 'Function.Execute("Anti-Macro Protector")' does not exist
Help me please.


First, that error occurred because the macro couldn't find the section "function("Anti-Macro Protector") in your script, not because you didn't insert the command "Function.Execute("Anti-Macro Protector")" the proper way. Next, you can easily identify the main loop / main macro when you switch to "Design view" in the Edit/Creat Macro window
Attachment:
Image 1.png
Image 1.png [ 76.2 KiB | Viewed 20982 times ]

it's not that obvious to insert to insert the command "Function.Execute("Anti-Macro Protector")" from the Design view if you are not accustomed to BEM scripting, but here is what I suggest, post your script In a text. file and I'll see what I can do to help :)

_________________
Anti - Macro protector script (by Davy) & Macro protector Warning Alarm
viewtopic.php?f=304&t=27497


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