Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

looking for simple kill script

crucial Armitage
Clothing Designer
Join date: 30 Aug 2004
Posts: 838
02-10-2006 05:28
I'm looking for a script that on a voice command from the owner will kill any object that it is in

I'm sure this is as easy as pie to make but my scripting skills are very limited
thanks in advance for any help any one of you wonderful scripters could provide.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
02-10-2006 05:31
From: crucial Armitage
I'm looking for a script that on a voice command from the owner will kill any object that it is in

I'm sure this is as easy as pie to make but my scripting skills are very limited
thanks in advance for any help any one of you wonderful scripters could provide.

CODE

default
{
state_entry()
{
llListen(0, "", llGetOwner(), "die object die");
}

listen(integer c, string name, key id, string msg)
{
llOwnerSay("Okay, okay! I'm dying here!");
llDie();
}
}


You could change the channel and the required command of course. Changing the 0 to 666 means that the owner would have to speak on channel 666 (i.e. "/666 die object die";).
crucial Armitage
Clothing Designer
Join date: 30 Aug 2004
Posts: 838
02-10-2006 05:35
woot ty ty ty
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
02-10-2006 05:37
By the way, I wrote about kill scripts on my blog recently - there's a longer one that you can use to kill an object via an email. I think it should work, but I've not tested it, my computer's in for repair.

http://engine-proceeding.blogspot.com/2006/02/by-my-command.html

CODE

string gKillCode;
string gOwnerEmail = "owner@somewhere.com";

default
{
on_rez(integer p)
{
llResetScript();
}

state_entry()
{
// 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
llSetTimerEvent(300.0);
}

timer()
{
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");
llDie();
}
if (num_left > 0) llGetNextEmail("", "");
}
}


Anyone see any problems with that?
Stellar Plasma
Registered User
Join date: 8 Feb 2006
Posts: 13
02-10-2006 13:46
No way, does this work with real email?!? Like I can send an email from my yahoo account and kill an object?