Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Wed Oct 28, 2020 11:37 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Avoid Portal [MACRO]
Thanked: 3 time(s)  Unread post Posted: Wed Jun 03, 2020 9:55 pm 
New User
New User
User avatar



Joined: Wed Apr 22, 2020 1:04 am
Posts: 24
Been thanked: 11 time(s)
Has thanked: 14 time(s)
Contribution Points: 51
Hello everyone, this is my first contribution here on the forum. I come to share with you a very simple macro that I created and that I have been testing these last few days. Because it works perfectly for me, I decided to share it here on the forum because I know that many need this utility in their bots.

What I come to share, is just a macro that makes your character teleport when you see a portal, whatever the map is. I use it, in conjunction with an autoattack and autoloot macro shared by Roan. (http://www.blueeye-macro.com/viewtopic.php?f=437&t=30450)

Another thing I need to let you know, is that this method will only work with the /effect turned off and for those who have the edited GRF of the maps, known as "grayworld". If you don't know what this is about, give a Google in these terms and you will know how to make this change. In my case, the colors used for the floor/walls of the map, are the patterns that come in the GRF Editor, which look like the image below:

Image

About the code, as you can see below, the code is very simple, using only the "if Image.Can be located on screen". This code will locate an image on the screen, and from there, it will execute the teleport command, which in my case is on F9. (You can edit in the macro for the location that uses the teleport in the game)

This is the code, you can just copy it and create your own macro in BEM, or simply download the attached file and import it into BEM.
Code:
 
begin
     Window.Set location("Ragnarok", "yes", "0", "0")
     Function.Execute("TeleportOnPortal")
 end

function("TeleportOnPortal")
     begin
          if  Image.Can be located on screen("C:\Users\...\Desktop\portal.png", "100")
               begin
                    Keyboard.Press key("{<f9>}")
                    Humanly.Pause("800", "900")
                    Keyboard.Press key("{<enter>}")
                    Humanly.Pause("2500", "3000")
               end
     end
function


This part of the macro is the location on my computer of the image, which the macro will find on the screen and perform the teleport function. In your case, you will have to edit to the folder where you will place the image.

The image that is attached is the portal.png image, this is nothing more than a screenshot of how the portal looks in the game, with the GRF edited, and with the /effect turned off.
Remembering that this attached image will only serve if you use the map in the same colors as the one I use.

Image

However, if you use the custom map with other colors, you will have to save your own map image. You can do it as follows:

1- Open the Investigator tool in BEM.
2- Enter Ragnarok (with the GRF already edited and /effect turned off), position your character next to a portal and press the Print Screen key or Ctrl + S
3- Return to the Investigator Tool in BEM and select, holding the left mouse button, the slice of the central part of the portal and save the image, as shown in the image below. (The cutout should be large enough, so that the shadow of the portal is not confused with the shadow below your character)

Image

After saving the image, you will have to place it at the same location address that is indicated in the macro.

After following all the steps, your bot will start teleporting every time you see a portal on the screen.
I hope you make good use of the macro. And if this post really helped you, click on THANK YOU! :mrgreen:
If you encountered any problems during the process or operation, post here so I can help you.


Attachments:
File comment: PORTAL IMAGE FILE
portal.png
portal.png [ 147 Bytes | Viewed 983 times ]
File comment: MACRO FILE
trial;roteleportonportal.bem [14.84 KiB]
Downloaded 86 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Avoid Portal [MACRO]
Thanked: 0 time(s)  Unread post Posted: Tue Jun 09, 2020 7:51 am 
New User
New User



Joined: Tue Jun 09, 2020 7:47 am
Posts: 11
Been thanked: 0 time(s)
Has thanked: 6 time(s)
Contribution Points: 16
dude i tried all of the tutorials but still not working any help?


Top
 Profile  
Reply with quote  
 Post subject: Re: Avoid Portal [MACRO]
Thanked: 1 time(s)  Unread post Posted: Wed Jun 10, 2020 12:47 am 
New User
New User
User avatar



Joined: Wed Apr 22, 2020 1:04 am
Posts: 24
Been thanked: 11 time(s)
Has thanked: 14 time(s)
Contribution Points: 51
maduga wrote:
dude i tried all of the tutorials but still not working any help?

Ok, let's see some alternatives that may be preventing the macro from working.

1) Are you using the GRF edition "grayworld"?


2) Are you using the "portal.png" image I provided, or did you create your own using the BEM Investigate Tool?

I recommend you create your own portal.png, using the Investigate Tool, as explained in the tutorial, as the colors emitted on my monitor may be different from those emitted on your computer. So if you are using the image I provided, it will probably will not be the same color as your map in the game, as your monitor emits other colors.
Another recommendation is that when you create the portal.png image, the print screen should be taken with the maximum zoom out in the game, so that the cropped square is as small as possible.

3) The third thing that may be preventing your macro from working, is the address that will be located in your image "portal.png". This must be exactly correct, from the location where you saved the image. You must replace the address in the part below the macro that is in bold.

if Image.Can be located on screen ("C: \ Users \ YOUR_USER \ Desktop \ portal.png", "100")

I believe that these may be the only implications for the macro not working for you. I'm using it, and it's working 100%, I shared it with a friend and it's working perfectly for him too.
Remembering that the macro file is configured to start with the commands ctrl + a and stop with ctrl + z

If you are still unable to make it work, send me some pictures of the screen, the folder where it is located, and the image "portal.png". Also a photo of the open game and its character near a portal, and a photo of the macro code, with the address of its folder which is located at "portal.png".

I hope you can solve the problem, any questions I am available.


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