Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

can't find a tipjar script....

Marylou Lane
Registered User
Join date: 3 Mar 2007
Posts: 60
03-19-2007 08:58
hello everybody...
if someone could help to find a tipjar scriptm it would be nice... I'm searching everywhere but I can't find any....
thank you for helping
marylou lane
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
03-19-2007 11:07
I sell one at my store. You can visit NDE in Immidae or look at:

SLEx NDE Tip Jar

In-world it's cheaper. SLEx uses some odd way of grabbing the current L$ value and adjusting for US$...so my prices come out more expensive there.

If you're looking for an open-source script for working your own tip jar...not sure where one is...

...basically though, a tip jar is just a script with a money() event and an llSetText() function.

CODE


integer itotal;

default
{
money(key giver, integer amount)
{
itotal += amount;
llSetText("Total Tipped: L$" + (string)itotal, <1,1,1>, 1.0);
}
}

_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Marylou Lane
Registered User
Join date: 3 Mar 2007
Posts: 60
ok...
03-19-2007 11:32
thank you I will try this script...
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
03-19-2007 15:05
Erg, L$320?

I wrote one a while back, here's my code:

CODE

//Generic Tip Jar 1.0 -- 03/07/06
// by Keknehv Psaltery

integer IM = 0; integer WHISPER = 1; integer SAY = 2;

//##########################SET THESE VALUES#########################//

list suggestedTips = [25,50,100,200]; //The "Fast Pay" buttons (enter four values)
integer defaultAmount = 40; //The default amount in the pay dialog

string amountBegin = "L$";
string amountEnd = " has been tipped so far";

string thanksBegin = "Thanks for the tip, "; // Begin + Name + End
string thanksEnd = "!";

//How the script thanks donors
integer thanksMode = WHISPER; //Set this to IM, WHISPER, or SAY to select

vector color = <0.6,0.6,0.6>; //The color for the hover text
float alpha = 1.0; //The transparency for the hover text

key splitKey = "f1f2d29a-210b-4b00-96d7-ab16c962a40f"; //The key of the person to split the money with
float splitPercentage = 0.0; //The percentage for the splittee

// Edit the prim's description -- this goes on the first line of the hovertext
// e.g., the description might be "Keknehv's tip jar, please donate"

//##########################END CONFIGURATION########################//

string description; //This will be set to whatever the Prim's Description is -- not the owner's name
//This means that you probably want to set the description to something like "Keknehv's tip jar, please donate!"

integer totalMoney = 0; //The total amount tipped so far

updateText() //Update the hover text. Placed here for easy modification, not speed
{
llSetText( description + "\n" + amountBegin + (string)totalMoney + amountEnd, color, alpha );
}

default
{
state_entry()
{
splitPercentage /= 100.0;
if ( splitPercentage > 0 )
llRequestPermissions( llGetOwner(), PERMISSION_DEBIT );
else //There's no need to get permissions
state soliciting;
}

touch_start(integer total_number)
{
llRequestPermissions( llGetOwner(), PERMISSION_DEBIT );
}

run_time_permissions( integer perm )
{
if ( perm & PERMISSION_DEBIT )
state soliciting;
}
}

state soliciting //Accepting tips now...
{
state_entry()
{
llSetPayPrice( defaultAmount, suggestedTips );
description = llGetObjectDesc();
updateText();
}

money( key id, integer amount )
{

string donor = llKey2Name( id );

totalMoney += amount;
description = llGetObjectDesc(); //Might as well...
updateText();

if ( splitPercentage > 0 )
llGiveMoney( splitKey, (integer)(amount * splitPercentage) );

if ( thanksMode == 0 )
llInstantMessage( id, thanksBegin + donor + thanksEnd );
else if ( thanksMode == 1 )
llWhisper( 0, thanksBegin + donor + thanksEnd );
else if ( thanksMode == 2 )
llSay( 0, thanksBegin + donor + thanksEnd );
}
}


(I also passed a copy along to you)
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
03-19-2007 16:50
Like I said, SLEx prices my stuff a bit too high...and I refuse to jockey around with my SLEx prices just because they can't get the code right. But US$1 isn't that bad of a price for the usage the tip jar allows.

I think the open-source tip jar you posted though will handle most people's needs.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
03-19-2007 22:20
I sell one for 50$

http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=138867
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-20-2007 01:28
Well if we're playing that game I do one for free.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
03-20-2007 06:09
There's also a lot of examples of tip jar code here on the forums for free.

Mine just happens to come with some nice models, and the script is moddable.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Marylou Lane
Registered User
Join date: 3 Mar 2007
Posts: 60
;)
03-20-2007 08:59
thank you for the script i've received, it works...
thanks a lot ;)
Mika Koltai
Registered User
Join date: 4 Feb 2007
Posts: 18
''it works ...
04-04-2007 23:42
Well I get it to work for me. but how do I Pack it so when i give it away it will rezz the right way and the script will start? eg. give me a cut.... should it be boxed or what?
Emree Sweetwater
Registered User
Join date: 21 Aug 2008
Posts: 1
Help...
08-26-2008 02:00
I wanted to say thanks to everyone who has free scripts. ^^;; I'm a poor n00b, so they're really helpful... 1$ may not be much to most people, but I don't have a job, atm, and only do SL to while away the hours between interviews, so I'm saving everything I've got.


Anyway. XD I am having a problem with the free script listed before, and I was just wondering if there was any chance to get some help with it. I can't seem to get it to work right, and I'm not quite sure how. I was reading over it and was just wondering if I'm doing it right...

From: Keknehv Psaltery

//Generic Tip Jar 1.0 -- 03/07/06
// by Keknehv Psaltery

integer IM = 0; integer WHISPER = 1; integer SAY = 2;

//##########################SET THESE VALUES#########################//

list suggestedTips = [25,50,100,200]; //The "Fast Pay" buttons (enter four values)
integer defaultAmount = 40; //The default amount in the pay dialog

string amountBegin = "L$";
string amountEnd = " has been tipped so far";

string thanksBegin = "Thanks for the tip, "; // Begin + Name + End
string thanksEnd = "!";

//How the script thanks donors
integer thanksMode = WHISPER; //Set this to IM, WHISPER, or SAY to select

vector color = <0.6,0.6,0.6>; //The color for the hover text
float alpha = 1.0; //The transparency for the hover text

key splitKey = "f1f2d29a-210b-4b00-96d7-ab16c962a40f"; //The key of the person to split the money with
float splitPercentage = 0.0; //The percentage for the splittee

// Edit the prim's description -- this goes on the first line of the hovertext
// e.g., the description might be "Keknehv's tip jar, please donate"

//##########################END CONFIGURATION########################//



It says 'set this', etc, but are we supposed to just set it there, or are we supposed to put it down where I see it listed? When I put in stuff for the hovering text, does it JUST use the description? I'm not having any floating text show up unless I use a seperate hovering text script, so... ^^;;;

Thanks to anyone that can help. ^^;