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:
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.
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 + S3- 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)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! If you encountered any problems during the process or operation, post here so I can help you.