SRL Archive - Other Scripts

Most amazing funny script V [1].0


insanomano

2008-07-26 12:45:00

ok so im working on a script that does a lot of cool things im not done it yet but atm it flips a coin, finds out your yearly income and im working on the dice roller version [1].0 has the dice roller functions and stuff in the script and is included in the setup and proggy but it does not work. The other parts in the script work but if anybody could please try my script and post there reports and please post on here how to make my dice roller work it would be greatly appreciated. I will post the script below :D

~Insanomano~

program AmazingScript;
{ AMAZING SCRIPT
V [1].0

Author: Insanomano.
Version: [1].0.
Description: Tells you some stuff when you imput the correct information.
Setup: (lines 19-25), click run.

DICE ROLLER DOES NOT WORK IN VERSION [1].0
}
var
HeadsNumber, Tails, Heads, TailsNumber, FlipCount: integer; //coin flip
One, Two, Three, Four, Five, Six, RollCount: integer; //dice roll
YearsIncome : integer; //income calculator

const
{COIN FLIP}
FlipAmount= 1000; // How many time you want to flip a coin.
{DICE ROLL}
RollAmount= 100;
{YEARLY INCOME CALCULATOR}
HourlyWage= 10; // Put how much money you make hourly at your job (WHOLE NUMBERS ONLY, ROUND UP).
HoursWeekly= 40; // Put how many hours a week you work.

Procedure Intro;
var
qwerty: integer;

begin
ClearDebug;
Writeln('WELCOME TO THE WORLDS MOST AMAZING SCRIPT');
wait(2000);
ClearDebug;
Writeln('IN JUST A FEW MOMENTS IM GOING TO HAVE ALL YOUR ANSWERS FOR YOU !!!!');
wait(2000);
ClearDebug;
repeat
Writeln('PLEASE WAIT .');
wait(300);
ClearDebug;
Writeln('PLEASE WAIT ..');
wait(300);
ClearDebug;
Writeln('PLEASE WAIT ...');
wait(300);
ClearDebug;
QWERTY := qwerty + 1;
until(QWERTY >= 4);
end;

function Flip : integer;
begin
case Random(2) of
0: Result := 0;
1: Result := 1;
end;
FlipCount := FlipCount+(1);
end;

function Roll : integer;
begin
case Random(6) of
0: Result := 0;
1: Result := 1;
2: Result := 2;
3: Result := 3;
4: Result := 4;
5: Result := 5;
end;
RollCount := RollCount+(1);
end;

procedure WhatWasCoin;
begin
if Flip = 0 then
TailsNumber := TailsNumber+(1)
else
HeadsNumber := Headsnumber+(1);
end;

procedure WhatWasDice;
begin
if Roll = 0 then
One := One+(1)
else if Roll = 1 then
Two := Two+(1)
else if Roll = 2 then
Three := Three+(1)
else if Roll = 3 then
Four := Four+(1)
else if Roll = 4 then
Five := Five+(1)
else if Roll = 5 then
Six := Six+(1)
end;

Procedure IncomeCalculator;
begin
YearsIncome := (HourlyWage) * (HoursWeekly) * 52 * (1);
end;

Procedure TheWholeAmazingLoop;
begin
IncomeCalculator;
repeat
WhatWasCoin;
until (FlipCount = (FlipAmount));
repeat
WhatWasDice;
until(RollCount = (RollAmount));
end;

Procedure EndingItAll;
Begin
Writeln('==========================================');
Writeln('======= Worlds Most amazing script =======');
writeln('==========================================');
Writeln('======== YEARLY INCOME CALCULATOR ========');
writeln('==========================================');
Writeln('== Your yearly income was $' + IntToStr(YearsIncome) + '.');
writeln('==========================================');
Writeln('=============== COIN FLIP ================')
writeln('==========================================');
Writeln('== Flip amount was ' + IntToStr(FlipAmount) + '.');
Writeln('== Tails amount was ' + IntToStr(TailsNumber) + '.');
Writeln('== Heads amount was ' + IntToStr(HeadsNumber) + '.');
writeln('==========================================');
writeln('=============== DICE ROLL ================');
writeln('==========================================');
Writeln('== Rolled 1 |' + IntToStr(One) + '| times');
Writeln('== Rolled 2 |' + IntToStr(Two) + '| times');
Writeln('== Rolled 3 |' + IntToStr(Three) + '| times');
Writeln('== Rolled 4 |' + IntToStr(Four) + '| times');
Writeln('== Rolled 5 |' + IntToStr(Five) + '| times');
Writeln('== Rolled 6 |' + IntToStr(Six) + '| times');
writeln('==========================================');
end;

Begin
Intro;
TheWholeAmazingLoop;
EndingItAll;
end.

EDIT: Thx GoF :D

GoF

2008-07-26 13:12:41

Not that bad x) Keep it up.

Laur€ns

2008-07-28 05:24:29


program AmazingScript;
{ AMAZING SCRIPT
V [1].0

Author: Insanomano.
Version: [1].0.
Description: Tells you some stuff when you imput the correct information.
Setup: (lines 19-25), click run.

DICE ROLLER DOES NOT WORK IN VERSION [1].0
}
var
HeadsNumber, Tails, Heads, TailsNumber, FlipCount: integer; //coin flip
One, Two, Three, Four, Five, Six, RollCount: integer; //dice roll
YearsIncome : integer; //income calculator

const
{COIN FLIP}
FlipAmount= 1000; // How many time you want to flip a coin.
{DICE ROLL}
RollAmount= 1000;
{YEARLY INCOME CALCULATOR}
HourlyWage= 25; // Put how much money you make hourly at your job (WHOLE NUMBERS ONLY, ROUND UP).
HoursWeekly= 40; // Put how many hours a week you work.

Procedure Intro;
var
qwerty: integer;

begin
ClearDebug;
Writeln('WELCOME TO THE WORLDS MOST AMAZING SCRIPT');
wait(2000);
ClearDebug;
Writeln('IN JUST A FEW MOMENTS IM GOING TO HAVE ALL YOUR ANSWERS FOR YOU !!!!');
wait(2000);
ClearDebug;
repeat
Writeln('PLEASE WAIT .');
wait(300);
ClearDebug;
Writeln('PLEASE WAIT ..');
wait(300);
ClearDebug;
Writeln('PLEASE WAIT ...');
wait(300);
ClearDebug;
QWERTY := qwerty + 1;
until(QWERTY >= 4);
end;

function Flip : integer;
begin
case Random(2) of
0: Result := 0;
1: Result := 1;
end;
FlipCount := FlipCount+(1);
end;

function Roll : integer;
begin
case Random(6) of
0: Result := 0;
1: Result := 1;
2: Result := 2;
3: Result := 3;
4: Result := 4;
5: Result := 5;
end;
RollCount := RollCount+(1);
end;

procedure WhatWasCoin;
begin
if Flip = 0 then
TailsNumber := TailsNumber+(1)
else
HeadsNumber := Headsnumber+(1);
end;

procedure WhatWasDice;
begin
if Roll = 0 then
One := One+(1)
else if Roll = 1 then
Two := Two+(1)
else if Roll = 2 then
Three := Three+(1)
else if Roll = 3 then
Four := Four+(1)
else if Roll = 4 then
Five := Five+(1)
else if Roll = 5 then
Six := Six+(1)
end;

Procedure IncomeCalculator;
begin
YearsIncome := (HourlyWage) * (HoursWeekly) * 52 * (1);
end;

Procedure TheWholeAmazingLoop;
begin
IncomeCalculator;
repeat
WhatWasCoin;
until (FlipCount = (FlipAmount));
repeat
WhatWasDice;
until(RollCount = (RollAmount));
end;

Procedure EndingItAll;
Begin
Writeln('==========================================');
Writeln('======= Worlds Most amazing script =======');
writeln('==========================================');
Writeln('======== YEARLY INCOME CALCULATOR ========');
writeln('==========================================');
Writeln('== Your yearly income was $' + IntToStr(YearsIncome) + '.');
writeln('==========================================');
Writeln('=============== COIN FLIP ================')
writeln('==========================================');
Writeln('== Flip amount was ' + IntToStr(FlipAmount) + '.');
Writeln('== Tails amount was ' + IntToStr(TailsNumber) + '.');
Writeln('== Heads amount was ' + IntToStr(HeadsNumber) + '.');
writeln('==========================================');
writeln('=============== DICE ROLL ================');
writeln('==========================================');
Writeln('== Rolled 1 |' + IntToStr(One) + '| times');
Writeln('== Rolled 2 |' + IntToStr(Two) + '| times');
Writeln('== Rolled 3 |' + IntToStr(Three) + '| times');
Writeln('== Rolled 4 |' + IntToStr(Four) + '| times');
Writeln('== Rolled 5 |' + IntToStr(Five) + '| times');
Writeln('== Rolled 6 |' + IntToStr(Six) + '| times');
writeln('==========================================');
end;

begin
TheWholeAmazingLoop;
EndingItAll;
end.

Now it prints teh stuff out :)

insanomano

2008-07-29 21:10:47

hmm well i currently cant test your version but if this is the only part that you changed

THIS:
function Roll : integer;
begin
case Random(6) of
0: Result := 0;
1: Result := 1;
2: Result := 2;
3: Result := 3;
4: Result := 4;
5: Result := 5;
end;
end;

TO THIS:
function Roll : integer;
begin
case Random(6) of
0: Result := 0;
1: Result := 1;
2: Result := 2;
3: Result := 3;
4: Result := 4;
5: Result := 5;
end;
RollCount := RollCount+(1); //This is added
end;

I had tried that before and it just got really messed up it didnt work properly

example: I would set it to roll 1000 times then in the progress report all the numbers rolled wouldnt add up to 1000

Example:

What it should look like after 1000 rolls
==========================================
=============== DICE ROLL ================
==========================================
== Rolled 1 |200| times
== Rolled 2 |150| times
== Rolled 3 |150| times
== Rolled 4 |200| times // THEY ALL ADD UP TO 1000
== Rolled 5 |25| times
== Rolled 6 |275| times
==========================================

what it does look like:
==========================================
=============== DICE ROLL ================
==========================================
== Rolled 1 |45| times
== Rolled 2 |67| times
== Rolled 3 |88| times
== Rolled 4 |115| times // THEY DONT ALL ADD UP TO 1000
== Rolled 5 |29| times
== Rolled 6 |46| times
==========================================

understand what i mean?

brent8900

2008-07-29 23:34:37

thats is a funny script lol!