• Welcome to #1 Roulette Forum & Message Board | www.RouletteForum.cc.

News:

Almost every system has been tested many times before. Start by learning what we already know doesn't work, and why.

Main Menu
Popular pages:

Roulette System

The Roulette Systems That Really Work

Roulette Computers

Hidden Electronics That Predict Spins

Roulette Strategy

Why Roulette Betting Strategies Lose

Roulette System

The Honest Live Online Roulette Casinos

Tom's second RSS Pro Tutorial. (Code)

Started by ThomasGrant, Jul 20, 10:33 AM 2010

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThomasGrant

Now that we have designed the bot.
See these links for more info.

link:://rouletteforum.cc/coding-for-roulette/tom%27s-first-rss-pro-tutorial/

link:://rouletteforum.cc/coding-for-roulette/tom%27s-second-rss-pro-tutorial-%28design%29/

We now start adding in some code.
So it will do what we want it to.

I have attached what I have done so far.
Have a look at some of the code in this post.
link:://rouletteforum.cc/coding-for-roulette/tom%27s-first-rss-pro-tutorial/

And lets add the same to our new bot.

procedure ComboBox1Change(Sender: TObject);
begin
   case ComboBox1.ItemIndex of            
   0:ShowMessage('Choose a casino');
   1:set_roulette_window_name('European Roulette - EuroGrand Casino');
   2:set_roulette_window_name('European Roulette - bet365casino');
   3:set_roulette_window_name('European Roulette - Casino Tropez');
   4:set_roulette_window_name('European Roulette - Mapau Casino');
   5:set_roulette_window_name('Roulette Pro - 21Nova Casino');
   6:set_roulette_window_name('European Roulette - William Hill CASINO CLUB');
   end;  
end;


We know that part works.

As you add in code.
Run and then save your work.
If it runs ok.
Then you should be able to just save it.

Now, last time we got it to insert the numbers into the memo.
Because we have 3 memos.
And we want numbers to go to the appropriate ones.
We have to add in a few extra code bits.

First we add in a function.

function in_array(i_nr,i_array):boolean;
{check if the i_nr value is from the i_array array}
var k;
begin
   result:=false;
   for k:=0 to VarArrayHighBound(i_array,1) do
   begin
       if i_nr=i_array[k] then
       begin
           result:=True;
           break;
       end;
   end;
end;


procedure Button1Click(Sender: TObject);
var cnt;
begin
   if edit1.Text <>'' then
   begin      
       spins:=IntToStr(edit1.Text);
       for cnt:=0 to spins do
       begin    
           click_spin();
           if in_array(get_last_number(),[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]) then
           begin
               memo1.Lines.Insert(0,'');
               memo2.Lines.Insert(0,'');
               memo3.Lines.Insert(0,get_last_number());
           end;
           if in_array(get_last_number(),[2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35]) then
           begin
               memo1.Lines.Insert(0,get_last_number());
               memo2.Lines.Insert(0,'');
               memo3.Lines.Insert(0,'');
           end;
           if in_array(get_last_number(),[0]) then
           begin
               memo1.Lines.Insert(0,'');
               memo2.Lines.Insert(0,get_last_number());
               memo3.Lines.Insert(0,'');
           end;
       end;
   end;
end;


In the code you can see that every time a number comes in.
It will be put in the correct memo box.

More Coding to come...
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

Ok, so we continue with the code for the bot.
First of.
If you press on any of the panels.
You will get this message.

So we have to fix that up.
Just double click on each panel.
And it will insert a procedure for each of em.

procedure Panel1Click(Sender: TObject);
begin
 
end;

procedure Panel3Click(Sender: TObject);
begin

end;

procedure Panel2Click(Sender: TObject);
begin

end;


Run and save.

We also have no script for when we change the info in Edit1.
So this error comes up.


So lets fix that up.
In fact lets fix all the Edit fields up.
Just double click on each of them.
And it will add code for each to the script.

procedure Edit1Change(Sender: TObject);
begin
 
end;

procedure Edit2Change(Sender: TObject);
begin               
 
end;

procedure Edit3Change(Sender: TObject);
begin

end;

procedure Edit4Change(Sender: TObject);
begin

end;


Run and save.

Ok, Now all that is done.
We should be bug free for the time being.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

Now we are going to add a key press procedure to the script.



What the code will do.
Is when you press the enter key in the Spins Field.
It will display the amount of spins that the wheel will spin for in Panel3.
Here is the code.

procedure Edit1KeyPress(Sender: TObject; var Key: Char);
begin
    if edit1.Text <>'' then
    begin
        if Key = #13 then
        begin
            Key := #0;
            Panel3.Caption:='You are about to spin the wheel for '+IntToStr(edit1.Text)+' Spins';
        end;
    end; 
end;


This is what happens when you press the enter key.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

Ok, now we got that part sorted out.
Lets keep adding in script.
This time I want to know how many spins I have done.



procedure Button1Click(Sender: TObject);
var cnt,nos;
begin
    nos:=0
    if edit1.Text <>'' then
    begin       
        spins:=IntToStr(edit1.Text);
        for cnt:=0 to spins do
        begin   
            click_spin();
            if in_array(get_last_number(),[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]) then
            begin
                memo1.Lines.Insert(0,'');
                memo2.Lines.Insert(0,'');
                memo3.Lines.Insert(0,get_last_number());
            end;
            if in_array(get_last_number(),[2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35]) then
            begin
                memo1.Lines.Insert(0,get_last_number());
                memo2.Lines.Insert(0,'');
                memo3.Lines.Insert(0,'');
            end;
            if in_array(get_last_number(),[0]) then
            begin
                memo1.Lines.Insert(0,'');
                memo2.Lines.Insert(0,get_last_number());
                memo3.Lines.Insert(0,'');
            end;
            Panel2.Caption:='Spins ='+IntToStr(nos);
            nos:=nos+1
        end;
    end;
end;


Ok, all I did there was to add in a variable nos (number of spins)
And get it to display in the Panel2.



And here is a video of it in action.
link:://rouletteprofesor.com/rss-pro/my-bot2/my-bot-p2a-vid1.html
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

And now, for the part you have all been waiting for.
"Getting it to place a bet on the table."

First we have to make some arrays.
Then we got to use the information.
To determine when and where to place the bet.

I added 3 new variables to the script.

var spins,red,black,bet;

    bet:=0;
    red:=[0,0];
    black:=[0,0];

red and black are the arrays.

I also need to write something that will clear the bets from the table.
if bet=1 then
begin
ide_delay:=500;
click_chip1();
click_red();
click_black();
click_clear_bets();
bet:=0;
black[0]:=0;
end;


So here is the entire start button script.
procedure Button1Click(Sender: TObject);
var cnt,nos;
begin
    nos:=0;               
    bet:=0;
    red:=[0,0];
    black:=[0,0];
    if edit1.Text <>'' then
    begin       
        spins:=IntToStr(edit1.Text);
        red[1]:=IntToStr(edit4.Text);
        black[1]:=IntToStr(edit3.Text);
        for cnt:=0 to spins do
        begin                     
            ide_delay:=10;
            click_spin();
            if in_array(get_last_number(),[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]) then
            begin
                memo1.Lines.Insert(0,'');
                memo2.Lines.Insert(0,'');
                memo3.Lines.Insert(0,get_last_number());
                black[0]:=black[0]+1; 
                if bet=1 then
                begin
                    ide_delay:=500;
                    click_chip1();
                    click_red();
                    click_black();
                    click_clear_bets();
                    bet:=0;
                    black[0]:=0;
                end;   
                if black[0]>black[1] then
                begin
                    click_chip1();
                    click_red();                   
                    bet:=1;
                end;               
            end;
            if in_array(get_last_number(),[2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35]) then
            begin
                memo1.Lines.Insert(0,get_last_number());
                memo2.Lines.Insert(0,'');
                memo3.Lines.Insert(0,'');
                red[0]:=red[0]+1;
                if bet=1 then
                begin
                    ide_delay:=500;
                    click_chip1();
                    click_red();
                    click_black();
                    click_clear_bets();
                    bet:=0;
                    black[0]:=0;
                end;
                if red[0]>red[1] then
                begin
                    click_chip1();
                    click_black();                   
                    bet:=1;
                end;
            end;
            if in_array(get_last_number(),[0]) then
            begin
                memo1.Lines.Insert(0,'');
                memo2.Lines.Insert(0,get_last_number());
                memo3.Lines.Insert(0,'');
                if bet=1 then
                begin
                    ide_delay:=500;
                    click_chip1();
                    click_red();
                    click_black();
                    click_clear_bets();
                    bet:=0;
                    black[0]:=0;
                end;
            end;
            Panel2.Caption:='Spins ='+IntToStr(nos);
            nos:=nos+1
        end;
    end;
end;


Now to see it in action.
link:://rouletteprofesor.com/rss-pro/my-bot2/my-bot-p2b-vid1.html

I also have the src code for you to download.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

Now all that is left.
Is to tidy it up.
Try putting repetitive things into a procedure.
And add some more code.
But all in all...

It works.
Just the way I planed it would.
Got to still add in a way to make it stop.
So I got to figure that out.

If anyone else found this tutorial a good read.
And found it interesting.

Please let me know.
It may motivate me to do Tutorial 3.

Thanks for following along.

Yours....

Thomas R. Grant
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

-