ZenMondo's simple tip jar 2

From ZenMondo Wormser, 1 Year ago, written in Linden Scripting, viewed 422 times.
URL http://flynnos.org/flynnbin/view/1b46ba55 Embed
Download Paste or View Raw
  1. ////////////////////////////
  2. // ZenMondo's simple tip jar 2
  3. //
  4. // Collects Tips and displays total.
  5. //
  6. //
  7. // LICENSE:
  8. //
  9. //  This script is given for free, and may NOT be
  10. //  resold or used in a commercial product.
  11. //  You may copy and distribute this script for free.
  12. //  When you redistribute or copy this script, you must
  13. //  do so with FULL PERMS (modify, copy, and transfer),
  14. //  and leave this notice intact.
  15. //
  16. //  You are free to modify this code, but any derivitive
  17. //  scripts must not be used in a commercial product or
  18. //  or sold, and must contain this license.  
  19. //
  20. //  This script is provided free for learning
  21. //  purposes, take it apart, break it, fix it,
  22. //  learn something.  If you come up with something
  23. //  clever, share it.
  24. //
  25. //  Questions about codepoetry (scripting) can always be addressed
  26. //  to me, ZenMondo Wormser.
  27. //
  28. /////////////////////////////////////////
  29.  
  30.  
  31. integer total;
  32.  
  33. {
  34.     state_entry()
  35.     {
  36.         total = 0;
  37.         llSetText(llKey2Name(llGetOwner())+"'s Tip Jar\nTotal Tips: L$" + (string) total, <0,1,0>, 1.0);
  38.     }
  39.  
  40.     money(key giver, integer amount)
  41.     {
  42.         llSay(0, "Thank you for your generosity, " + llKey2Name(giver) +".");
  43.         total += amount;
  44.         llSetText(llKey2Name(llGetOwner())+"'s Tip Jar\nTotal Tips: L$" + (string) total, <0,1,0>, 1.0);
  45.     }
  46.    
  47.     on_rez(integer start_param)
  48.     {
  49.         llResetScript();
  50.     }
  51. }

Reply to "ZenMondo's simple tip jar 2"

Here you can reply to the paste above

captcha