Jump to content

CincinnatiBearcats

Resident
  • Posts

    38
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm sorry I forgot to add my screen script (it's within my map object). integer Screen_Face=4;integer channel;string MEDIA_URL;string My_Name;integer PIN;default{ state_entry() { llOwnerSay("IN STATE ENTRY"); channel = (integer)("0x" + (string)llGetKey()); } on_rez( integer pin ) { llOwnerSay("ON REZ"); channel = (integer)("0x" + (string)llGetKey()); llListen(channel, "", NULL_KEY, ""); PIN = pin; llSetPrimitiveParams( [ PRIM_NAME, "SCREEN: ", PRIM_COLOR, Screen_Face, <195, 154, 24>, 1]); llSay(0, "Screen #"+(string)PIN+" has been rezzed. Channel = "+(string)channel+" Key = "+(string)llGetKey() ); llOwnerSay("CONNECTED"); } listen(integer chan, string MsgName, key From, string Msg) { llOwnerSay(""); //llSay(0, "#"+(string)PIN+": "+Msg); string beginning_of_msg = llGetSubString(Msg, 0, 6); if (beginning_of_msg == "Name Me") { llOwnerSay(""); Msg = llStringTrim(Msg, 3); Msg = llDeleteSubString(Msg, 0,10); //Removes "Name Media: " Msg = llStringTrim(Msg, 3); My_Name = llList2String( llParseString2List(Msg, ["'"], []), 0); llSay(channel, "Received Name"); llOwnerSay("NAME: " + My_Name); llSetPrimitiveParams([PRIM_NAME, My_Name, PRIM_TEXT, My_Name]); } if (beginning_of_msg == "Your UR") { llOwnerSay(""); Msg = llStringTrim(Msg, 3); Msg = llDeleteSubString(Msg, 0,9); //Removes "Your URL: " Msg = llStringTrim(Msg, 3); llOwnerSay("MSG = " + Msg); MEDIA_URL = llList2String( llParseString2List(Msg, ["'"], []), 0); llSay(channel, "Received URL"); llOwnerSay("URL: " + MEDIA_URL); llSetPrimMediaParams(Screen_Face, [PRIM_MEDIA_CURRENT_URL, MEDIA_URL]); llSetPrimMediaParams(Screen_Face, [PRIM_MEDIA_WIDTH_PIXELS, 120]); llSetPrimMediaParams(Screen_Face, [PRIM_MEDIA_HEIGHT_PIXELS, 120]); } }}
  2. Hi, I created an Android app to upload pictures, videos and audio to a server according to the GPS location. I created a media prim to display the pin points of where I uploaded each data piece on Google Maps. The problem I am having is the screen appearing when the pin points are being clicked on. It seems to do everything BUT rez the screen. I have a screen object inside my map object to be rezzed when clicked on. Here is my object_rez part of the code. Is there something I'm missing? object_rez(key Pushpin_Obj) { llGiveInventory( Pushpin_Obj, "Screen"); Pushpin_Keys += [""]; Pushpin_Keys = llListReplaceList( Pushpin_Keys,[Pushpin_Obj], Points_Placed, Points_Placed); integer waiting=0; if (Points_Placed <0) { Pushpin_C_Key = Pushpin_Obj; } else { Not_Heard += Points_Placed; channel = (integer)("0x" + (string)Pushpin_Obj); llSay(0, "Listening for Pin#"+(string)Points_Placed+" on channel "+(string)channel); listen_handle_Pin += llListen(channel, "", NULL_KEY, ""); waiting = Announce_Params( Not_Heard); } Points_Placed++; if (Points_Placed < readLines) { llSay(0, "Rezzing "+(string)Points_Placed+"th pushpin."); llRezObject( "Pushpin", llGetPos()+<0,0,Z_offset>, ZERO_VECTOR, llEuler2Rot(Map_Rot + <3.141592,0,0>), Points_Placed); } else { integer a; while (llGetListLength(Not_Heard) && a < 10) { waiting = Announce_Params( Not_Heard); a++; } } } This is what the map looks like:
  3. I'm saying I'm not using llGetAgentList. I'm using the logic of llOverMyLand keeping track of the first time visitors and returning visitors.
  4. In my script, I have a sensor scanning or avatars and adding the name to the list as it is found. I'm not using llGetAgentList so how can I use that function?
  5. Would I be putting that into my listen object or the other? Also, an explaination would be great for me as well. Thanks.
  6. If I find what avatar is not in the list, how can I find the duration of each individually? Won't I always have errors? How does llGetAgentSize work i dont understand that function.
  7. Hi, Awhile back I made a script to alert me when someone entered an area. I stored their name, which location they entered, and the time they entered. How can I find they left? If I can get that, I can calculate the duration but I'm stuck on finding out when they left. I have 4 objects and 1 listening to them in the middle. They are placed so that the 96m limit is not a factor. Here is my object script: integer chDialog; // for Dlialog Menu integer test; integer listenID; // serve as a 'handle' for the ch 0 listen activated by the touch event; key ownerKey; string ownerName; float SensorRange = 96.0; integer UpdateFrequency = 8640; integer frequency = 5; // ----------------------------------- // Internal Variables list todayVisitors = []; list allVisitors = []; list repeatVisitors = []; list firstTimers = []; integer newVisitors = 0; integer returnVisitors = 0; string ParcelName; list alreadyHere = []; list track = []; //Current access list list accessList = [""]; integer gIntMinute = 60; //-- 1 minute in seconds integer gIntHour = 3600; //-- 1 hour in seconds integer gInt12Hr = 43200; //-- 12hrs in seconds integer gIntDay = 86400; //-- 1 day in seconds string fStrGMTwOffset( integer vIntLocalOffset ){ //-- get the correct time in seconds for the given offset integer vIntBaseTime = ((integer)llGetGMTclock() + gIntDay + vIntLocalOffset * gIntHour) % gIntDay; string vStrReturn; //-- store morning or night and reduce to 12hour format if needed if (vIntBaseTime < gInt12Hr){ vStrReturn = " AM"; }else{ vStrReturn = " PM"; vIntBaseTime = vIntBaseTime % gInt12Hr; } //-- get and format minutes integer vIntMinutes = (vIntBaseTime % gIntHour) / gIntMinute; vStrReturn = (string)vIntMinutes + vStrReturn; if (10 > vIntMinutes){ vStrReturn = "0" + vStrReturn; } //-- add in the correct hour, force 0 to 12 if (vIntBaseTime < gIntHour){ vStrReturn = "12:" + vStrReturn; }else{ vStrReturn = (string)(vIntBaseTime / gIntHour) + ":" + vStrReturn; } return vStrReturn; } default { state_entry() { chDialog = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) ); ownerKey = llGetOwner(); ownerName = llKey2Name(ownerKey); llSensorRepeat( "", "", AGENT, SensorRange, PI, frequency); llOwnerSay("Visitor Log Started."); } sensor(integer avsFound) { key avKey; integer avNum; key detectedKey; string detectedName; vector detectedPos; string region = llGetRegionName(); for(avNum=0; avNum < avsFound; avNum++) { detectedKey = llDetectedKey(avNum); detectedName = llDetectedName(avNum); detectedPos = llDetectedPos(avNum); avKey = llDetectedKey(avNum); string whom = llDetectedName(avNum); if (!~llListFindList(todayVisitors, [whom])) { // This person hasn't been seen yet today. todayVisitors += [whom]; if (~llListFindList(allVisitors, [whom])) { // This is a returning visitor. returnVisitors++; repeatVisitors += [whom]; string avLocation = detectedName + " was located at " + (string)detectedPos + " at " + fStrGMTwOffset(-4) + "\n"; track = track + avLocation; llRegionSay(-3122, detectedName); } else { // This is a first-time visitor. newVisitors++; allVisitors = [whom] + allVisitors; firstTimers += [whom]; string log = detectedName + " entered " + region + " at " + fStrGMTwOffset(-4) + " on " + llGetDate(); llOwnerSay(log); alreadyHere = alreadyHere + detectedName; string name = detectedName; key requestid = llHTTPRequest("http://www.wbi-icc.com/students/SL/listen.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "log=" + (string)log + "&fStrGMTwOffset=" + (string)fStrGMTwOffset(-4) +"&name=" + (string)name); llRegionSay(-3122, name); } } } } touch_start(integer number) { //Get owner UUID and avatar who entered //key ownerKey = llGetOwner(); key toucherID = llDetectedKey(0); if(toucherID == ownerKey) { llListenRemove(listenID); // close any previous open listen string message = "Please make a choice:"; list buttons = ["AccessList", "Visitor Log", "Send HTTP"]; listenID = llListen(chDialog, "", ownerKey, ""); //security feature llDialog(ownerKey, message, buttons, chDialog); } } listen(integer channel, string name, key id, string message) { if(channel == test) { llShout(-3122, (string)track); } if(channel == chDialog) { if(message == "Visitor Log") { llOwnerSay((string)track); } else if(message == "AccessList") { llOwnerSay( "Access List: " + llList2CSV(accessList) ); } else if(message == "Send HTTP") { //Use text.php to send the visitor log as a text message or email key requestid = llHTTPRequest("http://www.wbi-icc.com/students/SL/listen.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "log=" + (string)alreadyHere + "&track=" + (string)track); } llListenRemove(listenID); } else { } } } And my listening script: list todayNames = []; default { state_entry() { llListen(-3122,"",NULL_KEY,""); // listen on channel -3122 llSetTimerEvent(seconds); } listen(integer channel, string name, key id, string message) { if (channel == -3122) { llOwnerSay(message); todayNames = message + todayNames; } else if(channel == -14) { llOwnerSay(message); todayNames = message + todayNames; } else if(channel == -31) { llOwnerSay(message); todayNames = message + todayNames; } else if(channel == -22) { llOwnerSay(message); todayNames = message + todayNames; } } on_rez(integer message) { llResetScript(); } }
  8. Hi, Is there a way to get the Eastern Standard Time? The closest thing I see is llGetTimestamp. Thanks.
  9. First, I appreciate your detailed response pointing all of things out very clearly. I realize the color thing is quite useless since the maximum number it could return is 16. The whole point behind that was to see visually how the number of objects and scripted objects in that given area is affecting that area and the entire region (ie. lag). Great point about the timer for movement and sensor-repeat. I knew there was probably a better way but that is just what I came up with in the beginning. Also, won't your script only return either passive or scripted? You can't get both of the values? Eventually, I want it to be able to move in a confined path (rigth now its just going straight and coming back). I want it to be able to go however many meters forward, go however many meters right, go however many meters backwards ect...
  10. Yeah I tried declaring: llSensorRepeat("", "", SCRIPTED, 15.0, PI, 5);llSensorRepeat("", "", PASSIVE, 10.0, PI, 5); in the touch_start but wasn't getting the correct data either...
  11. Hi, I am trying to write a script to count the number of objects and scripted objects as it is moving every 5 meters. The moving part is working great but for some reason it is not accurate (or ignoring) objects and scripted objects in the given radius I am giving it. Also, it is printing a lot of messages for the first 5 or so movements. ie. when it first moves it will display a lot of "There are no scripted objects in range". Can someone help me out with these 2 problems? I know it probably has to do with where I am placing my llSensorRepeat's? Is that right? Thanks! // declare global variables integer second; vector startPos; integer typeConst; integer face = -1; vector color = <1.0, 1.0, 1.0>; list objectCount = []; list scriptCount =[]; default { state_entry() { // declare the starting position of the object and set the original color back startPos = llGetPos(); llSetColor(color, face); } touch_start(integer total_number) { typeConst = 0; llSensorRepeat("", "", SCRIPTED, 10.0, PI, 5); // sensor for the scripted objects llSetTimerEvent(5); // a timer event every 5 seconds } timer() // do every time the timer event occurs { // increase the second count on the timer second++; // get the position of the object vector pos = llGetPos(); float X1 = pos.x; float Y = pos.y; float Z = pos.z; // move the object 5 meters at a time float X = X1 + 5.0; llSetPos (< X,Y,Z>); if (second > 10) // bring object back after 20 seconds { // move object back to starting position while (llVecDist(llGetPos(), startPos) > 0.001) { llSetPos(startPos); } llOwnerSay("Resetting script."); key requestid = llHTTPRequest ("http://www.wbi-icc.com/students/SL/text1.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "parameter1=" + (string)objectCount + "&parameter2=" + (string)scriptCount); llResetScript(); // return object to the last saved script's position } } //Use the sensors to keep a count of the total objects and scripts sensor(integer detected) { if(typeConst == 0) { llOwnerSay("There are "+ (string)detected +" scripted objects in range."); scriptCount = scriptCount + detected + "\n"; typeConst = 1; llSensorRepeat("", "",PASSIVE, 10.0, PI, 5); // sensor for the objects // set the color according to the detected script and object count if(detected > 20) { llOwnerSay("Too many objects and scripts!"); llSetColor(<0.5, 0.0, 0.0>, face); } else if(detected < 20 && detected > 15) { llOwnerSay("The object and script limit is getting high."); llSetColor(<1.0, 1.0, 0.0>, face); } else if(detected < 15) { llOwnerSay("The object and script count is ok."); llSetColor(<0.0, 1.0, 0.0>, face); } } else if(typeConst == 1) { llOwnerSay("There are "+(string)detected +" objects in range."); objectCount = objectCount + detected + "\n"; } } //Sensor did not find anything no_sensor() { if(typeConst == 0) { llOwnerSay("There are no scripted objects in range."); typeConst = 1; llSensor("", NULL_KEY, PASSIVE, 10.0, PI); llSetColor(<0.0, 1.0, 0.0>, face); } else { llOwnerSay("No objects in range."); llSetColor(<0.0, 1.0, 0.0>, face); } } }
  12. llLoadURL loads the webpage in a browser.. I want to be able to load it on the prim. I was wondering if there was a way to create "links" for the prim so when you click ie. "Google" it will show up on the prim. I know how to do a dialog menu... is that what I will have to do?
  13. Hi, I know you change the textures on the prim to different websites but can you just make links or toggles next to it to make it easier than enering different websites all the time? Or would this be achieved using a pop up menu for the user? Thanks!
  14. Thanks alot Innula working perfectly. I appreciate it.
  15. Not sure why but there's a syntax error with that code on the line string s = llDetectedName(i);
×
×
  • Create New...