SRL Archive - Other Scripts

Dicer!


Ultra

2008-01-06 13:06:31

I was bored, so i made this script. It basically "throws" the dice and then tells you what you got on it :).

Features.
-Animation.
-Var.
-101 Lines Of Code :).
-Waits.
-Report. :P.

Program Dicer;
{.Include SRL/SRL.Scar}
Var
Dice : Integer;
Rolls : Integer;

Procedure Animation1;
Begin
ClearDebug;
Begin
WriteLn(' ______ ');
WriteLn(' / 0 \');
WriteLn(' / 0 \');
WriteLn(' ----------');
WriteLn(' | 0 0 |');
WriteLn(' | 0 0 |');
WriteLn(' | 0 0 |');
WriteLn(' ----------');
End;
End;

Procedure Animation2;
Begin
ClearDebug;
Begin
WriteLn(' ________');
WriteLn(' / 0 /\');
WriteLn(' / / \');
WriteLn(' /_0_____/ \');
WriteLn(' \ 0 0 \ 0 /');
WriteLn(' \ 0 0 \ /');
WriteLn(' \_0___0_\/');
End;
End;

Procedure Animation3;
Begin
ClearDebug;
Begin
WriteLn(' ______');
WriteLn(' / 0 0 \');
WriteLn(' / 0 0 \');
WriteLn(' ----------');
WriteLn(' | 0 |');
WriteLn(' | |');
WriteLn(' | 0 |');
WriteLn(' ----------');
End;
End;

Procedure Animation4;
Begin
ClearDebug;
Begin
WriteLn(' ________');
WriteLn(' /\ 0\');
WriteLn(' / \ \');
WriteLn('/ 0 \0______\');
WriteLn('\ 0 / 0 0/');
WriteLn(' \0 / 0 0/');
WriteLn(' \/_0____0/');
End;
End;

Procedure CalculateDice;
Begin
Case Random(6)Of

0:Dice := Dice + 1;
1:Dice := Dice + 2;
2:Dice := Dice + 3;
3:Dice := Dice + 4;
4:Dice := Dice + 5;
5:Dice := Dice + 6;

End;
End;


Begin
SetUpSRL;
Dice := 0;
CalculateDice;
Begin
Repeat
Animation1;
Wait(200);
Animation2;
Wait(200);
Animation3;
Wait(200);
Animation4;
Wait(200);
Rolls := Rolls + 1;
Until(Rolls >= Dice);
If(Rolls >= Dice)Then
Begin
WriteLn('Your Dice Is : ' + IntToStr(Dice));
End;
End;
End.

Have fun lol.

Freddy1990

2008-01-27 16:30:42

Hey, just wondering, why do you include SRL? You don't use it…

squnky

2008-02-01 03:30:19

this makes me think of school calculators lol
they got dice throwers etc, for math probability shit…

Ultra

2008-02-04 12:11:44

Hey, just wondering, why do you include SRL? You don't use it..


Umm, i dono, but isnt WriteLn From SRL?

MasterKill

2008-02-04 13:12:35

From: U L T R A
Umm, i dono, but isnt WriteLn From SRL?


lol?

no… scar function

@freddy: sweet siggy :D

Not a L33cher

2008-02-06 13:32:34

Lol pritty fun, use full when you can't afford any dice but have a computer (lol).

Da 0wner

2008-02-07 04:31:55

lol i include srl as the default scar script