Fabio Eebus Posted June 26, 2020 Share Posted June 26, 2020 Do you know any script that counts how many hours a person stayed inside my house? I want to have statistics on the length of stay(hours) of each visitor. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted June 26, 2020 Share Posted June 26, 2020 (edited) Probably something like that on MP. This subforum is for actual scripting advice, you should post into the Wanted section. Doing it from scratch is complicated without an external database. (Even then it's complicated.) Edited June 26, 2020 by Wulfie Reanimator 1 Link to comment Share on other sites More sharing options...
SeanMcDonald Posted June 26, 2020 Share Posted June 26, 2020 As a thought exercise in how to do this, wouldn't it be possible to use something like Maria Korolov's visitor script from HypergridBusiness? She posted one a few years ago that records visitors to a Google Sheet, first removing duplicates who were already recorded. It seems like it should be possible to modify her script to also record when an avatar disappears from a region. Then have Sheets calculate the amount of time they spent there. I'm sure that this is not as easy-peasy as it sounds in my head. Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 26, 2020 Share Posted June 26, 2020 (edited) Unless you are dealing with a high traffic area, so you expect to generate a huge amount of data and need to save it for a long time, you don't truly need to go to great extremes. Systems like the ones you describe or that Wulfie is thinking about are necessary if you are running a club or an in-world shop that gets a lot of business. If you're just interested in finding out how long someone stays in your house, and you don't really care about saving reams of data until you log in to weeks from now, you can probably collect the information you need and put it into the Description field of a prim somewhere -- or IM/e-mail it to yourself periodically. You can modify almost any greeter/counter script to do that. My own counter in the script library is ten years old now but could do the job with a little tweaking. It has the advantage of having a fairly high capacity, as long as you don't care about saving visitor names. Edited June 26, 2020 by Rolig Loon Cleaner wording Link to comment Share on other sites More sharing options...
Sabrina Tamerlane Posted June 27, 2020 Share Posted June 27, 2020 (edited) If the names are stored in the script it is a memory hog. So, it can be very easy to do, but it can crash also very easily. Now if you are looking for a specific person like a dancer or host then it's different. Edited June 27, 2020 by Sabrina Tamerlane Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 27, 2020 Share Posted June 27, 2020 1 hour ago, Sabrina Tamerlane said: If the names are stored in the script it is a memory hog. So, it can be very easy to do, but it can crash also very easily. That's quite true. That's why I said that it's not practical to use local storage if you are trying to track traffic stats on a busy parcel. Traffic in your own house is likely to be pretty light, though, so it's a decent idea for that sort of place. Mine own greeter/counter can store stats for something like 1000 visitors before it starts lopping off the oldest ones to make space, so it's not bad for a private home or a quiet area. Because it always checks free memory, it never gets close enough to being so full that it crashes. Link to comment Share on other sites More sharing options...
Mollymews Posted June 28, 2020 Share Posted June 28, 2020 when we pack a uuid into a string of length 17 then we can get over 3,000 uuids into a list 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now