Chat Die

Expired

//This is to delete objects by chat. Place this script in an object you wish to have self delete. Say or Shout (hold ctrl while hitting enter) the word delete, and your object will self delete.
 
123//remove the 123 to be able to use this script. Just delete the numbers and make sure running in the lower left is checked and hit save.
 
//Make sure you save a copy of this script and all others in this package before removing the 123.
 
default
{
    state_entry()
    {
        llListen(0,"",llGetOwner(),"");
    }
 
    listen(integer channel, string name, key id, string m)
    {
        if (m=="delete");llDie();
    }
}

 

Chat Relay

Expired

//This is a script to easily distribute a conversation in a large area, or keep people in contact while off in different parts of the sim. I have it set up to relay objects that the avatar might be wearing (such as OOC chatters), and so that anyone can set up a relay and join in the conversation.
 
//This script, however, was designed to be polite. It asks you if you want to join the chat relay system, and you can click on the relay prim at any time to opt-out.
 
string original_name = "Chat Relay v1.0";
 
integer CHANNEL = -3735928559;
 
list acl;
list blk;
 
// CONSTANTS
string STR_ASK = "Would you like to be included in the chat-relay system?";
list LST_OPT = ["ALLOW","DENY"];
 
// Vars for speed
integer int;
key tempkey;
string str;
 
hovertext(){
llSetText(original_name + "\nCLICK TO CHANGE ALLOW/DENY SETTINGS\nAllow list: " + (string)llGetListLength(acl) +
"\nDeny list: " + (string)llGetListLength(blk)+
"\nMemory Left: " + (string)llGetFreeMemory(),
<1 .0,0.0,1.0>,1.0);
}
 
default{
on_rez(integer i){llResetScript();}
changed(integer i){if(i & CHANGED_OWNER){llResetScript();}}
state_entry() {
llSetObjectName(original_name);
llListen(0,"",NULL_KEY,"");
llListen(CHANNEL,"",NULL_KEY,"");
hovertext();
}
listen(integer chan,string name,key k,string message){
if(chan == 0){
//Get the name of the avatar/owner of object
str = name;
tempkey = llGetOwnerKey(k);
if(tempkey != k){
str = llKey2Name(tempkey);
if(str == ""){return;}
}
//Be nice to nearby vendors and such
if(name == ""){ return; }
 
//Ignore anyone on the blocklist
if(~llListFindList(blk,(list)str)){ return; }
//Check if not on ACL
if(!~llListFindList(acl,(list)str)){
llDialog(tempkey,STR_ASK,LST_OPT,CHANNEL);
return;
}
llSetObjectName(name);
llRegionSay(CHANNEL,message);
llSetObjectName(original_name);
return;
}
if(chan == CHANNEL){
if(message == "ALLOW"){
if(1 + llListFindList(acl,(list)name)){ return; }
int = llListFindList(blk,(list)name);
if(~int){ blk = llDeleteSubList(blk,int,int); }
acl = (acl = []) + acl + name;
hovertext();
return;
}
if(message == "DENY") {
if(1 + llListFindList(blk,(list)name)){ return; }
int = llListFindList(acl,(list)name);
if(~int){ acl = llDeleteSubList(acl,int,int); }
blk = (blk = []) + blk + name;
hovertext();
return;
}
llSetObjectName(name);
llSay(0,message);
llSetObjectName(original_name);
return;
}
}
touch_start(integer i){ llDialog(llDetectedKey(0),STR_ASK,LST_OPT,CHANNEL) ; }
}