Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Tip Jar help

Lucedo Arctor
Registered User
Join date: 29 Jun 2008
Posts: 2
07-07-2008 20:50
I am thinking about a dj position and i am currently making a tip cube.

I would want to know how to get the last amount donated in L$, who donated the amount, and the total amount of L$.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-07-2008 22:49
quickie

CODE

// start of script
vector text_color = <0.00,0.50,1.00>;
integer total;
string text;

default
{
state_entry()
{
llSetText("Tips", text_color, 1.0);
}

money(key id, integer amt)
{
total = total + amt;

text = llKey2Name(id) +
" just gave me " +
(string)amt + "$" +
"\n Total tips = " +
(string)total+ "$";

llSetText(text, text_color, 1.0);
}
}

// end of script
Lucedo Arctor
Registered User
Join date: 29 Jun 2008
Posts: 2
07-08-2008 09:07
Thanks.