Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Fri Apr 29, 2022 11:46 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: F1+left click
Thanked: 0 time(s)  Unread post Posted: Sun Mar 20, 2022 7:53 pm 
New User
New User



Joined: Sun Mar 20, 2022 7:47 pm
Posts: 10
Been thanked: 1 time(s)
Has thanked: 3 time(s)
Contribution Points: 26
Hi, I'm currently using a BEM macro bot for Ragnarok, its a working macro however I want this to cast a spell on the enemy before attacking it. Here's the code that I created ( Thanks to roan ) to press f1+left click if a certain pixel was found. It works but sometimes it is casting on itself not on the enemy.
If there's anyone who can help.
what i want is if a pixel was found. press f1 and left click on that pixel 3times and press left click after then begin the humanly pause function heal

Code:
function("Attack1")
     if  Color.Can be located on screen (RGB)("255", "230", "181", "0")
          begin
               Keyboard.Press key("{<f1>}")
               Mouse.Click at color closest to coordinate (RGB)("255", "230", "181", "0", "640", "375", "left")
          end
     begin
          Mouse.Click at color closest to coordinate (RGB)("255", "230", "181", "0", "640", "375", "left")
          Mouse.Move to coordinate("997", "43")
          if  Color.Pixel pattern can be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
               begin loop("3")
                    Humanly.Pause("250", "500")
                    Function.Execute("Heal")
                    if  Color.Pixel pattern can not be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
                         begin
                              Humanly.Pause("400", "500")
                              Function.Execute("Loot")
                              Macro.Break from loop("yes")
                         end
               end
     end
function


Top
 Profile  
Reply with quote  
 Post subject: Re: F1+left click
Thanked: 0 time(s)  Unread post Posted: Sun Mar 20, 2022 10:13 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2235
Location: USA
Been thanked: 526 time(s)
Has thanked: 38 time(s)
Contribution Points: 17660
It looks like you just need to move your loop up to the top part. It's hard for me to tell because I don't play that game and you don't have any comments as to which coordinates are which, but...

In your loop (that loops 3 times) you only have humanly pause and execute heal so it's only going to press F1 + click one time (because they are in the top part outside the loop); therefore it should do your pause/heal 3 times - not F1+click. Above that (still in the second part) you move the mouse to 997x43 which isn't where you were F1+clicking so that probably explains why it's not casting where you want it. I'm assuming that your location since you said it was casting on itself.

Based on what you wrote and what I assume the coordinates are for, you just need to move the loop to the top part.

_________________
----------------------------------------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: F1+left click
Thanked: 0 time(s)  Unread post Posted: Mon Mar 21, 2022 3:25 am 
New User
New User



Joined: Mon Mar 21, 2022 2:55 am
Posts: 9
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 31
mhalkita14 wrote:
Hi, I'm currently using a BEM macro bot for Ragnarok, its a working macro however I want this to cast a spell on the enemy before attacking it. Here's the code that I created ( Thanks to roan ) to press f1+left click if a certain pixel was found. It works but sometimes it is casting on itself not on the enemy.
If there's anyone who can help.
what i want is if a pixel was found. press f1 and left click on that pixel 3times and press left click after then begin the humanly pause function heal

Code:
function("Attack1")
     if  Color.Can be located on screen (RGB)("255", "230", "181", "0")
          begin
               Keyboard.Press key("{<f1>}")
               Mouse.Click at color closest to coordinate (RGB)("255", "230", "181", "0", "640", "375", "left")
          end
     begin
          Mouse.Click at color closest to coordinate (RGB)("255", "230", "181", "0", "640", "375", "left")
          Mouse.Move to coordinate("997", "43")
          if  Color.Pixel pattern can be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
               begin loop("3")
                    Humanly.Pause("250", "500")
                    Function.Execute("Heal")
                    if  Color.Pixel pattern can not be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
                         begin
                              Humanly.Pause("400", "500")
                              Function.Execute("Loot")
                              Macro.Break from loop("yes")
                         end
               end
     end
function



:( :( :( same here


Top
 Profile  
Reply with quote  
 Post subject: Re: F1+left click
Thanked: 0 time(s)  Unread post Posted: Mon Mar 21, 2022 5:31 am 
New User
New User



Joined: Sun Mar 20, 2022 7:47 pm
Posts: 10
Been thanked: 1 time(s)
Has thanked: 3 time(s)
Contribution Points: 26
Syrifina wrote:
It looks like you just need to move your loop up to the top part. It's hard for me to tell because I don't play that game and you don't have any comments as to which coordinates are which, but...

In your loop (that loops 3 times) you only have humanly pause and execute heal so it's only going to press F1 + click one time (because they are in the top part outside the loop); therefore it should do your pause/heal 3 times - not F1+click. Above that (still in the second part) you move the mouse to 997x43 which isn't where you were F1+clicking so that probably explains why it's not casting where you want it. I'm assuming that your location since you said it was casting on itself.

Based on what you wrote and what I assume the coordinates are for, you just need to move the loop to the top part.


Thank you, I was able to get my desired macro and now I'm having issues with the loop.

Quote:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
Humanly.Pause("400", "500")
end
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
begin loop("5")
end
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
Mouse.Move to coordinate("997", "43")
if Color.Pixel pattern can be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
begin loop()
Humanly.Pause("250", "500")
Function.Execute("Heal")
if Color.Pixel pattern can not be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
begin
Humanly.Pause("400", "500")
Function.Execute("Loot")
Macro.Break from loop("yes")
end
end
end
end
function


as u can see the "Keyboard.Press key("{<f1>}") Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")" should be looped 5x and when I check the execution logs it seems like it is not looping.

Quote:
Checking if: Color.Can be located on screen (RGB)(R: 247, G: 230, B: 206, Range: 0)
Result: Yes
Executing: Keyboard.Press key(Key: {<f1>})
Executing: Mouse.Click at color closest to coordinate (RGB)(R: 247, G: 230, B: 206, Range: 0, X Coordinate: 640, Y Coordinate: 375, Mouse Button: left)
Executing: Macro.Do nothing
Executing: Macro.Do nothing
Executing: Macro.Do nothing
Executing: Macro.Do nothing
Executing: Macro.Do nothing


Top
 Profile  
Reply with quote  
 Post subject: Re: F1+left click
Thanked: 0 time(s)  Unread post Posted: Mon Mar 21, 2022 8:43 am 
New User
New User



Joined: Sun Mar 20, 2022 7:47 pm
Posts: 10
Been thanked: 1 time(s)
Has thanked: 3 time(s)
Contribution Points: 26
mhalkita14 wrote:
Syrifina wrote:
It looks like you just need to move your loop up to the top part. It's hard for me to tell because I don't play that game and you don't have any comments as to which coordinates are which, but...

In your loop (that loops 3 times) you only have humanly pause and execute heal so it's only going to press F1 + click one time (because they are in the top part outside the loop); therefore it should do your pause/heal 3 times - not F1+click. Above that (still in the second part) you move the mouse to 997x43 which isn't where you were F1+clicking so that probably explains why it's not casting where you want it. I'm assuming that your location since you said it was casting on itself.

Based on what you wrote and what I assume the coordinates are for, you just need to move the loop to the top part.


Thank you, I was able to get my desired macro and now I'm having issues with the loop.

Quote:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
Humanly.Pause("400", "500")
end
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
begin loop("5")
end
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
Mouse.Move to coordinate("997", "43")
if Color.Pixel pattern can be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
begin loop()
Humanly.Pause("250", "500")
Function.Execute("Heal")
if Color.Pixel pattern can not be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
begin
Humanly.Pause("400", "500")
Function.Execute("Loot")
Macro.Break from loop("yes")
end
end
end
end
function


as u can see the "Keyboard.Press key("{<f1>}") Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")" should be looped 5x and when I check the execution logs it seems like it is not looping.

Quote:
Checking if: Color.Can be located on screen (RGB)(R: 247, G: 230, B: 206, Range: 0)
Result: Yes
Executing: Keyboard.Press key(Key: {<f1>})
Executing: Mouse.Click at color closest to coordinate (RGB)(R: 247, G: 230, B: 206, Range: 0, X Coordinate: 640, Y Coordinate: 375, Mouse Button: left)
Executing: Macro.Do nothingo
Executing: Macro.Do nothing
Executing: Macro.Do nothing
Executing: Macro.Do nothing
Executing: Macro.Do nothing


Figured this out btw. By repeating the process and not using the loop code XD


Top
 Profile  
Reply with quote  
 Post subject: Re: F1+left click
Thanked: 1 time(s)  Unread post Posted: Tue Mar 22, 2022 3:19 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2235
Location: USA
Been thanked: 526 time(s)
Has thanked: 38 time(s)
Contribution Points: 17660
Glad you figured it out.

Incidentally, it looks like you're scripting the loop wrong or just made a mistake. You wrote:
Code:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
begin loop("5")
end
If you want it to loop, whatever you want to loop needs to be within: Begin loop("5") ...and...end. That's the part that will loop. Your press key (F1) is outside the loop. So it should be written like this:
Code:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin loop("5")
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
end

_________________
----------------------------------------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: F1+left click
Thanked: 0 time(s)  Unread post Posted: Tue Mar 22, 2022 7:46 am 
New User
New User



Joined: Sun Mar 20, 2022 7:47 pm
Posts: 10
Been thanked: 1 time(s)
Has thanked: 3 time(s)
Contribution Points: 26
Syrifina wrote:
Glad you figured it out.

Incidentally, it looks like you're scripting the loop wrong or just made a mistake. You wrote:
Code:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
begin loop("5")
end
If you want it to loop, whatever you want to loop needs to be within: Begin loop("5") ...and...end. That's the part that will loop. Your press key (F1) is outside the loop. So it should be written like this:
Code:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin loop("5")
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
end


Thank you so much!! This'll make my life easy when changing RGB colors XD


Top
 Profile  
Reply with quote  
 Post subject: Re: F1+left click
Thanked: 0 time(s)  Unread post Posted: Tue Mar 29, 2022 7:31 am 
New User
New User



Joined: Sun Mar 20, 2022 7:47 pm
Posts: 10
Been thanked: 1 time(s)
Has thanked: 3 time(s)
Contribution Points: 26
Syrifina wrote:
Glad you figured it out.

Incidentally, it looks like you're scripting the loop wrong or just made a mistake. You wrote:
Code:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
begin loop("5")
end
If you want it to loop, whatever you want to loop needs to be within: Begin loop("5") ...and...end. That's the part that will loop. Your press key (F1) is outside the loop. So it should be written like this:
Code:
if Color.Can be located on screen (RGB)("129", "114", "145", "0")
begin loop("5")
Keyboard.Press key("{<f1>}")
Mouse.Click at color closest to coordinate (RGB)("129", "114", "145", "0", "640", "375", "left")
end



Hi, I will just again. Your previous answers are very helpful now I encounter an issue again.
So I'm using pixel color to locate a monster and execute the attack1 function however there are maps where there's a lot of walls where in the macro is begin looping and looping until the pixel of the monsters disappered (Killed by others players or moved out of the window) I tried executing a stopwatch so that it will start a flywithoutcondition function however it doesn't seem to fly when exceeded 60seconds.

Here's the codes


Code:
function("Attack1")
     if  Color.Can be located on screen (RGB)("214", "58", "58", "0")
          begin
               Macro.Start stopwatch("watch")
               Mouse.Click at color closest to coordinate (RGB)("214", "58", "58", "0", "640", "375", "left")
               Mouse.Move to coordinate("997", "43")
               Humanly.Pause("600", "1000")
          end
     if  Color.Can be located on screen (RGB)("214", "58", "58", "0")
          begin loop("5")
               Keyboard.Press key("{<f1>}")
               Mouse.Click at color closest to coordinate (RGB)("214", "58", "58", "0", "640", "375", "left")
               Humanly.Pause("600", "1000")
          end
     if  Color.Can be located on screen (RGB)("214", "58", "58", "0")
          begin
               Mouse.Click at color closest to coordinate (RGB)("214", "58", "58", "0", "640", "375", "left")
               Mouse.Move to coordinate("997", "43")
               Humanly.Pause("600", "1000")
          end
     begin
          Macro.Read stopwatch("watch", "variableForResult")
     end
     if  Macro.Stopwatch counter is greater than("watch", "60000")
          begin
               Function.Execute("FlyWithoutCondition")
          end
     if  Color.At coordinate is (RGB)("230", "140", "173", "73", "83")
          begin
               Function.Execute("FlyWithoutCondition")
          end
     if  Color.At coordinate is (RGB)("230", "230", "238", "59", "84")
          begin
               Function.Execute("FlyWithoutCondition")
          end
     if  Color.Can be located on screen (RGB)("181", "197", "197", "0")
          begin
               Function.Execute("lootcard")
               Humanly.Pause("600", "2000")
          end
     if  Color.Pixel pattern can be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
          begin loop("2")
               Humanly.Pause("250", "500")
               Function.Execute("Heal")
               if  Color.Pixel pattern can not be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")
                    begin
                         Humanly.Pause("400", "500")
                         Function.Execute("Loot")
                         Macro.Break from loop("yes")
                    end
          end
function


Top
 Profile  
Reply with quote  
 Post subject: Re: F1+left click
Thanked: 0 time(s)  Unread post Posted: Tue Mar 29, 2022 10:53 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2235
Location: USA
Been thanked: 526 time(s)
Has thanked: 38 time(s)
Contribution Points: 17660
You should check the execution log. It may not be starting because it only starts when this happens:
if Color.Can be located on screen (RGB)("214", "58", "58", "0")
...the execution log will tell you if it's finding that color or not; meaning whether the stopwatch is even starting. It will also tell you when it's reading it (and I think the value). Following that it will say what it's doing and you can check that against what you want it to do. (but I'd guess it's not starting).

Additionally, I'm not sure why that whole function would work. It's not formatted in the correct syntax, but maybe it still does anyway. Functions should be written like this:

function("name")
begin
...what you want it to do
end
function

You don't start with a "begin" so I'm surprised it compiled when you saved it, but if it's working then I guess it's okay. I would check the execution log though and see if that function is working at all.

_________________
----------------------------------------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: F1+left click
Thanked: 0 time(s)  Unread post Posted: Wed Mar 30, 2022 9:34 am 
New User
New User



Joined: Sun Mar 20, 2022 7:47 pm
Posts: 10
Been thanked: 1 time(s)
Has thanked: 3 time(s)
Contribution Points: 26
Syrifina wrote:
You should check the execution log. It may not be starting because it only starts when this happens:
if Color.Can be located on screen (RGB)("214", "58", "58", "0")
...the execution log will tell you if it's finding that color or not; meaning whether the stopwatch is even starting. It will also tell you when it's reading it (and I think the value). Following that it will say what it's doing and you can check that against what you want it to do. (but I'd guess it's not starting).

Additionally, I'm not sure why that whole function would work. It's not formatted in the correct syntax, but maybe it still does anyway. Functions should be written like this:

function("name")
begin
...what you want it to do
end
function

You don't start with a "begin" so I'm surprised it compiled when you saved it, but if it's working then I guess it's okay. I would check the execution log though and see if that function is working at all.


it works, I dunno what u think is wrong but that is a whole function u see it started with function(attack) and ended with function :D :D so far I'm not receiving any error logs and its completely working. the only thing that I am having trouble with is being stuck on a monster pixel that is on the otherside of a wall which u cannot walk to.I really don't have any idea about coding and Im just adapting what I see in the forum and copy how they position their configuration so far its working :lol: :lol:

I'm thinking to put the stop watch before locating the pixel I'll let u know if I encounter this problem.

Im also thinkinig that Unlimit area of interest might work however I don't know how to position it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

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