Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Wed May 22, 2019 1:14 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: XYZ waypoints, help?
Thanked: 0 time(s)  Unread post Posted: Fri Feb 22, 2019 1:41 pm 
New User
New User



Joined: Fri Feb 03, 2012 3:16 pm
Posts: 8
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 34
Code:
 begin
     Function.Execute("check1")
 end

function("check1")
     begin
          if  Memory.Value is below("cyntara", "Cyntara.exe+53CE04", "4", "1")
               and
               Window.Title of active window is("Cyntara", "no")
               and
               Memory.Value is between("cyntara", "Cyntara.exe+0053CE00,0c", "4", "814", "817")
               and
               Memory.Value is between("cyntara", "Cyntara.exe+0053CE00,10", "4", "980", "982")
               begin
                    Function.Execute("check2")
               end
          Function.Execute("go1")
     end
function

function("check2")
     begin
          if  Memory.Value is below("cyntara", "Cyntara.exe+53CE04", "4", "1")
               and
               Window.Title of active window is("Cyntara", "no")
               and
               Memory.Value is between("cyntara", "Cyntara.exe+0053CE00,0c", "4", "799", "799")
               and
               Memory.Value is between("cyntara", "Cyntara.exe+0053CE00,10", "4", "1015", "1015")
               begin
                    Function.Execute("check1")
               end
          Function.Execute("go2")
     end
function

function("go1")
     begin
          Mouse.Move to pixel pattern("8,98,36,0,-1,47,135,59,3,-2,222,193,175,3,0,8,98,36,0,1,8,98,36,0,1,122,93,73,-1,2,222,193,175,-2,1,122,93,73,-1,0,8,98,36,0,-1,47,135,59,0,-1,68,206,87,0,-1,47,135,59,0,-1,222,193,175,0,-1,222,193,175,0,-2,187,155,135,0,-1,70,58,50,2,1,187,155,135,0,1,222,193,175,0,6,222,193,175,0,1,187,155,135,1,-1,222,193,175,1,-1,222,193,175,1,-1,187,155,135,0,-1,187,155,135,-4,-3,222,193,175,-3,2,68,206,87,0,-1,222,193,175,1,-1,222,193,175,-2,0,70,58,50,-1,1,70,58,50,0,2,70,58,50,0,-1,70,58,50,0,2,70,58,50,0,1,70,58,50,1,0,187,155,135,1,0,222,193,175,0,1,187,155,135,-1,0,70,58,50,1,1,70,58,50,1,0,187,155,135,1,0,187,155,135,1,0,187,155,135,0,-4,68,206,87,0,-1,47,135,59,1,-1,47,135,59,0,1,68,206,87,0,1,47,135,59,1,-1,47,135,59,0,-1,68,206,87,0,-1,47,135,59,-4,2,47,135,59,0,1,68,206,87,0,1,47,135,59,0,1,8,98,36,3,-1,8,98,36,-1,0,47,135,59,0,1,8,98,36,2,-1,122,93,73,0,-1,8,98,36,1,-3,68,206,87,-2,5,122,93,73", "0", "yes")
          Macro.Pause("1")
          Mouse.Click("left")
          Mouse.Move to pixel pattern("8,98,36,0,-1,47,135,59,3,-2,222,193,175,3,0,8,98,36,0,1,8,98,36,0,1,122,93,73,-1,2,222,193,175,-2,1,122,93,73,-1,0,8,98,36,0,-1,47,135,59,0,-1,68,206,87,0,-1,47,135,59,0,-1,222,193,175,0,-1,222,193,175,0,-2,187,155,135,0,-1,70,58,50,2,1,187,155,135,0,1,222,193,175,0,6,222,193,175,0,1,187,155,135,1,-1,222,193,175,1,-1,222,193,175,1,-1,187,155,135,0,-1,187,155,135,-4,-3,222,193,175,-3,2,68,206,87,0,-1,222,193,175,1,-1,222,193,175,-2,0,70,58,50,-1,1,70,58,50,0,2,70,58,50,0,-1,70,58,50,0,2,70,58,50,0,1,70,58,50,1,0,187,155,135,1,0,222,193,175,0,1,187,155,135,-1,0,70,58,50,1,1,70,58,50,1,0,187,155,135,1,0,187,155,135,1,0,187,155,135,0,-4,68,206,87,0,-1,47,135,59,1,-1,47,135,59,0,1,68,206,87,0,1,47,135,59,1,-1,47,135,59,0,-1,68,206,87,0,-1,47,135,59,-4,2,47,135,59,0,1,68,206,87,0,1,47,135,59,0,1,8,98,36,3,-1,8,98,36,-1,0,47,135,59,0,1,8,98,36,2,-1,122,93,73,0,-1,8,98,36,1,-3,68,206,87,-2,5,122,93,73", "0", "yes")
          Macro.Pause("1")
          Mouse.Click("left")
     end
function

function("go2")
     begin
          Mouse.Move to pixel pattern("144,109,86,0,-1,0,74,128,0,-1,0,74,128,0,-1,144,109,86,0,-1,187,155,135,-1,0,187,155,135,-1,0,187,155,135,-1,0,187,155,135,-1,0,187,155,135,-1,1,188,163,148,0,1,15,15,255,1,0,0,74,128,2,0,0,74,128,1,0,15,15,255,-2,0,0,74,128,-1,-1,15,15,255,1,0,15,15,255,1,0,15,15,255,1,0,0,74,128,0,2,15,15,255,0,1,0,74,128,-1,0,15,15,255,-1,1,0,74,128,0,1,15,15,255,0,1,0,74,128,1,0,0,74,128,0,-1,0,74,128,0,-1,0,74,128,-3,-2,0,74,128,0,3,222,193,175,0,-1,222,193,175,4,3,187,155,135,2,-1,215,185,166,2,-2,70,58,50,0,-1,70,58,50,-1,0,215,185,166,0,-2,187,155,135,-2,-3,70,58,50,-2,0,70,58,50,-2,5,222,193,175,-3,0,70,58,50,0,2,70,58,50,1,1,79,66,57,1,1,79,66,57,2,1,70,58,50,3,0,70,58,50,1,-3,222,193,175,0,-1,222,193,175,-4,-1,15,15,255,-2,0,222,193,175,-2,-2,70,58,50,1,-1,79,66,57,2,-2,70,58,50", "0", "yes")
          Macro.Pause("1")
          Mouse.Click("left")
          Mouse.Move to pixel pattern("144,109,86,0,-1,0,74,128,0,-1,0,74,128,0,-1,144,109,86,0,-1,187,155,135,-1,0,187,155,135,-1,0,187,155,135,-1,0,187,155,135,-1,0,187,155,135,-1,1,188,163,148,0,1,15,15,255,1,0,0,74,128,2,0,0,74,128,1,0,15,15,255,-2,0,0,74,128,-1,-1,15,15,255,1,0,15,15,255,1,0,15,15,255,1,0,0,74,128,0,2,15,15,255,0,1,0,74,128,-1,0,15,15,255,-1,1,0,74,128,0,1,15,15,255,0,1,0,74,128,1,0,0,74,128,0,-1,0,74,128,0,-1,0,74,128,-3,-2,0,74,128,0,3,222,193,175,0,-1,222,193,175,4,3,187,155,135,2,-1,215,185,166,2,-2,70,58,50,0,-1,70,58,50,-1,0,215,185,166,0,-2,187,155,135,-2,-3,70,58,50,-2,0,70,58,50,-2,5,222,193,175,-3,0,70,58,50,0,2,70,58,50,1,1,79,66,57,1,1,79,66,57,2,1,70,58,50,3,0,70,58,50,1,-3,222,193,175,0,-1,222,193,175,-4,-1,15,15,255,-2,0,222,193,175,-2,-2,70,58,50,1,-1,79,66,57,2,-2,70,58,50", "0", "yes")
          Macro.Pause("1")
          Mouse.Click("left")
     end
function

What I'm trying to do is make the bot click on the minimap and move to a map marker, then use memory function to check if it's within range of the marker. My problem is it doesn't wait until it's in range of the other waypoint, it just goes in a loop clicking both waypoints. Does anyone know if there is a better way to go about this? It's a 2d game so the Z axis is pretty irrelevant.


Top
 Profile  
Reply with quote  
 Post subject: Re: XYZ waypoints, help?
Thanked: 0 time(s)  Unread post Posted: Sat Feb 23, 2019 8:57 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1891
Location: USA
Been thanked: 405 time(s)
Has thanked: 33 time(s)
Contribution Points: 16540
I think you should check your execution log. From what I see from your script, the way you described it working is one possible result.

From what I read in your script you tell it to: execute function check1, if the criteria for these memory addresses are not true, then execute go1 which is clicking on the pixel patterns. This is because you have the function.exe go1 outside of the criteria (the begin/end in which you check the memory pointers). Then the same for check2/go2...which means if it returns negative results for both, then your in a clicking loop. The execution log will show you the results of the memory checks and the values returned so you can see if this is happening.

The same would be true if both checks are true...you would be in a "check" loop and never click on anything.

I could be off-base, but I would assume (by what you described) that you may have function.exe check2/go1 swapped in the first one and function.exe check1/go2 swapped in the second. Meaning if the memory addresses are correct, then you want it to exe go1 (click at pixel patterns); if they are not correct exe check2.

Additionally, macro.pause (and time-based instructions) are in ms; you are using a 1ms pause which is very short...I'm not sure your mouse could travel to the correct destination(s) in 1ms to click where it is supposed to. I would suggest adding a little more time to the pause; I would start with 100ms and experiment with decreasing it...but if you're not having a problem with that, then don't worry about it.

Hope that helps...there is a chance I didn't fully understand what you're doing with the script, so just post more details and I can look deeper.

_________________
----------------------------------------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  [ 2 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