Jump to content

MCSythera

Resident
  • Posts

    17
  • Joined

  • Last visited

Everything posted by MCSythera

  1. Oh! I wasn't being clear. I'm not using the same example as before where I was using parallel lists of IDs and names. I'm only using a list of IDs, and extracting the name from the ID for use in the dialog buttons. The names are not actually stored anywhere but during the sorting of the buttons when displayed (tempStorage). But yeah, I changed my else if to else, so that it does work, because msg is the name on the button, so I can just use msg itself without evaluating it in any way. Essentially, it means that I account for all pre-made dialog options, forward and back buttons included. The only other buttons displayed are the names of the evaluated IDs in the list, so that if any name is clicked, it automatically does the action I want for that name using msg to determine that clicked name.
  2. Yeah, they would be. Because to build the buttons all I did was filter out the display name from the ID. So ID at position 3 would have display name name and clicking name on the menu button would be the 4th button. What I didn't understand above was how to go through the lists of IDs to get the same position as the button with name on it, while listening for name and not a position or ID.
  3. But the buttons in the menu are the first display name of that avatar ID. So the button selection is not in the list. Instead, I've just changed else if to else and that way when they select an option not on the standard menu options (IE: a name from the sensor sweep), it will just say their name via msg.
  4. Oh, so the check would be as simple as else if(~llListFindList(detected,[msg])){ time = 0; llPlaySound(“475a3e83-6801-49c6-e7ad-d6386b2ecc29”,1.0); llSay(0,”Sythera spanks “+msg+” hard!”);} That checks the entire list, 0 (first selection) included, and if the selection is in the list, says the name that was selected? Or would that just return it as the number where the selection is in that list, and output a number instead of the button name? I can already see the issue that that, as the 'detected' list is a series of IDs, from which the names are drawn into tempStorage for the selection. How would I get the list position that is clicked to determine, in this case, who to spank?
  5. Okay, I don't really know how to implement those into a listener. integer idx = llListFindList(detected,[msg]); key idxID = llList2Key(detected,idx); if(msg == llList2String(llParseString2List(llGetDisplayName(idxID),[" "],[]),0)){ time = 0; string spanked = llList2String(llParseString2List(llGetDisplayName(idxID),[" "],[]),0); llPlaySound("475a3e83-6801-49c6-e7ad-d6386b2ecc29",1.0); llSay(0,"Sythera spanks "+spanked+" hard!"); } Shouldn't that work when the menu buttons are formatted to show llList2String(llParseString2List(llGetDisplayName(avatarUUID),[" "],[]),0)?
  6. I see, very nice. That certainly makes things simpler. Now I notice you keep using ~, in front of the msg for the back and forward buttons, and then above in a check I wouldn't have to do. I looked it up and they don't explain it very well. What does it actually DO in the instance of checking to see if the msg is equal to the forward or back button?
  7. Yes, sorry for not including more of the code, I included what I thought was the issue. Currently the whole thing I have is over 1000 lines, so yeah. But that does look great. I will see about using that. I'm still going to have to rewrite most of the code I have now because I wanted to change a few things. I don't expect the lists to get too high, and I plan to change some of the tests over to use the avatar ID to determine name instead of storing it in a list. But it's still important to have a way to order the lists. Second question, which I have not figured out a good way for, is what should I do for the selection? For example, if someone picks option 15 from page 2, that's obviously just option 15. But right now the only way I've found to do that is to go down the list if(msg == llList2String(collectedAvatarNames,15)){ // do for 15 }. There has to be a better way to do that. I've thought of do-while and for loops, but that always gives me the last option in that list, not the one that is selected.
  8. I have been scouring around for a way to make infinite lists show on dialog menus, as those can only show 12 at a time. The below was modified from Free LSL Scripts. Using 35 test list items, the problem I am encountering is that on the second page, options 10 and 11 repeat. So page one shows 1-11 and the ---> buttons. Page two is ---->, <---- and options 10-19, when it should be 12 to 21. (Page three is 19-28, page four is 28-35, so those two pages only repeat 1.) What would I do to change this? numSouls = llGetListLength(collectedAvatarIDs); if(menuPosition >= 9) tempStorage += " <----"; else{ } if (numSouls > menuPosition+9) tempStorage += " ---->"; else{ } if (numSouls > 0){ integer b = menuPosition; for( ; b < numSouls; b++){ tempStorage = tempStorage + [llList2String(collectedAvatarNames,b)]; } } tempStorage = llDeleteSubList(tempStorage,12,999);
  9. That definitely did solve the problem. I haven't debugged it used Whitelisted and Un-Whitelisted avatars yet, nor tested the locking with another person, but the options do show up. Now I just have to figure out a loop and where to put it so that the Back function works properly. Then to testing! Thank you very much for your assistance.
  10. I'll give you all the examples I can. The first is the Whitelist All and Lock All / Un-whitelist All and Unlock All options. These appear in the main menu when you first click the object this script is in, and is governed by the following code block: if(N == llGetOwner()){ if(lockALL == FALSE & WLlockALL == FALSE){ llDialog(N,"Owner Option1 Options",SELECTION+["Lock"]+["Whitelist Only"],chan); } if(lockALL == FALSE & WLlockALL == TRUE){ llDialog(N,"Owner Options",SELECTION+["Lock"]+["No Whitelist"],chan); } if(lockALL == TRUE & WLlockALL == FALSE){ llDialog(N,"Owner Options",SELECTION+["Unlock"]+["Whitelist Only"],chan); } if(lockALL == TRUE & WLlockALL == TRUE){ llDialog(N,"Owner Options",SELECTION+["Unlock"]+["No Whitelist"],chan); } } That code presents the initial list "SELECTION" plus the options to Lock, Unlock, Whitelist, or Un-whitelist all submenus, which is governed by the following code block: if(Selection == "Lock"){ //Owner Command lockALL = TRUE; lockOption5 = TRUE; lockOption6 = TRUE; lockOption7 = TRUE; lockOption8 = TRUE; llOwnerSay("All options have been locked."); llListenRemove(listener); } if(Selection == "Unlock"){ //Owner Command lockALL = FALSE; lockOption5 = FALSE; lockOption6 = FALSE; lockOption7 = FALSE; lockOption8 = FALSE; llOwnerSay("All options have been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Only"){ //Owner Command WLlockALL = TRUE; WLlockOption5 = TRUE; WLlockOption6 = TRUE; WLlockOption7 = TRUE; WLlockOption8 = TRUE; llOwnerSay("All options are now whitelisted."); llListenRemove(listener); } if(Selection == "No Whitelist"){ //Owner Command WLlockALL = FALSE; WLlockOption5 = FALSE; WLlockOption6 = FALSE; WLlockOption7 = FALSE; WLlockOption8 = FALSE; llOwnerSay("All options are no longer whitelisted."); llListenRemove(listener); } WLlockALL and lockALL govern some of the responses to people trying to access a submenu when the value is TRUE, telling them the options menu is locked or whitelisted and presenting them with no option to continue. (I think I need to work on this portion a little so the options are never presented. At the moment, I believe the submenus open, but none of the selections do anything.) Now for the submenus. Each one (Option1, Option2, Option3, and Option4) is a submenu governed by its own code block. For example, Option1 is governed by: integer lockOption5 = FALSE;integer WLlockOption5 = TRUE; if(Selection == "Option1" && Name == llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ if(lockOption5 == FALSE && WLlockOption5 == FALSE){ llDialog(ID,"What would you like to?",Option8+["Lock Option1"]+["Whitelist Option1"]+["Back"],Ch); } if(lockOption5 == TRUE && WLlockOption5 == FALSE){ llDialog(ID,"What would you like to do?",Option8+["Unlock Option1"]+["Whitelist Option1"]+["Back"],Ch); } if(lockOption5 == FALSE && WLlockOption5 == TRUE){ llDialog(ID,"What would you like to do?",Option8+["Lock Option1"]+["No Option1 WL"]+["Back"],Ch); } if(lockOption5 == TRUE && WLlockOption5 == TRUE){ llDialog(ID,"What would you like to do?",Option5+["Unlock Option1"]+["No Option1 WL"]+["Back"],Ch); } if(Selection == "Lock Option1"){ lockOption5 = TRUE; llOwnerSay("Option1 menu has been locked."); llListenRemove(listener); } if(Selection == "Unlock Option1"){ lockOption5 = FALSE; llOwnerSay("Option1 menu has been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Option1"){ WLlockOption5 = TRUE; llOwnerSay("Option1 menu has been whitelisted."); llListenRemove(listener); } if(Selection == "No Option1 WL"){ WLlockOption5 = FALSE; llOwnerSay("Option1 menu is no longer whitelisted."); llListenRemove(listener); } } if(Selection == "Option1" && Name != llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ llDialog(ID,"What would you like to do?",Option5+["Back"],Ch); } Lock Option1, Unlock Option1, Whitelist Option1, and No Option1 WL all determine if lockOption5 and WLlockOption5 are TRUE or FALSE. These options only appear to the Owner on the submenu Option1, and change depending on the values of lockOption5 and WLlockOption5. (If lockOption5 is TRUE, the dialog will ask to unlock, and vice versa.) The last statement gives the same options minus the possibility to lock/whitelist or unlock/un-whitelist to someone who is not the owner. This is the type of place where I changed "Name != llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)" to "ID != llGetOwner()". This continues for Option2, Option3, and Option4 in the same manner. The problem is that as it stands, when clicking a Whitelist/Un-white or Lock/Unlock option in Option1-4 submenus, nothing happens. The code states that if you click Lock Option1 under the Option1 submenu, if(Selection == "Lock Option1"){ lockOption5 = TRUE; llOwnerSay("Option1 menu has been locked."); llListenRemove(listener); } Instead, the submenu disappears, lockOption5 does not change value, and there is no llOwnerSay("") event. I have tried moving the "if(Selection == "Lock _______"){ EVENT }" code down to below the code where it Lock/Unlocks, Whitelists/Un-whitelists, to no change. (See below.) if(Selection == "Lock"){ //Owner Command lockALL = TRUE; lockOption5 = TRUE; lockOption6 = TRUE; lockOption7 = TRUE; lockOption8 = TRUE; llOwnerSay("All options have been locked."); llListenRemove(listener); } if(Selection == "Unlock"){ //Owner Command lockALL = FALSE; lockOption5 = FALSE; lockOption6 = FALSE; lockOption7 = FALSE; lockOption8 = FALSE; llOwnerSay("All options have been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Only"){ //Owner Command WLlockALL = TRUE; WLlockOption5 = TRUE; WLlockOption6 = TRUE; WLlockOption7 = TRUE; WLlockOption8 = TRUE; llOwnerSay("All options are now whitelisted."); llListenRemove(listener); } if(Selection == "No Whitelist"){ //Owner Command WLlockALL = FALSE; WLlockOption5 = FALSE; WLlockOption6 = FALSE; WLlockOption7 = FALSE; WLlockOption8 = FALSE; llOwnerSay("All options are no longer whitelisted."); llListenRemove(listener); } // OPTION1 LOCKS // OPTION2 LOCKS, etc
  11. The problem isn't in the implementation of the submenu options, but the locking and whitelisting of them. I've moved them all from their submenus in the code to under the whitelist and unlock selections, but still nothing. All that happens when you click on the submenu option to whitelist or lock is that the submenu disappears. Nothing happens. I need to know why. I took your advice and changed a lot of the if statements over to else if. I also changed the first avatar name check to "ID == llGetOwner()". I also figured out where the extra closing brace was coming from and fixed it, it was just a tab issue where I had missed one indent and that affected the rest of the code below it.
  12. I have been working on this Whitelist script for a while; completed it once, but now I'm going back to put individual submenu whitelist and lock options in. The problem I am running into is that when I go into the object and select to lock or whitelist an individual submenu, it exits with no result. I have tried moving the selections around to no end, and putting the options into the submenu lists, to no avail. I've filled a lot of the fluff with generic numbers and such, but it has the same format I am using. I know it may be more complex than it needs to be, but that isn't really my primary concern. I also noticed I had to add an additional closing brace at the end, but I'm not sure where it came from. That most likely broke something else I haven't seen yet. list WHITELIST = [ "3883bea1-5f98-4354-88a2-55991d2dfad8" //Sythera // "Future IDs" ]; list SELECTION = [ "Option1","Option2","Option3","Option4"]; list Option5 = [ "Option9","Option10","Option11","Option12","Option13","Option14","Option15","Option16","Option17","Option18"]; list Option6 = [ "Option19","Option20","Option21","Option22","Option23","Option24","Option25","Option26","Option27"]; list Option7 = [ "Option28","Option29","Option30","Option31","Option32","Option33"]; list Option8 = [ "Option34","Option35","Option36","Option37","Option38","Option39","Option40","Option41"]; integer lockALL = FALSE; integer lockOption5 = FALSE; integer lockOption6 = FALSE; integer lockOption7 = FALSE; integer lockOption8 = FALSE; integer WLlockALL = TRUE; integer WLlockOption5 = TRUE; integer WLlockOption6 = TRUE; integer WLlockOption7 = TRUE; integer WLlockOption8 = TRUE; integer listener; string owner; integer Whitelist_Check(string check){ return ~llListFindList(WHITELIST,[check]); } default{ attach(key z){ llResetScript(); } on_rez(integer z){ llResetScript(); } state_entry(){ llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION| PERMISSION_TAKE_CONTROLS | PERMISSION_ATTACH); } touch_start(integer total_number){ integer chan = 100+(integer)llFrand(50000); string origName = llGetObjectName(); llSetObjectName("Obj New Name"); listener = llListen(chan,"","",""); key N = llDetectedKey(0); if(N == llGetOwner()){ if(lockALL == FALSE & WLlockALL == FALSE){ llDialog(N,"Owner Option1 Options",SELECTION+["Lock"]+["Whitelist Only"],chan); } if(lockALL == FALSE & WLlockALL == TRUE){ llDialog(N,"Owner Options",SELECTION+["Lock"]+["No Whitelist"],chan); } if(lockALL == TRUE & WLlockALL == FALSE){ llDialog(N,"Owner Options",SELECTION+["Unlock"]+["Whitelist Only"],chan); } if(lockALL == TRUE & WLlockALL == TRUE){ llDialog(N,"Owner Options",SELECTION+["Unlock"]+["No Whitelist"],chan); } } else if(lockALL == FALSE){ llDialog(N,"What would you like to do?",SELECTION,chan); } else{ llInstantMessage(N,"Locked."); llListenRemove(listener); } } listen(integer Ch, string Name, key ID, string Selection){ Name = llList2String(llParseString2List(llGetDisplayName(ID),[" "],[]),0); if(Selection == "Option1" && Name == llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ if(lockOption5 == FALSE && WLlockOption5 == FALSE){ llDialog(ID,"What would you like to?",Option8+["Lock Option1"]+["Whitelist Option1"]+["Back"],Ch); } if(lockOption5 == TRUE && WLlockOption5 == FALSE){ llDialog(ID,"What would you like to do?",Option8+["Unlock Option1"]+["Whitelist Option1"]+["Back"],Ch); } if(lockOption5 == FALSE && WLlockOption5 == TRUE){ llDialog(ID,"What would you like to do?",Option8+["Lock Option1"]+["No Option1 WL"]+["Back"],Ch); } if(lockOption5 == TRUE && WLlockOption5 == TRUE){ llDialog(ID,"What would you like to do?",Option5+["Unlock Option1"]+["No Option1 WL"]+["Back"],Ch); } if(Selection == "Lock Option1"){ lockOption5 = TRUE; llOwnerSay("Option1 menu has been locked."); llListenRemove(listener); } if(Selection == "Unlock Option1"){ lockOption5 = FALSE; llOwnerSay("Option1 menu has been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Option1"){ WLlockOption5 = TRUE; llOwnerSay("Option1 menu has been whitelisted."); llListenRemove(listener); } if(Selection == "No Option1 WL"){ WLlockOption5 = FALSE; llOwnerSay("Option1 menu is no longer whitelisted."); llListenRemove(listener); } } if(Selection == "Option1" && Name != llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ llDialog(ID,"What would you like to do?",Option5+["Back"],Ch); } if(Selection == "Option2" && Name == llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ if(lockOption6 == FALSE && WLlockOption6 == FALSE){ llDialog(ID,"What would you like to do?",Option6+["Lock Option2"]+["Whitelist Option2"]+["Back"],Ch); } if(lockOption6 == TRUE && WLlockOption6 == FALSE){ llDialog(ID,"What would you like to do?",Option6+["Unlock Option2"]+["Whitelist Option2"]+["Back"],Ch); } if(lockOption6 == FALSE && WLlockOption6 == TRUE){ llDialog(ID,"What would you like to do?",Option6+["Lock Option2"]+["No Option2 WL"]+["Back"],Ch); } if(lockOption6 == TRUE && WLlockOption6 == TRUE){ llDialog(ID,"What would you like to do?",Option6+["Unlock Option2"]+["No Option2 WL"]+["Back"],Ch); } if(Selection == "Lock Option2"){ lockOption6 = TRUE; llOwnerSay("Option2 menu has been locked."); llListenRemove(listener); } if(Selection == "Unlock Option2"){ lockOption6 = FALSE; llOwnerSay("Option2 menu has been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Option2"){ WLlockOption6 = TRUE; llOwnerSay("Option2 menu has been whitelisted."); llListenRemove(listener); } if(Selection == "No Option2 WL"){ WLlockOption6 = FALSE; llOwnerSay("Option2 menu is no longer whitelisted."); llListenRemove(listener); } } if(Selection == "Option2" && Name != llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ llDialog(ID,"What would you like to do?",Option6+["Back"],Ch); } if(Selection == "Option3" && Name == llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ if(lockOption7 == FALSE && WLlockOption7 == FALSE){ llDialog(ID,"What would you like to do?",Option7+["Lock Option3"]+["Whitelist Option3"]+["Back"],Ch); } if(lockOption7 == TRUE && WLlockOption7 == FALSE){ llDialog(ID,"What would you like to do?",Option7+["Unlock Option3"]+["Whitelist Option3"]+["Back"],Ch); } if(lockOption7 == FALSE && WLlockOption7 == TRUE){ llDialog(ID,"What would you like to do?",Option7+["Lock Option3"]+["No Option3 WL"]+["Back"],Ch); } if(lockOption7 == TRUE && WLlockOption7 == TRUE){ llDialog(ID,"What would you like to do?",Option7+["Unlock Option3"]+["No Option3 WL"]+["Back"],Ch); } if(Selection == "Lock Option3"){ lockOption7 = TRUE; llOwnerSay("Option3 menu has been locked."); llListenRemove(listener); } if(Selection == "Unlock Option3"){ lockOption7 = FALSE; llOwnerSay("Option3 menu has been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Option3"){ WLlockOption7 = TRUE; llOwnerSay("Option3 menu has been whitelisted."); llListenRemove(listener); } if(Selection == "No Option3 WL"){ WLlockOption7 = FALSE; llOwnerSay("Option3 menu is no longer whitelisted."); llListenRemove(listener); } } if(Selection == "Option3" && Name != llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ llDialog(ID,"What would you like to do?",Option7+["Back"],Ch); } if(Selection == "Option4" && Name == llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ if(lockOption8 == FALSE && WLlockOption8 == FALSE){ llDialog(ID,"What would you like to do?",Option8+["Lock Option4"]+["Whitelist Option4"]+["Back"],Ch); } if(lockOption8 == TRUE && WLlockOption8 == FALSE){ llDialog(ID,"What would you like to do?",Option8+["Unlock Option4"]+["Whitelist Option4"]+["Back"],Ch); } if(lockOption8 == FALSE && WLlockOption8 == TRUE){ llDialog(ID,"What would you like to do?",Option8+["Lock Option4"]+["No Option4 WL"]+["Back"],Ch); } if(lockOption8 == TRUE && WLlockOption8 == TRUE){ llDialog(ID,"What would you like to do?",Option8+["Unlock Option4"]+["No Option4 WL"]+["Back"],Ch); } if(Selection == "Lock Option4"){ lockOption8 = TRUE; llOwnerSay("Option4 menu has been locked."); llListenRemove(listener); } if(Selection == "Unlock Option4"){ lockOption8 = FALSE; llOwnerSay("Option4 menu has been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Option4"){ WLlockOption8 = TRUE; llOwnerSay("Option4 menu has been whitelisted."); llListenRemove(listener); } if(Selection == "No Option4 WL"){ WLlockOption8 = FALSE; llOwnerSay("Option4 menu is no longer whitelisted."); llListenRemove(listener); } } if(Selection == "Option4" && Name != llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ llDialog(ID,"What would you like to do?",Option8+["Back"],Ch); } if(Selection == "Back"){ if(Name == llList2String(llParseString2List(llGetDisplayName(llGetOwner()),[" "],[]),0)){ if(lockALL == FALSE & WLlockALL == FALSE){ llDialog(ID,"Owner Options",SELECTION+["Lock"]+["Whitelist Only"],Ch); } if(lockALL == FALSE & WLlockALL == TRUE){ llDialog(ID,"Owner Options",SELECTION+["Lock"]+["No Whitelist"],Ch); } if(lockALL == TRUE & WLlockALL == FALSE){ llDialog(ID,"Owner Options",SELECTION+["Unlock"]+["Whitelist Only"],Ch); } if(lockALL == TRUE & WLlockALL == TRUE){ llDialog(ID,"Owner Options",SELECTION+["Unlock"]+["No Whitelist"],Ch); } } else if(lockALL == FALSE){ llDialog(ID,"What would you like to play with?",SELECTION,Ch); } else{ llInstantMessage(ID,"All options are locked."); llListenRemove(listener); } if(Selection == "Lock"){ //Owner Command lockALL = TRUE; lockOption5 = TRUE; lockOption6 = TRUE; lockOption7 = TRUE; lockOption8 = TRUE; llOwnerSay("All options have been locked."); llListenRemove(listener); } if(Selection == "Unlock"){ //Owner Command lockALL = FALSE; lockOption5 = FALSE; lockOption6 = FALSE; lockOption7 = FALSE; lockOption8 = FALSE; llOwnerSay("All options have been unlocked."); llListenRemove(listener); } if(Selection == "Whitelist Only"){ //Owner Command WLlockALL = TRUE; WLlockOption5 = TRUE; WLlockOption6 = TRUE; WLlockOption7 = TRUE; WLlockOption8 = TRUE; llOwnerSay("All options are now whitelisted."); llListenRemove(listener); } if(Selection == "No Whitelist"){ //Owner Command WLlockALL = FALSE; WLlockOption5 = FALSE; WLlockOption6 = FALSE; WLlockOption7 = FALSE; WLlockOption8 = FALSE; llOwnerSay("All options are no longer whitelisted."); llListenRemove(listener); } if(WLlockOption5 == TRUE && lockOption5 == FALSE){ if(Whitelist_Check((string)ID)){ if(Selection == "Option17"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option18"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option16"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option15"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option9"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option10"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option11"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option12"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option13"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option14"){ // Option5 llSay(0,"Result."); llListenRemove(listener); } } else{ llOwnerSay("Someone tried to use an Option5, but it was whitelisted."); } } else if(lockOption5 == TRUE){ llInstantMessage(ID,"All options are locked."); } if(WLlockOption6 == TRUE && lockOption6 == FALSE){ if(Whitelist_Check((string)ID)){ if(Selection == "Option19"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option20"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option21"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option22"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option23"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option24"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option25"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option26"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option27"){ // Option6 llSay(0,"Result."); llListenRemove(listener); } } else{ llOwnerSay("Someone tried to use Option6, but it is whitelisted."); } } else if(lockOption6 == TRUE){ llInstantMessage(ID,"All options are locked."); } if(WLlockOption7 == TRUE && lockOption7 == FALSE){ if(Whitelist_Check((string)ID)){ if(Selection == "Option28"){ // Option7 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option29"){ // Option7 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option30"){ // Option7 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option31"){ // Option7 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option32"){ // Option7 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option33"){ // Option7 llSay(0,"Result."); llListenRemove(listener); } } else{ llOwnerSay("Someone tried to use Option7, but it is whitelisted."); llListenRemove(listener); } } else if(lockOption7 == TRUE){ llInstantMessage(ID,"All options are locked."); llListenRemove(listener); } if(WLlockOption8 == TRUE && lockOption8 == FALSE){ if(Whitelist_Check((string)ID)){ if(Selection == "Option34"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option35"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option36"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option37"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option38"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option39"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option40"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } if(Selection == "Option41"){ // Option8 llSay(0,"Result."); llListenRemove(listener); } } else{ llOwnerSay("Someone tried to use Option8, but it is whitelisted."); llListenRemove(listener); } } else if(lockOption8 == TRUE){ llInstantMessage(ID,"All options are locked."); llListenRemove(listener); } if(WLlockALL == FALSE && lockALL == FALSE){ if(Selection == "Option17"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option18"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option16"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option15"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option9"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option10"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option11"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option12"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option13"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option14"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option19"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option20"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option21"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option22"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option23"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option24"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option25"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option26"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option28"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option29"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option30"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option31"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option32"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option34"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option35"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option36"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option37"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option38"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option39"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option27"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option33"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option40"){ llSay(0,"Result2."); llListenRemove(listener); } if(Selection == "Option41"){ llSay(0,"Result2."); llListenRemove(listener); } } } } }
  13. The reason I asked here was because I did not understand how the examples would be put or lined up in a menu option. Would I simply create several lines of offset.x, offset.y, and offset.z and make them equal to the position I wanted? Do I need to do the vectors for the degrees, change it to Radians, and then change it to a Rotation? My best guess on that would leave me with about 7-10 more lines, but I don't think it is that easy.
  14. I'm currently wearing a collar that doesn't match the three different avatars I use very well without constantly changing it. I've read up about llSetPos and llSetRot and the variations branching down from those, but I could use a bit of help and more information about how this would work. My intention is to add a script option to the base menu of the collar that allows the option to choose an avatar, and adjust the collar's rotation, location and size based on the selection. For example, the first menu would add the option Avatars, in which there are the three options for my current variations. Clicking Variation 1 would yield one set of coordinates, alongside a rotation and size that differs from Variation 2 and 3, and so on.
  15. If you mean that anything returned is their username instead of their display name, that is already taken care of by the script. Name will always be the first part of their display name because of the line "Name = llList2String(llParseString2List(llGetDisplayName(ID),[" "],[]),0);" a few lines under where the Listen function starts. If you mean the name of the object given on the menus, where would I place that line?
  16. When I tried to make 1 Allow/Deny menu, it ended up playing all three options as output because the names were the same on all of them (hence the Allow ____ and Deny _____ for each). I'm not sure how I'd go about it otherwise. As to your solution, it works very well. And I certainly never would have thought of that. I also removed the X = Name; in those sections and just kept the X's where they were in the dialog. Works like a charm and it is now fully functional! Gave it a few tests with a friend and it is perfect. Kudos to you and many thanks for that amazing, yet simple solution!
  17. list Menu = [ "Friendly","Mean","Dirty"]; list Friendly = [ "Stroke","Nuzzle","Nibble","Hug","Scratch","Stare","Main Menu"]; list Mean = [ "Flick","Tug","Bite","Stomp","Snip","Burn","Main Menu"]; list Dirty = [ "Lick","Hump","Lift","Main Menu"]; integer listener; key Clicker; default{ state_entry(){ llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION| PERMISSION_TAKE_CONTROLS | PERMISSION_ATTACH); } touch_start(integer total_number){ string owner; string origName = llGetObjectName(); owner = llGetDisplayName(llGetOwner()); llSetObjectName("Sythera's Tail"); listener = llListen(112988,"","",""); llDialog(llDetectedKey(0),owner+"'s Tail: Main Selection Menu",Menu,112988); } listen(integer Ch, string Name, key ID, string Selection){ string origName = llGetObjectName(); string owner; owner = llGetDisplayName(llGetOwner()); Name = llList2String(llParseString2List(llGetDisplayName(ID),[" "],[]),0); llSetObjectName("Sythera's Tail"); if(Selection == "Friendly"){ listener = llListen(112981,"","",""); llDialog(ID,owner+"'s Tail: Secondary Selection Menu: Friendly",Friendly,112981); } if(Selection == "Main Menu"){ listener = llListen(112987,"","",""); llDialog(ID,owner+"'s Tail: Main Selection Menu",Menu,112987); } if(Selection == "Stroke"){ llListenRemove(listener); llSay(0,""+Name+" strokes their fingers through "+owner+"'s tail, getting a happy murr in response."); } if(Selection == "Nuzzle"){ llListenRemove(listener); llSay(0,""+Name+" nuzzles their head against "+owner+"'s tail, getting a pleased sigh."); } if(Selection == "Nibble"){ llListenRemove(listener); llSay(0,Name+" nibbles on "+owner+"'s tail softly, getting a playful twitch and giggle as a sign to continue."); } if(Selection == "Hug"){ llListenRemove(listener); llSay(0,Name+" hugs "+owner+"'s tail tightly, never wanting to let it go."); } if(Selection == "Scratch"){ llListenRemove(listener); llSay(0,Name+" scratches "+owner+"'s tail, receiving a soft moan for their efforts."); } if(Selection == "Stare"){ llListenRemove(listener); llSay(0,Name+" stares at "+owner+"'s tail, though whether from longing or admiration is uncertain."); } if(Selection == "Mean"){ listener = llListen(112983,"","",""); llDialog(ID,owner+"'s Tail: Secondary Selection Menu: Mean",Mean,112983); } if(Selection == "Flick"){ llListenRemove(listener); llSay(0,Name+" flicks "+owner+"'s tail, getting a paw to the back of their head in return."); } if(Selection == "Tug"){ llListenRemove(listener); llSay(0,Name+" tugs "+owner+"'s tail hard, getting her attention right quick. She turns and stares daggers at them."); } if(Selection == "Bite"){ llListenRemove(listener); llSay(0,Name+" bites down on "+owner+"'s tail. She yelps and turns around quickly, beating them mercilessly into submission."); } if(Selection == "Stomp"){ llListenRemove(listener); llSay(0,Name+" stomps their foot down onto "+owner+"'s tail. She whimpers and clutches her tail, curling up into a ball and crying softly. Meany!"); } if(Selection == "Snip"){ llListenRemove(listener); llSay(0,Name+" takes a pair of sissors and snips off a chunk of "+owner+"'s tail. When she realizes what they have done, she snatches her fur away from them and confiscates the sissors. Little do they know she will come for them while they are sleeping."); } if(Selection == "Burn"){ llListenRemove(listener); llSay(0,Name+" lights a small portion of "+owner+"'s tail on fire and watches as it spreads. She yelps when she sees what is happening and runs frantically around until someone puts her tail out. The singed remains of one side of her tail are no comparison to the hellfire burning in her eyes as she stares at the person responsible for this event."); } if(Selection == "Dirty"){ listener = llListen(112985,"","",""); llDialog(ID,owner+"'s Tail: Secondary Selection Menu: Dirty",Dirty,112985); } string X = llList2String(llParseString2List(llGetDisplayName(ID),[" "],[]),0); if(Selection == "Lick"){ llListenRemove(listener); listener = llListen(92612,"",owner,""); llDialog(llGetOwner(),""+Name+" would like to LICK your tail.",["Allow Lick","Deny Lick"],92612); } if(Selection == "Allow Lick"){ { llSay(0,""+X+" kneels behind "+owner+" and begins to lick her tail.."); } } else if(Selection == "Deny Lick"){ { llSay(0,""+X+" tries to lick "+owner+"'s tail, but gets batted away."); } } if(Selection == "Hump"){ llListenRemove(listener); listener = llListen(92612,"",owner,""); llDialog(llGetOwner(),""+Name+" would like to HUMP your tail.",["Allow Hump","Deny Hump"],92612); X = Name; } if(Selection == "Allow Hump"){ { llSay(0,""+X+" paces around behind "+owner+" and presses themselves against her back.."); } } else if(Selection == "Deny Hump"){ { llSay(0,""+X+" tries to hump "+owner+"'s tail, but gets batted away."); } } if(Selection == "Lift"){ llListenRemove(listener); listener = llListen(92612,"",owner,""); llDialog(llGetOwner(),""+Name+" would like to LIFT your tail.",["Allow Lift","Deny Lift"],92612); X = Name; } if(Selection == "Allow Lift"){ { llSay(0,""+X+" grabs "+owner+"'s tail and lifts it."); } } else if(Selection == "Deny Lift"){ { llSay(0,""+X+" tries to lift "+owner+"'s tail, but gets batted away."); } } llSetObjectName( origName ); } } The code above has been altered to show significantly less of the Dirty Menu, for public viewing. The bold section is where the problem is occuring. Instead of posting an output with the clicker's name as string X, it is posting the owner's name. I believe this is caused by the Allow/Deny menu changing the ID key of the person, given it is counted as an additional menu. I've tried a number of different things to work around that, finally giving up when I got to this, trying to declare the first ID as a string (X), to retain it's original state. Any help would be greatly appreciated.
×
×
  • Create New...