summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-11-29 23:53:32 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-11-29 23:53:32 +0000
commitad4108e292e96efeb7aba0e9e0473c15459c227b (patch)
tree4091177cfa5473294dce29531e57e3f0cb528966
parentAdd missing wait after chastity lockup (diff)
downloadtoy-ad4108e292e96efeb7aba0e9e0473c15459c227b.zip
Adds basic support for going out on plans
-rw-r--r--scripts/toy.groovy74
1 files changed, 73 insertions, 1 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index d334095..43458e1 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -628,6 +628,35 @@ def setDefault = { prop, val ->
save(prop, val);
}
};
+def leaveNote = { msg, instr ->
+ save("toy.note", msg);
+ save("toy.noteInstr", instr);
+};
+def readNote = {
+ leaveNote(null, null);
+};
+def plannedCheck = { plan ->
+ return (getTime() > loadInteger("toy.plan.${plan}.${START}") && getTime() < loadInteger("toy.plan.${plan}.${END}"));
+}
+def beginPlan = { plan ->
+ dress([[DRESSED,nTEASE], [DRESSED,TEASE]]);
+ save("toy.owner.outfitTime", loadInteger("toy.plan.${plan}.${END}"));
+ if (sessionSummon([DRESSED,nTEASE])) {
+ present([DRESSED,nTEASE], [
+ [ "I'm going out now, toy.", "$plan time!" ],
+ [ "Will you be good while I'm gone?", "You will behave as I expect?" ]]);
+ wait(10);
+ if (has(CHASTITY) && !is(CHASTE)) {
+ postChastity();
+ }
+ present([DRESSED,TEASE], [
+ [ "Back later!", "See you soon, toy" ]]);
+ wait(5);
+ }
+ else if (has(CHASTITY)) {
+ leaveNote("I want you in chastity until I return!", CHASTE);
+ }
+};
// Initial - basic checks and defaults
def setupInitial = {
if (loadInteger("toy.version") == null) {
@@ -681,6 +710,35 @@ if (localTime() > 25.75 || localTime() < 7.5) { // 1:45am - 7:30am
wait(10);
exit();
}
+if (plannedCheck(LUNCH) || plannedCheck(SHOPPING) || plannedCheck(PARTY)) {
+ setImage(null);
+ def note = loadString("toy.note");
+ def noteInstr = loadString("toy.noteInstr");
+ if (note) {
+ show("Mistress is out... but you find a note:\n$note");
+ showButton("OK");
+ if (noteInstr) {
+ set(noteInstr, true);
+ }
+ readNote();
+ }
+ else {
+ show("Mistress is out...");
+ wait(10);
+ }
+ while (plannedCheck(LUNCH) || plannedCheck(SHOPPING) || plannedCheck(PARTY)) {
+ wait(5);
+ }
+ if (sessionSummon([DRESSED])) {
+ present([DRESSED], [["Hello, toy!"], ["I'm back home now."]]);
+ wait(10);
+ setImage(null);
+ }
+}
+else {
+ leaveNote(null, null);
+}
+
final cycleTime = 6;
while (true) {
if (showButton("Please, Miss?", cycleTime) < cycleTime) {
@@ -688,17 +746,31 @@ while (true) {
"Status",
"Calendar",
"Play",
+ "Plan begin",
"Back"
])) {
case 0: setupShowState(); break;
case 1: setupShowCalendar(); break;
case 2: playtime(); break;
- case 3: return "toy";
+ case 3: beginPlan(LUNCH); exit();
+ case 4: return "toy";
}
}
else if (localTime() > 25.75) { // 1:45am
bedtime();
}
+ else if (plannedCheck(LUNCH)) {
+ beginPlan(LUNCH);
+ exit();
+ }
+ else if (plannedCheck(SHOPPING)) {
+ beginPlan(SHOPPING);
+ exit();
+ }
+ else if (plannedCheck(PARTY)) {
+ beginPlan(PARTY);
+ exit();
+ }
else if (getRandom(1000) == 0) {
playtime();
}