Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Jan 21, 2021 8:11 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Auto Login to the Game
Thanked: 2 time(s)  Unread post Posted: Fri Feb 15, 2013 9:21 pm 
Moderator
Moderator



Joined: Tue Feb 05, 2013 5:45 am
Posts: 280
Been thanked: 49 time(s)
Has thanked: 11 time(s)
Contribution Points: 5371
This is almost out of the box macro, you just need to have some pictures saved through navigation.

*** Modified (09/24/2013) *** Thanks to stairbuilder for his advice.

I have modified this macro so user can give input at the first when macro started; macro will store those input globally and then this macro will run on those choices. It will work for any pin numbers and characters.


AutoLogin
Code:
 begin
     Macro.Execute new("Aika", "UserInput", "yes")
     Macro.Execute new("Aika", "LogIn", "yes")
 end


UserInput
Code:
 begin
     // User Name
     begin loop()
          Window.Request user text input("What is your User Name?", "userName")
          if  Variable.Is empty("userName")
               begin
                    Function.Execute setting 1 variable("checkEmpty", "userInput", "User Name")
               end
          if  Variable.Is not empty("userName")
               begin
                    Variable.Set global("globalUserName", "{userName}")
                    Macro.Break from loop("no")
               end
     end
     // Password
     begin loop()
          Window.Request user text input("What is your Password?", "passWord")
          if  Variable.Is empty("passWord")
               begin
                    Function.Execute setting 1 variable("checkEmpty", "userInput", "Password")
               end
          if  Variable.Is not empty("passWord")
               begin
                    Variable.Set global("globalPassWord", "{passWord}")
                    Macro.Break from loop("no")
               end
     end
     // Channel (By Default PvP)
     Window.Request user single choice input("Which Channel would you like to join?", "PvP;PvE", "channel")
     Variable.Set global("globalChannel", "{channel}")
     // Which Character (By Default Left Slot)
     Window.Request user multiple buttons choice("Which character slot would you like to play?", "Left;Middle;Right", "charToPlay")
     Variable.Set global("globalCharToPlay", "{charToPlay}")
     // Pin Number
     begin loop()
          Window.Request user text input("What is your Pin Number?", "pinNumber")
          if  Variable.Is empty("pinNumber")
               or
               Variable.Is non numeric("pinNumber")
               or
               Variable.Is not between (Math)("pinNumber", "1000", "9999")
               begin
                    Window.Display message box("Pin Number can not be empty and It has to be 4 digits Numeric.", "yes")
               end
          if  Macro.Previous criteria was not met()
               begin
                    Variable.Set global("globalPinNumber", "{pinNumber}")
                    Macro.Break from loop("no")
               end
     end
     //
     // End of first Begin
 end

function("checkEmpty")
     begin
          // Text Example
          Variable.Evaluate (Text) ("{userInput} can not be empty, Please re-enter.","input")
          Window.Display message box("{input}", "yes")
     end
function
 

LogIn
Code:
   begin
     // Bring Aika Client to the front
     Window.Bring to front("AikaClient", "No")
     // Check if user is loged out
     if  Image.Can be located on screen near coordinate("C:\BlueEyeMacro\Login\login.jpg", "99", "960",  "635", "100")
          // If sometimes user can't log in (server problem, lag), it repeats the same process again and again to login
          begin loop()
               // This is just to be on a safe side, this will click the cancel button if there is "Would you like to exit the game windows (if ESC button was pressed while on login in mode)" if not then it just click on a blank space.
               Mouse.Click at coordinate("1026", "342", "left")
               Macro.Pause("1000")
               // Click on the right most side of the User Name  text box
               Mouse.Click at coordinate("1036", "672", "left")
               // Delete everything that is already there (when some micro running, it does not know user is loged out so there will be some garbage text)
               Keyboard.Hold keys("{<backspace>}")
               Macro.Pause("1000")
               Keyboard.Release keys("{<backspace>}")
               // Get global user Name from UserInput Macro
               Variable.Get global("globalUserName", "userName")
               Keyboard.Press keys("{userName}")
               Macro.Pause("2000")
               // Click on the right most side of the Password  text box
               Mouse.Click at coordinate("1030", "704", "left")
               Keyboard.Hold keys("{<backspace>}")
               Macro.Pause("1000")
               Keyboard.Release keys("{<backspace>}")
               // Get global Password from UserInput Macro
               Variable.Get global("globalPassWord", "passWord")
               Keyboard.Press keys("{passWord}")
               Macro.Pause("2000")
               Keyboard.Press key("{<enter>}")
               Macro.Pause("5000")
               // Choose world
               Mouse.Click at coordinate("955", "660", "left")
               Macro.Pause("10000")
               // Choose Channel
               // You can choose here either pvp or pve channel to go
               // Get global Channel from UserInput Macro
               Variable.Get global("globalChannel", "channel")
               if  Variable.Is equal to("channel", "PvP")
                    begin
                         // Choose PvP Channel
                         Mouse.Double click at coordinate("935", "617", "left")
                    end
               if  Variable.Is equal to("channel", "PvE")
                    begin
                         // Choose PvE channel
                         Mouse.Double click at coordinate("935", "642", "left")
                    end
               Macro.Pause("5000")
               // You can choose here which char to choose, left middle or right
               // Get global CharToPlay  from UserInput Macro
               Variable.Get global("globalCharToPlay", "charToPlay")
               // this is for the left char
               if  Variable.Is equal to("charToPlay", "Left")
                    begin
                         Mouse.Double click at coordinate("620", "615", "left")
                    end
               // this is for the middle char
               if  Variable.Is equal to("charToPlay", "Middle")
                    begin
                         Mouse.Double click at coordinate("994", "663", "left")
                    end
               // this is for the all the way right char
               if  Variable.Is equal to("charToPlay", "Right")
                    begin
                         Mouse.Double click at coordinate("1367", "602", "left")
                    end
               Macro.Pause("2000")
               // Get global Pin Number  from UserInput Macro
               Variable.Get global("globalPinNumber", "pinNumber")
               Variable.Set("count", "0")
//It extract each number from the pin number
               while  Variable.Is less than (Math)("count", "4")
                    begin
                         Variable.Get character at index("pinNumber", "{count}", "image")
                         Variable.Evaluate (Text) ("C:\BlueEyeMacro\Login\{image}.jpg","input")
                         Mouse.Click at image("{input}", "100", "left")
                         Macro.Pause("1000")
                         Variable.Increment (Math)("count")
                    end
               // Wait for 1 minute
               Macro.Pause("60000")
               // You have to save this picture too to make sure you are already in the game
               if  Image.Can be located on screen near coordinate("C\BlueEyeMacro\loginsuccessful.jpg", "99", "1770", "113", "50")
                    begin
                         // This is the part where you write other micro or link other micro after successfull login. I usually port my char to save point and start grinding ;)
                    end
          end
 end
 


You need these .jpg files.
0.jpg, 1.jpg, ......, 9.jpg

Image Image ImageImageImageImageImageImageImageImage

Login.jpg
Image

LoginSuccessful.jpg (It is a picture of World Map Opener(it is on the left side of the mini map)
Image

_________________
Heavy Duty Mod, always watching with both eyes open 8-)

Please --- Please --- Please DO NOT reply to spam thread/post.
I will give you CP if you report spam thread/post instead of replying to it. :)

Click Here>> Let's make BEM forum out of spammers

-------------------------
Check out my Bots
-------------------------

Auto login to the game


Last edited by LetMeBeStealth on Tue Sep 24, 2013 8:16 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 1 time(s)  Unread post Posted: Sat Feb 16, 2013 12:06 am 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 69 time(s)
Has thanked: 28 time(s)
Contribution Points: 581
nice
thanks for sharing

I don't play aika so not sure how the character_select is set up, but I play allods and switch characters quite a bit so I added this at the beginning of the scripts
basically it has a popup that allows you to choose which character you will be playing and then sets the x,y to click accordingly
the coords in this are all the same
Code:
 begin
     Window.Request user single choice input("Please slot of character you wish to bot with.", "Position1;Position2;Position3;Position4;", "whichSlot")
     if  Variable.Is equal to("whichSlot", "Position1")
          begin
               Mouse.Double click at coordinate("620", "615", "left")
          end
     if  Variable.Is equal to("whichSlot", "Position2")
          begin
               Mouse.Double click at coordinate("620", "615", "left")
          end
     if  Variable.Is equal to("whichSlot", "Position2")
          begin
               Mouse.Double click at coordinate("620", "615", "left")
          end
     if  Variable.Is equal to("whichSlot", "Position4")
          begin
               Mouse.Double click at coordinate("620", "615", "left")
          end
 end
 

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Sat Feb 16, 2013 9:28 am 
Moderator
Moderator



Joined: Tue Feb 05, 2013 5:45 am
Posts: 280
Been thanked: 49 time(s)
Has thanked: 11 time(s)
Contribution Points: 5371
Thank you very much.

That will work perfectly in AIKA too.

When I was writing that code, I was thinking about player being AFK and got disconected. Thats the reason I made fix coordinate for the player. When botting, if player disconnected and he/she is afk then system waits for the input can can't automatically log in.

_________________
Heavy Duty Mod, always watching with both eyes open 8-)

Please --- Please --- Please DO NOT reply to spam thread/post.
I will give you CP if you report spam thread/post instead of replying to it. :)

Click Here>> Let's make BEM forum out of spammers

-------------------------
Check out my Bots
-------------------------

Auto login to the game


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 1 time(s)  Unread post Posted: Sat Feb 16, 2013 2:33 pm 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 69 time(s)
Has thanked: 28 time(s)
Contribution Points: 581
LetMeBeStealth wrote:
Thank you very much.

That will work perfectly in AIKA too.

When I was writing that code, I was thinking about player being AFK and got disconected. Thats the reason I made fix coordinate for the player. When botting, if player disconnected and he/she is afk then system waits for the input can can't automatically log in.


what I posted saves to a variable so if you structure the code correctly the only time that it would ask for the user input is on the initial startup so it would work fine for what you are doing
So you just put it at the top of your code outside of the loop
you can do the same thing for user name and password

Code:
 begin
     Window.Request user text input("What is your user name?", "userName")
     Window.Request user text input("What is your account password?", "password")
     Keyboard.Press keys("userName")
     Keyboard.Press keys("password")
 end

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Sat Feb 16, 2013 5:05 pm 
Moderator
Moderator



Joined: Tue Feb 05, 2013 5:45 am
Posts: 280
Been thanked: 49 time(s)
Has thanked: 11 time(s)
Contribution Points: 5371
stairbuilder wrote:
LetMeBeStealth wrote:
Thank you very much.

That will work perfectly in AIKA too.

When I was writing that code, I was thinking about player being AFK and got disconected. Thats the reason I made fix coordinate for the player. When botting, if player disconnected and he/she is afk then system waits for the input can can't automatically log in.


what I posted saves to a variable so if you structure the code correctly the only time that it would ask for the user input is on the initial startup so it would work fine for what you are doing
So you just put it at the top of your code outside of the loop
you can do the same thing for user name and password

Code:
 begin
     Window.Request user text input("What is your user name?", "userName")
     Window.Request user text input("What is your account password?", "password")
     Keyboard.Press keys("userName")
     Keyboard.Press keys("password")
 end



Now I see what you trying to do. This is awesome thanks.

_________________
Heavy Duty Mod, always watching with both eyes open 8-)

Please --- Please --- Please DO NOT reply to spam thread/post.
I will give you CP if you report spam thread/post instead of replying to it. :)

Click Here>> Let's make BEM forum out of spammers

-------------------------
Check out my Bots
-------------------------

Auto login to the game


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Sat Feb 16, 2013 5:44 pm 
Gold Contributor
Gold Contributor



Joined: Sat Oct 13, 2012 3:41 pm
Posts: 357
Been thanked: 69 time(s)
Has thanked: 28 time(s)
Contribution Points: 581
NP
trying to share things I am learning as I learn it
good way to get some CP ;)

_________________
Feel free to give constructive criticism to any code I post
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Tue Mar 26, 2013 2:14 pm 
Active User
Active User



Joined: Mon Feb 04, 2013 11:10 am
Posts: 40
Been thanked: 0 time(s)
Has thanked: 8 time(s)
Contribution Points: 73
LetMeBeStealth wrote:
This is almost out of box macro, you just need to have some pictures saved through navigation.

Code:
 begin
     // Bring Aika Client to the front
     Window.Bring to front("AikaClient", "No")
     // Check if user is loged out
     if  Image.Can be located on screen near coordinate("C\BlueEyeMacro\login.jpg", "99", "960",  "635", "100")
          // If sometimes user can't log in (server problem, lag), it repeats the same process again and again to login
          begin loop()
               // This is just to be on a safe side, this will click the cancel button if there is "Would you like to exit the game windows (if ESC button was pressed while on login in mode)" if not then it will just click on a blank space.
               Mouse.Click at coordinate("1026", "342", "left")
               Macro.Pause("1000")
               // Click on the right most side of the User Name text box
               Mouse.Click at coordinate("1036", "672", "left")
               // Delete everything that is already there (when some micro running, it does not know user is loged out so there will be some garbage text)
               Keyboard.Hold keys("{<backspace>}")
               Macro.Pause("1000")
               Keyboard.Release keys("{<backspace>}")
               Keyboard.Press keys("userName")
               Macro.Pause("2000")
               // Click on the right most side of the Password text box
               Mouse.Click at coordinate("1030", "704", "left")
               Keyboard.Hold keys("{<backspace>}")
               Macro.Pause("1000")
               Keyboard.Release keys("{<backspace>}")
               Keyboard.Press keys("password")
               Macro.Pause("2000")
               Keyboard.Press key("{<enter>}")
               Macro.Pause("5000")
               // Choose world
               Mouse.Click at coordinate("955", "660", "left")
               Macro.Pause("10000")
               // Choose Channel
               Mouse.Double click at coordinate("935", "617", "left")
               Macro.Pause("5000")
               // Click on the char (My char is on the left most side so it always works, if you have multiple characters then you have to provide the exact X & Y Coordinates of your char)
               Mouse.Double click at coordinate("620", "615", "left")
               Macro.Pause("2000")
               // You have to save yours PIN number Pictures, if your pin is 1739 then you have to save 1.jpg, 7.jpg, 3.jpg and 9.jpg. Save picture from Investigate by taking screen shots.
               Mouse.Click at image("C\BlueEyeMacro\1.jpg", "100", "left")
               Macro.Pause("1000")
               Mouse.Click at image("C\BlueEyeMacro\7.jpg", "100", "left")
               Macro.Pause("1000")
               Mouse.Click at image("C\BlueEyeMacro\3.jpg", "100", "left")
               Macro.Pause("1000")
               Mouse.Click at image("C\BlueEyeMacro\9.jpg", "100", "left")
               // Wait for 1 minute
               Macro.Pause("60000")
               // You have to save this picture too to make sure you are already in the game
               if  Image.Can be located on screen near coordinate("C\BlueEyeMacro\loginsuccessful.jpg", "99", "1770",  "113", "50")
                    begin
                         // This is the part where you write other micro or link other micro after successfull login. I usually port my char to save point and start grinding ;)
                    end
          end
 end


You need these .jpg files.
You need four .jpgs of your pin number.
Image
Login.jpg
Image
LoginSuccessful.jpg (It is a picture of World Map Opener(it is on the left side of the mini map)
Image




which resolution and set up will it work???


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Tue Mar 26, 2013 5:27 pm 
Moderator
Moderator



Joined: Tue Feb 05, 2013 5:45 am
Posts: 280
Been thanked: 49 time(s)
Has thanked: 11 time(s)
Contribution Points: 5371
Quote:
which resolution and set up will it work???


1090 x 1080 (1080p)

_________________
Heavy Duty Mod, always watching with both eyes open 8-)

Please --- Please --- Please DO NOT reply to spam thread/post.
I will give you CP if you report spam thread/post instead of replying to it. :)

Click Here>> Let's make BEM forum out of spammers

-------------------------
Check out my Bots
-------------------------

Auto login to the game


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Wed Mar 27, 2013 9:53 am 
Silver Contributor
Silver Contributor



Joined: Sat Dec 01, 2012 3:39 pm
Posts: 173
Been thanked: 3 time(s)
Has thanked: 0 time(s)
Contribution Points: 36
does it work and save ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Login to the Game
Thanked: 0 time(s)  Unread post Posted: Mon Sep 23, 2013 5:13 am 
Moderator
Moderator



Joined: Tue Feb 05, 2013 5:45 am
Posts: 280
Been thanked: 49 time(s)
Has thanked: 11 time(s)
Contribution Points: 5371
ekydpa21 wrote:
does it work and save ?


Yea it does work. I am working on a modified version of it. When ever it is ready I will post here.

_________________
Heavy Duty Mod, always watching with both eyes open 8-)

Please --- Please --- Please DO NOT reply to spam thread/post.
I will give you CP if you report spam thread/post instead of replying to it. :)

Click Here>> Let's make BEM forum out of spammers

-------------------------
Check out my Bots
-------------------------

Auto login to the game


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