BBot - The best bot of the world
[MACRO] Loops - Printable Version

+- BBot - The best bot of the world (https://forums.bmega.net)
+-- Forum: Support (https://forums.bmega.net/forum-6.html)
+--- Forum: Support & Help (https://forums.bmega.net/forum-8.html)
+--- Thread: [MACRO] Loops (/thread-20120.html)



[MACRO] Loops - Karadoborgu - 07-13-2016

Can i use any loops in macros? If, while, etc. ? I don't see any of that in bbot wiki with functions and variables.


RE: [MACRO] Loops - MegaNo0body - 07-13-2016

Hi,

First of all, Macro was not designed to be a kind of scripting language, so no, no native support for it. But you can archive it working with the Condition engine:

Self.Health()==100 [NotHealth100]
Self.Say(My life is 100)
Exit()
{NotHealth100}
Self.Say(My life is not 100)

You can use the condition to jump around the macro ([ElseLabel] {Label}).

But remember: Macros are for simpler things, for more complex things it's expected to have a easier function.


RE: [MACRO] Loops - Catar - 07-13-2016

but if u fully understand how conditions work u can make pretty complex and long macros ;d
like i used to do ;d

My longest macro was over 250 lines, but now its useless, since thing it did is now one of bot build in fuctions


RE: [MACRO] Loops - MegaNo0body - 07-13-2016

(07-13-2016, 07:24 PM)Catar Wrote: My longest macro was over 250 lines, but now its useless, since thing it did is now one of bot build in fuctions

More info, please! haha


RE: [MACRO] Loops - Catar - 07-13-2016

(07-13-2016, 07:29 PM)MegaNo0body Wrote:
(07-13-2016, 07:24 PM)Catar Wrote: My longest macro was over 250 lines, but now its useless, since thing it did is now one of bot build in fuctions

More info, please! haha

Anti rs one? Remember? Had to add each sqm position that I didn't want my bot to aoe