Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //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 =)
  2.  
  3. //Summary: The following script will make an object accept donations on your behalf.
  4. //Usage: stick it on any object you own(my favorite is a top hat), and it will promptly display:
  5. //"<your name>'s donation hat.
  6. //Donate if you are so inclined."
  7. //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
  8. //also shows the total amount donated
  9.  
  10.  
  11.  
  12. integer totaldonated;
  13. string owner;
  14. string dname;
  15. default
  16. {
  17.     on_rez( integer sparam )
  18.     {
  19.         llResetScript();
  20.     }
  21.     state_entry()
  22.     {
  23.         dname=llGetDisplayName(llGetOwner());
  24.         owner = llKey2Name( llGetOwner() );
  25.         llSetText((string)dname+ "'s Tip Jar.\nPlease tip if you are so inclined!\n$L0 Donated so far",<.25,1,.65>,1);
  26.     }
  27.  
  28.     money(key id, integer amount)
  29.     {
  30.         totaldonated += amount;
  31.         llParticleSystem(
  32.         [
  33.             PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_EXPLODE,
  34.             PSYS_SRC_BURST_RADIUS,0,
  35.             PSYS_SRC_ANGLE_BEGIN,0,
  36.             PSYS_SRC_ANGLE_END,0,
  37.             PSYS_SRC_TARGET_KEY,llGetKey(),
  38.             PSYS_PART_START_COLOR,<1.000000,1.000000,1.000000>,
  39.             PSYS_PART_END_COLOR,<1.000000,1.000000,1.000000>,
  40.             PSYS_PART_START_ALPHA,1,
  41.             PSYS_PART_END_ALPHA,1,
  42.             PSYS_PART_START_GLOW,0,
  43.             PSYS_PART_END_GLOW,0,
  44.             PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_ALPHA,
  45.             PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA,
  46.             PSYS_PART_START_SCALE,<0.500000,0.500000,0.000000>,
  47.             PSYS_PART_END_SCALE,<0.500000,0.500000,0.000000>,
  48.              PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE, 0),
  49.             PSYS_SRC_MAX_AGE,0,
  50.             PSYS_PART_MAX_AGE,5,
  51.             PSYS_SRC_BURST_RATE,0.3,
  52.             PSYS_SRC_BURST_PART_COUNT,5,
  53.             PSYS_SRC_ACCEL,<0.000000,0.000000,0.000000>,
  54.             PSYS_SRC_OMEGA,<0.000000,0.000000,0.000000>,
  55.             PSYS_SRC_BURST_SPEED_MIN,0.5,
  56.             PSYS_SRC_BURST_SPEED_MAX,0.5,
  57.             PSYS_PART_FLAGS,
  58.                 0 |
  59.                 PSYS_PART_EMISSIVE_MASK
  60.         ]);
  61.         llSleep(2);
  62.          llParticleSystem([]);
  63.  
  64.         llSetText( dname + "'s Tip Jar.\nPlease tip if you are so inclined!\n$L" + (string)amount + " Was donated by"+(string)llGetDisplayName(id) +"!\n" + "$L" + (string)totaldonated + " Donated so far",<.25,1,.65>,1);
  65.         llInstantMessage(id,"Thanks for the tip!  I really appreciate it.");
  66.         llInstantMessage(llGetOwner(),(string)llKey2Name(id)+" donated $" + (string)amount);
  67.     }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement