![]() |
Macro IF and ELSE Tutorial - 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 IF and ELSE Tutorial (/thread-7303.html) |
Macro IF and ELSE Tutorial - Eduardoroeder - 02-21-2013 Hello everybody. I am eduardoroeder and used to be a forum moderator when bbot started. Today i will teach you how to do If and Else on macros. I have not found a way to learn this so i learned by my self on the hard way. First you make a macro normally and add the contition you want to check. Example: Code: I:=Misc.Random(1, 6) You put "Exit()" on the end of the macro, and on a new line you make this: Code: {dootherthing} Code: I:=Misc.Random(1, 6) And thats it! What this script will do: 1-I:=Misc.Random(1, 6) -> Get a random number between 1 and 6 2-!I!==1 [dootherthing] -> Check if the number is 1. If true do whats down the check, if false, do [dootherthing]. 3-Do the true or false part ![]() Thanks! Any question please ask and ill try to answer. |