Talitha Midal
Resident-
Posts
21 -
Joined
-
Last visited
Reputation
0 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
IM/Give Inventory to a Specific Avatar on Touch
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
*facepalms* It wasn't running! Thank you thank you everyone.... a real "d'oh" moment! -
IM/Give Inventory to a Specific Avatar on Touch
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
Hey everyone. This is how I wrote my script, I have tried it several times and it just isn't working. It doesn't even show the pointy finger as the specific avatar hovers over it. It is really odd! What am I missing? lol It has to be something so obvious... I'd be so grateful for any further help... string item = "Photo1"; key id = "xxx-xxx-xxx-xxx"; string name = "Jo Bloggs"; default { touch_start(integer total_number) { llGiveInventory(id, item); llInstantMessage(id, "Here is a photo."); } } -
IM/Give Inventory to a Specific Avatar on Touch
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
Thank you everyone. Sorry feeling a bit rubbish today... it seems like such a simple thing but it is something I haven't yet done in my scripting. Will go give it all a go! -
IM/Give Inventory to a Specific Avatar on Touch
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
Hi Dora Thank you for your reply I have the key for the avatar. I have set up the touch_start event. Put in place the llGiveInventory & llInstantMessage functions in place. I even put some variables at the top because I was thinking I would need to store the key Id up there somehow... I'm missing a link. I'm not sure what...or how to get the key ID into the script so that it works... string message = "Here is a photo."; string item = "Photo1"; key id = "XXX-XXX-XXX-XXX"; string name = "Jo Bloggs"; default { touch_start(integer total_number) { llGiveInventory(llDetectedKey("XXX-XXX-XXX-XXX"), item); llInstantMessage((string)name, message); } } -
Hi. Despite dipping my fingers into scripting every so often, I am still very new to it. I was trying to make a script that when you touch a box it will Instant Message and give an item in its inventory to a specified avatar (either via avatar name or their key ID). I have been playing with llDetected Key(0) and trying to set key ID and string name variables but I haven't made a script set for a specific avatar before. Could anyone leave me any tips or point me in the right direction? Many thanks :)
-
Adding a timer into a texture change script...
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
Oh! I am so so sorry... The prim I had it on was a flat square and I hadn't realised that the surface it was working on was therefore not visible. After your last post, I went Inworld and expanded the cube and found that it is all fine. Thank you so much for highlighting that point and sorry again for having wasted anyone's time... Ooops! -
Adding a timer into a texture change script...
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
The * * around that section of script were to highlight the section that I hadn't been able to add in, as it keeps telling me I have an error. The part beneath that section is the script as I have it currently - saved successfully but not working. list textures = ["d495d72a-b17f-3042-c326-5e0b143acda1", "1f2989c3-08df-e376-ee74-7ee625fe30ef", "c6ce3ff0-e468-7b7c-8275-ff04b49ffef6"]; integer textures_number; integer current_index; default {state_entry() { llSetTimerEvent(30); textures_number = llGetListLength(textures); } timer() { llSetTexture(llList2String(textures,current_index),0); if(++current_index >= textures_number) current_index = 0; } } -
Hi. I am trying to add a timer element to a texture change script I have. So that rather than being a touch change, it becomes a change every Xseconds. The script below saved successfully but doesn't work. This section of script* hasn't been added in yet but when I try to place it... the whole script complains and won't save. I have played with different ways but now I am unsure what I am doing wrong. Can anyone help? * { textures_number = llGetListLength(textures); }* list textures = ["d495d72a-b17f-3042-c326-5e0b143acda1", "1f2989c3-08df-e376-ee74-7ee625fe30ef", "c6ce3ff0-e468-7b7c-8275-ff04b49ffef6"]; integer textures_number; integer current_index; default {state_entry() { llSetTimerEvent(30); textures_number = llGetListLength(textures); } timer() { llSetTexture(llList2String(textures,current_index),0); if(++current_index >= textures_number) current_index = 0; } }
-
Changing MailBox Script to Multiple Owner/Manager
Talitha Midal replied to Talitha Midal's topic in LSL Scripting
Thank you! -
Hi I found a free use mailbox script online and have been tinkering with it inworld. It works well but I am not very good at reading script yet. It is early learning days still. I am not sure whether it is possible to change it to be multiple owner/manager so that I can set an access list of people who can pick up/read/delete the notecards. If anyone could give me some pointers... it might be that I need to start from scratch. I saw the ID == llgetowner and wondered if I could put in av keys there somehow?? Bit lost honestly! Thanks, Tali list lMail = []; // column 1 = notecard name, column 2 = read by user integer MAIL_UNREADED = 0; integer MAIL_READED = 1; integer DIALOG_CHANNEL = 49383; list DIALOG_CHOICE = ["Unread", "Read", "Delete"]; integer nLastCardCount = 0; integer nLastItemCount = 0; TxtRefresh() { // show the unreadable notecard integer nTotalCard = 0; integer nNotReaded = 0; integer nCount = 0; for (nCount = 0; nCount < llGetListLength(lMail); nCount += 2) { if (llList2Integer(lMail, nCount + 1) == MAIL_UNREADED) nNotReaded += 1; nTotalCard += 1; } // total string string cPost = (string)nTotalCard + " card"; if (nTotalCard > 1) cPost += "s"; cPost += " posted"; // unreaded string string cUnreaded = (string)nNotReaded + " unread"; llSetText("Suggestion Box!\n" + cPost + "\n" + cUnreaded, <.95, .75, 0>, 1); } default { state_entry() { // Allowing dropping of object llAllowInventoryDrop(TRUE); llListen(DIALOG_CHANNEL, "", NULL_KEY, ""); nLastCardCount = llGetInventoryNumber(INVENTORY_ALL); nLastItemCount = llGetInventoryNumber(INVENTORY_NOTECARD); // Auto complete list integer nCardCount = llGetInventoryNumber(INVENTORY_NOTECARD); integer n_CurObj = 0; string c_Name = "NotEmpty"; while (c_Name != "") { c_Name = llGetInventoryName(INVENTORY_NOTECARD, n_CurObj); n_CurObj += 1; if (c_Name != "") { lMail += [c_Name]; lMail += MAIL_UNREADED; } } TxtRefresh(); } touch_start(integer total_number) { llSay(0, "Drop a notecard to be sent to MY OWNER."); //---- Change MY OWNER above to suit your likes and needs. // // if owner key id = llDetectedKey(0); if (id == llGetOwner()) { // Show a dialog llDialog(id, "What do you want to do ?", DIALOG_CHOICE, DIALOG_CHANNEL); } } listen(integer channel, string name, key id, string message) { if (llGetOwner() == id && llListFindList(DIALOG_CHOICE, [message]) != -1) { integer i; string cName; list lRemove; integer nStatus; for (i = 0; i < llGetListLength(lMail); i += 2) { cName = llList2String(lMail, i); nStatus = llList2Integer(lMail, i + 1); if (message == llList2String(DIALOG_CHOICE, 0) && nStatus == MAIL_UNREADED) { // open un-readed llGiveInventory(id, cName); // mark for readed lMail = llListReplaceList(lMail, [MAIL_READED], i + 1, i + 1); } if (message == llList2String(DIALOG_CHOICE, 1) && nStatus == MAIL_READED) { // open readed llGiveInventory(id, cName); } if (message == llList2String(DIALOG_CHOICE, 2) && nStatus == MAIL_READED) { // delete readed llSay(0, cName); llRemoveInventory(cName); lRemove += i; } } // remove from the list if (llGetListLength(lRemove) > 0) { integer k; for (k = 0; k < llGetListLength(lRemove); k++) { i = llList2Integer(lRemove, k); lMail = llDeleteSubList(lMail, i, i+1); } } TxtRefresh(); } } changed(integer change) { // dont accept other than a notecard integer nItemCount = llGetInventoryNumber(INVENTORY_ALL); if (nItemCount < 2) { // clear the list lMail = []; } if (nItemCount != nLastItemCount) { // delete other item type than notecard string cName = "NotEmpty"; integer nCurObj = 0; integer nObjType = INVENTORY_NONE; list lRemove = []; while (cName != "") { cName = llGetInventoryName(INVENTORY_ALL, nCurObj); nCurObj += 1; nObjType = llGetInventoryType(cName); if (nObjType != INVENTORY_NOTECARD) { // add for deletion, its not a notecard lRemove += cName; } } // delete other object than notecard integer nD = 0; for (nD = 0; nD < llGetListLength(lRemove); nD += 1) { // dont remove this script ! cName = llList2String(lRemove, nD); if (cName != llGetScriptName() && cName != "") { llSay(0, "Sorry but " + cName + " is not a notecard."); llRemoveInventory(cName); } } // search for a new notecard integer n_CurObj = 0; string c_Name = "NotEmpty"; while (c_Name != "") { c_Name = llGetInventoryName(INVENTORY_NOTECARD, n_CurObj); llSay(0, c_Name); n_CurObj += 1; // search for this card if (llListFindList(lMail, [c_Name]) == -1 && c_Name != "") { // ok its a new card lMail += [c_Name]; lMail += MAIL_UNREADED; llSay(0, c_Name + " added to the mailbox."); } } } nLastItemCount = llGetInventoryNumber(INVENTORY_ALL); nLastCardCount = llGetInventoryNumber(INVENTORY_NOTECARD); // refresh the text TxtRefresh(); } }
-
Thanks for the help. I think I might have been having inworld issues as I got stuck for ages trying to re-open the script. I have cleaned it up now and it is working again The script did have the UUIDs of the textures in inworld, so that wasn't the problem. Just SL.
-
I should have known it would be a rogue bracket, now I feel silly. LOL. You mention indenting brackets and I have noticed how scripters do that. But I wasn't sure when to indent and when not to, as some of the brackets seem in line with each other. (I seem to be having inworld issues now trying to open the object and the script I am working on)
-
Oh sorry. I should have said that I haven't put the texture UUIDs in. I realise how they are meant to be added and in the script inworld they are there Thank you for the suggestion though...
-
I've been tinkering around with the script I set out to create in this thread and have hit a stumbling block. I wanted to see if I could make it so that only I, as owner, could change the texture. This came about when I realised that if I wanted to control it, rather than visitors changing the texture all the time, I needed to add something. I visited the College of Scripting and did some wiki searching etc. I got this far. It accepts the script and saves it but then nothing happens, no texture changing anymore. I think I am missing a chunk but am not sure what. Can anyone help me along? list textures = ["123"]; integer textures_number; integer current_index; default { state_entry() { textures_number = llGetListLength(textures); } touch_start(integer detected_number) {if(llDetectedKey(0) == llGetOwner()) {llSetTexture(llList2String(textures,current_index),0); if(++current_index >= textures_number) current_index = 0; } } }
-
Thank you all so much for the advice and suggestions. I'm looking forward to starting a new education! Tali