Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Email Help

LaZy Hulka
Registered User
Join date: 11 Apr 2006
Posts: 32
12-05-2006 21:18
I'm trying to make a C-4 remote det email script. The first script works well. But the c4 script seem to need fixed. Every time I rezz the c4 on the ground it seems to go off. Can someone please help me xD

CODE

key objid= "ddc6266b-7d80-7e1f-27c9-b1705a1c1d30"; // key of target object
default
{
state_entry()
{

}

touch_start(integer total_number)
{
llSay(0, "Initializing...");
//llSay(0,"Calling the Lift. Please wait.");
llEmail((string)objid + "@lsl.secondlife.com","CALL LIFT - DOWN","no message");
llSay(0, "Done!");


}
}



Second Script (one needs fixed)
CODE

vector velocity;
integer shot = FALSE;
integer fade = FALSE;
float alpha = 1.0;
float damage = 100;
float hitpower = 9999;
float lifetime = 120;
key owner;
key objid;
string strid;

default
{
on_rez ( integer start )
{

llResetScript(); // Resets the script on rez

}
state_entry()
{
key objid = llGetKey();
string strid = (string)objid;
llEmail(strid + "@lsl.secondlife.com", "Init", "This is a test message."); // send email to self

llSetTimerEvent(10); // Poll for more emails (Yuck!)
}

timer()
{
llGetNextEmail("", ""); // check for email with any subject/sender
}

email(string time, string address, string subj, string message, integer num_left)

{

llSay(0,"Received an email - " + subj);



llSay(0, "5.");
llTriggerSound("", 10.0);
llSleep(1.0);
llSay(0, "4.");
llTriggerSound("", 10.0);
llSleep(1.0);
llSay(0, "3.");
llTriggerSound("", 10.0);
llSleep(1.0);
llSay(0, "2.");
llTriggerSound("", 10.0);
llSleep(1.0);
llSay(0, "1.");
llTriggerSound("f", 10.0);
llSleep(1.0);

llSetStatus(STATUS_PHYSICS, FALSE);
vector vel = llGetVel() * hitpower;
llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE);
llSetForce(<0,0,0>, TRUE);
llTriggerSound("", 10.0);


llMakeExplosion(20, 20, 20, 20.0, 50.0, "smoke", ZERO_VECTOR);
llMakeExplosion(20, 20.0, 20, 20.0, 50.0, "smoke", ZERO_VECTOR);
llMakeExplosion(20, 20, 20, 20, 50, "fire2", <0,0,0>);
llMakeExplosion(10, 20, 10.0, 10, 10.0, "fire2", <0.0, 0.0, 0.0>);
llMakeExplosion(5, 0, 2, 0, PI, "fire2", ZERO_VECTOR);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "fire2", <0.0, 0.0, 0.0>);
llMakeExplosion(10, 20, 10.0, 10, 10.0, "fire2", <0.0, 0.0, 0.0>);
llMakeExplosion(5, 0, 2, 0, PI, "fire2", ZERO_VECTOR);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "fire2", <0.0, 0.0, 0.0>);
llSetDamage(50.0);
llMakeExplosion(20, 15.0, 15, 6.0, 1.0, "smoke", ZERO_VECTOR);
llMakeExplosion(25, 15.0, 15, 5.0, 1.0, "smoke", ZERO_VECTOR);
llMakeExplosion(10, 1.0, 1, 1, 1.0, "smoke", <0,0,0>);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "smoke", <0.0, 0.0, 0.0>);
llMakeExplosion(5, 1.0, 2, 3.0, PI, "smoke", ZERO_VECTOR);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "smoke", <0.0, 0.0, 0.0>);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "smoke", <0.0, 0.0, 0.0>);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "smoke", <0.0, 0.0, 0.0>);
llMakeExplosion(60, 15.0, 15, 60.0, 1.0, "Smoke", ZERO_VECTOR);
llMakeExplosion(100, 15.0, 15, 75.0, 1.0, "Smoke", ZERO_VECTOR);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "smoke", <0.0, 0.0, 0.0>);
llMakeExplosion(80, 1.0, 13.0, 2.2, 1.0, "smoke", <0.0, 0.0, 0.0>);
llDie();
llSay(0,"Called by Email");

}
}

_____________________
USMC Time to kick ass and take names later. Show No Mercy

Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
12-05-2006 23:24
The object is sending itself email then checking its mail queue. So, you've just made a complex way of setting itself off on rez. Just cut out the bits where it sends mail.


This system isn't going to work too well. The object gets a new UUID every time you rez it, so you need some way of getting that new uuid to the "switch" script.

Also, llDetected* will not work in the email() event. You need a sensor() event for that.

llMakeExplosion() has been depreciated. Use llParticleSystem().

llSetDamage() isn't useful here, as the object is very unlikely to collide with anything.

If you keep those empty llTrigerSound()s, the float for volume is clamped to 1.0, so may as well set them to 1.0. 10.0 isn't any louder. Get rid of them if you're not actually going to trigger a sound.

llDie() is a complete stop. The llSay() after it will not be executed. llDie() should be the very last command in the event.
_____________________
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-06-2006 02:40
What is even more interesting is that the calling script is a lift script that I wrote for a friend and was NEVER released to the public. The UUID specified is a dead give away as it was for the lift platform.

I have no problem with it being used, its not exactly rocket science after all but i do wonder where you obtained it?
LaZy Hulka
Registered User
Join date: 11 Apr 2006
Posts: 32
12-06-2006 14:29
Sure I found it here (
/54/18/142290/1.html)
_____________________
USMC Time to kick ass and take names later. Show No Mercy

Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-06-2006 14:39
ROFLMAO, OK I forgot I posted that there!!!!