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

(Used in Second Life)

Date:06/07/07
Author:Wolt Amat
URL:n/a
Comments:0
Info:http://www.lslwiki.net
Score: (1.40 in 5 votes)
// In Linden Labs Scripting Language (LSL)
// in Second Life
// Wolt Amat

integer beer = 99;
vector signcolor = <1,0,0>;     // Red
float signtrans = 1.0;          // Opaque

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

  touch_start(integer n) {
    while (0 < beer)
    {
        llSay(0,(string)beer + " bottles of beer on the wall");
        llSay(0,(string)beer + " bottles of beer");
        llSay(0,"Take one down");
        llSay(0,"Pass it around");
        beer--;
        llSay(0,(string)beer + " bottles of beer on the wall");
    }
    llSay(0,"No more bottles of beer on the wall");
    llSay(0,"No more bottles of beer");
    llSay(0,"Go to the store");
    llSay(0,"To get us some more");
    beer = 99;
    llSay(0,(string)beer + " bottles of beer on the wall");
  }
}

Download Source | Write Comment

Alternative Versions

Comments

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: