Jump to content

LashElmond

Resident
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. Ok, it works now. I took care about the capitalization as Rolig mentioned. But it had to be different than I thought. I typed the login names exactly as shown in my friends list and there have been some with lower case and/or a dot between the two names. Spelling them with capitals and without that dot finally works.
  2. Hello, I tried to implement the "Linkable Mulitprim Sliding Door"" script into this one here. Thanks in both cases for the code as I am hard working on getting better in scripting, which rather means that I am spending lots of time with trial and error than really knowing what I am doing. But it could be worse *smirks* Anyways, I could make it work fo me (and only me) that I click the linked multiprim door, then it says the message about Access granted. So as there is also a timer, I have a certain time span during that it is possible to open the door by clicking it again (or close) before the access will be checked again. The problem is, that the login names which I put in the notecard, and this in the same prim´s inventory as the script, do not have access as it is meant to be. I checked the spelling and capitalization twice. I am not sure if I should post the script in here (it´s kind of big), but without doing that there will be no way I guess. So I would be thankful for suggestion what I am doing wrong. // Generic Whitelist Script -- Rolig Loon -- March 2011// Put login names (NOT Display names) of avatars to be whitelisted in a notecard, one per line// Spelling and capitalization count//MEINE NOTIZEN: der erste Klick checkt die Permissions von der Notecard. Dann gibt es einen Zeitraum, während dem man durch Klicken die Tür öffnet und schließt. Die Dauer des Zeitraums kann im state OK Teil geändert werden.list gWhiteList = [];string gCard;integer gLine;key gQuery;list gWho = ["Me Only","Group","List","Group+List","Everyone"];integer gAccess;integer gDChnl;//--- Part of the "Sliding Door in Linkset" Scriptinteger gON = 1; // Change to -1 to reverse the direction of openingfloat gDistance = 0.5; // Adjust to set the distance the door should move long its local Y axis//---default // Read Whitelist from notecard, one name per line{ state_entry() { if(llGetInventoryNumber(INVENTORY_NOTECARD) == 1) { gCard = llGetInventoryName(INVENTORY_NOTECARD,0); gQuery = llGetNotecardLine(gCard, 0); } else { llOwnerSay("The whitelist notecard is missing."); } } changed(integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } dataserver(key QID, string data) { if(gQuery == QID) { if (data != EOF) { gWhiteList += [llStringTrim(data,STRING_TRIM)]; gQuery = llGetNotecardLine(gCard, ++gLine); } else { llOwnerSay("Initialized"); state running; } } }}state running{ state_entry() { gDChnl = (integer) ("0xF" + llGetSubString(llGetOwner(),0,6)); } changed(integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } touch_start(integer total_number) { llResetTime(); integer idx = llListFindList(gWhiteList,[llDetectedName(0)]); if (llDetectedKey(0) != llGetOwner()) { if ((gAccess == 4) || ((gAccess == 3) && (~idx || llSameGroup(llDetectedKey(0)))) || ((gAccess == 2) && (~idx)) || ((gAccess == 1) && (llSameGroup(llDetectedKey(0))))) { llSay(0,"Access granted."); state OK; } else { llSay(0,"Access denied."); } } } touch_end(integer num) //Mouse button released { if(llDetectedKey(0) == llGetOwner()) { if (llGetTime() < 3.0 ) //Less than 3 seconds after mouse button down { llSay(0,"Access granted."); state OK; } else if (llGetTime() >= 3.0 ) // Owner set access permissions { llListen(gDChnl,"","",""); llDialog(llGetOwner(),"Who should have access?",gWho,gDChnl); } } } listen(integer channel, string name, key id, string msg) { gAccess = llListFindList(gWho,[msg]); string temp; if (gAccess == 0) { temp = "you only."; } else if (gAccess == 1) { temp = "group members only."; } else if (gAccess == 2) { temp = " \n" + llDumpList2String(gWhiteList," \n"); } else if (gAccess == 3) { temp = "this group and " + " \n" +llDumpList2String(gWhiteList, " \n"); } else { temp = "everyone."; } llOwnerSay("Access has been granted to " + temp); }}state OK{ state_entry() { llSetTimerEvent(60.0); llWhisper(0,"You have 60 seconds to open and close the door before your access permissions will be checked again."); } changed(integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } // Insert whatever events you want available for people with access // Be sure that there is a path back to state running touch_start(integer total_number) { if (llGetLinkName(llDetectedLinkNumber(0)) == "DOOR") { integer i; for (i=2;i<=llGetNumberOfPrims();++i) { if (llGetLinkName(i) == "DOOR") { list temp = llGetLinkPrimitiveParams(i,[PRIM_POSITION,PRIM_ROT_LOCAL]); rotation local_rot = (rotation)llList2String(temp,1); vector local_pos = ((vector)llList2String(temp,0)- llGetPos())/llGetRot(); llSetLinkPrimitiveParamsFast(i,[PRIM_POSITION,local_pos + (<0.0,gDistance *gON,0.0>*local_rot),PRIM_ROTATION,local_rot/llGetRot()]); } } gON = (-1)*gON; } } //End of Sliding Action timer() // Return to previous state if nothing else happens before timer triggers { llSetTimerEvent(0.0); state running; }}
×
×
  • Create New...