Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Simple Tip Jar

Tarek Nikolaidis
Registered User
Join date: 6 Apr 2007
Posts: 35
05-31-2007 12:01
Hi Guys

Let me start off by saying im a total scripting noob, and to bre honest i am hoping i will get a ready to use script here that i can just whack into an object and make it work.
I need a script for a tip jar, that will tip the owner, no splitting, no logging in and out, just a plain old tip jar, that i can give away and whoever gets it can use it as a tip jar for themselves, maybe some ncie function like total donated as a floating text...

Looking forward to your replies....
have a great day

Tarek
Simnelia Petrichor
Registered User
Join date: 10 Feb 2006
Posts: 35
06-01-2007 01:32
Something like this:

CODE
integer  gv_paid_so_far = 0;

set_display()
{
llSetText("$" + (string) gv_paid_so_far + ".00 donated so far.", <0.0, 1.0, 0.0>, 1.0);
}

default
{
state_entry()
{
set_display();
}

money(key id, integer amount)
{
gv_paid_so_far = gv_paid_so_far + amount;
set_display();
}
}

Haven't actually tested this, but I think it's about right.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-01-2007 18:40
From: someone

integer total;

default
{
on_rez(integer r)
{
llResetScript();
}

money(key id, integer amount)
{
total += amount;
llSetText((string)total+ "L$ given", <llFrand(1),llFrand(1),llFrand(1)>, 1);
}
}


same thing different take - tested