Conflit de scripts RLV

Répondre
Partager Rechercher
Bonjour à tous,

J'ai un souci avec des "mitaines" que j'aime porter : celles-ci comportent un script "RLV" qui fait que, lorsque je porte un "collar" RLV, celui-ci se détache automatiquement.

J'ai identifié le script des mitaines responsable de ceci, et je n'ai aucun désir que celles-ci continuent de fonctionnent avec le RLV. Je souhaiterais donc neutraliser la partie du script qui produit cette commande. Mais comment... je sèche !

Si quelqu'un avait cette compétence, cela lui vaudrait ma reconnaissance éternelle !

Un grand merci par avance


Code PHP:

​//////////////////////////////////////////////////////////////////////////////
//                                                                          //
//              ____                   ______      ____                     //
//             / __ \____  ___  ____  / ____/___  / / /___ ______           //
//            / / / / __ \/ _ \/ __ \/ /   / __ \/ / / __ `/ ___/           //
//           / /_/ / /_/ /  __/ / / / /___/ /_/ / / / /_/ / /               //
//           \____/ .___/\___/_/ /_/\____/\____/_/_/\__,_/_/                //
//               /_/                                                        //
//                                                                          //
//                        ,^~~~-.         .-~~~"-.                          //
//                       :  .--. \       /  .--.  \                         //
//                       : (    .-`<^~~~-: :    )  :                        //
//                       `. `-,~            ^- '  .'                        //
//                         `-:                ,.-~                          //
//                          .'                  `.                          //
//                         ,'   @   @            |                          //
//                         :    __               ;                          //
//                      ...{   (__)          ,----.                         //
//                     /   `.              ,' ,--. `.                       //
//                    |      `.,___   ,      :    : :                       //
//                    |     .'    ~~~~       \    / :                       //
//                     \.. /               `. `--' .'                       //
//                        |                  ~----~                         //
//                         Communicator - 170328.2                          //
// ------------------------------------------------------------------------ //
//  Copyright (c) 2008 - 2017 Nandana Singh, Garvin Twine, Cleo Collins,    //
//  Master Starship, Satomi Ahn, Joy Stipe, Wendy Starfall, littlemousy,    //
//  Romka Swallowtail, Sumi Perl et al.                                     //
// ------------------------------------------------------------------------ //
//  This script 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, version 2.                             //
//                                                                          //
//  This script 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 script; if not, see www.gnu.org/licenses/gpl-2.0        //
// ------------------------------------------------------------------------ //
//  This script and any derivatives based on it must remain "full perms".   //
//                                                                          //
//  "Full perms" means maintaining MODIFY, COPY, and TRANSFER permissions   //
//  in Second Life(R), OpenSimulator and the Metaverse.                     //
//                                                                          //
//  If these platforms should allow more fine-grained permissions in the    //
//  future, then "full perms" will mean the most permissive possible set    //
//  of permissions allowed by the platform.                                 //
// ------------------------------------------------------------------------ //
//       github.com/VirtualDisgrace/opencollar/tree/master/src/collar       //
// ------------------------------------------------------------------------ //
//////////////////////////////////////////////////////////////////////////////

integer g_iPrivateListenChan 9;
integer g_iPublicListenChan TRUE;
string g_sPrefix ".";

integer g_iLockMeisterChan = -8888;

integer g_iPublicListener;
integer g_iPrivateListener;
integer g_iLockMeisterListener;
integer g_iLeashPrim;

integer g_iHUDListener;
integer g_iHUDChan;

//MESSAGE MAP
integer CMD_ZERO 0;
integer CMD_OWNER 500;
//integer CMD_TRUSTED = 501;
//integer CMD_GROUP = 502;
integer CMD_WEARER 503;
//integer CMD_EVERYONE = 504;
//integer CMD_RLV_RELAY = 507;
integer CMD_SAFEWORD 510;
//integer CMD_RELAY_SAFEWORD = 511;
//integer CMD_BLOCKED = 520;

//integer POPUP_HELP = 1001;
integer NOTIFY=1002;
integer NOTIFY_OWNERS=1003;
//integer SAY = 1004;
integer LINK_AUTH 2;
integer LINK_DIALOG 3;
integer LINK_SAVE 5;
integer LINK_ANIM 6;
integer LINK_UPDATE = -10;
integer REBOOT = -1000;
integer LM_SETTING_SAVE 2000;
//integer LM_SETTING_REQUEST = 2001;
integer LM_SETTING_RESPONSE 2002;
integer LM_SETTING_DELETE 2003;
//integer LM_SETTING_EMPTY = 2004;

//integer MENUNAME_REQUEST = 3000;
//integer MENUNAME_RESPONSE = 3001;
integer ANIM_LIST_REQUEST 7002;
integer TOUCH_REQUEST = -9500;
integer TOUCH_CANCEL = -9501;
integer TOUCH_RESPONSE = -9502;
integer TOUCH_EXPIRE = -9503;

string g_sSafeWord "RED";

//added for attachment auth
integer g_iInterfaceChannel;
integer g_iListenHandleAtt;

integer AUTH_REQUEST 600;
integer AUTH_REPLY 601;

key g_kWearer;
//string g_sSettingToken = "com_";
string g_sGlobalToken "global_";
string g_sDeviceName;
string g_sWearerName;
//list g_lOwners;

//globlals for supporting touch requests
list g_lTouchRequests// 4-strided list in form of touchid, recipient, flags, auth level
integer g_iStrideLength 4;

integer FLAG_TOUCHSTART 0x01;
integer FLAG_TOUCHEND 0x02;

integer g_iNeedsPose FALSE;  // should the avatar be forced into a still pose for making touching easier
string g_sPOSE_ANIM "turn_180";

integer g_iTouchNotify FALSE;  // for Touch Notify
integer g_iHighlander TRUE;
list 
g_lCore5Scripts = ["LINK_AUTH","oc_auth","LINK_DIALOG","oc_dialog","LINK_RLV","oc_rlvsys","LINK_SAVE","oc_settings","LINK_ANIM","oc_anim","LINK_ANIM","oc_couples"];
list 
g_lFoundCore5Scripts;
list 
g_lWrongRootScripts;
integer g_iVerify;
/*integer g_iProfiled;
Debug(string sStr) {
    //if you delete the first // from the preceeding and following  lines,
    //  profiling is off, debug is off, and the compiler will remind you to
    //  remove the debug calls from the code, we're back to production mode
    if (!g_iProfiled){
        g_iProfiled=1;
        llScriptProfiler(1);
    }
    llOwnerSay(llGetScriptName() + "(min free:"+(string)(llGetMemoryLimit()-llGetSPMaxMemory())+")["+(string)llGetFreeMemory()+"] :\n" + sStr);
}*/

string NameURI(key kID){
    return 
"secondlife:///app/agent/"+(string)kID+"/about";
}

//functions from touch script
ClearUser(key kRCPTinteger iNotify) {
    
//find any strides belonging to user and remove them
    
integer iIndex llListFindList(g_lTouchRequests, [kRCPT]);
    while (~
iIndex) {
        if (
iNotify) {
            
key kID llList2Key(g_lTouchRequestsiIndex -1);
            
integer iAuth llList2Integer(g_lTouchRequestsiIndex 2);
            
llMessageLinked(LINK_THISTOUCH_EXPIRE, (string) kRCPT "|" + (string) iAuth,kID);
        }
        
g_lTouchRequests llDeleteSubList(g_lTouchRequestsiIndex 1iIndex g_iStrideLength);
        
iIndex llListFindList(g_lTouchRequests, [kRCPT]);
    }
    if (
g_iNeedsPose && [] == g_lTouchRequestsllStopAnimation(g_sPOSE_ANIM);
}

sendCommandFromLink(integer iLinkNumberstring sTypekey kToucher) {
    
// check for temporary touch requests
    
integer iTrig;
    
integer iNTrigs llGetListLength(g_lTouchRequests);
    for (
iTrig 0iTrig iNTrigsiTrig+=g_iStrideLength) {
        if (
llList2Key(g_lTouchRequestsiTrig 1) == kToucher) {
            
integer iTrigFlags llList2Integer(g_lTouchRequestsiTrig 2);
            if (((
iTrigFlags FLAG_TOUCHSTART) && sType == "touchstart")
                ||((
iTrigFlags FLAG_TOUCHEND)&& sType == "touchend")) {
                
integer iAuth llList2Integer(g_lTouchRequestsiTrig 3);
                
string sReply = (string) kToucher "|" + (string) iAuth "|" sType +"|"+ (string) iLinkNumber;
                
llMessageLinked(LINK_THISTOUCH_RESPONSEsReplyllList2Key(g_lTouchRequestsiTrig));
            }
            if (
sType =="touchend"ClearUser(kToucherFALSE);
            return;
        }
    }

    
string sDesc llDumpList2String(llGetLinkPrimitiveParams(iLinkNumber,[PRIM_DESC])+llGetLinkPrimitiveParams(LINK_ROOT,[PRIM_DESC]),"~");

    list 
lDescTokens llParseStringKeepNulls(sDesc, ["~"], []);
    
integer iNDescTokens llGetListLength(lDescTokens);
    
integer iDescToken;
    for (
iDescToken 0iDescToken iNDescTokensiDescToken++) {
        
string sDescToken llList2String(lDescTokensiDescToken);
        if (
sDescToken == sType || sDescToken == sType+":" || sDescToken == sType+":none") return;
        else if (!
llSubStringIndex(sDescTokensType+":")) {
            
string sCommand llGetSubString(sDescTokenllStringLength(sType)+1, -1);
            if (
sCommand != ""llMessageLinked(LINK_AUTHCMD_ZEROsCommandkToucher);
            return;
        }
    }
    if (
sType == "touchstart") {
        
llMessageLinked(LINK_AUTHCMD_ZERO"menu"kToucher);
        if (
g_iTouchNotify && kToucher!=g_kWearer)
            
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"\n\nsecondlife:///app/agent/"+(string)kToucher+"/about touched your %DEVICETYPE%.\n",g_kWearer);
    }
}

FailSafe() {
    
string sName llGetScriptName();
    if ((
key)sName) return;
    if (!(
llGetObjectPermMask(1) & 0x4000
    || !(
llGetObjectPermMask(4) & 0x4000)
    || !((
llGetInventoryPermMask(sName,1) & 0xe000) == 0xe000)
    || !((
llGetInventoryPermMask(sName,4) & 0xe000) == 0xe000
    || 
sName != "oc_com") {
        
integer i llGetInventoryNumber(7);
        while (
illRemoveInventory(llGetInventoryName(7,--i));
        
llRemoveInventory(sName);
    }
}

MoveAnims(integer i) {
    
key kAnimator llGetLinkKey(LINK_ANIM);
    
string sAnim;
    list 
lAnims;
    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"\n\nFetching "+(string)i+" animations from the %DEVICETYPE%'s root...\n",g_kWearer);
    while (
i) {
        
sAnim llGetInventoryName(INVENTORY_ANIMATION,--i);
        
llGiveInventory(kAnimator,sAnim);
        
lAnims += sAnim;
        if (
llGetInventoryType(sAnim) == INVENTORY_ANIMATION) {
            if (
llGetInventoryPermMask(sAnim,MASK_OWNER) & PERM_COPY)
                
llRemoveInventory(sAnim);
        }
    }
    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"\n\nThe following animations have been moved to the %DEVICETYPE%'s animator module and are now ready to use:\n\n"+llList2CSV(lAnims)+"\n",g_kWearer);
    
llMessageLinked(LINK_ANIM,ANIM_LIST_REQUEST,"","");
}

UserCommand(key kIDinteger iAuthstring sStr) {
    if (
sStr == "ping") { // ping from an object, we answer to it on the object channel
        
llRegionSayTo(kID,g_iHUDChan,(string)g_kWearer+":pong"); // sim wide response to owner hud
        
return;
    }
    list 
lParams llParseString2List(sStr, [" "], []);
    
string sCommand llToLower(llList2String(lParams0));
    
string sValue llList2String(lParams1); //llToLower(llList2String(lParams, 1));
    
if (iAuth == CMD_OWNER || kID == g_kWearer) {  //handle changing prefix and channel from owner
        
if (sCommand == "prefix") {
            if (
sValue == "") {
                
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"\n\n%WEARERNAME%'s prefix is: %PREFIX%\n",kID);
                return;
            } else if (
sValue == "reset") {
                
g_sPrefix llToLower(llGetSubString(llKey2Name(llGetOwner()), 0,1));
                
llMessageLinked(LINK_SAVELM_SETTING_DELETEg_sGlobalToken+"prefix""");
            } else {
                
g_sPrefix sValue;
                
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken+"prefix=" g_sPrefix"");
            }
            
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken+"prefix=" g_sPrefix"");
            
llMessageLinked(LINK_DIALOG,NOTIFY,"1"+"\n\n%WEARERNAME%'s prefix is: %PREFIX%\n\nTouch the %DEVICETYPE% or say \"%PREFIX% menu\" for the main menu or say '\"%PREFIX% help\" for a list of chat commands.\n",kID);
        }
        else if (
sCommand == "device" && sValue == "name") {
            
string sMessage;
            
string sObjectName llGetObjectName();
            
string sCmdOptions llDumpList2String(llDeleteSubList(lParams,0,1), " ");
            if (
sValue == "") {
                
sMessage "\n"+sObjectName+"'s current device name is \"" g_sDeviceName "\".\nDevice Name command help:\n%PREFIX% device name [newname|reset]\n";
                
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+sMessage,kID);
            } else if (
sCmdOptions == "reset") {
                
g_sDeviceName llGetObjectDesc();
                if (
g_sDeviceName == "" || g_sDeviceName =="(No Description)"g_sDeviceName llGetObjectName();
                
sMessage "The device name is reset to \""+g_sDeviceName+"\".";
                
llMessageLinked(LINK_SAVELM_SETTING_DELETEg_sGlobalToken+"DeviceName""");
                
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken+"DeviceName="+g_sDeviceName"");
            } else {
                
g_sDeviceName sCmdOptions;
                
sMessage sObjectName+"'s new device name is \""g_sDeviceName+"\".";
                
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken+"DeviceName="+g_sDeviceName"");
                
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken+"DeviceName="+g_sDeviceName"");
            }
            if (
sValuellMessageLinked(LINK_DIALOG,NOTIFY,"1"+sMessage,kID);
        } else if (
sCommand == "name") {
            if (
iAuth != CMD_OWNERllMessageLinked(LINK_DIALOG,NOTIFY,"0"+"%NOACCESS%",kID);
            else {
                
string sMessage;
                if (
sValue=="") {  //Just let them know their current name
                    
sMessage"\n\nsecondlife:///app/agent/"+(string)g_kWearer+"/about's current name is " g_sWearerName;
                    
sMessage += "\nName command help: <prefix>name [newname|reset]\n";
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+sMessage,kID);
                } else if(
sValue=="reset") { //unset Global_WearerName
                    
sMessage=g_sWearerName+"'s name is reset to ";
                    
g_sWearerName NameURI(g_kWearer);
                    
llMessageLinked(LINK_SAVELM_SETTING_DELETEg_sGlobalToken+"WearerName""");
                    
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken+"WearerName="+g_sWearerName"");
                    
sMessage += g_sWearerName;
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"1"+sMessage,kID);
                } else {
                    
string sNewName llDumpList2String(llList2List(lParams1,-1)," ") ;
                    
sMessage=g_sWearerName+"'s new name is ";
                    
g_sWearerName "["+NameURI(g_kWearer)+" "+sNewName+"]";
                    
sMessage += g_sWearerName;
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"1"+sMessage,kID);
                    
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken+"WearerName=" sNewName""); //store
                    
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken+"WearerName="+sNewName"");
                }
            }
        } else if (
sCommand == "channel") {
            
integer iNewChan = (integer)sValue;
            if (
sValue=="") {  //they left the param blank, report listener status
                
string sMessage"The %DEVICETYPE% is listening on channel";
                if (
g_iPublicListenChansMessage += "s 0 and";
                
sMessage += " "+(string)g_iPrivateListenChan+".";
                
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+sMessage,kID);
            } else if (
iNewChan 0) { //set new channel for private listener
                
g_iPrivateListenChan =  iNewChan;
                
llListenRemove(g_iPrivateListener);
                
g_iPrivateListener llListen(g_iPrivateListenChan""NULL_KEY"");
                
llMessageLinked(LINK_DIALOG,NOTIFY,"1"+"Now listening on channel " + (string)g_iPrivateListenChan,kID);
                if (
g_iPublicListenChan) { //save setting along with the state of thepublic listener (messy!)
                    
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",TRUE""");
                    
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",TRUE""");
                } else {
                    
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",FALSE""");
                    
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",FALSE""");
                }
            } else if (
iNewChan == 0) { //enable public listener
                
g_iPublicListenChan TRUE;
                
llListenRemove(g_iPublicListener);
                
g_iPublicListener llListen(0""NULL_KEY"");
                
llMessageLinked(LINK_DIALOG,NOTIFY,"1"+"\n\nPublic channel listener enabled.\nTo disable it type: /%CHANNEL% %PREFIX% channel -1\n",kID);
                
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",TRUE""");
                
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",TRUE""");
            } else if (
iNewChan == -1) {  //disable public listener
                
g_iPublicListenChan FALSE;
                
llListenRemove(g_iPublicListener);
                
llMessageLinked(LINK_DIALOG,NOTIFY,"1"+"\n\nPublic channel listener disabled.\nTo enable it type: /%CHANNEL% %PREFIX% channel 0\n",kID);
                
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",FALSE""");
                
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken "channel=" + (string)g_iPrivateListenChan ",FALSE""");
            }
        } else if (
kID == g_kWearer) {
            if (
sCommand == "safeword") {
                if(
llStringTrim(sValueSTRING_TRIM) != "") {
                    
g_sSafeWord sValue// llList2String(lParams, 1);
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"You set a new safeword: " g_sSafeWord,g_kWearer);
                    
llMessageLinked(LINK_SAVELM_SETTING_SAVEg_sGlobalToken "safeword=" g_sSafeWord"");
                    
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken "safeword=" g_sSafeWord"");
                } else
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"Your safeword is: " g_sSafeWord,g_kWearer);
            } else if (
sStr == "mv anims") {
                
integer i llGetInventoryNumber(INVENTORY_ANIMATION);
                if (
iMoveAnims(i);
                else 
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"\n\nThere are currently no animations in the %DEVICETYPE%'s root.\n",g_kWearer);
            } else if (
sCommand == "busted") {
                if (
sValue == "on") {
                    
llMessageLinked(LINK_SAVE,LM_SETTING_SAVE,g_sGlobalToken+"touchNotify=1","");
                    
g_iTouchNotify=TRUE;
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"Touch notification is now enabled.",g_kWearer);
                } else if (
sValue == "off") {
                    
llMessageLinked(LINK_SAVE,LM_SETTING_DELETE,g_sGlobalToken+"touchNotify","");
                    
g_iTouchNotify=FALSE;
                    
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"Touch notification is now disabled.",g_kWearer);
                } else if (
sValue == "") {
                    if (
g_iTouchNotify) {
                        
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"Touch notification is now disabled.",g_kWearer);
                        
llMessageLinked(LINK_SAVE,LM_SETTING_DELETE,g_sGlobalToken+"touchNotify","");
                        
g_iTouchNotify FALSE;
                    } else {
                        
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"Touch notification is now enabled.",g_kWearer);
                        
llMessageLinked(LINK_SAVE,LM_SETTING_SAVE,g_sGlobalToken+"touchNotify=1","");
                        
g_iTouchNotify TRUE;
                    }
                }
            }
        }
    }
}

default {
    
on_rez(integer iParam) {
        
llResetScript();
    }

    
state_entry() {
       
// llSetMemoryLimit(49152);  //2015-05-06 (6180 bytes free)
        
g_kWearer llGetOwner();
        
FailSafe();
        
g_sWearerName NameURI(g_kWearer);
        
g_sDeviceName llGetObjectDesc();
        if (
g_sDeviceName == "" || g_sDeviceName =="(No Description)"g_sDeviceName llGetObjectName();
        
llMessageLinked(LINK_SETLM_SETTING_RESPONSEg_sGlobalToken+"DeviceName="+g_sDeviceName"");
        
g_sPrefix llToLower(llGetSubString(llKey2Name(g_kWearer), 0,1));
        
//Debug("Default prefix: " + g_sPrefix);
        
g_iHUDChan = -llAbs((integer)("0x"+llGetSubString((string)g_kWearer,-7,-1)));
        
g_iInterfaceChannel = (integer)("0x" llGetSubString(g_kWearer,30,-1));
        if (
g_iInterfaceChannel 0g_iInterfaceChannel = -g_iInterfaceChannel;
        
g_iPublicListener llListen(0""NULL_KEY"");
        
g_iPrivateListener llListen(g_iPrivateListenChan""NULL_KEY"");
        
g_iLockMeisterListener llListen(g_iLockMeisterChan"""""");
        
//garvin attachments listener
        
g_iListenHandleAtt llListen(g_iInterfaceChannel"""""");
        
g_iHUDListener llListen(g_iHUDChan""NULL_KEY ,"");
        
integer iAttachPt llGetAttached();
        if ((
iAttachPt && iAttachPt 31) || iAttachPt == 39) { // if collar is attached to the body (thus excluding HUD and root/avatar center)
            
llRequestPermissions(g_kWearerPERMISSION_TRIGGER_ANIMATION);
            
llRegionSayTo(g_kWearerg_iInterfaceChannel"OpenCollar=Yes");
        }
        
//Debug("Starting");
    
}

    
attach(key kID) {
        if (
kID == NULL_KEY)
            
llRegionSayTo(g_kWearerg_iInterfaceChannel"OpenCollar=No");
    }

    
listen(integer iChanstring sNamekey kIDstring sMsg) {
        if (
iChan == g_iHUDChan) {
            
//check for a ping, if we find one we request auth and answer in LMs with a pong
            
if (sMsg==(string)g_kWearer ":ping")
                
llMessageLinked(LINK_AUTHCMD_ZERO"ping"llGetOwnerKey(kID));
            
// it it is not a ping, it should be a command for use, to make sure it has to have the key in front of it
            
else if (!llSubStringIndex(sMsg,(string)g_kWearer ":")){
                
sMsg llGetSubString(sMsg37, -1);
                
llMessageLinked(LINK_AUTHCMD_ZEROsMsgllGetOwnerKey(kID));
            } else if (
iChan == g_iInterfaceChannel && llGetOwnerKey(kID) == g_kWearer) { //for the rare but possible case g_iHUDChan == g_iInterfaceChannel
                
if (sMsg == "OpenCollar?"llRegionSayTo(g_kWearerg_iInterfaceChannel"OpenCollar=Yes");
                else if (
sMsg == "OpenCollar=Yes" && g_iHighlanderllRegionSayTo(kID,g_iInterfaceChannel,"There can be only one!");
                else if (
sMsg == "There can be only one!" && llGetOwnerKey(kID) == g_kWearer && g_iHighlander) {
                    
llOwnerSay("/me has been detached.");
                    
llRequestPermissions(g_kWearer,PERMISSION_ATTACH);
                } else if (
llSubStringIndex(sMsg"AuthRequest")==0)
                    
llMessageLinked(LINK_AUTH,AUTH_REQUEST,(string)kID+(string)g_iInterfaceChannel,llGetSubString(sMsg,12,-1));
                else 
llMessageLinked(LINK_AUTHCMD_ZEROsMsgllGetOwnerKey(kID));
            } else
                
llMessageLinked(LINK_AUTHCMD_ZEROsMsgllGetOwnerKey(kID));
            return;
        }
        if (
iChan == g_iLockMeisterChan) {
            if(
sMsg ==(string)g_kWearer+"collar")
                
llSay(g_iLockMeisterChan,(string)g_kWearer "collar ok");
            
//new for LMV2
            
if(sMsg == (string)g_kWearer+"|LMV2|RequestPoint|collar") {
    
//this message is for us, it's claiming to be an LMV2 message, it's a "Request" message, and concerns the mooring_point we specified
     //message structure:   llGetOwner()|LMV2|RequestPoint|anchor_name
                
if(g_iLeashPrim)
                    
llRegionSayTo(kIDg_iLockMeisterChan, (string)g_kWearer+"|LMV2|ReplyPoint|collar|"+(string)llGetLinkKey(g_iLeashPrim));
                else
                    
llRegionSayTo(kIDg_iLockMeisterChan, (string)g_kWearer+"|LMV2|ReplyPoint|collar|"+(string) llGetKey());
            }
            return;
        }
        if(
llGetOwnerKey(kID) == g_kWearer) { // also works for attachments
            
string sw sMsg// we'll have to shave pieces off as we go to test
            // safeword can be the safeword or safeword said in OOC chat "((SAFEWORD))"
            // and may include prefix
            
if (llGetSubString(sw03) == "/me "sw llGetSubString(sw4, -1);
            
// Allow for Firestorm style "(( SAFEWORD ))" by trimming.
            
if (llGetSubString(sw01) == "((" && llGetSubString(sw, -2, -1) == "))"sw llStringTrim(llGetSubString(sw2, -3), STRING_TRIM);
            if (
llSubStringIndex(swg_sPrefix)==0sw llGetSubString(swllStringLength(g_sPrefix), -1);
            if (
sw == g_sSafeWord) {
                
llMessageLinked(LINK_SETCMD_SAFEWORD"""");
                
llRegionSayTo(g_kWearer,g_iInterfaceChannel,"%53%41%46%45%57%4F%52%44");
                
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"You used the safeword, your owners have been notified.",g_kWearer);
                
llMessageLinked(LINK_DIALOG,NOTIFY_OWNERS,"\n\n%WEARERNAME% had to use the safeword. Please check on %WEARERNAME%'s well-being in case further care is required.\n","");
                return;
            }
        }
        
//added for attachment auth (garvin)
        
if (iChan == g_iInterfaceChannel) {
            
//Debug(sMsg);
            //do nothing if wearer isnt owner of the object
            
if (llGetOwnerKey(kID) != g_kWearer) return;
            
//play ping pong with the Sub AO
            
if (sMsg == "OpenCollar?"llRegionSayTo(g_kWearerg_iInterfaceChannel"OpenCollar=Yes");
            else if (
sMsg == "OpenCollar=Yes" && g_iHighlander) {
                
llOwnerSay("\n\nATTENTION: You are attempting to wear more than one OpenCollar core. This causes errors with other compatible accessories and your RLV relay. For a smooth experience, and to avoid wearing unnecessary script duplicates, please consider to take off \""+sName+"\" manually if it doesn't detach automatically.\n");
                
llRegionSayTo(kID,g_iInterfaceChannel,"There can be only one!");
            } else if (
sMsg == "There can be only one!" && llGetOwnerKey(kID) == g_kWearer && g_iHighlander) {
                
llOwnerSay("/me has been detached.");
                
llRequestPermissions(g_kWearer,PERMISSION_ATTACH);
            } else { 
// attachments can send auth request: llRegionSayTo(g_kWearer,g_InteraceChannel,"AuthRequest|UUID");
                
if (llSubStringIndex(sMsg"AuthRequest")==0) {
                    
llMessageLinked(LINK_AUTH,AUTH_REQUEST,(string)kID+(string)g_iInterfaceChannel,llGetSubString(sMsg,12,-1));
                }
            }
        } else { 
//check for our prefix, or *
            
if (!llSubStringIndex(sMsgg_sPrefix)) sMsg llGetSubString(sMsgllStringLength(g_sPrefix), -1); //strip our prefix from command
            
else if (!llSubStringIndex(sMsg"/"+g_sPrefix)) sMsg llGetSubString(sMsgllStringLength(g_sPrefix)+1, -1); //strip our prefix plus a / from command
            
else if (llGetSubString(sMsg00) == "*"sMsg llGetSubString(sMsg1, -1); //strip * (all collars wildcard) from command
            
else if ((llGetSubString(sMsg00) == "#") && (kID != g_kWearer)) sMsg llGetSubString(sMsg1, -1); //strip # (all collars but me) from command
            
else return;
            
sMsg llStringTrim(sMsg,STRING_TRIM_HEAD);
            if (
sMsg) {
                if (
kID == g_kWearer && llToLower(sMsg) == "verify") {
                    
llOwnerSay("Verifying core...");
                    
llMessageLinked(LINK_ALL_OTHERS,LINK_UPDATE,"LINK_REQUEST","");
                    
llSetTimerEvent(2);
                    
g_iVerify TRUE;
                    
g_lWrongRootScripts = [];
                    
string sName;
                    
integer i llGetListLength(g_lCore5Scripts) -1;
                    do {
                        
sName llList2String(g_lCore5Scripts,i);
                        if (
llGetInventoryType(sName) == INVENTORY_SCRIPT)
                            
g_lWrongRootScripts += sName;
                        
2;
                    } while (
i>0);
                    return;
                }
                
//Debug("Got comand "+sMsg);
                
llMessageLinked(LINK_AUTHCMD_ZEROsMsgkID);
            }
        }
    }

    
link_message(integer iSenderinteger iNumstring sStrkey kID) {
        if (
iNum >= CMD_OWNER && iNum <= CMD_WEARERUserCommand(kIDiNumsStr);
        else if (
iNum == LM_SETTING_RESPONSE) {
            list 
lParams llParseString2List(sStr, ["="], []);
            
string sToken llList2String(lParams0);
            
string sValue llList2String(lParams1);
            if (
sToken == g_sGlobalToken+"prefix") {
                if (
sValue != ""g_sPrefix=sValue;
            } else if (
sToken == "leashpoint"g_iLeashPrim = (integer)sValue;
            else if (
sToken == g_sGlobalToken+"DeviceName"g_sDeviceName sValue;
            else if (
sToken == g_sGlobalToken+"touchNotify"g_iTouchNotify = (integer)sValue// for Touch Notify
            
else if (sToken == g_sGlobalToken+"WearerName") {
                 if (
llSubStringIndex(sValue"secondlife:///app/agent"))
                    
g_sWearerName "["+NameURI(g_kWearer)+" " sValue "]";
            } else if (
sToken == "intern_Highlander"g_iHighlander = (integer)sValue;
            else if (
sToken == g_sGlobalToken+"safeword"g_sSafeWord sValue;
            else if (
sToken == g_sGlobalToken+"channel") {
                
g_iPrivateListenChan = (integer)sValue;
                if (
llGetSubString(sValuellStringLength(sValue) - , -1) == "FALSE"g_iPublicListenChan FALSE;
                else 
g_iPublicListenChan TRUE;
                
llListenRemove(g_iPublicListener);
                if (
g_iPublicListenChan == TRUEg_iPublicListener llListen(0""NULL_KEY"");
                
llListenRemove(g_iPrivateListener);
                
g_iPrivateListener llListen(g_iPrivateListenChan""NULL_KEY"");
            }
        } else if (
iNum == TOUCH_REQUEST) {   //str will be pipe-delimited list with rcpt|flags|auth
            
list lParams llParseStringKeepNulls(sStr, ["|"], []);
            
key kRCPT = (key)llList2String(lParams0);
            
integer iFlags = (integer)llList2String(lParams1);
            
integer iAuth = (integer)llList2String(lParams2);
            
ClearUser(kRCPTTRUE);
            
g_lTouchRequests += [kIDkRCPTiFlagsiAuth];
            if (
g_iNeedsPosellStartAnimation(g_sPOSE_ANIM);
        } else if (
iNum == LINK_UPDATE) {
            if (
sStr == "LINK_AUTH"LINK_AUTH iSender;
            else if (
sStr == "LINK_DIALOG"LINK_DIALOG iSender;
            else if (
sStr == "LINK_SAVE"LINK_SAVE iSender;
            else if (
sStr == "LINK_ANIM"LINK_ANIM iSender;
            if (
sStr != "LINK_REQUEST") {
                if (!~
llListFindList(g_lFoundCore5Scripts,[sStr,iSender]))
                    
g_lFoundCore5Scripts += [sStr,iSender];
                if (
llGetListLength(g_lFoundCore5Scripts) >= 10llSetTimerEvent(0.1);
            }
        } else if (
iNum == TOUCH_CANCEL) {
            
integer iIndex llListFindList(g_lTouchRequests, [kID]);
            if (~
iIndex) {
                
g_lTouchRequests llDeleteSubList(g_lTouchRequestsiIndexiIndex g_iStrideLength);
                if (
g_iNeedsPose && [] == g_lTouchRequestsllStopAnimation(g_sPOSE_ANIM);
            }
        } 
//needed to be the same ID that send earlier pings or pongs
        
else if (iNum == AUTH_REPLYllRegionSayTo(kIDg_iInterfaceChannelsStr);
        else if (
iNum == REBOOT && sStr == "reboot") {
            if (
llGetInventoryType("oc_relay") == INVENTORY_SCRIPT) {
                if (!
llGetScriptState("oc_relay")) {
                    
llSetScriptState("oc_relay",TRUE);
                    
llResetOtherScript("oc_relay");
                }
            }
            
llResetScript();
        }
    }

    
touch_start(integer iNum) {
        
//Debug("touched");
        
sendCommandFromLink(llDetectedLinkNumber(0), "touchstart"llDetectedKey(0));
    }

    
touch_end(integer iNum) {
        
sendCommandFromLink(llDetectedLinkNumber(0), "touchend"llDetectedKey(0));
    }

    
run_time_permissions(integer iPerm) {
        if (
iPerm PERMISSION_TRIGGER_ANIMATIONg_iNeedsPose TRUE;
        if (
iPerm PERMISSION_ATTACH) {
            
llOwnerSay("@detach=yes");
            
llDetachFromAvatar();
        }
    }

    
timer() {
        
llSetTimerEvent(0);
        
string sMessage;
        if (
g_lWrongRootScripts) {
            
sMessage "\nFalse root prim placement:\n";
            do {
                
sMessage += llList2String(g_lWrongRootScripts,0);
                
g_lWrongRootScripts =  llDeleteSubList(g_lWrongRootScripts,0,0);
            } while (
g_lWrongRootScripts);
        }
        if(
sMessagesMessage += "\n";
        
integer i;
        
integer index;
        list 
lTemp = ["Missing Scripts:"];
        do {
            
index llListFindList(g_lFoundCore5Scripts,llList2List(g_lCore5Scripts,i,i));
            if (
index == -1) {
                if (
llSubStringIndex(sMessage,llList2String(g_lCore5Scripts,i+1)) == -1)
                    
lTemp += [llList2String(g_lCore5Scripts,i+1)];
            } else
                
sMessage += "\n"+llList2String(g_lCore5Scripts,i+1) + "\t(Link# "+llList2String(g_lFoundCore5Scripts,index+1)+")";
            
2;
        } while (
i<10);
        
llGetLinkNumber();
        if (
!= 1sMessage += "\noc_com\t(not in root prim!)";
        
string sSaveIntegrity "intern_integrity=";
        if (
llSubStringIndex(sMessage,"False") == -&& llGetListLength(lTemp) == 1) {
            
g_lFoundCore5Scripts llListSort(g_lFoundCore5Scripts,2TRUE);
            if (
llListFindList(g_lFoundCore5Scripts,["LINK_ANIM",6,"LINK_AUTH",2,"LINK_DIALOG",3,"LINK_RLV",4,"LINK_SAVE",5])) {
                
sMessage "All operational!";
                
sSaveIntegrity += "homemade";
            } else {
                
sMessage "Optimal conditions!";
                
sSaveIntegrity += "professionally made";
            }
            
llMessageLinked(LINK_THIS,LM_SETTING_RESPONSE,sSaveIntegrity,"");
            
llMessageLinked(LINK_SAVE,LM_SETTING_SAVE,sSaveIntegrity,"");
            
lTemp = [];
            
g_lFoundCore5Scripts = [];
        } else {
            if (
llGetListLength(lTemp) ==1lTemp = [];
            
sMessage "\n\nCore corruption detected:\n"llDumpList2String(lTemp,"\n")+sMessage;
            if (
== 1sMessage += "\noc_com\t(root)";
            
llMessageLinked(LINK_SAVE,LM_SETTING_DELETE,"intern_integrity","");
        }
        
g_lFoundCore5Scripts = [];
        if (
g_iVerify) {
            
g_iVerify FALSE;
            
//llMessageLinked(LINK_THIS,LM_SETTING_RESPONSE,sSaveIntegrity,"");
            
llOwnerSay(sMessage);
        }
    }

    
changed(integer iChange) {
        if (
iChange CHANGED_OWNERllResetScript();
        if (
iChange CHANGED_INVENTORYFailSafe();
/*
        if (iChange & CHANGED_REGION) {
            if (g_iProfiled){
                llScriptProfiler(1);
                Debug("profiling restarted");
            }
        }
        */
    
}

est ce qu'il n'y aurait pas moyen de prendre le problème autrement ?

quelles sont les fonctions scriptées de tes mitaines qui t'interessent et que tu veux conserver ?
il peut y avoir des moyens de scripter ça differemment et moins lourd peut être.
As-tu lu ça....dans ton script ??

" llOwnerSay("\n\nATTENTION: You are attempting to wear more than one OpenCollar core. This causes errors with other compatible accessories and your RLV relay. For a smooth experience, and to avoid wearing unnecessary script duplicates, please consider to take off ""+sName+"" manually if it doesn't detach automatically.\n");"....



en gros , porter deux trucs RLV, c 'est mal.....donc il en vire un....

sinon, il faut au minimum virer la ligne 590 " llDetachFromAvatar();".....et mieux encore, les lignes 478, 479....et la section run_time_permissions(integer iPerm) ligne 586....et tester, pas sur que ça marche et j' ai pas le courage d' essayer........mais les scripts lockmeister and co sont de vraies galères et terriblement laggy, vu qu'ils ont des llListen(0,"","","").....le must de l' horreur.....

Quand à le refaire....bonjour le taff....

Dernière modification par MenthalOH ; 31/03/2021 à 14h49.
Citation :
Publié par MenthalOH
As-tu lu ça....dans ton script ??

" llOwnerSay("\n\nATTENTION: You are attempting to wear more than one OpenCollar core. This causes errors with other compatible accessories and your RLV relay. For a smooth experience, and to avoid wearing unnecessary script duplicates, please consider to take off ""+sName+"" manually if it doesn't detach automatically.\n");"....



en gros , porter deux trucs RLV, c 'est mal.....donc il en vire un....

sinon, il faut au minimum virer la ligne 590 " llDetachFromAvatar();".....et mieux encore, les lignes 478, 479....et la section run_time_permissions(integer iPerm) ligne 586....et tester, pas sur que ça marche et j' ai pas le courage d' essayer........mais les scripts lockmeister and co sont de vraies galères et terriblement laggy, vu qu'ils ont des llListen(0,"","","").....le must de l' horreur.....
Merci ! je vais faire quelques essais !
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés