User Tools

Site Tools


macros

This is an old revision of the document!


Macros

Summary

Macros are powerful tools that let you customize almost everything. Want to do something special in determinated situation? Create a macro and let it do it for you.

Settings

Active: when checked, it'll turn your macros on.

Debug: here is very useful tool that will help to see if your macro is working properly. The Debug works on your Tibia screen showing each step of your macro and how it's going on.

How Debug works

For instance, you have created this macro:

500||{Test}||Self.Mana>=400||Hotkey.Use(237)

The debug works this way: [Macro]Self.Mana<=400: in this line the Debug shows the first step of your macro that here is Self.Mana⇐400. You can read like this: “If Self.Mana<=400”

[Macro]650 <= 400: here the Debug is comparing your currently mana with the one written in the Macro.

[Macro]Ok: as your currently mana is higher than the mana written in the macro, it doesn't go to the next step. Therefore the Debug writes “Ok”.

Let's say your currently mana is lower than 400:

[Macro]Self.Mana<=400: first step of your macro as seen above.

[Macro]300 <= 400: comparing again.

[Macro]Hotkey.use(237)=1: as your currently mana is lower than the mana written in the macro, it goes to the next step that is use the item with the ID “237”. So, the Debug writes the next command “Hotkey.use(237)=1”.

It will keep doing this infinitely until you uncheck the Active button (this will turn off the Macros) or uncheck the Debug button.

Macro Editor

Here is the place where you'll create your own macros. The BBot macro uses the famous If clauses: “If this, do that. If not this, do nothing.” Unfortunately, it's not possible yet to do the negative “else, do that”.

All the commands can be found here: Macros Commands.

My Position: by clicking this button you'll know your char's currently (X, Y, Z).

Name: type in the name of your macro.

Auto Delay: type in the cicle of your macro. ATTENTION! The time is in milisecconds so if you put 1, this is equal to 0,001s.

Accepted operators for macros:

  • > Bigger
  • >= Bigger or Equal
  • < Smaller
  • <= Smaller or Equal

Ok, now for the examples. Let's say I want a macro that heal my char if I have less than 100 HP only when there are more than 3 creatures on screen. This is how you should make the macro:

Find the command you want and right click it. A window will appear requesting you to write the parameters of the command:

After you coded your macro and added a name to it, you must copy what is written in Code:

And paste it in the Macros section:

Hints

If you are playing OTs and the ID of the items are different, you can find its ID by pressing alt+f8. A gray message will appear containing good piece of informations and one of these are “ID”. That's the ID of the last seen item.

If you saw an interesting macro in the forum and want to use it you can copy it and paste directly in the Macros by selecting all the macro, right clicking it and in the Macros right click the blank square and click on Paste Codes.

macros.1311099319.txt.gz · Last modified: 2021/11/15 16:43 (external edit)