Advanced Permissions Tricks

Creating scripts
Post Reply
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Advanced Permissions Tricks

Post by Kayaker Magic »

If you sell building materials to people, you have to mark them MOD or they cannot link your gadget into their builds. You usually want to mark it COPY so they can use it on several builds or recover from lost copies. And if you are selling things to people who will add them to their builds and want to sell the result, you have to mark your part TRANS.

Most things I make are scripted, and I don't want to give away the store: I want to protect the scripts somehow. I cannot mark them notrans, because if anything in inventory is notrans, the system will not let my customer transfer it. I cannot mark them nocopy, because if anything in inventory is nocopy, the system will not let my customer copy it. But if I mark the script (or other items in inventory) nomod then the system will still let my customer link it into their build. Marking a script nomod prevents anyone from reading it, but it still works and my customer can do everything she needs with the gadget.

There is another combination I often use: I mark an item MOD COPY notrans and the script inside just COPY (nomod notrans). Then my customer can link it into her build and use it, but cannot sell or give it away. I often sell a version with this combination for less. Someone who is building things for their own use and not for sale then doesn't have to pay full price. But if they decide later that they want to sell their build, then they have to come back to me and pay for the expensive TRANS version! I'll upgrade anyone who asks and only make them pay the difference. I should put up a sign in my store saying this. It might make more sales to people who want to try things out for the lower cost first.

When I sell something with COPY, MOD and TRANS, I put a notice in the product description that says “you can link this into your build and then sell the combination, but you cannot resell my item by itself”. There is no easy way to prevent this, I just have to assume most people are good.

There is one combination that could cause problems: If my customer adds my gadget to their build and sells the whole thing as TRANS again. Then her customers could take it apart and use my gadget in their own builds, or sell my gadget by itself and compete with me. I found a technical fix for this: I add a test in the script to see if TRANS is still on but the owner is no longer the creator. If this is true I put up a message in annoying red floating text that says “REMOVE THE TRANS PERMISSION!” Removing TRANS from the object does not prevent my customer from transferring it, this only changes the permission that the next owner will have. So my customer can mark it notrans, take it back into inventory, and use that copy from then on with no annoying red floating text. Here is an example of the code to do this:

Code: Select all

on_rez(integer param)
{
 	llSetText("",<0,0,0>,0.0);
	if (llGetOwner()!=llGetCreator() && (llGetObjectPermMask(MASK_NEXT)&PERM_TRANSFER)!=0)
		llSetText("REMOVE THE NEXT OWNER CAN TRANSFER PERMISSIONS!",<1,0,0>,1.0);
		//whatever else you need to do on rez
}
You might think this is mean spirited of me, but forgetting to clear TRANS in objects for sale is something I have done several times! So the annoying red text is a welcome reminder even for myself!
These users thanked the author Kayaker Magic for the post (total 6):
Graham MillsCarlos LoffKeith SelmesDanko WhitfieldDeuce HalseyDundridge Dreadlow
Post Reply