Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 15, 2018 12:56 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Question on simple Skill+ PotMacro
Thanked: 0 time(s)  Unread post Posted: Mon Sep 03, 2018 5:37 pm 
New User
New User



Joined: Mon Sep 03, 2018 5:25 pm
Posts: 1
Been thanked: 0 time(s)
Has thanked: 2 time(s)
Contribution Points: 10
I have this code which is spamming skill at the w key, but I want it to spam w key then after 4 rounds of keypress, press e which is blue pots.
I am trying to use the variable system in which I use counters after each while loop then when it goes to 4, the code goes to an If statement which is to use blue pots and empty out the counter.
Can anyone point me what I am doing wrong. The skill spamming part is working, but the variable addition/ counters and that if statement is not working properly.

Code:
 
 begin loop()
     Variable.Set("CTR", "0")
     when  Keyboard.Key is held down("w")
          begin
               while  Keyboard.Key is held down("w")
                    begin
                         Keyboard.Press key("w")
                         Mouse.Click("Left")
                         Variable.Evaluate (Math)("{CTR} + 1", "{CTR}")
                         if  Variable.Is equal to("{CTR}", "4")
                              begin
                                   Keyboard.Press key("e")
                                   Variable.Set("{CTR}", "0")
                              end
                    end
          end
 end
 
 


Top
 Profile  
Reply with quote  
 Post subject: Re: Question on simple Skill+ PotMacro
Thanked: 1 time(s)  Unread post Posted: Tue Sep 04, 2018 12:39 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
It's because you're holding down "w"; you can only press one letter at a time. You need to tell it to let off of "w" in order to press "e".

Another way to write that and use triggers instead of holding it down:
Code:
 begin
     Window.Bring to front("Untitled - Notepad", "no")
     begin loop("4")
          Keyboard.Press key("w")
     end
     Mouse.Click("Left")
     Keyboard.Press key("e")
 end
...and put it on infinite loop (don't forget your start/stop triggers).

_________________
----------------------------------------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  
 Post subject: Re: Question on simple Skill+ PotMacro
Thanked: 1 time(s)  Unread post Posted: Tue Sep 04, 2018 1:09 am 
Silver Contributor
Silver Contributor



Joined: Thu Nov 24, 2016 12:55 am
Posts: 200
Been thanked: 48 time(s)
Has thanked: 4 time(s)
Contribution Points: 93
aeonphalanx wrote:
I have this code which is spamming skill at the w key, but I want it to spam w key then after 4 rounds of keypress, press e which is blue pots.
I am trying to use the variable system in which I use counters after each while loop then when it goes to 4, the code goes to an If statement which is to use blue pots and empty out the counter.
Can anyone point me what I am doing wrong. The skill spamming part is working, but the variable addition/ counters and that if statement is not working properly.


yes you need to add release key since you are pressing it down also try adding pause to it.. try this script

Code:
begin loop()
     Variable.Set("CTR", "0")
     while  Keyboard.Key is held down("w")
                      begin loop()
                         Keyboard.Press key("w")
                         Mouse.Click("Left")
                         Variable.Evaluate (Math)("{CTR} + 1", "{CTR}")
                         if  Variable.Is equal to("{CTR}", "4")
                              begin
                                   Keyboard.Release key("w")
                                   Macro.Pause("500")
                                   Keyboard.Press key("e")
                                   Variable.Set("{CTR}", "0")
                                   Macro.Break from loop("yes")
                              end
                    end
          end
 

_________________
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: Question on simple Skill+ PotMacro
Thanked: 0 time(s)  Unread post Posted: Tue Sep 04, 2018 1:47 am 


Thanks for the replies! I managed to create my code and dump the counters and rely on the loop() for the w spam. And yes, I do need to add release keys and pauses(made my machine BSOD without it LMAO). Here is my code which somewhat works.

Code:
  begin
     when  Keyboard.Key is held down("w")
          begin
               while  Keyboard.Key is held down("w")
                    begin loop("10")
                         Keyboard.Press key("w")
                         Mouse.Click("Left")
                         Macro.Pause("100")
                         Keyboard.Release keys("w")
                    end
               Keyboard.Press key("e")
          end
 end


This code works for skill spamming + blue pots, "begin loop("10")" is where how many skills you want to do before potting.

This is what I get for jumping onto coding without reading some manuals lmao.


Top
  
Reply with quote  
 Post subject: Re: Question on simple Skill+ PotMacro
Thanked: 0 time(s)  Unread post Posted: Tue Sep 04, 2018 4:38 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
Awesome! Glad you got it working.

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