Forum

Please note that you can subscribe to the individual forums. A subscription for news only covers the news.

Ideas for giving an...
 
Notifications
Clear all

[Solved] Ideas for giving and partially using up time

2 Posts
2 Users
0 Likes
2,796 Views
0
Topic starter

So, I'm trying to figure out how to code a scenario where in addition to merits, certain actions earn the sub "reward minutes", tracked in a time variable. These minutes could potentially be used for anything (in this case, this is time in which the sub is allowed to masturbate). The idea is that the minutes can be banked and used up as much or as little as the sub wishes (provided she obtains permission to access them). So if she asks permission, has 30 min available, uses 10, 20 minutes should remain after. 

It's easy enough for me to set up something - a flag, an assignment, a status - with a maximum time equal to the current value of the variable holding the minutes available. But what I'm stuck on is how the program can measure how much time the sub used up so that it can be deducted from the total and leave the remainder in place. 

I've been looking through the manual and it looks like maybe I could create a job and then use the! zzRuntime to measure how long the sub takes. But it would be kind of clunky to have them request a permission, assign a job, start the job, then deduct the time. 

So I guess I'm wondering - do you see an easier way to go about it or a better solution? Is there a better way to be able to have a sub hit a button which starts a timer, and when they hit the button again it tells you how long between?

I feel like there is something obvious I'm missing, but it's been quite a long time since I last did any scripting and I'm rusty. 🙂 

ETA: So after writing the above I reread the description of the !zzResponseTime and that MIGHT work. Only thing with that one is, how to prevent the sub from going OVER their allowed time if they don't hit the button.... Hmm. 

 

Thanks for any ideas! 

This topic was modified 6 years ago by hyacinth
2 Answers
0

You actually missed something obvious. The variable !zzNow will give you the current date and time. Assign it to another variable when you start and again when you end, and you can subtract the two values to give the time spent. 

If you want to make sure that the sub doesn't go over time, start with setting a flag with a duration of the time available. Then set a ExpireProcedure to stop the sub when the time is up. Remember to remove the flag if the sub finishes before time is up.

Sven B.

 

0
Topic starter

Thanks Sven!