Jump to content

Muther Shinji

Resident
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Muther Shinji

  1. Just seeking a little clarity here ? Here is the above mentioned item, sunglasses with 3 other prim boxes. The image shows it rezzed on the ground , and worn. I tried to replicate the effect, even attaching the arm pieces separately, then re rezzing and linking. when wearing, the arm pieces attach to the arms... and the glasses attach to the face... and they are linked? Glasses are root with 1 script.
  2. After reading the notes here, and visiting Landguard security products, it seems that this may only work on certain types of land. It works well as a security device, kicking anyone but the land owner, in it's current location, and it works when the owner is logged out. all you have to do is deactivate it if you have company. Thanks for the responses, i guess there is no fix in this situation though the note at Landguard said you may be able to get temporary permissions to set up your security device. Feel free to test or use this as you will, mine is put inside a small semi-transparent blue sphere. // channel 9 to use commandskey second = NULL_KEY; // fill in a second key if you wantstring active = "deactive";float range = 25.0; // Range we will be scanning for for persons to check if they are on the whitellistkey nrofnamesoncard; // Some variables used to collect all the data from the notecardinteger nrofnames;list names;list keynameoncard;string nameoncard;string storedname;integer listener; default // We use the default state to read the notecard. { state_entry() { llOwnerSay("Startup state reading whitelist notecard"); nrofnamesoncard = llGetNumberOfNotecardLines("whitelist"); // Triggers the notecard reading by getting the numer of lines in the notecard } on_rez (integer param) { llResetScript(); llSetPos(llGetPos() + <0.0,0.0,0.1>); } dataserver (key queryid, string data){ if (queryid == nrofnamesoncard) { // When we receive the number of lines in the notecard we do llGetNotecardLine for each line to get the contents nrofnames = (integer) data; llOwnerSay("Found "+(string)nrofnames+ " names in whitelist."); integer i; for (i=0;i < nrofnames;i++){ keynameoncard += llGetNotecardLine("whitelist", i); } } else { integer listlength; listlength = llGetListLength(keynameoncard); integer j; for(j=0;j<listlength;j++) { if (queryid == (key) llList2String(keynameoncard,j)) { // after checking if this really was an answer to one of our llGetNotecardLines calls (checking the keys we stored earlier) // We add the name to our names list. Which we will use in a later state. llOwnerSay("Name added to whitelist: "+data); names += data; } } } if (llGetListLength(names) == nrofnames) { // If we have read all the names (just as many names as there where notecard lines). We switch to our next state "start" // This state will do the actual work llOwnerSay ("Done with reading notecard. Starting script now"); llOwnerSay ("SecurityOrb Sentry commands will use channel 9"); llOwnerSay ("Type /9 activate to turn on orb - commands are activate, deactivate, reset, range"); state start; } } }state start{ state_entry () { // This is where we enter our state. We start 2 listeneres. One for our owner and one for our second owner.. llListen(9, "", llGetOwner(), ""); llListen(9, "", second, ""); llSensorRepeat("", NULL_KEY, AGENT, range, PI, 5.0); // We also start scanning for people in it's vincinity. This scan scans for AGENS (avatars), in a range we determinded above (first few lines). And PI means a full circle around us. In theory you could just scan parts of it. llSay(0,"Surveilance rotation begining"); llTargetOmega(<0,0,1> ,1, 1); //Make the object phantom. Physics is hard for the sim to handle! llSetStatus(STATUS_PHANTOM, FALSE); //makes the block physical. Since it's phantom, //it won't collide with things, but will still move llSetStatus(STATUS_PHYSICS, TRUE); //let's fly! llSetForce(<0,0,.001>*llGetMass(),FALSE); vector myPosition = llGetPos(); llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + 3, FALSE, 1.0); } on_rez(integer param) { llResetScript(); } listen(integer channel, string name, key id, string message) { // This is our listen event. Here we receive all commands to control the orbs behaviour. if (message == "activate") // Starts the orb { active = "active"; llSay(0,"SecurityOrb Activated"); } if (message == "deactivate") // Stops the orb { active = "deactive"; llSay(0,"SecurityOrb Deactivated"); } if (message == "reset") // Resets the script { llResetScript(); } if (llGetSubString(message,0,4) == "range"){ // If the command was range. We extract the new range from the command. Stop the sensor and start it again with the new range. range = (float) llGetSubString(message,6,-1); llSensorRemove(); llSensorRepeat("", NULL_KEY, AGENT, range, PI, 5.0); llOwnerSay("Changed range to: "+(string) range); } } sensor(integer nr) { // Here is where all people found in its vincinity are returned. if (active == "active") // first we make sure the orb is active before we continue { integer i; for (i = 0; i < nr; i++) //Here we start to loop throug all persons we found. We do this one by one. { string found = "no"; string nametotest = llDetectedName(i); integer j; for (j = 0; j < llGetListLength(names); j++) // We scan through the list of names to see if this person is whitelisted { if (llList2String(names, j) == nametotest){ found = "yes"; // When found we set found to true. } } if (found == "no" && llOverMyLand(llDetectedKey(i)) && (llDetectedKey(i) != llGetOwner())) // When the person has not been found we start to check if this person is on our land. And on popuar reques we will never kick the owner { llSay(0, "WARNING! Intruder Alert...Ejection in 10 seconds. You are trespassing on Private Property."); // Let's notify this user that he has a few seconds to leave llSleep(10); // Wait the time we gave him to leave if (llOverMyLand(llDetectedKey(i))) // Ok let's see if he has left. { // If he is still on lets say BYE to him, and tell the owner and second owner someone is kicked off the land llSay(0, "Ejection Protocol Commencing..."); llInstantMessage(llGetOwner(), "Ejecting from our home: "+llDetectedName(i)); if (second != NULL_KEY) { llInstantMessage(second , "Ejecting from our home: "+llDetectedName(i)); } llEjectFromLand(llDetectedKey(i)); //And finaly we really kick him off } } } } } touch_start(integer total_number) { llOwnerSay("Commands on channel 9. Type /9 activate (or deactivate, reset, range)."); } }
  3. after testing the security orb script, it reads the whitelist notecard correctly, but still kicks anyone but the owner of the land. There are serveral functions that mention deeded land. This is for someone with a new premium account, the land is in a housing complex, the group is "maintainence" does anyone have any info on security scripts and land ownership, or problems with this script? Thank you for any help or advice, M.
  4. Thanks , I had it set physical because it would fly like hell straight up, and i couldn't catch it to edit it Setting llGetMass() to Fasle got rid of the drifting, and removing physics seems to have done it. Thank you again, M.
  5. Hi, sorry-new to forums and scripting. I have a mod of the Security Orb script that i'm using to learn sscripting , and what i'm trying to do is have the orb float up and then lock it's position and stay there. It takes about 5 seconds for it to rez and float up, so i'm looking for a 5 second dealy.wait,timer etc. the problems I am having are- it will sometimes rez into the floor, it will sometimes float up higher than 3.5 meters. if rezzed in sandbox, it tends to float away. not sure if this is the script or the prims properties. prim is set Physical Gravity 1 friction .4 density 1000. _____________ // channel 9 to use commandskey second = NULL_KEY; // fill in a second key if you wantstring active = "deactive";float range = 25.0; // Range we will be scanning for for persons to check if they are on the whitellistkey nrofnamesoncard; // Some variables used to collect all the data from the notecardinteger nrofnames;list names;list keynameoncard;string nameoncard;string storedname;integer listener; default // We use the default state to read the notecard. { state_entry() { llOwnerSay("Startup state reading whitelist notecard"); nrofnamesoncard = llGetNumberOfNotecardLines("whitelist"); // Triggers the notecard reading by getting the numer of lines in the notecard } on_rez (integer param) { llResetScript(); } dataserver (key queryid, string data){ if (queryid == nrofnamesoncard) { // When we receive the number of lines in the notecard we do llGetNotecardLine for each line to get the contents nrofnames = (integer) data; llOwnerSay("Found "+(string)nrofnames+ " names in whitelist."); integer i; for (i=0;i < nrofnames;i++){ keynameoncard += llGetNotecardLine("whitelist", i); } } else { integer listlength; listlength = llGetListLength(keynameoncard); integer j; for(j=0;j<listlength;j++) { if (queryid == (key) llList2String(keynameoncard,j)) { // after checking if this really was an answer to one of our llGetNotecardLines calls (checking the keys we stored earlier) // We add the name to our names list. Which we will use in a later state. llOwnerSay("Name added to whitelist: "+data); names += data; } } } if (llGetListLength(names) == nrofnames) { // If we have read all the names (just as many names as there where notecard lines). We switch to our next state "start" // This state will do the actual work llOwnerSay ("Done with reading notecard. Starting script now"); state start; } } }state start{ state_entry () { // This is where we enter our state. We start 2 listeneres. One for our owner and one for our second owner.. llListen(9, "", llGetOwner(), ""); llListen(9, "", second, ""); llSensorRepeat("", NULL_KEY, AGENT, range, PI, 5.0); // We also start scanning for people in it's vincinity. This scan scans for AGENS (avatars), in a range we determinded above (first few lines). And PI means a full circle around us. In theory you could just scan parts of it. llSay(0,"Surveilance rotation begining"); //ADDED ROTATE HERE? llTargetOmega(<0,0,1> ,1, 1); //Make the object phantom. Physics is hard for the sim to handle! (CHANGED TO FALSE) llSetStatus(STATUS_PHANTOM, FALSE); //makes the block physical. Since it's phantom, //it won't collide with things, but will still move llSetStatus(STATUS_PHYSICS, TRUE); //let's fly! llSetForce(<0,0,4>*llGetMass(),TRUE); // ADDED HOVER HERE vector myPosition = llGetPos(); llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + 3.5, FALSE, 1.0); //LOOKING FOR 5 SEC DELAY & LOCK PHYSICAL POSITION HERE? } on_rez(integer param) { llResetScript(); } listen(integer channel, string name, key id, string message) { // This is our listen event. Here we receive all commands to control the orbs behaviour. if (message == "activate") // Starts the orb { active = "active"; llSay(0,"SecurityOrb Activated"); } if (message == "deactivate") // Stops the orb { active = "deactive"; llSay(0,"SecurityOrb Deactivated"); } if (message == "reset") // Resets the script { llResetScript(); } if (llGetSubString(message,0,4) == "range"){ // If the command was range. We extract the new range from the command. Stop the sensor and start it again with the new range. range = (float) llGetSubString(message,6,-1); llSensorRemove(); llSensorRepeat("", NULL_KEY, AGENT, range, PI, 5.0); llOwnerSay("Changed range to: "+(string) range); } } sensor(integer nr) { // Here is where all people found in its vincinity are returned. if (active == "active") // first we make sure the orb is active before we continue { integer i; for (i = 0; i < nr; i++) //Here we start to loop throug all persons we found. We do this one by one. { string found = "no"; string nametotest = llDetectedName(i); integer j; for (j = 0; j < llGetListLength(names); j++) // We scan through the list of names to see if this person is whitelisted { if (llList2String(names, j) == nametotest){ found = "yes"; // When found we set found to true. } } if (found == "no" && llOverMyLand(llDetectedKey(i)) && (llDetectedKey(i) != llGetOwner())) // When the person has not been found we start to check if this person is on our land. And on popuar reques we will never kick the owner { llSay(0, "WARNING! Intruder Alert...Ejection in 10 seconds. You are on Private Property and trespassing."); // Let's notify this user that he has a few seconds to leave llSleep(10); // Wait the time we gave him to leave if (llOverMyLand(llDetectedKey(i))) // Ok let's see if he has left. { // If he is still on lets say BYE to him, and tell the owner and second owner someone is kicked off the land llSay(0, "Ejection Completed..."); llInstantMessage(llGetOwner(), "Ejecting from our home: "+llDetectedName(i)); if (second != NULL_KEY) { llInstantMessage(second , "Ejecting from our home: "+llDetectedName(i)); } llEjectFromLand(llDetectedKey(i)); //And finaly we really kick him off } } } } } }
  6. fabulous, now i have to ask how to post code.. Any way to lock a prim's position after 5 seconds? Ty
×
×
  • Create New...