Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language DM

(Upgraded version of DanTom's)

Date:09/22/07
Author:Mechana2412
URL:http://www.games.byond.com
Comments:6
Info:http://www.byond.com
Score: (2.43 in 7 votes)
//DanTom's 99 Bottles of Beer in DM Code 2.0
//Upgraded by Mechana2412

var/bottles = 99

mob/Login()
 usr << "Welcome to 99 Bottles of Beer 2.0"
 for()
  usr << "[bottles] Bottles of beer on the wall, [bottles] bottles of beer."
  bottles -= 1
  usr << "Take one down and pass it around, [bottles] bottles of beer on the wall."
  sleep(10)
  if(bottles==1)
   usr << "[bottles] Bottle of beer on the wall, [bottles] bottle of beer."
   usr << "Take one down and pass it around, no more bottles of beer on the wall."
   usr << "No more bottle of beer on the wall. No more bottles of beer..."
   usr << "Go to the store and buy some more...99 bottles of beer."
   break
   world << "For waiting so long, you get a cookie!"
   usr.Logout()

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Sing-along!Hiead10/27/071

Comments

>>  GoodDoggyTreat said on 10/27/07 18:36:03

GoodDoggyTreat No put usr in proc!

>>  GhostAnime said on 10/27/07 18:42:40

GhostAnime Aye, that's really poor programming...

The following would look better :)

//DanTom's 99 Bottles of Beer in DM Code 2.0
//Upgraded by GhpstAnime

var/bottles = 99

client/New()
src << "Welcome to 99 Bottles of Beer 2.0"
for(1 to 99)
src << "[bottles] Bottles of beer on the wall, [bottles] bottles of beer."
src << "Take one down and pass it around, [!(--bottles)?"no more":bottles] bottles of beer on the wall."
sleep(10)
src << "Go to the store and buy some more...99 bottles of beer."
src << "For waiting so long, you get a cookie!"
del(src)

>>  GhostAnime said on 10/27/07 18:44:43

GhostAnime Er, indentation didn't show properly >_>
Indent everything under client/New() and one more for the lines after the for() upto and including sleep(10) >_>

>>  A.T.H.K said on 10/28/07 03:26:45

A.T.H.K Mechana2412 you really need to learn how to code.

>>  peanut said on 12/27/07 17:40:04

peanut My turn!

<code>
client/New()
..()
var/bottles = 99
do
world << "[bottles] bottles of beer on the wall, [bottles] bottles of beer!"
world << "Take one down and pass it around, [--bottles ? "[bottles] bottles of beer " : "no more bottles of beer "]\
on the wall."
world << null
sleep(10)
while(bottles)
world << "No more bottles of beer on the wall, no more bottles of beer!"
world << "Go to the store and buy some more, 99 bottles of beer on the wall."
world << null
sleep(10)
New()
</code>

>>  peanut said on 12/27/07 17:52:25

peanut Kek, forgot to support singular. :-/

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: