PDA

View Full Version : fun coin flipper!!



Jacobdm0
08-10-2007, 01:44 AM
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
08-10-2007, 02:19 AM
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
08-10-2007, 05:45 AM
lol no its not... (no offense)

DaWu
08-10-2007, 09:32 AM
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
08-10-2007, 10:21 AM
Whoa! I haven't seen DaWu in ages! Welcome back.

Nice script Jacob.

GoF
08-10-2007, 11:31 AM
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
08-10-2007, 02:32 PM
Pwnt :) DaWu = Back?

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

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

Skalla
08-13-2007, 01:44 AM
Rofl, cool to use if u dont have a coin ;)

Jacobdm0
08-13-2007, 01:57 AM
Update

drnewheart
08-13-2007, 02:16 AM
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
08-13-2007, 02:17 AM
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
09-09-2007, 03:32 AM
funny script :D
tis is cool :D

ckeboss
09-09-2007, 04:47 AM
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
09-13-2007, 11:00 PM
Thats one nice script XD.

osmose
09-15-2007, 09:07 AM
i like it lol good for first script. Much better than an autotyper good thinking

marre
09-16-2007, 09:50 AM
nice 1

busha5a5a5
09-16-2007, 09:21 PM
No offence but what is the point of this script?

scarn00b
09-18-2007, 11:46 AM
Nice script will use it untill i will get a coin someway;)

ckeboss
09-18-2007, 03:16 PM
but can anything be random? i tweak the script so i alwas win! lol

deoxys505
09-20-2007, 01:21 AM
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
09-20-2007, 05:28 AM
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
09-21-2007, 07:46 PM
Now that's a nice script :P

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

deoxys505
10-02-2007, 12:26 AM
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
10-28-2007, 07:42 AM
is ok

adam191
10-28-2007, 09:50 PM
well thats cool i guess works.

bth8
10-29-2007, 06:13 AM
kinda fun gets boring after a while though

Zeta
10-29-2007, 04:53 PM
now try doing it off the top of your head

2black2hack
10-29-2007, 10:12 PM
what is this script used for?

teh_lulz
10-29-2007, 11:17 PM
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
10-30-2007, 12:10 AM
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
10-30-2007, 01:08 PM
Nice first script i'm not good at making script