Difference between revisions of "Script Override Functions"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:


==== USAGE: /CHANNEL Object_Name,message,value eg: /1000 Object,channel,1001 ====
==== USAGE: /CHANNEL Object_Name,message,value eg: /1000 Object,channel,1001 ====
<lsl>
<source lang="lsl2">
list csv_commands;
list csv_commands;


Line 34: Line 34:
     }
     }
}
}
</lsl>
</source>


For technical support, requests, etc., use the Search under the Groups Tab and search for Skidz Partz - Open Source
==== Support ====
 
For technical support, requests, etc., use the Search under the Groups Tab and search for Dazzle Software


If you have any problems getting this script to work either contact me in-world [https://wiki.secondlife.com/wiki/User:Revolution_Perenti Revolution Perenti]
If you have any problems getting this script to work either contact me in-world [https://wiki.secondlife.com/wiki/User:Revolution_Perenti Revolution Perenti]
or visit our free scripts at our LSL scripts [http://www.dazzlesoftware.ca www.dazzlesoftware.ca] Secondlife Open Source Section on our Tutorials.
Or visit our free scripts at our LSL scripts [http://www.dazzlesoftware.org www.dazzlesoftware.org] Secondlife Open Source Section on Tutorials.
[http://slurl.com/secondlife/Skidz%20Isle/128/128/23 Skidz Isle]
Latest version always available on [http://maps.secondlife.com/secondlife/Wyrd/230/83/97 Dazzle Software via Wyrd]
 


{{LSLC|Library}}
{{LSLC|Library}}
{{LSLC|Examples}}
{{LSLC|Examples}}

Latest revision as of 17:53, 24 January 2015

Script Override

Well, you like to override strings, integer etc. in chat channel. For example you like to enable debug or change the channel. I find this the best solution and it can be pretty useful API framework for many listens.

USAGE: /CHANNEL Object_Name,message,value eg: /1000 Object,channel,1001

list csv_commands;

integer P_channel = 1000; // channel
integer key_listen;  // listen key
default
{
    state_entry()
    {
        key_listen = llListen(P_channel, "", NULL_KEY, "");
    }

    listen(integer channel, string name, key id, string message) 
    {
        csv_commands = llCSV2List( llToLower( message ));
//        string said_name = llList2String( csv_commands, 0);        
        string command = llList2String( csv_commands, 1);
        if ( command == "channel") 
        {
            P_channel = (integer)llList2String( csv_commands, 2);
            llListenRemove( key_listen );
            key_listen = llListen(P_channel, "","","");
            llOwnerSay( "Listen Channel set to " + (string)P_channel);
        }
        else if(command == "avatar" || message == "AVATAR")
        {
            llSay(0, "Hello, Avatar!");
        }
    }
}

Support

For technical support, requests, etc., use the Search under the Groups Tab and search for Dazzle Software

If you have any problems getting this script to work either contact me in-world Revolution Perenti Or visit our free scripts at our LSL scripts www.dazzlesoftware.org Secondlife Open Source Section on Tutorials. Latest version always available on Dazzle Software via Wyrd