
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,1,1>,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,1,1>,1);
llInstantMessage(id,"Thanks very much for the tip!");
llInstantMessage(llGetOwner(),llKey2Name(id)+" donated $" + (string)amount);
}
}
You have your tipjar :)
No comments:
Post a Comment