Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Wed Nov 21, 2018 12:15 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: 12 Point Divisor - Roulette Bot
Thanked: 0 time(s)  Unread post Posted: Tue Sep 30, 2014 6:48 pm 
New User
New User



Joined: Wed Aug 27, 2014 4:49 pm
Posts: 5
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 13
Hi all,

In my endeavour to learn more about coding, I have tried to create a more complicated bot for roulette. I am still working on it but here is my current code for a bot using the 12 point divisor betting strategy.
It currently just alternates between red and black, but it should be easy enough to change for your own betting strategies.
You may need to update the co-ordinates for mouse clicking for you computer.
It was made for Casino.com so should work on any Playtech casinos "out of the box" as they use the same software

Any questions just ask. If you want to see a feature added let me know, i am still learning so it may take me a while to add if it's complicated but i will do my best.
If you think there is a better way to do something in my code, feel free to let me know, i am always up for learning more!

Pre-Defined Variables:
{target} - set to your profit target for the session, ie: 10 units
{currentBet} - set to your starting bet...I started with $1 do set to 1, $10 would be 10, etc
{winOdds} - this was set to 1 as playing red/black with odds 1:1, if your doing rows with odds 1:2, then set to 2
{divisor} - this is what you want the target to be divided by. some use 6 but i did this for 12 (hence 12 point divisor)
{tempTarget} - set this to the same as your profit target and the code will change this automatically
{won} - set to 0 and code will change this automatically
{lastBet} - set to black or red and code will change this automatically
{bet} - set to opposite colour of lastBet and code will change this automatically
{maxBet} - set this if you would like a safety brake...basically it won't make a bet higher than this but will continue to bet this amount until you have earned back what you lost.
{minBet} - set this to your starting bet
{newTarget} - set to same profit target for the session and code will change this automatically.

Code:

Code:
Begin
     Function.Execute("Spin")
     Humanly.Pause("500", "1000")
     Function.Execute("Check if we won")
     Humanly.Pause("100", "200")
     Function.Execute("Determine Betsize")
     Humanly.Pause("100", "200")
     Function.Execute("Where to Bet")
     Humanly.Pause("100", "200")
     Function.Execute("Bet")
     Humanly.Pause("100", "200")
     Function.Execute("Last Bet")
 end

function("Spin")
     begin
          Mouse.Click at coordinate("189", "428", "left")
     end
function

function("Check if we won")
     begin
          // Win - found "w"
          if  Color.Pixel pattern can be located on screen near coordinate("0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,2,3,1,1,0,0,0,0,0,-1,0,0,0,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,1,0,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,1,0,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,-1,0,0,0,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,1,0,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,1,0,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0", "0", "647", "167", "20")
               begin
                    Variable.Set("won", "0")
               end
          // Lose - no "w"
          if  Color.Pixel pattern can not be located on screen near coordinate("0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,2,3,1,1,0,0,0,0,0,-1,0,0,0,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,1,0,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,1,0,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,-1,0,0,0,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,1,0,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,1,0,0,0,0,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,254,254,254,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,-1,254,254,254,0,-1,254,254,254,0,-1,0,0,0", "0", "647", "167", "20")
               begin
                    Variable.Set("won", "1")
               end
     end
function

function("Determine Betsize")
     begin
          if  Variable.Is equal to("won", "0")
               begin
                    Variable.Multiply (Math)("currentBet", "{winOdds}")
                    Variable.Subtract (Math)("target", "{currentBet}")
                    if  Variable.Is less than (Math)("target", "1")
                         begin
                              Variable.Set("target", "{newTarget}")
                         end
                    Variable.Set("tempTarget", "{target}")
                    Variable.Divide (Math)("tempTarget", "{divisor}")
                    Variable.Round (Math)("tempTarget", "0")
                    Variable.Set("currentBet", "{tempTarget}")
               end
          if  Variable.Is equal to("won", "1")
               begin
                    Variable.Add (Math)("target", "{currentBet}")
                    Variable.Set("tempTarget", "{target}")
                    Variable.Divide (Math)("tempTarget", "{divisor}")
                    Variable.Round (Math)("tempTarget", "0")
                    Variable.Set("currentBet", "{tempTarget}")
               end
          if  Variable.Is greater than (Math)("currentBet", "{maxBet}")
               begin
                    Variable.Set("currentBet", "{maxBet}")
               end
          if  Variable.Is less than (Math)("currentBet", "{minBet}")
               begin
                    Variable.Set("currentBet", "{minBet}")
               end
     end
function

function("Where to Bet")
     if  Variable.Is equal to("lastBet", "red")
          Begin
               Variable.Set("bet", "black")
          end
     if  Variable.Is equal to("lastBet", "black")
          begin
               Variable.Set("bet", "red")
          end
function

function("Bet")
     if  Variable.Is equal to("bet", "black")
          Begin loop("{currentBet}")
               Mouse.Click at coordinate("359", "403", "left")
          end
     if  Variable.Is equal to("bet", "red")
          begin loop("{currentBet}")
               Mouse.Click at coordinate("418", "447", "left")
          end
function

function("Last Bet")
     if  Variable.Is equal to("bet", "black")
          Begin
               Variable.Set("lastBet", "black")
          end
     if  Variable.Is equal to("bet", "red")
          begin
               Variable.Set("lastBet", "red")
          end
function


Last edited by Syrifina on Tue Sep 30, 2014 7:32 pm, edited 1 time in total.
added code tags


Top
 Profile  
Reply with quote  
 Post subject: Re: 12 Point Divisor - Roulette Bot
Thanked: 0 time(s)  Unread post Posted: Wed Oct 01, 2014 6:12 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
Good job; nice to see that you got it working. Was your "assignment" to create a roulette bot for school? How did you do?

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: 12 Point Divisor - Roulette Bot
Thanked: 0 time(s)  Unread post Posted: Tue Oct 14, 2014 4:46 pm 
New User
New User



Joined: Wed Aug 27, 2014 4:49 pm
Posts: 5
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 13
Yes it was, I did quite well on the assignment as most people just used a martingale strategy where I used a divisor strategy. They now want us to modify our bots to use a sleeper strategy. So we have to wait for say red to come up x amount of times and then bet. After we have done that we then need to be able to incorporate multiple bet categories, so line, single, row, etc, but have it so that before you start the bot you can choose which bet type to use.

I was thinking of using the window.request user multiple choice input, would that be the best way to implement choice in the bot? or would it be better to use another function?

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: 12 Point Divisor - Roulette Bot
Thanked: 0 time(s)  Unread post Posted: Tue Oct 14, 2014 9:59 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1839
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16376
Glad you did well on your assignment!

Any of the "...request user..." instructions would work.

If I was working on it and wanted to stand out, I would use voice commands. I wrote a thread demonstrating using voice commands to activate macros a couple of years ago, it also includes a video; viewtopic.php?f=122&t=7722 Make sure you read the whole thread because I didn't write it with functions at first, but I rewrote it towards the end of the post using functions.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: 12 Point Divisor - Roulette Bot
Thanked: 0 time(s)  Unread post Posted: Wed Oct 15, 2014 9:35 am 
Gold Contributor
Gold Contributor
User avatar



Joined: Thu Oct 09, 2014 4:34 am
Posts: 301
Location: Beelzemon
Been thanked: 12 time(s)
Has thanked: 38 time(s)
Contribution Points: 31
Programmer always a programmer :D


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group