Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Mon Jun 01, 2020 1:20 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help Auto Attack Stops After Sonic Blow
Thanked: 0 time(s)  Unread post Posted: Wed May 20, 2020 10:07 am 
Contributor
Contributor



Joined: Mon Mar 30, 2020 12:58 pm
Posts: 69
Been thanked: 4 time(s)
Has thanked: 4 time(s)
Contribution Points: 125
Good day everyone, can anyone help me how to continue attacking after the sonic blow was cast,

im using this config by: macroblitz

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Help Auto Attack Stops After Sonic Blow
Thanked: 1 time(s)  Unread post Posted: Wed May 20, 2020 11:16 am 
Gold Contributor
Gold Contributor



Joined: Thu Nov 24, 2016 12:55 am
Posts: 471
Been thanked: 136 time(s)
Has thanked: 10 time(s)
Contribution Points: 456
Sonic blow is autocast from injustice card??

auto attack stops when sonic blows is triggered you need to click the monster again if sonic blow is triggered.

_________________
Ragnarok Online

Bot4You ROPH (will also work on other servers but you need to make your own bypass)
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Help Auto Attack Stops After Sonic Blow
Thanked: 0 time(s)  Unread post Posted: Wed May 20, 2020 2:35 pm 
Contributor
Contributor



Joined: Mon Mar 30, 2020 12:58 pm
Posts: 69
Been thanked: 4 time(s)
Has thanked: 4 time(s)
Contribution Points: 125
Roan1234321 wrote:
Sonic blow is autocast from injustice card??

auto attack stops when sonic blows is triggered you need to click the monster again if sonic blow is triggered.


how can i adapt it here with the one im using right now?

I like this codes:

Code:
 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")


Because it stop the bot to change attack while attacking a monster, but it also limit the clicking of the monster from time to time.

And your code sir roan, i used it before but the problem is,
This code right here:

Code:
 Mouse.Click at color closest to coordinate (RGB)("255", "255", "0", "0", "640", "375", "left")


Make the bot change attack during its process even though the monster is not yet dead.

Code:
function("Attack")
     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")
               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()
                         Mouse.Move to coordinate("997", "43")
                         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("Loot4")
                                   Macro.Break from loop("yes")
                              end
                    end
          end
function


I tried to insert this code:
Code:
Mouse.Click at color closest to coordinate (RGB)("0", "66", "66", "0", "640", "375", "left")
                    // 997 43
                    Mouse.Move to coordinate("919", "84")


Code:
function("Attack")
     begin
          // Click Monster if Located
          if  Color.Can be located on screen (RGB)("0", "66", "66", "0")
               begin
                    Mouse.Click at color closest to coordinate (RGB)("0", "66", "66", "0", "640", "375", "left")
                    // 997 43
                    Mouse.Move to coordinate("919", "84")
                    // 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() 
                    Mouse.Click at color closest to coordinate (RGB)("0", "66", "66", "0", "640", "375", "left")
                    // 997 43
                    Mouse.Move to coordinate("919", "84")
                              Macro.Get parent loop iteration("count")
                              Variable.Set("x", "{count}")
                              if  Variable.Is equal to("x", "50")
                                   begin
                                        Function.Execute("FlyWithoutCondition")
                                   end
                              Macro.Pause("300")
                              Function.Execute("HPPotions")
                              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


But it keeps on changing attack to far away monster.


Attachments:
attack code.png
attack code.png [ 45.26 KiB | Viewed 161 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: Help Auto Attack Stops After Sonic Blow
Thanked: 0 time(s)  Unread post Posted: Thu May 21, 2020 4:18 am 
Gold Contributor
Gold Contributor



Joined: Thu Nov 24, 2016 12:55 am
Posts: 471
Been thanked: 136 time(s)
Has thanked: 10 time(s)
Contribution Points: 456
My code was made not to change attack when mob is still alive it has the same code structure that detects if the monster is still alive.

This code checks if the mosnters is still alive and will not change target
Code:
 if  Color.Pixel pattern can be located on screen("255,198,198,0,-1,255,198,198,0,2,255,198,198", "4")



Also this is what preventing your bot from attacking again.

You will need to add a code that detects If skill is triggered and the bot needs to attack again.

_________________
Ragnarok Online

Bot4You ROPH (will also work on other servers but you need to make your own bypass)
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Help Auto Attack Stops After Sonic Blow
Thanked: 0 time(s)  Unread post Posted: Sat May 23, 2020 8:36 am 
New User
New User



Joined: Sun May 10, 2020 4:22 pm
Posts: 11
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 25
Hi,

What server did you try this?


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