Ron
2006-06-30 22:01:25
Here is the script. Just run it, and sing along! :D
This script is fully commented so people learning SCAR could see this as useful. You can change the number of bottles, the speed of each line, and what type of bottles. Beer? Milk? Piss? Anything lol.
Enjoy!
~Ron :)
This script is fully commented so people learning SCAR could see this as useful. You can change the number of bottles, the speed of each line, and what type of bottles. Beer? Milk? Piss? Anything lol.
{.Script Info:
# ScriptName = BeerBottles
# Author = Ron from moparisthebest.com
# Description = Sing the 100 bottles of beer on the wall song!
# Version = .1
# Date = June 30th, 2006
# Comments = Setup is on line 40. You don't have to set it up, just run it.
/Script Info}
Program BeerBottles;
Var
TotalS, TotalM, WaitTT, WaitT, i : Integer; // All of these are integers.
Liquid : String; // All of these are strings.
// Just give me credit procedure.
Procedure GiveMeCredit;
Begin
WriteLn('BBBB Y Y RRRR OOO N N');
WriteLn('B B Y Y R R O O NN N');
WriteLn('B B Y Y R R O O N N N');
WriteLn('B B Y Y R R O O N N N');
WriteLn('B B Y RRR O O N N N');
WriteLn('B B Y R R O O N N N');
WriteLn('B B Y R R O O N NN');
WriteLn('BBBB Y R R OOO N N');
// Waits a little so you can see it and then starts the script.
Wait(2000);
End;
Begin
// Clears the rectangular box on the bottom.
ClearDebug;
// Just give me credit.
GiveMeCredit;
// Setup These three values.
WaitT := 2500; // How long of a wait per line?
i := 100; // How many bottles?
Liquid := 'beer'; // Bottles of what? Beer? Milk? Piss?
// Total Seconds is calculated by this calculation. I'll break it down.
// WaitT is the wait in milliseconds per line so divide that by 1000 to convert it into seconds.
// Then multiply that number by 3 because the WaitTs are included three times in the repeat loop.
// Finally, multiply that number by i because that's how many times the repeat loop is played.
TotalS := (WaitT/1000)*3*i;
// Divide the Total Seconds by 60 to convert the seconds into minutes.
TotalM := TotalS/60;
// Repeats this section only!
Repeat
// IntToStr converts an integer to a string so you can write it.
// Writes 100 bottles of beer on the wall, 100 bottles of beer.
WriteLn(IntToStr(i) + ' bottles of ' + Liquid + ' on the wall. ' + IntToStr(i) + ' bottles of ' + Liquid + '.');
// Waits so you can sing.
Wait(WaitT);
// Decrease the number of bottles by one.
i := i-1;
// Writes Take on down! Pass it around!
WriteLn('Take one down! Pass it around! ');
// Waits again so you can sing.
Wait(WaitT);
// Writes 99 bottles of beer on the wall.
WriteLn(IntToStr(i) + ' bottles of ' + Liquid + ' on the wall!');
// Writes nothing so there is a space and it's easier to read.
WriteLn('');
// Waits again so you can sing.
Wait(WaitT);
// Keeps repeating until i becomes 0.
Until(i = 0)
// Writes nothing so you can see the middle message more clearly.
WriteLn('');
WriteLn('');
// Ron congratulates you.
WriteLn('Ron says, "Good job man!"');
// Tells you in how many minutes you sang the song in.
WriteLn('You sang the whole song in a total of ' + IntToStr(TotalM) + ' minutes.');
// Writes nothing so you can see the middle message more clearly.
WriteLn('');
WriteLn('');
End.
Enjoy!
~Ron :)