Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer gRLVactive = FALSE;
- string gRLVversion = "";
- default {
- state_entry() {
- if (gRLVversion == "") {
- state RLVcheck;
- }
- }
- touch_start(integer touchers) {
- if (gRLVactive) {
- llOwnerSay("@attach:TestDir=force");
- }
- }
- }
- state RLVcheck {
- // This state performs a test to see if the RestrainedLove extensions are enabled in the user's viewer.
- // It sets a global flag variable to tell the rest of the script whether to use RLV commands, and stores
- // the RLV version number in a global variable, or sets that variable to "None".
- state_entry() {
- integer channel = 0x80000000 | ((integer)("0x"+(string) llGetOwner()) ^ ((integer)llFrand(99)));
- llListen(channel,"","","");
- llOwnerSay("@versionnew="+(string)channel);
- llSetTimerEvent(5.00);
- }
- listen( integer channel, string name, key id, string message ) {
- integer index = llSubStringIndex(message,"RestrainedLove viewer");
- if (~index) {
- gRLVactive = TRUE;
- gRLVversion = llGetSubString(message, (index + 23), llStringLength(message) );
- llOwnerSay("RLV v"+gRLVversion+" active in this viewer. All functions enabled.");
- }
- llSetTimerEvent(0.0);
- state default;
- }
- on_rez(integer StartParam) {
- llResetScript();
- }
- timer() {
- gRLVactive = FALSE;
- gRLVversion = "None";
- llOwnerSay("RLV not active in this viewer. RLV functions disabled.");
- llSetTimerEvent(0.0);
- state default;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment