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 Linden Script

(LSL scripts can control the behavior of)

Date:09/07/06
Author:mnmnk
URL:n/a
Comments:1
Info:http://en.wikipedia.org/wiki/Linden_Scripting_Language
Score: (2.62 in 13 votes)
integer bottles = 99;

default
{
    state_entry()
    {
        llSetObjectName("99 Bottles Of Beer");
        llSay(0, "99 Bottle of Beer on the Wall - mnmnk");
    }

    touch_start(integer total_number)
    {
    while ( bottles > 0 )
        {    
            llSay(0, (string)bottles+ " bottles of beer on the wall,");
            llSay(0, (string)bottles+" bottles of beer.");
            llSay(0,"Take one down, pass it around,");
            --bottles;
            
            if(bottles == 0) 
            {
                llSay(0, "No More Beer On the Wall...."); 
                llSay(0, "Go to the store and buy some more,99 bottles of beer on the wall");
            }
            
            else
            {
                llSay(0, (string)bottles+" bottles of beer on the wall.");
            }       
        }
    }
}

Download Source | Write Comment

Alternative Versions

Comments

>>  Atte said on 10/17/06 17:01:33

Atte This says 1 bottles, not 1 bottle...

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: