Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 21, 2024 12:23 pm

All times are UTC




Post new topic Reply to topic  [ 156 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next
Author Message
 Post subject: Ragnarok Script for Auto Farming
Thanked: 11 time(s)  Unread post Posted: Tue Apr 14, 2020 2:36 pm 
Active User
Active User
User avatar



Joined: Tue Apr 07, 2020 11:23 am
Posts: 43
Been thanked: 29 time(s)
Has thanked: 2 time(s)
Contribution Points: 611
So it's quarantine period and I'm bored, so I would like to share my script to you guys. But first, I would like to give credit to one guided me on this, please see URL below:
https://www.blueeye-macro.com/viewtopic.php?f=437&t=30450

Kindly follow his/her tutorial so that it would be easier to know how to make this script work.
Kindly see PROS and CONS if this will work for you.

PROS:
1. It works and I already got 5+ cards in a month
2. It will teleport when monster is not killed within 9-10 seconds
3. It will teleport when you apply an avoid sprite to a monster (Boss or high level mobs)
4. It will use awakening potion every 30 minutes
5. It will use potions, but only when hp bar is red.
6. With a little edit, it will be usable with attacking monster using skills
7. It will teleport when clicking on a monster failed to show its name 5 times.

CONS:
1. Random Walking is Disabled, you should have teleport skill or unlimited fly wing
2. It will not avoid going to a portal to another map
3. It will attempt kill steal and loot steal
4. Potion use is not fast and reliable.
5. This script does not use keyboard press, it will double click on the fly wing (since keyboard press doesn't work in my case)
6. It will not auto storage the loots, so being overweight is bad unless you have Sky Deleter Card, your character can go up to 90% weight
7. It will click on the GM global chat because the color yellow is the same with the monster to attack. If you want you can change the monster to attack color.

Note:
-When I use this macro, I maxed zoom-in so it will only see nearby monsters, this will be helpful on a map with lots of walls and obstacles.
-Slot 1 is for Potion, Slot 2 is for Fly Wing, Slot 3 is for awakening, Slot 4 is for Potion2, Slot 5 is for Potion3
-If you want to use the teleport skill, you need to add a mouse click or keyboard enter after using the skill.
-I have used it with Knight, Rogue, and Blacksmith and it works fine.

So to make this work: You need to change the spr (Sprite) of all monster you want to attack with the yellow color attached sprite, change the monster you want to avoid to the orange color attached sprite, and changed the item you want to pick-up to the blue color attached sprite using the GRF Editor. (Please see my attached files)

Version 0.2 - April 17, 2020
Code:
 begin
     Window.Set location("Ragnarok", "yes", "0", "0")
     // Settings
     // Change to 0 if you have no awakes or potion
     Variable.Set("IsAwakeAvailable", "1")
     Variable.Set("IsPotionAvailable", "1")
     // Potion to use when HP is 2/3
     Variable.Set("HowManyPotionToUse", "5")
     Variable.Set("HowManyAttackAttempt", "5")
     // Coordinates
     Variable.Set("ShortCutBarY", "42")
     Variable.Set("FlyWingX", "270")
     Variable.Set("PotionX", "242")
     Variable.Set("Potion2X", "328")
     Variable.Set("Potion3X", "357")
     Variable.Set("AwakeningX", "299")
     // Start a timer
     Macro.Start stopwatch("checkTime")
     Macro.Start stopwatch("checkLootTime")
     // Declare Variables
     Variable.Set("IsNotValidMonster", "0")
     Variable.Add (Math)("IsNotValidMonster", "1")
     // Check Initialize every 31 minutes
     Variable.Set("MinutesToCheck", "1860000")
     Variable.Set("MinutesToLoot", "10000")
     // Start Up
     Function.Execute("Initialize")
     begin loop()
          Macro.Read stopwatch("checkTime", "waitTime")
          if  Variable.Is greater than (Math)("waitTime", "{MinutesToCheck}")
               begin
                    Function.Execute("Initialize")
               end
          Function.Execute("Attack")
          Function.Execute("Loot4")
          Function.Execute("Fly")
          Function.Execute("IfNeedToPotion")
          // Function.Execute("Rwalk")
     end
 end

function("Initialize")
     begin
          if  Variable.Is equal to("IsAwakeAvailable","1")
               begin
                    Function.Execute("Awakening")
               end
          Macro.Restart stopwatch("checkTime")
          Macro.Pause("500")
     end
function

function("Attack")
     begin
          // Teleport if Monster to avoid is found
          Function.Execute("EmergencyFlyWing")
          // Click Monster if Located
          if  Color.Can be located on screen (RGB)("255", "255", "0", "0")
               begin
                    Mouse.Click at color closest to coordinate (RGB)("255", "255", "0", "0", "640", "375", "left")
                    // 997 43
                    Mouse.Move to coordinate("270", "40")
                    // Teleport if clicking on the monster a number of times but still the name isn't shown
                    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
                              Variable.Add (Math)("IsNotValidMonster", "1")
                              Macro.Pause("500")
                              if  Variable.Is greater than (Math)("IsNotValidMonster", "{HowManyAttackAttempt}")
                                   begin
                                        Variable.Set("IsNotValidMonster", "1")
                                        Function.Execute("FlyWithoutCondition")
                                   end
                         end
                    // If the monster isn't dead within the set number of seconds it will teleport
                    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()
                              Macro.Get parent loop iteration("count")
                              Variable.Set("x", "{count}")
                              if  Variable.Is equal to("x","30")
                                   begin
                                        Function.Execute("FlyWithoutCondition")
                                   end
                              Macro.Pause("300")
                              Function.Execute("IfNeedToPotion")
                              // Teleport if Monster to avoid is found
                              Function.Execute("EmergencyFlyWing")
                              // Mouse.Move to coordinate("270", "40")
                              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
                                        if  Variable.Is greater than (Math)("IsNotValidMonster", "{HowManyAttackAttempt}")
                                             begin
                                                  Variable.Set("IsNotValidMonster", "1")
                                                  Function.Execute("FlyWithoutCondition")
                                             end
                                        Variable.Set("IsNotValidMonster", "1")
                                        Macro.Pause("300")
                                        Function.Execute("Loot4")
                                        Macro.Break from loop("yes")
                                   end
                         end
               end
     end
function

function("Loot4")
     begin
          // 463, 249, 376, 287
          Color.Limit area of interest to coordinates("263", "149", "676", "487")
          if  Color.Can be located on screen (RGB)("0", "0", "255", "0")
               begin loop()
                    Mouse.Click at color closest to coordinate (RGB)("0", "0", "255", "0", "640", "375", "left")
                    Humanly.Pause("400", "500")
                    if  Color.Can not be located on screen (RGB)("0", "0", "255", "0")
                         begin
                              if  Color.Can not be located on screen (RGB)("0", "0", "255", "0")
                                   begin
                                        Color.Unlimit area of interest()
                                        Macro.Break from loop("yes")
                                   end
                         end
                    if  Color.Pixel pattern can be located on screen("255,239,148,0,-1,255,239,148,0,2,255,239,148", "4")
                         begin
                              Macro.Read stopwatch("checkLootTime", "waitLootTime")
                              if  Variable.Is greater than (Math)("waitLootTime", "{MinutesToLoot}")
                                   begin
                                        // Function.Execute("FlyWithoutCondition")
                                        // Window.Display message box("Loot timer up", "yes")
                                        Macro.Restart stopwatch("checkLootTime")
                                   end
                         end
                    if  Color.Pixel pattern can not be located on screen("255,239,148,0,-1,255,239,148,0,2,255,239,148", "4")
                         begin
                              Macro.Restart stopwatch("checkLootTime")
                         end
               end
          Color.Unlimit area of interest()
     end
function

function("Rwalk")
     begin
          // Teleport if Monster to avoid is found
          Function.Execute("EmergencyFlyWing")
          if  Color.Can not be located on screen (RGB)("255", "255", "0", "0")
               begin
                    // set variables from random X coordinates on your screen example 100 to 1100
                    Variable.Set random number("X", "100", "1100")
                    // set variables from random Y coordinates on your screen example 100 to 620
                    Variable.Set random number("Y", "100", "620")
                    Mouse.Click at coordinate("{X}", "{Y}", "left")
                    Humanly.Pause("750", "1000")
               end
     end
function

function("Fly")
     begin
          // Teleport if Monster to avoid is found
          Function.Execute("EmergencyFlyWing")
          if  Color.Can not be located on screen (RGB)("255", "255", "0", "0")
               begin
                    if  Color.Can not be located on screen (RGB)("255", "255", "0", "0")
                         begin
                              Function.Execute("FlyWithoutCondition")
                         end
               end
     end
function

function("EmergencyFlyWing")
     begin
          if  Color.Can be located on screen (RGB)("255", "181", "82", "0")
               begin
                    Function.Execute("FlyWithoutCondition")
               end
     end
function

function("FlyWithoutCondition")
     begin
          Mouse.Double click at coordinate("{FlyWingX}","{ShortCutBarY}","left")
          Macro.Pause("1000")
     end
function

function("Awakening")
     begin
          if  Color.Pixel pattern can not be located on screen("203,254,51,-2,-2,203,254,51,1,1,203,254,51,-1,2,203,254,51,1,-1,203,254,51,1,-1,203,254,51,1,-1,203,254,51,0,3,203,254,51,2,0,203,254,51,4,1,203,254,51,-4,0,203,254,51,3,0,203,254,51,-2,0,203,254,51,1,0,203,254,51,-1,-2,203,254,51,1,-1,203,254,51,1,-1,203,254,51,1,-1,203,254,51,0,-1,203,254,51,-1,-1,203,254,51,-1,0,203,254,51,-1,0,203,254,51,-1,1,203,254,51", "10")
               Begin
                    Mouse.Double click at coordinate("{AwakeningX}", "{ShortCutBarY}", "left")
                    Macro.Pause("300")
               End
     end
function

function("IfNeedToPotion")
     Begin
          // If HP Bar become 2/3
          if  Variable.Is equal to("IsPotionAvailable","1")
               begin
                    // if  Color.Pixel pattern can not be located on screen("16,239,33,-6,0,16,239,33,3,0,16,239,33,6,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33,3,0,16,239,33", "0")
                    if  Color.Can be located on screen (RGB)("239", "16", "16", "0")
                         begin
                              if  Color.Can not be located on screen (RGB)("16", "239", "33", "0")
                                   begin
                                        Function.Execute("Potion")
                                        if  Color.Can be located on screen (RGB)("239", "16", "16", "0")
                                             begin
                                                  if  Color.Can not be located on screen (RGB)("16", "239", "33", "0")
                                                       begin
                                                            Function.Execute("Potion2")
                                                            if  Color.Can be located on screen (RGB)("239", "16", "16", "0")
                                                                 begin
                                                                      if  Color.Can not be located on screen (RGB)("16", "239", "33", "0")
                                                                           begin
                                                                                Function.Execute("Potion3")
                                                                                if  Color.Can be located on screen (RGB)("239", "16", "16", "0")
                                                                                     begin
                                                                                          if  Color.Can not be located on screen (RGB)("16", "239", "33", "0")
                                                                                               begin
                                                                                                    Variable.Set("IsPotionAvailable", "0")
                                                                                               end
                                                                                     end
                                                                           end
                                                                 end
                                                       end
                                             end
                                   end
                         end
               end
     End
function

function("Potion")
     begin loop("{HowManyPotionToUse}")
          // Teleport if Monster to avoid is found
          Function.Execute("EmergencyFlyWing")
          Mouse.Double click at coordinate("{PotionX}", "{ShortCutBarY}", "left")
          Macro.Pause("300")
     end
function

function("Potion2")
     begin loop("{HowManyPotionToUse}")
          // Teleport if Monster to avoid is found
          Function.Execute("EmergencyFlyWing")
          Mouse.Double click at coordinate("{Potion2X}", "{ShortCutBarY}", "left")
          Macro.Pause("300")
     end
function

function("Potion3")
     begin loop("{HowManyPotionToUse}")
          // Teleport if Monster to avoid is found
          Function.Execute("EmergencyFlyWing")
          Mouse.Double click at coordinate("{Potion3X}", "{ShortCutBarY}", "left")
          Macro.Pause("300")
     end
function


Please comment if you found any problem, so we all can think of a solution. Thank you.


Attachments:
File comment: Macro Script V0.2
trial;roautofarm.rar [12.65 KiB]
Downloaded 2821 times
File comment: Macro Script V0.1
trial;roautofarm.rar [11.31 KiB]
Downloaded 1431 times
File comment: Replace the Item spr with this, so the macro will loot all item with this color within the macro range
ItemName.rar [374 Bytes]
Downloaded 1787 times
File comment: Replace the monster spr with this, so the macro will avoid all monster with this color by teleporting
AvoidMonster.rar [694 Bytes]
Downloaded 1778 times
File comment: Replace the monster spr with this, so the macro will attack all monster with this color
AttackMonster.rar [1.07 KiB]
Downloaded 2349 times

_________________
If you like my posts, please login and click Thank You. It will help me a lot.
I apologize if I can't reply to your PM and inquiries. I do game development so I get really busy sometimes.

My Ragnarok Macro Script
https://www.blueeye-macro.com/viewtopic.php?f=437&p=198717

My Ragnarok Macro Script Dual Client
https://www.blueeye-macro.com/viewtopic.php?f=437&t=35263

Macroblitz


Last edited by macroblitz on Fri Apr 17, 2020 11:04 am, edited 2 times in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 3 time(s)  Unread post Posted: Tue Apr 14, 2020 3:39 pm 
VIP Contributor
VIP Contributor



Joined: Thu Nov 24, 2016 12:55 am
Posts: 549
Been thanked: 192 time(s)
Has thanked: 18 time(s)
Contribution Points: 185
have you tried installing virtual drivers? so that keypress would work it can also shorten your code.

_________________
Ragnarok Online

Bot4You ROPH
http://www.blueeye-macro.com/viewtopic.php?f=437&t=30450

Creating .spr file or sprite for Pixel bot
http://www.blueeye-macro.com/viewtopic.php?f=435&t=30445

Changing monster sprite and items sprite
http://www.blueeye-macro.com/viewtopic.php?f=435&t=30516
Donate
https://www.paypal.com/donate/?business=KZWJ5C7XC6WF6&no_recurring=1&currency_code=PHP
QR
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 0 time(s)  Unread post Posted: Wed Apr 15, 2020 3:45 am 


Roan1234321 wrote:
have you tried installing virtual drivers? so that keypress would work it can also shorten your code.


Hi Roan,

Yes, it is a possible solution, and I believe it would work. I will try to do that when I have to create a complex script with skills for leveling up my vit knight in the future. Thank you.


Top
  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 2 time(s)  Unread post Posted: Wed Apr 15, 2020 11:38 am 
New User
New User



Joined: Wed Apr 15, 2020 11:35 am
Posts: 1
Been thanked: 2 time(s)
Has thanked: 0 time(s)
Contribution Points: 12
good evening
sir may problem ako, hindi nag cli-click sa monster yong mouse. ano ba dapat gawin sir. thank you.


Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 2 time(s)  Unread post Posted: Wed Apr 15, 2020 12:22 pm 
Active User
Active User
User avatar



Joined: Tue Apr 07, 2020 11:23 am
Posts: 43
Been thanked: 29 time(s)
Has thanked: 2 time(s)
Contribution Points: 611
jowell13 wrote:
good evening
sir may problem ako, hindi nag cli-click sa monster yong mouse. ano ba dapat gawin sir. thank you.


Hi jowell13,

Can you provide more information? Is the other clicking function working?

Maybe you didn't change the sprite of the monster? Their image should become a color yellow box. Thank you.

_________________
If you like my posts, please login and click Thank You. It will help me a lot.
I apologize if I can't reply to your PM and inquiries. I do game development so I get really busy sometimes.

My Ragnarok Macro Script
https://www.blueeye-macro.com/viewtopic.php?f=437&p=198717

My Ragnarok Macro Script Dual Client
https://www.blueeye-macro.com/viewtopic.php?f=437&t=35263

Macroblitz


Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 0 time(s)  Unread post Posted: Thu Apr 16, 2020 4:14 am 
New User
New User



Joined: Wed Apr 15, 2020 6:34 am
Posts: 2
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 13
hello, i'm having problems with the monster.spr it's not changing for me. the items.spr works, any advice on what to do


Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 4 time(s)  Unread post Posted: Thu Apr 16, 2020 6:13 am 
Active User
Active User
User avatar



Joined: Tue Apr 07, 2020 11:23 am
Posts: 43
Been thanked: 29 time(s)
Has thanked: 2 time(s)
Contribution Points: 611
bloke wrote:
hello, i'm having problems with the monster.spr it's not changing for me. the items.spr works, any advice on what to do


Hi bloke,

Can you send a screenshot of how you change the monster sprite?

it should be exactly like these (Unless you use a non 8-Bit color, the sprite color will not show in-game)
Also remember to save every time you change a .spr file before moving to the second .spr

Thank you.


Attachments:
grf.png
grf.png [ 50.16 KiB | Viewed 54446 times ]

_________________
If you like my posts, please login and click Thank You. It will help me a lot.
I apologize if I can't reply to your PM and inquiries. I do game development so I get really busy sometimes.

My Ragnarok Macro Script
https://www.blueeye-macro.com/viewtopic.php?f=437&p=198717

My Ragnarok Macro Script Dual Client
https://www.blueeye-macro.com/viewtopic.php?f=437&t=35263

Macroblitz
Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 0 time(s)  Unread post Posted: Thu Apr 16, 2020 10:52 pm 


How to disable flywing function sir? Also, to stop the macro.


Top
  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 1 time(s)  Unread post Posted: Fri Apr 17, 2020 2:18 am 
Contributor
Contributor



Joined: Mon Mar 30, 2020 12:58 pm
Posts: 71
Been thanked: 8 time(s)
Has thanked: 4 time(s)
Contribution Points: 129
Under Progress


Last edited by senjeru on Sat Apr 18, 2020 2:08 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Ragnarok Script for Auto Farming
Thanked: 1 time(s)  Unread post Posted: Fri Apr 17, 2020 2:25 am 
Contributor
Contributor



Joined: Mon Mar 30, 2020 12:58 pm
Posts: 71
Been thanked: 8 time(s)
Has thanked: 4 time(s)
Contribution Points: 129
Bettor to change your monster sprite too.

I change mine, so that it would not click any messages from the screen, during WOE, or during someone opening a scroll for items.

In short every announcement in the screen is same as the color of the monster sprite of Sir Roan.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 156 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:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group