Scenario: I had a prim that was rezzed a few days ago that I could not select or edit. It was scripted, and when i touched it, the script did what it was supposed to do. I had to log out and just logged back in today, and the object was still there. I couldn't right-click take, or edit. I also couldn't handle it with the region debug tools, it didn't show up. But when I used a sensor script, I could find it no problem. I also found that I could drag-drop a script into the object, even though I couldn't directly edit it.
So I made this script:
Code: Select all
//On state entry, chats to the owner the key and
//name and location of the object the script was dropped into.
//This allows the owner to verify that the script is in the right object.
//If the owner chats "Delete [object name] now."
//The script will delete the object.
//Ohn made this to delete weird objects/prims
//that were rezzed but not selectable.
key myKey;
string myName;
vector myPosition;
checkObject() {
llOwnerSay((string)myKey + ", " + myName + " located at " + (string)myPosition + " has deleteme script. If this is the right object, say 'Delete " + myName + " now.'");
}
deleteObject() {
llOwnerSay((string)myName + " will die in ");
integer index = 5;
while (index)
{
// wait a sec
llSleep(1.0);
llSay(0, (string)index);
--index;
}
llDie();
}
default
{
state_entry()
{
myKey = llGetKey();
myName = llGetObjectName();
myPosition = llGetPos();
llListen(0, "", llGetOwner(), "Delete " + myName + " now.");
checkObject();
}
listen( integer channel, string name, key id, string message )
{
deleteObject();
}
}