Difference between revisions of "VD & AiTech Object Renaming Script"

From Second Life Wiki
Jump to navigation Jump to search
(slimmed the code, changed to <lsl> highlighting... though i can't see a value in this script. and it's not doing what the description says it would do)
Line 1: Line 1:
   
   
<pre>
<lsl>
"Library"  
"Library"  
//    THIS SCRIPT SHOULD NOT BE SOLD UNDER ANY CIRCUMSTANCE, IT IS UNDER THE GNU LICENSE!
//    THIS SCRIPT SHOULD NOT BE SOLD UNDER ANY CIRCUMSTANCE, IT IS UNDER THE GNU LICENSE!
Line 23: Line 23:
     {
     {
         string name = llKey2Name(llGetOwner());
         string name = llKey2Name(llGetOwner());
         string name1 =llKey2Name(llGetOwner());
         name = llGetSubString(name, 0, llSubStringIndex(name, " ")-1 ); // get lastname
        string firstname = llList2String(llParseString2List(name,[ " "],[]),0);
         llSetObjectName("[VD] " + name + "'s Right Cuff");
        string lastname = llList2String(llParseString2List(name1, [ "2 "],[]),0);
         llSetObjectDesc("[VD] " +  name +"'s Right Cuff - v1.20");
         llSetObjectName("[VD] " + lastname + "'s Right Cuff");
         llSetObjectDesc("[VD] " +  lastname +"'s Right Cuff - v1.20");
     }
     }
      
      
Line 38: Line 36:
     }
     }
}
}
</pre>
</lsl>

Revision as of 10:24, 29 January 2009

<lsl> "Library" // THIS SCRIPT SHOULD NOT BE SOLD UNDER ANY CIRCUMSTANCE, IT IS UNDER THE GNU LICENSE! // Created By: Asami Imako [AiTech]. // MODIFY TO MAKE BOTH FIRST & LAST NAME DISPLAY ON THE OBJECTS TITLE // Modify By: Chihuahua Violet, [VD] (C) 2009. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>.

default {

   state_entry()
   {
       string name = llKey2Name(llGetOwner());
       name = llGetSubString(name, 0, llSubStringIndex(name, " ")-1 ); // get lastname
       llSetObjectName("[VD] " + name + "'s Right Cuff");
       llSetObjectDesc("[VD] " +  name +"'s Right Cuff - v1.20");
   }
   
   changed(integer change)
   {
       if(change & CHANGED_OWNER)
       {
           llResetScript();
       }
   }

} </lsl>