webpro 31 Posted November 24, 2015 Report Share Posted November 24, 2015 ui stat monitor("number picked",#randomselector) set(#randomselector,$rand(1,5),"Global") if($comparison(#randomselector,"<= Less than or equal to",4)) { then { alert("number {#randomselector} selected") } else { alert("number five selected (else)") } } Here above is a little code to understand how to randomize selections. Well it's one of the ways... Ex:You want the bot to click on YES (or whatever) more OFTEN. Well you would replace the ALERT COMMAND with your "Yes" CLICK COMMAND (or whatever you wish the bot to do) So numbers from 1 to 4 are GO, do something. If Number five is selected, then it will click NO button (or whatever you wish the bot to do) So number five is do something else. In fact, you can put entire DEFINE commands in THEN and in ELSEJust put the entire code in a loop so it will never stop. ui stat monitor("number picked",#randomselector) loop while($true) { set(#randomselector,$rand(1,5),"Global") if($comparison(#randomselector,"<= Less than or equal to",4)) { then { alert("number {#randomselector} selected") } else { alert("number five selected (else)") } } wait(3) } Quote Link to post Share on other sites
pash 504 Posted November 24, 2015 Report Share Posted November 24, 2015 use variable in "loop while" ui stat monitor("number picked",#randomselector) set(#Check,$true,"Global") loop while(#Check) { set(#randomselector,$rand(1,5),"Global") if($comparison(#randomselector,"<= Less than or equal to",4)) { then { alert("number {#randomselector} selected") } else { alert("number five selected (else)") set(#Check,$false,"Global") } } wait(3) } Quote Link to post Share on other sites
webpro 31 Posted November 24, 2015 Author Report Share Posted November 24, 2015 Yeah thanks Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.