Jump to content

CobraDredd

Resident
  • Posts

    18
  • 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 know this is like over a year old but has there been a fix for this yet as I still have the lag in my chat and its just getting worse and worse.
  2. I found a script in the archive that was done to say "SPY" when people are online or offiline. I'm modifying it to do some extra stuff to be used to send IM's or Emails to 2 people. I've got the IM's and Email working but the status indicator shows 0 all the time. I want it to show online or offline can anyone help? key kQuery; integer iLine; integer listener; list AvKeys; string Display; integer ON = TRUE; integer i; integer newsum; integer oldsum; integer Dlisten; integer DFlag; key name_q; key online_q; key KeyNow; key user; string status; string owner1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; string owner2 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; string email_address = "email@yahoo.com"; string email_address1 = "email@gmail.com"; default { state_entry() { if (llGetInventoryNumber(INVENTORY_NOTECARD) > 0) { iLine = 0; kQuery = llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0), iLine); } else { llOwnerSay("The UUID notecard is missing from this device."); } } on_rez ( integer startup) { llResetScript(); } changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data != EOF) { key newkey = (key)llStringTrim(data, STRING_TRIM); if (newkey) { AvKeys += newkey; iLine++; kQuery = llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0), iLine); } else { llOwnerSay ( "Invalid key in the notecard: \"" + (string) newkey + "\". Initialization cancelled."); } } else { state running; // Finished reading UUIDs from notecard } } } } state running { state_entry() { llSetColor(<0,1,0>, 5); DFlag = TRUE; llSetTimerEvent(10); } on_rez( integer startup) { llResetScript(); } timer() { llSetText(Display,<1,1,1>,1.0* DFlag); if (oldsum != newsum) // Notify owner of any change in online status { llInstantMessage(llGetOwner(),"Online Status Change \n" + Display); } Display = ""; i = 0; KeyNow = (key)llList2String(AvKeys,0); name_q = llRequestAgentData(KeyNow,DATA_NAME); oldsum = newsum; newsum = 0; } dataserver(key query, string data) { string name; integer status; if(name_q == query) { name = data; Display += name; online_q = llRequestAgentData(KeyNow,DATA_ONLINE); } else if (online_q == query) { if ((integer) data == 0) { string status = "Online"; } else { string status = "Offline"; } //status = (integer)data; newsum += status; Display += " : " +(string) status + "\n"; if ( ++i <= llGetListLength(AvKeys) ) { KeyNow = (key)llList2String(AvKeys,i); name_q = llRequestAgentData(KeyNow,DATA_NAME); } } } touch_start(integer total_number) // Switch timer ON/OFF, activate dialog options { llListenRemove(listener);//A previous user may not have responded. Make sure we don't leak! integer channel = ~(integer)llFrand(1000.0); listener = llListen(channel,"","",""); user = llKey2Name(llDetectedKey(0)); llTextBox(llDetectedKey(0),"Please type your message to Miracle Photography",channel); } listen (integer channel, string name, key id, string message) { if (status = "Online") { llInstantMessage(owner1, (string) user +" says "+ message); llInstantMessage(owner2, (string) user +" says "+ message); } else if (status = "Offline") { llEmail( email_address, "Miracle Photography Email", (string) user + " sent this message \n\n\n"+ message); llEmail( email_address1, "Miracle Photography Email", (string) user + " sent this message \n\n\n"+ message); } llListenRemove(listener); } changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } }
  3. Thanks everyone. I got it fixed with your suggestions. And yes this code is very poor but it was done by the people listed in it. I was just modifying to meet my needs.
  4. OK so I'll admit that this script was working and compiling just fine until I tried to add some security to it. Its the basic script for google calendar access in world. It works fine except I did some modifiications to it so that myself and my partner could both use it and see what is on the calendar. That all worked fine but I'm thinking ahead and trying to password protect it so that only myself and my partner can use the script or anyone we give the password to. Here is the full script with certain pieces censored. I bolded the section that the compile is saying the syntaxt error is at. But here is the line its erroring on http_response(key request_id, integer status, list metadata, string body) If anyone can help me figure out why its throwing this error now I'd greatly appreciate it. ///////////////////////////////////////////////////////////////////// // GA Event Notifier 1.0 by Jason Dahlen (aka Victor Hua) // SpotOn3D // https://spoton3d.com/ // (c) 2010 - Jason Dahlen // // Distributed as GPL, donated to wiki.secondlife.com on 13 July 2010 // // SCRIPT: GA Event Notifier.lsl 1.0 :: Use on your web server // gaenot_1.0.php :: Use inworld // // FUNCTION: // Gather seven days event data from a Google calendar and display it through a simple interface. //The lsl script can access several calendars at once through seperate php files. One file per calendar. // // USAGE: // 1. Place gaenot_1.0.php in your web directory. Anywhere you can view the php file in a web browser. // You will need a seperate gaenot_1.0.php file for each calendar you want to display. You can rename the files. // 2. At the top of your gaenot_1.0.php file you will find two variables. // $email Enter your gmail address // $Calendar_xml_URL A URL that points to your Live Bookmarks feed for Google Calendars. // You can find this under My Calendar in the settings toward the bottom. // Choose the 'xml' button selection from the following: // -Calendar Address - This address works if you have a publically viewable calendar // (ie viewable publically in a web browser) // -Private Address - Use this address if you want to display information from an // otherwise private calendar. This calendar would then only be viewable by // yourself and those using the in world lsl tool. // 3. Drop the GA Event Notifier.lsl in your object. // 4. Add the locations of the php files in the url list. You can have one or several. // 5. Set the gmtOffset to your time or the time of the calendar you are accessing. // ///////////////////////////////////////////////////////////////////// //Add URLs to the list pointing to the location of your gaenot.php script. //list urls = [ // "https://yourdomain.com/gaenot_1.0.php", // "https://yourdomain.com/gaenot_1.0-2.php" // ]; list urls = [ "http://my domain.org/gaenot_1.0.php" ]; //Set the GMT offset to your timezone or to the timezone of the google calendar. integer gmtOffset = -5; key user; //######################################### Edit below this line at your own risk ########################## list days; //Day value reference list dates; //List of event dates list titles; //Event titles list place; //Event locations if given list details; //Event details if given integer calendars; //Number of calendars traced by this tool. integer thisCalendar; //Used when retrieving calendar data. //Used to parse incoming event data list weekdays = ["Thu", "Fri", "Sat", "Sun", "Mon", "Tue", "Wed"]; //Used for generating button list. list week = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]; list buttonList; //Channels integer CHANNEL; integer HANDLE; //Initialize script variables constructor() { key user; user=llDetectedKey(0); days = []; dates = []; titles = []; place = []; details = []; calendars = llGetListLength(urls); thisCalendar = 0; llSetTimerEvent(3600); makeButtonList(); //llHTTPRequest(url, [], ""); requestData(); llInstantMessage(user,"Events List Refreshed"); llInstantMessage(user,""); llListenControl(HANDLE, FALSE); } requestData() { if(thisCalendar < calendars) { llHTTPRequest(llList2String(urls,thisCalendar), [], ""); thisCalendar += 1; } } // Generate dialog button list makeButtonList() { buttonList = []; list tempList = []; integer day = getDay(gmtOffset); integer i; for (i=0; i<7; i++) { tempList += llList2String(week,day); day++; if (day > 6) { day = 0; } } buttonList = [llList2String(tempList,6),"Today", "Refresh", llList2String(tempList,3), llList2String(tempList,4), llList2String(tempList,5), llList2String(tempList,0), llList2String(tempList,1), llList2String(tempList,2)]; } //Creates dialog channel based on the object UUID. Reduces the chance of cross messaging. integer hex2int(string hex) { if(llGetSubString(hex,0,1) == "0x") return (integer)hex; if(llGetSubString(hex,0,0) == "x") return (integer)("0"+hex); return(integer)("0x"+hex); } //Parse incoming data from the php file into seperate lists. parceString(string body) { list tempList = llParseString2List(body, ["||"], []); integer listLength = llGetListLength(tempList); integer i; for (i = 0; i < listLength; i++) { list data = llParseString2List(llList2String(tempList, i), [":"], []); string flag = llStringTrim(llList2String(data,0), STRING_TRIM); string val = llStringTrim(llList2String(data,1), STRING_TRIM); if (flag == "Date") { string day = llList2String(llParseString2List(val, [" "], []), 0); integer dayNum = llListFindList(weekdays, [day]); days += dayNum; dates+=val; } else if (flag == "Title") { titles+=val; } else if (flag == "Event Description") { //Google uses a colon for its data tags. //Unfortionatly this means that if you used a colon in your description such as a URL, it would be cut off prematurly. //I put a check here so at least two URLs or SLURLS such as secondlife://lambda/175/30/26 could be included. if (llStringTrim(llList2String(data,3), STRING_TRIM) != "") { place += (val + ":" + llStringTrim(llList2String(data,2), STRING_TRIM)+ ":" + llStringTrim(llList2String(data,3), STRING_TRIM)); } else if (llStringTrim(llList2String(data,2), STRING_TRIM) != "") { place += (val + ":" + llStringTrim(llList2String(data,2), STRING_TRIM)); } else { place+=val; } } else if (flag == "Where" || flag == "Event Status") { details+=val; } } } //Display day event. displayEvent(integer day) { llListenControl(HANDLE, FALSE); integer i; if(llListFindList(days, [day]) != -1) { for (i=0; i<llGetListLength(days); i++) { if (llList2Integer(days,i) == day) { llInstantMessage(user,"Event Date: " + llList2String(dates, i)); llInstantMessage(user,"Event Name: " + llList2String(titles, i)); llInstantMessage(user,llList2String(place, i)); llInstantMessage(user,llList2String(details, i)); llInstantMessage(user,""); } } } else { llInstantMessage(user,"No events found for the day selected."); llInstantMessage(user,""); } } //Get what day it is today based on ineger value integer getDay(integer offset) { integer hours = llGetUnixTime()/3600; integer days = (hours + offset)/24; integer day_of_week = days%7; return day_of_week; } default { state_entry() { CHANNEL = hex2int(llGetKey()); HANDLE = llListen(CHANNEL, "", "", ""); llListenControl(HANDLE, FALSE); constructor(); } touch_start(integer start) { llListenRemove(glisten); integer glisten = ~(integer)llFrand(1000.0); listener = llListen(glisten,"","",""); llTextBox(llDetectedKey(0),"Enter the Password",glisten); } listen(integer glisten, string name, key id, string message) { if (message == "my password"); { user=llDetectedKey(0); llListenControl(HANDLE, TRUE); llDialog(llDetectedKey(0), "Google Access Event Calendar \n \n" + llList2String(week,getDay(0)) + " "+ llGetDate(), buttonList, CHANNEL); } http_response(key request_id, integer status, list metadata, string body) { parceString(body); requestData(); } listen(integer channel, string name, key id, string message) { //0 => "Thu", 1 =>"Fri", 2=>"Sat", 3=>"Sun", 4=>"Mon", 5=>"Tue", 6=>"Wed"]; if(message == "Today") { displayEvent(getDay(gmtOffset)); } else if(message == "Sunday") { displayEvent(3); } else if(message == "Monday") { displayEvent(4); } else if(message == "Tuesday") { displayEvent(5); } else if(message == "Wednesday") { displayEvent(6); } else if(message == "Thursday") { displayEvent(0); } else if(message == "Friday") { displayEvent(1); } else if(message == "Saturday") { displayEvent(2); } else if(message == "Refresh") { constructor(); } } else if (message != "my password") { llInstantMessage(user,"You are NOT Authorized!"); } timer() { llSetTimerEvent(3600); constructor(); } }
  5. Drago Artful wrote: I updated to build 232901 of the mesh viewer and got rid of the MAD viewer. I still can't upload any meshes. I have the mesh upload option; it's just that nothing happens when I click upload after going through the mesh settings. I can see everyone else's meshes. When I upload a model, there's that Mesh Upload progress thing that appears at the bottom right. It would read, "Mesh Upload -- price quote: 0:0 | upload: 1:0 | create: 0". It goes away pretty fast since I guess my models are small. Is there anything off there? I have the exact same problem. Has anyone found what is causing this or how to fix it?
  6. Thats what I thought also but I'm getting black and some other colors that I can't make out and they aren't going in order either it will flash the first color in the list then a random one in the list then black then sometimes flash the same color several times with alternating black.
  7. Thank you that seems to of worked but there's some strange things happening that I can't figure out. The prim turns colors that aren't even listed in the AllColors list. So not sure why thats happening.
  8. That worked with one exception. It only changes colors on click not on its own. I was looking to have to cycle thru the colors automatically.
  9. Here is how the line reads now vector lightcolor = (vector)llList2String(AllColors,(integer)llFrand((float)llGetListLength(AllColors )))
  10. I tried that also still get line 2, 20 syntax error which is the line in question
  11. When I do that the script errors telling me that the following PRIM_POINT_LIGHT, light_s, lightcolor, intensity, radius, falloff, lightcolor name is not defined within scope.
  12. Here is the complete script as is. integer light_s = TRUE;list AllColors =[ "<1.0,1.0,1.0>"," <1.0.1.0,0.0>","<0.0,0.0,1.0>"," <0.0,1.0,1.0,>","<0.0,1.0,0.0>"];vector lightcolor = (vector)llList2String(AllColors,(integerllFrand((float)llGetListLength(AllColors) -1));float intensity = 1.0;float radius = 20.0;float falloff = 0.0;float glow = 1.0; switchit(){ float thisglow = 0.0; light_s = !light_s; if (light_s) { thisglow = glow; } llSetPrimitiveParams([ PRIM_POINT_LIGHT, light_s, lightcolor, intensity, radius, falloff, PRIM_FULLBRIGHT, ALL_SIDES, light_s, PRIM_GLOW, ALL_SIDES, thisglow ]); llSetColor(lightcolor, ALL_SIDES);} default{ state_entry() { switchit(); } touch_start(integer total_number) { switchit(); }}
  13. I tried that too still get a syntax error. I'm just not familar enough with LSL to know what possible syntax should be for vector. One thing I forgot to mention is that its telling me the syntax error is immediately after the = sign in this code. vector lightcolor = (vector)llList2String( AllColors, (integer)llFrand( (float)llGetListLength( AllColors ) ) );
  14. Sorry I should of mentioned I was not a scripter or programmer by trade. I'm rather new to scripting in SL and not sure how to do what you suggested. I have gotten some other details but I keep getting a syntax error for the following code but not sure what the syntax error is. vector lightcolor = (vector)llList2String(AllColors,(integer)llFrand(llGetListLength(AllColors) -1))
  15. I'm running a script that reads a line and then creates light based on the lines in the head. I want to be able to have it rotate thru different colors based on a list variable but not sure how to get it to work. Here is the script if anyone has any input or can point me to a script that already does it I'd be greatful. integer light_s = TRUE; vector lightcolor = <1.0, 0.255, 1.0>; float intensity = 1.0; float radius = 20.0; float falloff = 0.0; float glow = 1.0; switchit() { float thisglow = 0.0; light_s = !light_s; if (light_s) { thisglow = glow; } llSetPrimitiveParams([ PRIM_POINT_LIGHT, light_s, lightcolor, intensity, radius, falloff, PRIM_FULLBRIGHT, ALL_SIDES, light_s, PRIM_GLOW, ALL_SIDES, thisglow ]); llSetColor(lightcolor, ALL_SIDES); } default { state_entry() { switchit(); } touch_start(integer total_number) { switchit(); } }
×
×
  • Create New...