Jump to content

Surssin

Resident
  • Posts

    40
  • Joined

  • Last visited

Reputation

16 Good

Recent Profile Visitors

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

  1. That was the missing bit. I feel silly because I knew I needed the "GetOwner" part, but I couldn't add it without getting an error. Now I see what I was missing. It works as desired now. Thank you!
  2. I can't seem to get it to work. I can get it to detect if I'm sitting when I attach it, but I can't get a timer to recheck the status of sitting/not. My best effort. integer gSitting; integer sit; key ID; default { state_entry() { llSetTimerEvent(5.0); } attach(key ID) { sit = llGetAgentInfo(ID); if (sit & AGENT_SITTING) { llOwnerSay("Is sitting"); } else { llOwnerSay("Has stood up"); } } timer() { key ID; integer sitting = llGetAgentInfo(ID)&(AGENT_SITTING|AGENT_ON_OBJECT); if(sitting!=gSitting) { gSitting=sitting; if(gSitting) { llOwnerSay("Is sitting"); } else { llOwnerSay("Has stood up"); } llOwnerSay((string)sitting); } } }
  3. hm, when I try it, I don't get the responses when I sit on something. I'll try the adjustments you mentioned after work. Unless someone has a different way to do it.
  4. I don't care what I'm sitting on. It's all about "am I sitting?" I managed to man-handle the example into accurately detecting sit on attach. So that's one part down. Thanks for that. Now I just need help with the timer part, or whatever I need, to have it detect when I stand up.
  5. I swear I've tried to find ways to do it, so I'm probably looking right past some simple example. I want to have an attachment react to the wearer sitting vs not sitting. Both when it's attached, or just "oh hey, you're sitting now. We're going to do X. Oh you stood up? Okay. We'll do Y." I'm confident I can get it to do what I want it too when those states are detected, but I can't figure out how to get it to detect sitting vs not. I saw about the llGetAgentInfo, but I'm at a loss as to how to use that to do what I'm looking for. P.S. Noob scriptor. Forgive me missing anything simple.
  6. For someone better than me, I have absolutely no doubt. But this is a system I understand and can adapt to fit my end goals (such as easily adding or removing options). So if I can get it to operate with the main menu, that'll do. I'm not good enough to condense it. And I plan to eventually sell these scripts so people can build their own gags like I did. Getting someone to do all of that work for free or a price I can afford with that understanding is highly unlikely.
  7. well that's progress. I FINALLY had it save without any error messages! ...Now I just gotta get the link stuff part to ACTUALLY work (it doesn't right now). But still, thank you!
  8. Sheesh. How does anyone stay sane doing this? It's like pulling weeds. Got that fixed (I think), but now on the line listed below, it's giving me a "name not defined within scope" error. if(option == "RLV 1...")
  9. I don't think that's it. With out that line, I get a "Dead code found beyond return statement" error, and STILL get the other error as well. I added that in as an attempt at a cheat to get around that. Edit: The "Not all code paths return a value" error jumps to the end of the script, if that helps.
  10. So with a little help I DID finally clear the syntax error. Had to cheat a little to get around a "dead code" error, but now I get a different one; "Not all code paths return a value" I think it's time I just posted the whole second script (the first one is behaving, though no idea if the linking works yet), and see if I can get schooled on what I'm missing and how to make what I want to happen, happen. For reference, "RLV 1..." is the first page of this second script's menu, and the one the main menu would call up when someone chooses "RLV" on the main meny. I'll also need to tune things so that when "Main Menu" is chosen, you get the main menu. integer RLVFlags=65533; list pList; key tkey; RLVRefresh() { if(RLVFlags & 4) trestrict += ",showinv=y"; else trestrict += ",showinv=n"; if(RLVFlags & 32) trestrict += ",addoutfit=y,addattach=y"; else trestrict += ",addoutfit=n,addattach=n"; if(RLVFlags & 64) trestrict += ",remoutfit=y,remattach=y"; else trestrict += ",remoutfit=n,remattach=n"; if(RLVFlags & 128) trestrict += ",touchattachother=y"; else trestrict += ",touchattachother=n"; if(RLVFlags & 256) trestrict += ",touchattachself=y"; else trestrict += ",touchattachself=n"; if(RLVFlags & 512) trestrict += ",touchworld=y"; else trestrict += ",touchworld=n"; if(RLVFlags & 1024) trestrict += ",edit=y"; else trestrict += ",edit=n"; if(RLVFlags & 2048) trestrict += ",rez=y"; else trestrict += ",rez=n"; if(RLVFlags & 4096) trestrict += ",touchfar=y"; else trestrict += ",touchfar=n"; if(RLVFlags & 8192) trestrict += ",sittp=y"; else trestrict += ",sittp=n"; if(RLVFlags & 16384) trestrict += ",showworldmap=y,showminimap=y"; else trestrict += ",showworldmap=n,showminimap=n"; if(RLVFlags & 24) trestrict += ",shownearby=y,shownametags=y"; else trestrict += ",shownearby=n,shownametags=n"; if(RLVFlags & 32768) trestrict += ",startim=y"; else trestrict += ",startim=n"; llOwnerSay(trestrict); } string IsOffOn(integer value) { if(value) return "off"; return "on"; } string IsBlockedAllowed(integer value) { if(value) return "allowed"; return "BLOCKED"; } string At() { { } if(option == "RLV 1...") { tstring = "Configure the current RLV options (1/2).\nRLV is currently "; if(RLVFlags & 1) tstring += "ACTIVE\n\n"; else tstring += "DISABLED\n\n"; tstring += "Current Restrictions:"+"\nInventory - "+ IsBlockedAllowed(RLVFlags & 4) +"\nWear clothing - "+ IsBlockedAllowed(RLVFlags & 32) +"\nUnwear clothing - "+ IsBlockedAllowed(RLVFlags & 64) +"\nTouch attach (other) - "+ IsBlockedAllowed(RLVFlags & 128) +"\nTouch attach (self) - "+ IsBlockedAllowed(RLVFlags & 256) +"\nTouch world - "+ IsBlockedAllowed(RLVFlags & 512) +"\n(More on page 2)"; tlist = ["Disable All RLV", "Unwear "+ IsOffOn(RLVFlags & 64), "Touch Wld "+ IsOffOn(RLVFlags & 512), "Enable Most RLV", "Wear "+ IsOffOn(RLVFlags & 32), "Touch Sel "+ IsOffOn(RLVFlags & 256), "Enable All RLV", "Inv. "+ IsOffOn(RLVFlags & 4), "Touch Oth "+ IsOffOn(RLVFlags & 128), "Main Menu", "RLV 2..."]; } else if(option == "RLV 2...") { tstring = "Configure the current RLV options (2/2).\nRLV is currently "; if(RLVFlags & 1) tstring += "ACTIVE\n\n"; else tstring += "DISABLED\n\n"; tstring += "Current restrictions:\nEdit - "+ IsBlockedAllowed(RLVFlags & 1024) +"\nRez - "+ IsBlockedAllowed(RLVFlags & 2048) +"\nMaps & Location "+ IsBlockedAllowed(RLVFlags & 16384) +"\nFar touch - "+ IsBlockedAllowed(RLVFlags & 4096) +"\nFar sit - "+ IsBlockedAllowed(RLVFlags & 8192) +"\nStartIM - "+ IsBlockedAllowed(RLVFlags & 32768) +"\nNametags & Radar - "+ IsBlockedAllowed(RLVFlags & 24) +"\n(More on page 1)"; tlist = ["Disable All RLV", "Maps "+ IsOffOn(RLVFlags & 16384), "Nametags "+ IsOffOn(RLVFlags & 24), "Enable Most RLV", "Rez "+ IsOffOn(RLVFlags & 2048), "StartIM "+ IsOffOn(RLVFlags & 32768), "Enable All RLV", "Edit "+ IsOffOn(RLVFlags & 1024), "Farsit "+ IsOffOn(RLVFlags & 8192), "Main Menu", "RLV 1...", "Fartouch "+ IsOffOn(RLVFlags & 4096)]; } else if(llSubStringIndex(message, "Inv. ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 4) ^ 4); else RLVFlags = RLVFlags | 4; remenu = "RLV..."; } else if(llSubStringIndex(message, "Wear ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 32) ^ 32); else RLVFlags = RLVFlags | 32; remenu = "RLV..."; } else if(llSubStringIndex(message, "Unwear ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 64) ^ 64); else RLVFlags = RLVFlags | 64; remenu = "RLV..."; } else if(llSubStringIndex(message, "Touch Oth ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 128) ^ 128); else RLVFlags = RLVFlags | 128; remenu = "RLV..."; } else if(llSubStringIndex(message, "Touch Sel ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 256) ^ 256); else RLVFlags = RLVFlags | 256; remenu = "RLV..."; } else if(llSubStringIndex(message, "Touch Wld ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 512) ^ 512); else RLVFlags = RLVFlags | 512; remenu = "RLV..."; } else if(llSubStringIndex(message, "Edit ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 1024) ^ 1024); else RLVFlags = RLVFlags | 1024; remenu = "RLV 2..."; } else if(llSubStringIndex(message, "Rez ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 2048) ^ 2048); else RLVFlags = RLVFlags | 2048; remenu = "RLV 2..."; } else if(llSubStringIndex(message, "Fartouch ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 4096) ^ 4096); else RLVFlags = RLVFlags | 4096; remenu = "RLV 2..."; } else if(llSubStringIndex(message, "Farsit ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 8192) ^ 8192); else RLVFlags = RLVFlags | 8192; remenu = "RLV 2..."; } else if(llSubStringIndex(message, "StartIM ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 32768) ^ 32768); else RLVFlags = RLVFlags | 32768; remenu = "RLV 2..."; } else if(llSubStringIndex(message, "Maps ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 16384) ^ 16384); else RLVFlags = RLVFlags | 16384; remenu = "RLV 2..."; } else if(llSubStringIndex(message, "Nametags ") == 0) { if(llGetSubString(message, -3, -1) == "off") RLVFlags = ((RLVFlags | 24) ^ 24); else RLVFlags = RLVFlags | 24; remenu = "RLV 2..."; } else if(message == "Enable Most RLV") { RLVFlags = ((RLVFlags | 4) ^ 4); RLVFlags = ((RLVFlags | 32) ^ 32); RLVFlags = ((RLVFlags | 64) ^ 64); RLVFlags = ((RLVFlags | 128) ^ 128); RLVFlags = ((RLVFlags | 256) ^ 256); RLVFlags = ((RLVFlags | 1024) ^ 1024); RLVFlags = ((RLVFlags | 2048) ^ 2048); RLVFlags = ((RLVFlags | 16384) ^ 16384); remenu = "RLV..."; } else if(message == "Enable All RLV") { RLVFlags = ((RLVFlags | 4) ^ 4); RLVFlags = ((RLVFlags | 32) ^ 32); RLVFlags = ((RLVFlags | 64) ^ 64); RLVFlags = ((RLVFlags | 128) ^ 128); RLVFlags = ((RLVFlags | 256) ^ 256); RLVFlags = ((RLVFlags | 512) ^ 512); RLVFlags = ((RLVFlags | 1024) ^ 1024); RLVFlags = ((RLVFlags | 2048) ^ 2048); RLVFlags = ((RLVFlags | 4096) ^ 4096); RLVFlags = ((RLVFlags | 8192) ^ 8192); RLVFlags = ((RLVFlags | 16384) ^ 16384); remenu = "RLV..."; } else if(message == "Unsit") { llOwnerSay("@unsit=force"); remenu = "RLV..."; } else if(message == "Disable All RLV") { RLVFlags = RLVFlags | 65533; remenu = "RLV..."; } else if(message == "Main Menu") { llMessageLinked(LINK_THIS,0,"Main Menu",""); } else if(message == "Clear") { RLVFlags = RLVFlags | 65533; } } default { state_entry() { } }
  11. Like I said, just way above my head. Thank you for trying, but really I'm pretty much just giving up. It's more complex than I can manage right now.
  12. Well one script it's saying the error is the very last bracket at the end. not sure how to post that one. The other is this section, with a little bit above and below for some context. (I haven't added MY options/commands to it yet)
  13. Nope, my brain is fried. Thank you all for trying, but I think this is beyond me. I'm gonna need to find someone to make these changes for me.
  14. It's telling me the error is at the very very end. The final bracket. I've tried to match them up but I can't seem to.
  15. I've tried and tried, and to me it seems like it should be fine and match up, but I still get the same syntax error.
×
×
  • Create New...