Bettie Shippe
Registered User
Join date: 17 Jun 2008
Posts: 10
|
06-21-2008 04:54
Hi
I'm looking for a tip jar or donations box that doesn't announce tips in general chat. One of the places I'm renting doesn't allow announcers, so I want an object where people can pay me but doesn't thank in general chat, I will thank personally via I.M
any help would be greatly appreciated!
|
Davo Huber
Coffee!
Join date: 28 May 2004
Posts: 8
|
06-21-2008 06:46
From: someone list donations = []; default { state_entry() { llSetText(llKey2Name(llGetOwner()) + "'s " + llGetObjectName(), <1.0, 1.0, 1.0>, 1.0); llSetPayPrice(PAY_DEFAULT, [5, 25, 50, 100]); } touch_start(integer num_detected) { if(llDetectedKey(0) == llGetOwner()) { llOwnerSay(llDumpList2String(donations, ", "  ); donations = []; } } money(key giver, integer amount) { donations += llKey2Name(giver) + "[L$" + (string)amount + "]"; llInstantMessage(giver, "Your donation of L$" + (string)amount + " is greatly appreciated!"  ; } } If for example your object is called "Pencil", the object's set text would display "Bettie Shippe's Pencil" and if someone donates it will thank them via llInstantMessage from the object automatically. If you touch the object it will give you a list of all the people and the amounts that they have donated. Enjoy! 
|
Bettie Shippe
Registered User
Join date: 17 Jun 2008
Posts: 10
|
06-21-2008 09:06
Thank you - You're a Star
|
Xhawkx Holden
Registered User
Join date: 1 Nov 2006
Posts: 86
|
06-21-2008 09:14
I will add the comment that the list is going to grow for ever.. and eventually run out of memory. I would add a line right after the llOwnerSay that clears the list after it tells you the donations:
donations=[];
|