Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string gMessage = "Thank you for your tip, It is appreciated!";
- integer gRecommendedTip = 50;
- vector gColor = <1,1,1>;
- string gShowSwitch = "yes";
- string gNotifySwitch = "yes";
- //_______________Do not edit below here____________
- integer gTotal = 0;
- default
- {
- state_entry()
- {
- llSetText("", <1,1,1>, 1);
- llSetClickAction(CLICK_ACTION_PAY);
- llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
- }
- run_time_permissions(integer perms)
- {
- if(perms)
- {
- llSetPayPrice(gRecommendedTip, [100, 150, 200, 250]);
- }
- }
- money(key customer, integer amount)
- {
- string CustomerName = llKey2Name(customer);
- integer Last = amount;
- gTotal += amount;
- string Prefix = "";
- if(llToLower(gShowSwitch) == "yes")
- Prefix = "Last Tipper: "+CustomerName+"\n";
- llSetText(Prefix+"Last Tip: $L "+(string)Last+"\nTotal: $L "+(string)gTotal,gColor, 1); // Change this to your Grid's Currency type
- llInstantMessage(customer, gMessage);
- if(llToLower(gNotifySwitch) == "yes")
- llInstantMessage(llGetOwner(), CustomerName+" has just made a donation of $L "+(string)amount+"."); // Change this to your Grid's Currency type
- }
- on_rez(integer start_param)
- {
- llResetScript();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement