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 Scripting Language (LSL)

(Corrected for exact lyrics)

Date:06/08/07
Author:Wolt Amat
URL:n/a
Comments:1
Info:http://www.lslwiki.net
Score: (2.60 in 5 votes)
// 99 Bottles of Beer On The Wall
// Version 2.0, Corrected for exact lyrics
// Ref entry by, and apologies to, MNMNK - I hadn't seen it before.
// In Linden Labs Scripting Language (LSL)
// Wolt Amat

integer beer = 99;
vector signcolor = <1,0,0>;     // Red
float signtrans = 1.0;          // Opaque
string BB = " bottles of beer";
string OW = " on the wall";
string TD = "Take one down and pass it around, ";
string BC;

default {
  state_entry() {
    llSetText("Touch me to start taking beer off the wall", signcolor, signtrans);
  }

  touch_start(integer n) {
    while (1 < beer)
    {
        BC = (string)beer;
        llSay(0,BC + BB + OW + ", " + BC + BB);
        llSay(0,TD + BC + BB + OW);
        beer--;
    }
    BC = (string)beer;
    llSay(0,BC + " bottle of beer" + OW + ", " + BC + " bottle of beer");
    llSay(0,TD + "no more" + BB + OW);
    
    llShout(0,"No more" + BB + OW + ", no more" + BB);
    llShout(0,"Go to the store and buy us some more");
    beer = 99;
    llSay(0,(string)beer + BB + OW);
  }
}

Download Source | Write Comment

Alternative Versions

Comments

>>  Madgeek Nixdorf said on 02/10/09 19:14:30

Madgeek Nixdorf AH! Beat me to it... when I discovered this site I thought that there was no way anyone had done a LSL one yet...

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: