//Keknehv Psaltery Updated Version of DONATION BOX By jean cook, ama omega, and nada epoch Debugged by YadNi Monde (LoL) Yea, that s a Bunch O Peeps =)
//Summary: The following script will make an object accept donations on your behalf.
//Usage: stick it on any object you own(my favorite is a top hat), and it will promptly display:
//"<your name>'s donation hat.
//Donate if you are so inclined."
//at which point anyone can right click on it and give you a tip. also, the script tells the donator thanks, and then tells you who donated how much
//also shows the total amount donated
integer totaldonated;
string owner;
default
{
on_rez( integer sparam )
{
llResetScript();
}
state_entry()
{
owner = llKey2Name( llGetOwner() );
llSetText( owner + "'s Tip Jar.\nPlease tip if you are so inclined!\n$L0 Donated so far",<.25,1,.65>,1);
//Red Light flash
llParticleSystem
([
PSYS_PART_FLAGS,
PSYS_PART_INTERP_COLOR_MASK|
PSYS_PART_FOLLOW_SRC_MASK|
PSYS_PART_EMISSIVE_MASK, PSYS_SRC_PATTERN,
PSYS_SRC_PATTERN_ANGLE_CONE,
PSYS_SRC_INNERANGLE, 0.0,
PSYS_SRC_OUTERANGLE, 0.1,
PSYS_SRC_BURST_SPEED_MIN, 0.0,
PSYS_SRC_BURST_SPEED_MAX, 0.0,
PSYS_SRC_BURST_RADIUS, 0.0,
PSYS_SRC_BURST_PART_COUNT, 5,
PSYS_SRC_BURST_RATE, 1.0,
PSYS_PART_MAX_AGE, 1.0,
PSYS_PART_START_SCALE, <1,1,1>,
PSYS_PART_START_COLOR, <1,0.2,0.2>,
PSYS_PART_END_COLOR, <1,0,0>,
PSYS_PART_START_ALPHA, 1.0,
PSYS_PART_END_ALPHA, 0.0
]);
// Rotate
llTargetOmega(<0,0,0.05>,PI,0.05);
}
money(key id, integer amount)
{
totaldonated += amount;
llSetText( owner + "'s Tip Jar.\nPlease tip if you are so inclined!\n$L" + (string)amount + " Was donated last!\n" + "$L" + (string)totaldonated + " Donated so far",<.25,1,.65>,1);
llInstantMessage(id,"Thanks for the tip! I really appreciate it.");
llInstantMessage(llGetOwner(),(string)llKey2Name(id)+" donated $" + (string)amount);
}
}