VD & AiTech Object Renaming Script

From Second Life Wiki
Revision as of 09:41, 29 January 2009 by Chihuahua Violet (talk | contribs)
Jump to navigation Jump to search
"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());
        string name1 =llKey2Name(llGetOwner());
        string firstname = llList2String(llParseString2List(name,[ " "],[]),0);
        string lastname = llList2String(llParseString2List(name1, [ "2 "],[]),0);
        llSetObjectName("[VD] " + lastname + "'s Right Cuff");
        llSetObjectDesc("[VD] " +  lastname +"'s Right Cuff - v1.20");
    }
    
    changed(integer change)
    {
        if(change & CHANGED_OWNER)
        {
            llResetScript();
        }
    }
}