Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Fri Apr 10, 2020 4:08 am

All times are UTC




Post new topic Reply to topic  [ 56 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: Roulette bot version 2
Thanked: 0 time(s)  Unread post Posted: Fri Feb 21, 2020 2:05 am 


Hi, very interesting code! Is it possible to extract text from a part of the screen in order to recognize for each spin what was the last number?
Thank you


Top
  
Reply with quote  
 Post subject: Re: Roulette bot version 2
Thanked: 0 time(s)  Unread post Posted: Sat Mar 14, 2020 6:01 pm 
New User
New User



Joined: Tue Dec 04, 2018 11:02 pm
Posts: 2
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
hi this thread is ideal for me, im trying to customise some of the code people have posted already

i am so inexperienced but thought id have a go, and now i have no idea

ive tried to make 2 functions red and black as i want the macro to wait for 4/5 reds or blacks in a row before placing a bet on the opposite colour,

wait for 5 red or black
bet - on either red or black depending on streak having trouble figuring out how i can do this
check colour - if win reloop, if lose rebet
rebet - double click on button at coord
essentially repeating these last 2 steps until win



Code:
function("Red")
                              Color.Wait for color at coordinate to be (RGB)("180", "47", "36", "691", "363")
                              Macro.Pause("10000")
                              Color.Wait for color at coordinate to be (RGB)("180", "47", "36", "691", "363")
                              Macro.Pause("10000")
                              Color.Wait for color at coordinate to be (RGB)("180", "47", "36", "691", "363")
                              Macro.Pause("10000")
                              Color.Wait for color at coordinate to be (RGB)("180", "47", "36", "691", "363")
                              Macro.Pause("10000")
                         end
function
function("Black")
                         Color.Wait for color at coordinate to be (RGB)("47", "47", "36", "691", "363")
                         Macro.Pause("10000")
                         Color.Wait for color at coordinate to be (RGB)("47", "47", "36", "691", "363")
                         Macro.Pause("10000")
                         Color.Wait for color at coordinate to be (RGB)("47", "47", "36", "691", "363")
                         Macro.Pause("10000")
                         Color.Wait for color at coordinate to be (RGB)("47", "47", "36", "691", "363")
                         Macro.Pause("10000")
                    end
function
function("Place bet") // also this depends what colour streak//
     Mouse.Click at coordinate relative to window("1", "1", "1", "1", "1")
 end
function("Check if we won")
     begin
          Variable.Set("won", "no")
          if  Color.Wait for color at coordinate to be (RGB)("47", "47", "36", "691", "363")

               begin
                   
               end


Top
 Profile  
Reply with quote  
 Post subject: Re: Roulette bot version 2
Thanked: 1 time(s)  Unread post Posted: Sat Mar 14, 2020 9:31 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2013
Location: USA
Been thanked: 447 time(s)
Has thanked: 34 time(s)
Contribution Points: 16936
I guess the first question I would have is what are you doing while you're waiting for 5 reds/blacks? Are you betting or spinning without betting?

For now let's take that part out and just talk about how to switch the bets. I think the easiest way would be to add a couple more variables.
- First add a count: variable.set ("count", 0)
- then you check if you won. If you did then add 1 to the count: variable.increment ("count", 1)
- if not, you want to reset the count to 0
- next add an "if" statement that looks at the count to see if it hits 5; if so, then you want to switch the color (explained next)

To switch colors of where you are betting, you will need more variables. Basically you will need 2 functions for betting as well; 1 for betting on red and 1 for betting on black. So set those up with the coordinates to bet on each.
- then add the variable: variable.set ("color", red); or whatever color you want to start betting on.
- after the count hits 5, change the value of "color" to "the other color": variable.set ("color", black)
- I would continue this allowing the count to hit 10. At 10 I would switch back to red
- then reset the count: variable.set ("count", 0)
-- I think that should cycle it indefinitely between the colors

To switch between the betting functions, (at the top in the video) add function.execute("{color}"). The function to execute is a variable.
- which means at first the macro will bet on red (the first value we set the variable color as), but after the count reaches 5, the variable "color" will switch to "black" and BEM will read: function.execute("black")...because black is now the value of color. Then at 10 it switches to red again, you reset the count to 0, and everything keeps going.

Hope that makes sense. Many brand new people to BEM that come for roulette only, usually want to jump straight in on very complicated macros. It's much easy to learn if you get the basics down first. For example, follow along with Gigus' video and get that working. Then try adding some features and see if you run into problems. If you run into problems, then just post a question and we can try to help. Additionally, for what I wrote above to work, you do need parts of Gigus' macro working (like spinning, checking if you won, etc.). Give it a try.

_________________
----------------------------------------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: Roulette bot version 2
Thanked: 0 time(s)  Unread post Posted: Mon Apr 06, 2020 8:29 am 
New User
New User



Joined: Tue Dec 04, 2018 11:02 pm
Posts: 2
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
so its playing live roullette so between the spins just waiting for another pop up to show colour.

this is what ive come up with so far still being new and just keeping at it trail and error. but now instead of waiting until the black streak gets to 5, somehow the bot thinks it does and bets on red too soon, the site i use is skybet i cant see where ive made a mistake


Code:
 begin
     Window.Set always on top("Live Roulette - Play casino games online | Sky Casino Online - Google Chrome", "no", "yes")
 end
 begin loop()
     Macro.Report progress("Reading")
     Function.Execute("black")
     Function.Execute("red")
     Function.Execute("check")
     Function.Execute("check1")
 end

function("red")
     if  Color.At coordinate is within (RGB range)("180", "46", "37", "15", "1010", "570")
          begin
               Function.Execute("redwin")
               Macro.Pause("3000")
          end
function

function("redwin")
     begin
          Variable.Increment (Math)("red")
          Variable.Set("black", "0")
          Macro.Pause("3000")
     end
function

function("black")
     if  Color.At coordinate is within (RGB range)("47", "47", "47", "10", "1010", "570")
          begin
               Function.Execute("blackwin")
               Macro.Report progress("black won")
          end
function

function("blackwin")
     begin
          Variable.Set("red", "0")
          Variable.Increment (Math)("black")
          Macro.Pause("3000")
     end
function

function("check")
     if  Variable.Is equal to("red", "5")
          begin
               Macro.Report progress("red variable is equal to 5")
               Function.Execute("redstreak")
          end
     if  Variable.Is equal to("black", "5")
          begin
               Macro.Report progress("black variable is equal to 5")
               Function.Execute("blackstreak")
          end
function

function("redstreak")
     begin
          Mouse.Click at coordinate relative to window("1040", "903", "left", "Live Roulette - Play casino games online | Sky Casino Online - Google Chrome", "no")
          Macro.Pause("5000")
     end
function

function("blackstreak")
     begin
          Mouse.Click at coordinate relative to window("960", "903", "left", "Live Roulette - Play casino games online | Sky Casino Online - Google Chrome", "no")
          Macro.Pause("5000")
     end
function

function("check1")
     if  Variable.Is greater than (Math)("red", "5")
          begin
               Macro.Report progress("red variable is greater than 5")
               Function.Execute("rebet")
          end
     if  Variable.Is greater than (Math)("black", "5")
          begin
               Macro.Report progress("black variable is greater than 5")
               Function.Execute("rebet")
          end
function

function("rebet")
     begin
          Mouse.Click at coordinate relative to window("1005", "960", "left", "Live Roulette - Play casino games online | Sky Casino Online - Google Chrome", "no")
          Mouse.Click at coordinate relative to window("1005", "960", "left", "Live Roulette - Play casino games online | Sky Casino Online - Google Chrome", "no")
          Macro.Pause("5000")
     end
function
 


Top
 Profile  
Reply with quote  
 Post subject: Re: Roulette bot version 2
Thanked: 0 time(s)  Unread post Posted: Mon Apr 06, 2020 9:49 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2013
Location: USA
Been thanked: 447 time(s)
Has thanked: 34 time(s)
Contribution Points: 16936
Your colors may be off considering:

In RGB:
red should be (or close to): 255 0 0
and black should be : 0 0 0

Which may be normal for this game because they are shades of red and black. Also consider you have set tolerances in there since you used "range" of 15 and 10...meaning they can be off quite a bit and still give a positive result. Considering black is first, this may be why it's always saying black won...but there's more:

I think you have the coordinates off also. If you look at your color checks, both red and black use the same coordinates. Usually in roulette, there's a "table" with columns for red, zero, and black...meaning the winning indicator would be in a different spot for each color respectively. I would definitely look into that. To me, logically, the coordinates should be different (at least for how you seem to be checking for the winner).

So it may be a combination of those two. The red you are using is a dark red and considering the tolerances of both...it may always be saying black. Or kinda vice-versa, it's only looking in the black spot and with the tolerances it always sees black (I don't know what color is behind black, like when you don't win. If there's not so much contrast then with the tolerances it may always say black no matter what).

Here's a way to tell what's going on: So after you run the script open the execution log. It will tell you exactly what it's doing. If it's saying that black is always winning (even though it's not), it means your colors or coordinates are off - which in this case I think they are both inaccurate. Or perhaps you will notice something else that is not behaving properly.

Hope that helps.

_________________
----------------------------------------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: Roulette bot version 2
Thanked: 0 time(s)  Unread post Posted: Mon Apr 06, 2020 10:52 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2013
Location: USA
Been thanked: 447 time(s)
Has thanked: 34 time(s)
Contribution Points: 16936
Oh yea...one more thing I noticed but this shouldn't have any thing to do with the current problem you are having is your function "check". You have that check if the variable is exactly 5. You know that will only happen once...meaning all other scenarios are that the variable is less than or greater than 5.

That function executes red and black streaks. Whatever you have it clicking on in the those streak functions will only happen once (unless the color switches). I realize you have might want to know when it's on a streak and maybe that's only once, but keep in mind whatever it's clicking will only happen once also.

The rebet function should be fine since it's greater than and it's not tied to "check" or "streaks".

_________________
----------------------------------------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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 56 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

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