Tip Jar

Create 2 torus with following properties:

1. .5,.6,.6, glass, color blue, 50% transparent
2. .05,.4,.4, glass, color blue, 20% transparent

Put one on the top of the other, link them and put following script:

integer totaldonated;
string owner;

default
{
state_entry()
{
owner = llKey2Name(llGetOwner());
llSetText( owner + “‘s donation box.\nAll donations gratefully accepted.\n$0 donated so far.\nRight-click on me and select Pay to donate.”,,1);
}

on_rez( integer sparam )
{
llResetScript();
}

money(key id, integer amount)
{
totaldonated+=amount;
llSetText( owner + “‘s donation box.\nAll donations gratefully accepted.\n$” + (string)totaldonated + ” donated so far.\nRight-click on me and select Pay to donate.”,,1);
llInstantMessage(id,”Thanks very much for the tip!”);
llInstantMessage(llGetOwner(),llKey2Name(id)+” donated $” + (string)amount);
}

}

You have your tipjar 🙂

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s