Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///TRYING TO MAKE A SCRIPT THAT WILL HAVE FLOAT TEXT WITH DONATIONS THAT WILL PASS THE MONEY TO SIM OWNER AS DONATION I have to declare these global variables at the top of the script so i can refer to them anywhere in it
- key friend = "e80e7fee-95e0-474a-a700-1029696d72fc"; // Mayfield1950's -- you might want to alter this
- string friend_name; // because of the way lsl works, i have to get the name in the script itself
- default
- {
- state_entry()
- {
- llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); // ask for permission to debit the owner's account -- needed to pay money to someone else
- llRequestAgentData(friend, DATA_NAME); // get friend's name
- llSetPayPrice (PAY_DEFAULT,[50, 100, 250, 500]); // put in some suggested amounts
- }
- dataserver(key queryid, string data)
- {
- friend_name = data; // fill in the value for the friend_name variable
- llOwnerSay("going to pass donation to "+friend_name); //make sure we've got this right
- }
- money(key giver, integer amount)
- {
- total += amount;
- llSetText("Mayfield Sim " + " L$ " + (string)total + "\nLast donation: L$ " + (string)amt + "\nby " + llKey2Name(id), <1,1,1>, 1);
- llSay(0, "Thank you , "+llKey2Name(giver)+ ", for your support of L$"+(string)amount+", which is being forwarded to "+friend_name+" right now");
- llGiveMoney(friend, amount); // give the amount I've just been given to my friend
- }
- changed(integer change){
- if(change&CHANGED_OWNER){
- llResetScript();
- }
- }
- }
Add Comment
Please, Sign In to add comment