SRL Archive - First Scripts

fun coin flipper!!


Jacobdm0

2007-08-09 21:44:30

not my first script, (like my 5th or 6th) but it's still a very begginer script.

Here it is:

program CoinFlip;

//SETUP\\
const
Howmanyflips = 100; //how many coin flips to do.
Howlongtowait = 0; //how many miliseconds to wait between each flip.
//END OF SETUP\\

var
i : integer;
Heads : integer;
Tails : integer;

procedure
Count;
Begin
i:= i+1;
case Random (2) of

0: begin
Heads:= Heads+1
end

1: begin
Tails:= Tails+1
end;
end;
end;
Procedure
ProgReport;
begin
Writeln('==================');
Writeln(' Tails : ' +IntToStr(Tails));
Writeln(' Heads : ' +IntToStr(Heads));
Writeln('==================');
end;
begin
i:= 0;
repeat
begin
Count;
Wait(howlongtowait);
end
until (i = howmanyflips);
ProgReport;
end.

not really that great…but still kinda fun!

*UPDATED* Much better version, cuts out actually writing heads and tails, and gives you immediate results.

Harry

2007-08-09 22:19:08

Maybe add forms with a pic of a coin for another version? :D

Simple, but okay for a first script. Better than all the auto talkers in this section .. :p

warrockownz

2007-08-10 01:45:56

lol no its not… (no offense)

DaWu

2007-08-10 05:32:05

From: warrockownz
lol no its not… (no offense)


It is, you probably copied all your autotalking stuff from someone otheres anyways,
Theres been so many autotalkers, that it is piece of cake for newb to do one, just grab some piece there and some pieces here..

You could go grab some nice up STFU and leave others topics alone okay ?


Its good for first script, keep it up.

Santa_Clause

2007-08-10 06:21:28

Whoa! I haven't seen DaWu in ages! Welcome back.

Nice script Jacob.

GoF

2007-08-10 07:31:46

From: DaWu
It is, you probably copied all your autotalking stuff from someone otheres anyways,
Theres been so many autotalkers, that it is piece of cake for newb to do one, just grab some piece there and some pieces here..

You could go grab some nice up STFU and leave others topics alone okay ?


Its good for first script, keep it up.


Pwnt :) DaWu = Back?

Nice idea, and I suggest adding a form too, would be cooler :p.

DaWu

2007-08-10 10:32:20

From: GoF
Pwnt :) DaWu = Back?

Nice idea, and I suggest adding a form too, would be cooler :p.


"I'm back… Better than ever.." :stirthepot:

Skalla

2007-08-12 21:44:14

Rofl, cool to use if u dont have a coin ;)

Jacobdm0

2007-08-12 21:57:30

Update

drnewheart

2007-08-12 22:16:43

Very Cool This Is A Good Script. :p I Like It. Its Fun To Bet My Friends What Is Gonna Win. But Then I Can Script And Change The OutCome EveryTime So I Win. haha

YoHoJo

2007-08-12 22:17:37

From: Skalla
Rofl, cool to use if u dont have a coin ;)


Yeah!
Great for the times when your out scaring and betting your friend that your better, but unfortunately! You do have a coin! So you whip our your computer, open scar, and the the script!
VERY CONVENIENT!:p

Nice script,i would also like to see a little form, but that would be kind of tough.

asdffff

2007-09-08 23:32:23

funny script :D
tis is cool :D

ckeboss

2007-09-09 00:47:33

Heres a little mod I did so it looks a little better =)

program CoinFlip;

//SETUP\\
const
Howmanyflips = 100; //how many coin flips to do.
Howlongtowait = 0; //how many miliseconds to wait between each flip.
//END OF SETUP\\

var
i : integer;
Heads : integer;
Tails : integer;

procedure
Count;
Begin
i:= i+1;
case Random (2) of

0: begin
Heads:= Heads+1
end

1: begin
Tails:= Tails+1
end;
end;
end;
Procedure
ProgReport;
begin
Writeln('==================');
Writeln(' (--------)');
Writeln(' (----------)');
Writeln(' (---TAILS----)' +IntToStr(Tails));
Writeln(' (----------)');
Writeln(' (--------)');
Writeln('==================');
Writeln(' (--------)');
Writeln(' (----------)');
Writeln(' (---HEADS----)' +IntToStr(Heads));
Writeln(' (----------)');
Writeln(' (--------)');
Writeln('==================');
end;
begin
i:= 0;
repeat
begin
Count;
Wait(howlongtowait);
end
until (i = howmanyflips);
ProgReport;
end.

All your script still =)

Smile

2007-09-13 19:00:18

Thats one nice script XD.

osmose

2007-09-15 05:07:57

i like it lol good for first script. Much better than an autotyper good thinking

marre

2007-09-16 05:50:55

nice 1

busha5a5a5

2007-09-16 17:21:58

No offence but what is the point of this script?

scarn00b

2007-09-18 07:46:17

Nice script will use it untill i will get a coin someway;)

ckeboss

2007-09-18 11:16:48

but can anything be random? i tweak the script so i alwas win! lol

deoxys505

2007-09-19 21:21:45

should put in ClearDebug; in a procedure (ex.1). also, you should put the procedure name on the same line (ex.2). a very nice script. i tried with 1000, worked instantly. i tried 100 Billion (100000000000) and its still going 5 minutes later with no result lol.

ex.1

Procedure ProgReport;
begin
ClearDebug; //clears the debug box of everything
Writeln('==================');
Writeln(' Tails : ' +IntToStr(Tails));
Writeln(' Heads : ' +IntToStr(Heads));
Writeln('==================');
end;

ex.2

Procedure ProgReport;
begin
end;

anonymity

2007-09-20 01:28:51

Hey, thought it was a pretty awesome script for a 5th or 6th first timer. Mine still only consist of lame internet game cheats that seem to always be messing up somehow….. your script can keep me highly entertained for a long while.

yes I have no real life….
anonymity

Wise Fries

2007-09-21 15:46:11

Now that's a nice script :P

==================
Tails : 53
Heads : 47
==================

deoxys505

2007-10-01 20:26:29

like the script. idk how much of a scripter you are, but you could put in a thing that lets you bet and if oyu win or come close you would have to pay the script. kinda like a gambling kinda thing. lol. playing poker with a scar script lol. no but that would be really cool. and if the person didn't want the script to do all that then you could add a const at the begining to just do the normal script.

and you could add a game into it while you wait on the results if it is more then 5 minutes long for the results.

bth8

2007-10-28 03:42:20

is ok

adam191

2007-10-28 17:50:09

well thats cool i guess works.

bth8

2007-10-29 02:13:33

kinda fun gets boring after a while though

Zeta

2007-10-29 12:53:47

now try doing it off the top of your head

2black2hack

2007-10-29 18:12:21

what is this script used for?

teh_lulz

2007-10-29 19:17:58

ckebosss: The script is just fine without those details.
Pretty good for a first script, I'm a noob at scripting and would probably be most likely to make an auto-alcher :o GJ, what do you plan for your next script?

jvwarrior

2007-10-29 20:10:12

From: Hy71194
Maybe add forms with a pic of a coin for another version? :D

Simple, but okay for a first script. Better than all the auto talkers in this section .. :p


Whats wrong with a noob makeing AutoTalkers? Thats like an insult to my series. LOL I'm just playing IDC I know there nooby.
O AND 1 MORE THING HE CLEARLY STATED NOT HIS FIRST SCRIPT!

qwix

2007-10-30 09:08:15

Nice first script i'm not good at making script