BBot - The best bot of the world
operations, logic - 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: operations, logic (/thread-17332.html)



operations, logic - rogyman - 06-12-2015

Hello!
i need help with macro / language
1) how i can use mathematical operations +,-,*,/ on variables.
for example: number:=Creatures.OnScreen()+Creatures.PlayrsOnScreen()

2) logical operations equivalen with AND, OR ,
THX so much


RE: operations, logic - damiansnk - 06-12-2015

Open bbot doku wiki Then go macro commands and on begin are thoose options i can't help u cuz I'm on mobile


RE: operations, logic - MegaNo0body - 06-12-2015

Unfortunatelly Macro engine doesn't have relational operations (AND, OR..), but it contains basic math functions:

http://wiki.bmega.net/doku.php?id=macros_commands#internals

+ is Inc
- is Dec

To do what you need, a example (I didn't test, nor wrote correctly the functions):

Creatures:=Creatures.OnScreen()
Playrs:=Creatures.PlayersOnScreen()
Inc(Creatures, !Players!)


RE: operations, logic - damiansnk - 06-12-2015

You can do separated values in settings and I think it will be better for customize

Example
Use energy ring when
Creatures by name
(Rotworm, troll) more than x
Creature to ignore ( snake, dog, cat)
Players on screen more than x
Ignore npc