Our members are dedicated to PASSION and PURPOSE without drama!

How to scripting the upcoming bot

Started by Ralph, November 19, 2012, 11:26:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ralph


I plan to make the bot accessable for using in about three weeks. How to script the bot I will publish some more later, for now here is an introduction for scripting.


Coding the Roullettetbot.com BVBot! There will be no fee for downloading the bot.
The bot will run using external scripts, and there are requirements to make it works well. The scripts are located at a server and will be accessable to all users, the same moment it will be added. The user can then chose a script for the play.
The script language can in principle be any, but to make it sure all users can run the scripts JavaScript or vBScript are best, as any users have that accessable via the OS in Windows.
The scripts should receive 3 arguments 1: The number won last spin. 2: The chip value 3:The bet.
The script should return the next bet, and the chip size.


Code (javascript) Select
       function extfunc(lastnumber,chipsize,bet){


          //the tasks of the script


          return bet + "/" + chipsize;


       }

   


The name of the receiving and returning function must have the name "extfunc". There could be more functions in the script.
The bets are described using string tokens which is separated by commas.
All possible bets or mix of bets can be used.
The bot will not work without a script, which the user chose in a listbox.
It is not for any other reason than calculate the next bet,the script need to know the win/loss, the bot reads the balance at the casino, and can be made to stop at a given win or loss.


The bets are described as follow:
The single, or straight up bets by the number. If the script returns "1,12,3" The bot place a chip straight up on the number 1,12 and 3.
If "13,13,13,14" is returned the bot place three chips on number 13 and one on number 14.


The other inside bets are easy to remember, it is always the lowest number following of a bet marker and the highest number.
A split use "#" as marker, and the split between 2 and 5 will be 2#5, important always the lowest number first and the bet marker followed by the highest number.
The street is similar 1s3 means the street 1,2,3.
The corner bet is 1c5 for the corner 1,2,4,5.
The line or double street has 1d6 for the first double street and all other the same style.
All bets can be mixed, if the script returns "1d6,1d6,7d12,7d12,35#36" the bot place two chips on the first and second line, and a split on number 35 and 36.


The outside bets have all tokens, the Ec "rr" for red,"bb" for black, "oo" for odd,"ee" for even, "ll" for low and "hh" for higth. Not hard to remember.


The dozen tokens are "ld", "md" and "hd". The Col tokens are "co1","co2","co3" ther co1 is the col with 1 on top and 34 on bottom.


This is about all you need to know to coding a script for any method! If you start with a simpler to get the concept, there are no limits making a method in scripting.


I will show a very simple script and explain the way a script should be written.


The example will be simple to follow, and will describe a martingale playing odd numbers.
The script needs at least one function, using the name "extfunc"!
       
Code (javascript) Select
function extfunc(number,betsize,bets){
        }

   
The function receive three Args, in this case we assume number 2, betsize 0.1 and a bet on odd.
The function must first check if the number 2 is odd, if it win or lose.
       Partly pseudocode:
     
Code (javascript) Select
function extfunc(number,betsize,bets){
       if(number == 0) { return as loss}
         if(number % 2 == 0) { return as loss }
          else { return as win }
          }

   
We check using a modular division if it is an odd or even number, but first handle zero.
If the bet lose we shall return two times the incoming bet, and if it wins we shall return the lowest bet.
           
     
Code (javascript) Select
function extfunc(number,betsize,bets){
         if(number == 0) {return bets + "," + bets + "/0";}
         if(number % 2 == 0) {return bets + "," + bets + "/0";}
         else { return "oo"+"/0"; }
        }

   
That is the all the script checks if the number is odd, the args to the function was (2,0,oo) there 2 was the winning last number, 0 is the lowest bet (the index in the listbox) and "oo" the code for one chip on odd. If we had won the same bet will be returned, but on a loss the betsize will be double. The returnstring will because of a loss be "oo,oo/0" and the bot will place two 0.01 chips on odd.
Next time the bot will send the returned bet of two to the script, if we win the scrips return just one chip bet, if a loss it return four as it received a "oo,oo" bet and send it back two times the size.
This simple script can handle a martingale on one EC. Any coder familiar with the script language, are able to use Arrays or more advanced coding, no method is not possible. The main is the script get the bet, compute what to do the next bet and return that bet.
I will continue coding different methods, but invite all who code to make up the number of scripts.The scripts do not need to be wrapped what issue the bot can handle. Just a textfile with the script.A coder who do not have access to a scripting environment, can use the webbrowser and debug using alert or html to display the result during coding.


Trebor

Ralph,


This looks like being a fantastic asset to the forum.


Trebor

Ralph

Here is a picture of the bot controls in the first release, it is some more work with the screen recognizion of the balance, a bit tricky due to the way BV use the ending zeros (or not use).

The first bet is entetered in the textfield, after chosen a metod script, the chip value shall be selected, the default is 0.01.

Then we enter the balance we want as win target, the stop/loss is the balance we take into the game, as that is possible at BV.

The start button can then be pressed and the bot makes one spin using the script, the returning next bet will be shown. We can play semiautomatic watching the spins and hit the button.

At that moment we can mark the checkbox, which make the bot to run until manually stopped, the win target is reached or the stop/loss.

When the session is ended, we press new session, and  the variables in the script will be resetted, and we can start all over. but do not forgett to resett the casino balance via putting  the winnings to the head account, so the stop/loss remain the same.

Ralph

A simple tool to use writing a script and debug it is notepad and a webbrowser, any webbrowser can execute javascript .


Here is an example of the martingale script set for debugging in a webbrowser.  you can change the args to the script and see the returned value,

The code was disturbed after posting it so I have to use a picture.

Ralph

Here is an other script, which will be available with the bot. It plays the dominant EC's for the session. I have checked sessions for about 300 spins and found it very often are an EC which is more dominant, even if we add the zeros to the least EC, the dominant are in larger frequence. The script start counting all six EC and bet flat on the dominant for the session.  I use to try to win 5 to 10 units before resetting the session. Three  EC's are bet with one unit every spin, and always the dominant.




Ralph

In Javascript the Array is a powerful tool.
If we do not know how many entries it will be, we can add at the end.


var arr = new Array();


A new  slot at the end is easy  to set   arr[arr.length] = "the new"


The array can be used as a stack using pop() which remove the last.


You can remove any, using other ways. Check on the net, very much there try http://www.w3schools.com witch amied to websites, but easy transformed to the use as roulette script. 


The use of indexOf  can tell if a number is red  just a string whith the red numbers is checked.


The language is used much one web applications, and that from private sites to banks and casinos, a very good and flexible language, which is not hard to learn. You do not need to master all, it is a forgiven language, handle from "spagetticode" to full OOP.

Ralph

The step from a tracker to a script which works in a robot is not far. The tracker has done  the special work for a method, the (ro)bot takes care of the betting at the table, the win target and the stop/loss.  My bot is designed to take any imageable methods with a script wich never is harder to code than a tracker.  The bot will be supported, but it is up to you to have the sytem (Windows) updated, whith NET 4.0.
I can not spend time to support your configurations. Any newer windows will work (from vista) if you own a legal copy which are updated manually every week or auto as soon needed, it will run good. You need 500 mb RAM to run fast, 300 is min. Older computers will work, but not old OS (for between  two or  five years witout updating) NET FRAMEWORK IS MANDATORY!

All version of Windows do not have it, it is free from Microsoft site.  If you are unsure, an easy way is to download  Visual basic Express  2012 which is free, and always give the NET framework for your Windows version.