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.

Constructor

And the most important part! Here is the place where you'll create your macro. 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 in Macros Commands.

Accepted operators for macros:

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

So, let's say I want a macro that heal my char if I have less than 100 HP and there are more than 3 creatures on screen, there are two ways of creating your sample:

First Mode: on BBot

After you coded your macro and added a name to it, you must press the “Done” button to compile it:

As compiled, your macro will be seen in the first blank square:

Second Mode: on NotePad (advanced)

500||{Test}||Self.Health<100||Creatures.OnScreen>3||Self.Say(exura vita)

or

500 {Test} Self.Health<100 Creatures.OnScreen>3 Self.Say(exura vita)

Every step of the macro is separated by || or by the 'space' button . Furthermore, the name of the macro should be between “{ }”.

Summit of the macro layout on NotePad:

Delay||{Name}||Condition||Result

or

Delay {Name} Condition Result

After you finished your macro on NotePad you can save it in “[…]\BBot\Configs” and load it in Macros or you can copy your code and paste it directly in Macros as seen in the last part of this tutorial.

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 wat to use it you canto 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.1311097658.txt.gz · Last modified: 2021/11/15 16:43 (external edit)