I found this script from BEM forum (Thanks to LetMeBeStealth) and made some adjustment on it to suits my fishing mode.
So I would like to share it to fisherman out there and for your further study
For better understanding, this will be the requirement:
1) A running fishing macro.
2) Some screenshot - The "Log-in" picture at main screen and your char pin number
- If your pin number is 1234 then you have to save 1.png, 2.png, 3.png, and 4.png.
- If you using same pin number like 9999, then u have to capture normal 9 and brighter 9 (with mouse hover on it).
- Please see attachment for reference.
3) A new macro with new trigger key for this script (for safety and better controlling).
How it works:
- This script will auto login if your bot disconnect.
- It was write base on identifying a picture and screen pixel. So you may have to edit it base on your screen resolution.
- The coordinate inside this script is according to screen resolution 1600*900 and full screen mode.
- The speed is according to my computer speed, so you have to edit the "macro.pause" timing to suits your computer speed.
*1000 means 1 second.
begin
// Bring Aika client to the front
Window.Bring to front("AikaClient", "No")
// Check if user is logged out
if Image.Can be located on screen("C:\.."YourLoginPicturePath".....\login.png ", "100")
// If user cannot login due to server problem or lag, it will repeat again and again until success.
begin loop()
// This is where I stop my fishing macro, in this case I'm using ctrl+x for the trigger key.
Keyboard.Hold keys("{<lcontrolkey>}")
Keyboard.Hold keys("x")
Keyboard.Release keys("{<lcontrolkey>}")
Keyboard.Release keys("x")
// When some macro running, it will be some garbage text so you have to clean it)
Macro.Pause("1000")
// Click at the left side of the login box
Mouse.Click at coordinate("757", "570", "left")
Keyboard.Hold keys("{<backspace>}")
Keyboard.Hold keys("{<delete>}")
Macro.Pause("1000")
Keyboard.Release keys("{<backspace>}")
Keyboard.Hold keys("{<delete>}")
// Enter your login name
Keyboard.Press keys("YourLoginName")
Macro.Pause("500")
// Click at the left side of the password box
Mouse.Click at coordinate("757", "601", "left")
Keyboard.Hold keys("{<backspace>}")
Keyboard.Hold keys("{<delete>}")
Macro.Pause("1000")
Keyboard.Release keys("{<backspace>}")
Keyboard.Hold keys("{<delete>}")
// Enter your password
Keyboard.Press keys("YourPassword")
Macro.Pause("500")
Keyboard.Press key("{<enter>}")
Macro.Pause("500")
// Select your world
Mouse.Click at coordinate("797", "560", "left")
Macro.Pause("3000")
// Choose your channel
Mouse.Double click at coordinate("797", "523", "left")
Macro.Pause("2000")
// Choose your selected char
Mouse.click at coordinate("1126", "499", "left")
Macro.Pause("1000")
Mouse.click at coordinate("759", "540", "left")
Macro.Pause("500")
// Click the pin number, for example 1234
Mouse.Click at image("C:\.....YourPinNumberPath....\1.png", "100", "left")
Macro.Pause("800")
Mouse.Click at image("C:\.....YourPinNumberPath....\2.png", "100", "left")
Macro.Pause("800")
Mouse.Click at image("C:\.....YourPinNumberPath....\3.png", "100", "left")
Macro.Pause("800")
Mouse.Click at image("C:\.....YourPinNumberPath....\4.png", "100", "left")
// Wait for the game to load
Macro.Pause("10000")
// This is where I set up the mouse coordinate for fishing
Mouse.Move to coordinate("526", "697")
Macro.Pause("1000")
// Start back the fishing macro, in this case I'm using ctrl+z for the trigger key
Keyboard.Hold keys("{<lcontrolkey>}")
Keyboard.Hold keys("z")
Keyboard.Release keys("{<lcontrolkey>}")
Keyboard.Release keys("z")
Macro.Break from loop("no")
end
end
Enjoy
Please register or login to download attachments.