Jump to content

elleevelyn

Resident
  • Posts

    611
  • Joined

  • Last visited

Everything posted by elleevelyn

  1. on the first you are correct that single script routines execute in order on the second coordinating multi-script flow can be a bit involved as events in the second script(s) occur independent of the first script (as you know). So I think your approach (have the first script change event trigger the notecard reader script) will help with the flow the first script may tho have to wait till the notecard reader script has completed its task. Is a number ways to do this. One way is to raise a flag accessible to both scripts (linkset_data / object description). The first script raising the flag, the notecard reader script lowering the flag on completion. The first script polling the flag til is lowered. Something like: in first script changed (integer change) { if (change & CHANGED_INVENTORY) { ... stop animations ... raise flag (linkset_data or object description) ... link message to notecard reader to start reading // wait for notecard reader to complete // or stop after some_quite_long_time to prevent the script going catatonic // should the notecard reader script fail to complete float pause = llGetTime() + some_quite_long_time; while ((flag is raised) && (llGetTime() < pause)) { llSleep(1.0); // .. this sleep helps prevent wait from over-thrashing } if (flag is raised) { ... notecard reader script has failed to complete in some_quite_long_time ... do something about it } else { ... we are good to continue } // ... potential catatonic wait method, avoid doing this // ... while (flag is raised); } } in notecard reader script ... on_read_complete, lower flag
  2. be best to begin debugging from the change event. Where in this event are the running animations stopped ? and where in this event are the config cards reread ? If the latter comes first then does the notecard reader set the global variables to 0 ?
  3. a alternative approach can be multiple scripts in the region monitor. Something like: 1) Scanner script: - timer scan for agents on region llGetAgentList(...REGION...) - loop thru - if (agent no longer on region - llGetAgentSize)) then tag agent KVP Active = False (or remove from KVP) and done - if (agent not in experience) then - if (agent tagged in KVP as OOC after X invites) then skip/ignore else hand off agent key + delegated Ping script id (link_message) to Invite script else if (agent in experience) then hand off agent key + KVP Active status (link_message) to available Ping script 2) Invite script: - receive agent key + delegated ping script id (link_message) - if (agent no longer on region - llGetAgentSize) then tag agent KVP Active = False (or remove from KVP) and done - invite agent to experience - if (agent accepts invite) then hand off agent key + KVP Active status = False to delegated Ping script else if (agent refuses/ignores invite after X scanner-prompted invites) then tag them in KVP as OOC 3) Ping script: - receive agent key + KVP Active status (link_message) - if (agent no longer on region - llGetAgentSize) then tag agent KVP Active = False (or remove from KVP) and done - if (agent no longer in experience) (people can leave an experience at any time) then tag agent KVP Active = False and done (inviting them again on next scan) - if (agent KVP Active status = False is new entrant) then attach HUD and tag KVP Active = True else ping the agent's HUD - if (ping response) then done else if (after X time) attach HUD - on_attach HUD (HUD checks for presence of existing HUD) - if (existing HUD) then remove/delete the newly attached HUD 4) HUD monitors for presence of companion Meter. Check on HUD attached, Meter detached, and on changed region. Attaching new when Meter not found. When HUD detached then HUD detaches Meter 5) KVP Writer script: Any script can read the KVP for info. In the multiple script scenario tho is often better for scripts to pass a Write link_message to a dedicated KVP Writer script to do this work in this approach there are as many Invite and Ping scripts as needed to better handle the volume of agents present at any one time. The scanner script farming (handing off) the work to the Invite and Ping scripts the objective with this approach is to only rez things when they are needed and to have the scanner script do the least amount of work as possible
  4. it can when use a self-replicator. Which goes: 1) Make a box. Put a copy of the box and a giver script in the box 2) On_rez copy of box from contents. Give the copy of box the contents of the rezzer box is useful for things like sit teleporters and vehicles which are available for anyone to drive. Saves having to provide a rezzer post. Person sits on the vehicle. On_sit the vehicle rezzes a copy of itself, person drives away leaving a new vehicle behind in its place for the next person
  5. Gossipgirl was a promotion partnership between Linden and the Gossipgirl franchise. The name could come back if the partnership was renewed
  6. example of a reversible arithmetic feistel network. Reversible meaning encoder/decoder // reversible arithmetic feistel network // public domain: elleevelyn February 2024 // credits: irihapeti/16/elizabeth // // typical use case: obfuscation of a sequence of ordinal numbers // - generate a sequence of "random-looking" unique numbers that can be mapped back // to the sequence set // - for further obfuscation (given that the encoder/decoder algorithm is public) // then the simplist is to changeout the pseudorandom number generator for another // keeping the changeout a secret known only to yourself // - more obfuscation can be obtained by adding more layers to the mixing as // irihapeti did. Note that i keep the mixing to the barest so will be easier to // add layers of your own design // galois lfsr pseudorandom number generator integer raN; // state generated by raD integer raD(integer magnitude) { raN = (raN >> 1) ^ (-(raN & 0x1) & 0xD0000001); return (raN & 0x7FFFFFFF) % magnitude; } // brute factor magnitude integer raF(integer magnitude) { // return low factor of magnitude integer result = (integer)llSqrt(magnitude); integer n = 1 + (magnitude & 0x1); result -= ((!(result & 0x1)) && (n == 2)); for (; (result > 2) && (magnitude % result); result -= n); return result; } // arithmetic feistel network encoder integer encode(integer value, integer magnitude, integer lowfactor, integer seed) { // encode value using magnitude, lowfactor, seed raN = seed; integer highfactor = magnitude / lowfactor; integer i; // forward mixing : fixed to 8 rounds integer low = value % lowfactor; integer high = value / lowfactor; for (i = 0; i < 8; ++i) { integer m = high % lowfactor; low = (low + (m * m) + raD(highfactor)) % lowfactor; m = low % highfactor; high = (high + (m * m) + raD(lowfactor)) % highfactor; } return high * lowfactor + low; } // arithmetic feistel network decoder integer decode(integer value, integer magnitude, integer lowfactor, integer seed) { // decode value using magnitude, lowfactor, seed raN = seed; integer highfactor = magnitude / lowfactor; integer i; // get the PRNG outputs used by encoder list prng; for (i = 0; i < 8; ++i, prng += [raD(highfactor), raD(lowfactor)]); // reverse mixing : fixed to 8 rounds integer low = value % lowfactor; integer high = value / lowfactor; for (i = 14; i >= 0; i -= 2) { integer m = low % highfactor; high = (high - (m * m) - llList2Integer(prng, i+1)) % highfactor; if (high < 0) high += highfactor; m = high % lowfactor; low = (low - (m * m) - llList2Integer(prng, i)) % lowfactor; if (low < 0) low += lowfactor; } return high * lowfactor + low; } default { state_entry() { // encode/decode set [0..9] within magnitude range [0..9] integer seed = (integer)llFrand(0x10000) << 16 | (integer)llFrand(0x10000); integer magnitude = 10; integer lowfactor = raF(magnitude); integer i; for (i = 0; i < magnitude; ++i) { integer encoded = encode(i, magnitude, lowfactor, seed); integer decoded = decode(encoded, magnitude, lowfactor, seed); llOwnerSay(llDumpList2String(["i: ", i, " enc: ", encoded, " dec: ", decoded], "")); } // encode/decode set [2000..2009] within magnitude range [0..99999999] seed = (integer)llFrand(0x10000) << 16 | (integer)llFrand(0x10000); magnitude = 100000000; lowfactor = raF(magnitude); for (i = 2000; i < 2010; ++i) { integer encoded = encode(i, magnitude, lowfactor, seed); integer decoded = decode(encoded, magnitude, lowfactor, seed); llOwnerSay(llDumpList2String(["i: ", i, " enc: ", encoded, " dec: ", decoded], "")); } } }
  7. this viewer could come to be seen as SL 2.0 I think also that this SL 2.0 view of the inworld could be subscription-only equivalent to Premium Plus (approx. 10/12USD month) with all the current PP benefits (land, stipend, uploads, etc) I assume/speculate/guess this as the Alpha invite was to existing Premium Plus accounts which is interesting. Interesting, given that there are also any number of other account type holders who would otherwise be very invested in this mobile version
  8. i parked my car on the street outside my friend's house when I went visit them. My car was immediately towed away when I go out of my car. I am outrage about this as there wasn't any No Parking sign
  9. no what I am saying is that a scripted solution can do everything that parcel Auto-return can do and more. For the widest number of people having more choices in how to manage their land, is better than having fewer choices. Even tho as an individual land owner we might think the way we have chosen is the best way. Which it is, for us as the individual most concerned.
  10. Linden not be happy if the owner was soliciting for tips on the public land. Public land adhere to the Welcome Area rules which bans soliciting if doing this tho for fun then is a legitimate use of public land. The main purpose of public land is to provide spaces where people can meet and get to know each other if/when they choose to do so
  11. is a few barges that are mod and free. Could get one of them and make a party barge and sail the seas looking for other party people 😻
  12. yes why not a more nuanced object return system might suit some parcel owners
  13. i will address this one point people do this now on the Blake Sae. Park their mega boat next to another mega boat, alts sitting. Then they go back and forth on each others boats and party up, along with every else who have come to party
  14. how is it easier ? sail in a mega boat and remain sitting and will stay forever under the current parcel Auto-return system with a scripted solution can also add in a finite time if agent is sitting, llUnsit, amd return boat
  15. @Extrude Ragu thinking about this some more. What you proposing can be done now by parcel owners using a LSL script - timer poll for agents on parcel - agent not on parcel: return all objects belonging to agent - agent on parcel (first time detected): save key of their first object detected (typically will be the object they rode in on - when Build is Off) - agent on parcel (subsequent detected): return all objects belonging to agent other than first detected object for LDPW right-of-way parcels, a question is would LPDW be willing to try this on a test region and gather info ? Like a ocean region for example. How many boats turn up, how many are present at the same time, how long do they stay, etc Siren's Isle in Blake Sea be a good candidate for this test info that would help guide Linden decision on whether to proceed with a parcel setting project
  16. yes this is true. Thanks for pointing this out to me. Going forward if I do need to pause a script then I be using llSleep from now on
  17. yes. I had a quick play with llSetTimerEvent just to proof it using llSleep vs "pause". The outcome is identical
  18. you right about this, i had a look. I should spend more time learning about how LSL actual works rather than just assume it works like other interrupt event driven languages that I am used too
  19. the reason why Auto-return is set to 0 when we transfer land is to avoid an entire build being returned when we deed the parcel to group or transfer the parcel to an alt or friend who wants to keep the build changing it so that Autoreturn is set if we don't opt out is going to cause more problems that what is worth tbf to the current Land Lindens who look after mainland they are pretty good at setting Auto-return on private parcels when there is a mess of other people's stuff,. detracting the neighbours enjoyment of their own lands
  20. just a wish i wish there to be a way to check whether the notecard is cached. Something like integer yes = llIsNotecardCached(notecardName) and when this function is called the notecard in cache is moved to the front so is last out of the cache thank you Any Linden who might read this
  21. yes if we going to be reading notecard in more than one place then a user-defined function, if not then inline it in either case then I think we left with something like this string notecardISAM(string notecard, integer line) { llGetNumberOfNotecardLines(notecard); integer retry = -3; // retry 3 times string data; do { /* alternatively llGetNumberOfNotecardLines(notecard); could go here, and we thrash it upto retry times */ data = llGetNotecardLineSync(notecard, line); if (data == NAK) { // non-eventblocking pause before we retry float pause = llGetTime() + 0.1; while (llGetTime() < pause); } } while (retry++ && data == NAK); return data; } it can still return NAK but this would be no different to a standard ISAM system in how we then deal with it we could also make it smarter where we monitor cache performance. Adjusting retry and pause in response
  22. constructor competitions have largely gone by the wayside since mesh objects came in. Is still the odd prim speed-building contests, just not in the numbers there used to be since Skill Gaming policy came in then wagering on games of skill is a controlled activity and requires a Skill Gaming region since the advent of sophisticated bots then activities like racing (horses, cars, etc) for money has largely disappeared pretty much all that is left in a competition sense are free-to-participate yacht regattas and some few other vehicle type races in terms of board games then pretty much the only competitive feel left inworld are free-to-play games with Hi-Score leaderboards leaderboards can also be found on some car racing tracks, some fewer equestrian events like barrel racing and showjumping, and some golf, skeet, archery,, etc Linden also provide free-to-play games with competitive elements also. See inworld for more info: http://maps.secondlife.com/secondlife/Portal Park 1/97/159/54
×
×
  • Create New...