Login to get access to all resources of Money Maker Machine - Forum
Open Source Roulette Systems and Roulette Tools Forum.
May 25, 2013, 01:13:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
French German Italian Dutch Spanish Portuguese Korean Chinese Simplified Japanese Greek Arabic Russian
 
   Home   Help Search Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]   Go Down
  Print  
Author Topic: Silver's utilities module s_utils.psc  (Read 645 times)
0 Members and 1 Guest are viewing this topic.
Silver
Moderator
Trade Count: (+8)
Sr. Member
*****

Karma: 79
Offline Offline

:Yesterday at 11:00:48 AM
Posts: 585
Referrals: 1



Activity
0%

RSS Expert


« on: March 27, 2009, 01:54:55 PM »

Hello, in this post will be available the s_utils module.
It contain usefull functions and procedures, that do the codding process easy.

1. procedure bet_x_on_y(xunits,yelements,chips);
   Bet the xunits amount on yelements elements.
   Chips is the declaration of chips from your script.
   Ex: bet_x_on_y(17.5,['column1','dozen1'],chips);

2. function in_array(i_nr,i_array):boolean;
   Check if the i_nr value is from the i_array array.
   Ex: if in_array(3,[1,2,3,4,5,6]) then print('Number 3 is from line 1-6') else print('Number 3 is not from line 1-6');

3. function number_is(number, name):boolean;
   Check if the number is red, black ,etc.
   Ex: if number_is(3,'line1') then print('Number 3 is from line1') else print('Number 3 is not from line 1');
   Ex: if number_is(34,'dozen2') then print('Number 34 is from dozen2') else print('Number 34 is not from dozen2');

4. procedure wait_ms(ms_in);
   wait ms_in milliseconds
   Ex: click_rebet(); wait_ms(2000); click_clear_bets(); //will wait 2 seconds

In the attachment you can download the s_utils.psc and the s_utils_example.psc.


* s_utils.psc (24.68 KB - downloaded 100 times.)
* s_utils_example.psc (0.97 KB - downloaded 87 times.)
Logged

RSS is limited only by your imagination ...

Have any error with your script or any question with it - go to SILVER's Room board for free help.
Need a fully functional and well organized RSS Script - visit http://silver.money-maker-machine.com
Lickmastr
Guest
Trade Count: (0)
« Reply #1 on: April 06, 2009, 11:29:48 AM »

Hi there silver Smiley
I`m looking at your s_utils here, and was wondering about the number_is function.

I see you need to specify 2 parameters when dooing this .ex: Number_is(1,red)
But what if i want to use only Red? I want to find out if the last number is just red: Ex:


repeat
click_spin()
until Number_is(red)

how could i make this happen?Smiley
Logged
Silver
Moderator
Trade Count: (+8)
Sr. Member
*****

Karma: 79
Offline Offline

:Yesterday at 11:00:48 AM
Posts: 585
Referrals: 1



Activity
0%

RSS Expert


« Reply #2 on: April 06, 2009, 11:46:42 AM »

Here is your solution -)

repeat
click_spin()
until Number_is(get_last_number(),'red');
Logged

RSS is limited only by your imagination ...

Have any error with your script or any question with it - go to SILVER's Room board for free help.
Need a fully functional and well organized RSS Script - visit http://silver.money-maker-machine.com
Lickmastr
Guest
Trade Count: (0)
« Reply #3 on: April 06, 2009, 11:53:05 AM »

Oh.. hehe.. why did i not see that one coming? Smiley hehe.. tnx Smiley
Logged
thomasgrant
PLATINUM Member
Trade Count: (+1)
Hero Member
***

Karma: 1643
Offline Offline

:Yesterday at 07:04:18 PM
Posts: 3082
Referrals: 21



Activity
40%

RSS Writer and Teacher


WWW
« Reply #4 on: March 28, 2010, 04:53:07 AM »

Question on utils.
Ok, I have been trying to add this procedure to utils.

procedure display_spins;
begin                                            
    {Here we dispaly how many times the roulette wheel has spun.}
    if (nos=ds)
    then
    begin
        print('The wheel has spun '+IntToStr(nos)+' times');
        Print('');        
        ds:= ds + 50
    end;
end;
With not much success.
First I tried it as is.
Then I tried sending arguments to it.

procedure display_spins(nos,ds);

nos:=0
ds:=50;
for k:=0 to 110 do
    begin
        click_spin();
        nos:= nos + 1

      display_spins(nos,ds);
        
        last_number:=get_last_number();
end; //k:=0 to Spins do  

After my spins = get to 50
It will display that I have reached 50
But when spins reaches 100
Nothing happens.
Should it be in an array? of some sorts?

This happens when I add it to the utils.
And call the routine up from there.

When I add the routine to the main script.
It works fine.
I just remove the arguments.

nos:=0
ds:=50;
for k:=0 to 110 do
    begin
        click_spin();
        nos:= nos + 1

      display_spins;
       
        last_number:=get_last_number();
end; //k:=0 to Spins do 
« Last Edit: March 28, 2010, 04:56:29 AM by thomasgrant » Logged

"Live long and prosper." Spock
www.thomasrgrant.com

The Roulette Professor.
http://rouletteprofesor.com/
thomasgrant
PLATINUM Member
Trade Count: (+1)
Hero Member
***

Karma: 1643
Offline Offline

:Yesterday at 07:04:18 PM
Posts: 3082
Referrals: 21



Activity
40%

RSS Writer and Teacher


WWW
« Reply #5 on: March 28, 2010, 04:59:22 AM »

Perhaps you could explain how utils works.
And how to add procedures and functions to it.
And how to test that they do what they are supposed to do.
Logged

"Live long and prosper." Spock
www.thomasrgrant.com

The Roulette Professor.
http://rouletteprofesor.com/
thomasgrant
PLATINUM Member
Trade Count: (+1)
Hero Member
***

Karma: 1643
Offline Offline

:Yesterday at 07:04:18 PM
Posts: 3082
Referrals: 21



Activity
40%

RSS Writer and Teacher


WWW
« Reply #6 on: March 28, 2010, 05:46:54 AM »

Another question on utils.
I added some more info to this part of the script.

function number_is(number, name):boolean;
{check if the number is red, black ,etc.}
begin
   result:=false;
   case name of
      'Red':  if in_array(number,[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]) then
      begin
         result:=True;
         red_numbers[1]:=elements[w,1];
      end;
      'Black':if in_array(number,[2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35]) then
      begin
         result:=True;
         black_numbers[1]:=elements[w,1];
      end;
      'Odd': if in_array(number,[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35]) then
      begin
         result:=True;
         odd_numbers[1]:=elements[w,1];
      end;
      'Even':if in_array(number,[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36]) then
      begin
         result:=True;
         even_numbers[1]:=elements[w,1];
      end;
      'Low': if in_array(number,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]) then
      begin
         result:=True;
         low_numbers[1]:=elements[w,1];
      end;
      'High':if in_array(number,[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]) then
      begin
         result:=True;
         high_numbers[1]:=elements[w,1];
      end;
      
      //here you can add other elements
   end;
end;

red_numbers[1]:=elements[w,1];
Here I have set the array red_numbers[1] to = elements[w,1];
Now, I am not sure this will work if I have it in the utils.
I have this in my main script.
But would like to have it in utils.
Saves on script size.
How do I go about doing the above?
How would I go about adding this to utils so it will work?
Logged

"Live long and prosper." Spock
www.thomasrgrant.com

The Roulette Professor.
http://rouletteprofesor.com/
Silver
Moderator
Trade Count: (+8)
Sr. Member
*****

Karma: 79
Offline Offline

:Yesterday at 11:00:48 AM
Posts: 585
Referrals: 1



Activity
0%

RSS Expert


« Reply #7 on: March 28, 2010, 12:14:31 PM »

On all your questions I have the one answer - you confuse the variable from the main script, and from the unit s_utils.
In your s_utils you have:
        print('The wheel has spun '+IntToStr(nos)+' times');
        Print('');       
        ds:= ds + 50

and here you increase the value of ds - but you increase the value of variable from s_utils.

But the other variable from the main script (with the same name ds) will not be changed.
So in s_utils you cannot modify the value of variables declared in main script.
In order to omit such situations - just declare the variables with different names.

procedure display_spins(utils_nos,utils_ds);

And about red_numbers[1]:=elements[w,1]; - I think you may found the solutions to do this calculation in main script.
Because the same rule: in s_utils you cannot modify the value of variables declared in main script.
This rule is common for all programming languages.

Good luck !!!
Logged

RSS is limited only by your imagination ...

Have any error with your script or any question with it - go to SILVER's Room board for free help.
Need a fully functional and well organized RSS Script - visit http://silver.money-maker-machine.com
thomasgrant
PLATINUM Member
Trade Count: (+1)
Hero Member
***

Karma: 1643
Offline Offline

:Yesterday at 07:04:18 PM
Posts: 3082
Referrals: 21



Activity
40%

RSS Writer and Teacher


WWW
« Reply #8 on: March 29, 2010, 06:05:09 AM »

Thank you.
So it seems that utils is only good for sending in true or false statements.
Or doing action. Click_Chip etc.
Hmmm, ok.
Logged

"Live long and prosper." Spock
www.thomasrgrant.com

The Roulette Professor.
http://rouletteprofesor.com/
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
How do I upload this code - s_utils.psc - here so that it works without errors??
SILVER's Coding Room
ombrerico 14 161 Last post November 22, 2010, 03:42:37 PM
by ombrerico
Silver is a genius...
SILVER's Coding Room
thomasgrant 1 113 Last post December 22, 2010, 08:37:06 AM
by Silver
RSS with Silver's Script.
SILVER's Coding Room
thomasgrant 2 114 Last post January 03, 2011, 04:18:26 PM
by thomasgrant
s_utils.psc
Request File Service
thomasgrant 0 72 Last post January 09, 2011, 04:46:49 AM
by thomasgrant
TomsPSC - s_utils
Scripts Zone
strider 2 114 Last post January 12, 2011, 08:31:38 PM
by strider
Project: Chart module for RSS Pro « 1 2 »
Projects
MMM Admin 16 375 Last post March 28, 2012, 12:43:30 PM
by MMM Admin
Live Roulette Visual Ballistic Project: Final Stage : Analyze Module Test « 1 2 ... 6 7 »
LRA Project
MMM Admin 92 942 Last post July 28, 2012, 07:41:28 AM
by Loek2000
Re: Live Roulette Visual Ballistic Project: Final Stage : Analyze Module Test
LRA Project
trilskfia 1 30 Last post July 23, 2012, 02:03:58 PM
by MMM Admin
Re: Live Roulette Visual Ballistic Project: Final Stage : Analyze Module Test
LRA Project
starfighter55 2 27 Last post July 23, 2012, 02:04:05 PM
by MMM Admin
Inside Analyze Module « 1 2 3 »
RNG-D Project
MMM Admin 31 400 Last post April 05, 2013, 04:21:45 PM
by ombrerico
Powered by MySQL Powered by PHP Money Maker Machine © 2007-2011
Powered by SMF | SMF © 2006, Simple Machines
SMFAds for Free Forums | Sitemap | Sitemap
Valid XHTML 1.0! Valid CSS!


May 19, 2013, 10:03:00 PM