Wednesday, February 01, 2006

By my command

Here's a script that I could have found very useful recently:

string gKillCode;
string gOwnerEmail = "";

on_rez(integer p)

// Generate random kill code
// This stops just anyone killing the object
// if they get its key

// Email this to the owner
gKillCode = "*" + (string)llRound(llFrand(2000000000)) + "*";
llEmail(gOwnerEmail, "Kill object by email",
"My kill code is " + gKillCode);
// Now set to poll email every five minutes

llGetNextEmail("", "");

email(string time, string address, string subj,
string message, integer num_left)
// If the message contains the kill code,
// email a confirmation and die

if (llSubStringIndex(message, gKillCode) != -1) {
llEmail(gOwnerEmail, "Confirmation of receipt of kill email",
"Dying now");
if (num_left > 0) llGetNextEmail("", "");

That's just off the top of my head right now so there may be the odd bug, but I think the basic idea is sound.

If one creates anything that might annoy other people, one should include some sort of emergency kill script, or even

llListen(999, "", llGetOwner(), "die");


listen(integer channel, string name, key id, string msg)
llOwnerSay("Dying now");

so you can go around shouting "/999 die" to purge the area if it ever comes down to it. (The above obviously needs changing if you have other listens running. Don't blame me if you just stick it into your code and your objects die at odd times.)

One other thing that I have learnt recently is that I'm getting much too involved in certain factional fighting, and it's causing me to make mistakes and bother people who are uninvolved. It's also getting in the way of other things that I am doing. I don't want this to happen, so I'm going to pull back - I'll provide scripting support, alerts, presence loggers (not chat loggers, no, that's against ToS if you're not there and they don't consent) etc but I'm not taking an active part any more.

(Unless I change my mind of course.)

I've had enough of building weapon delivery systems; after I've fulfilled the responsibilities that I already have, I might build a sandwich delivery system.


Post a Comment

<< Home