From 4d9ea5b77f4c79d9348977a4a046bc168a38f154 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 10 Dec 2018 21:35:58 +0000 Subject: Replace irritatingly random play trigger with a self-rescheduling event. --- scripts/toy.groovy | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 866fa6f..057efd9 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -21,6 +21,7 @@ final BONDAGE = "bondage", CBT = "cbt", CHORES = "chores", PAIN = "pain"; // toy.permission. final CUM = "cum", EDGE = "edge" final PERMIT = "permit"; +final PLAY = "play"; // toy.state. final CHASTE = "chaste", COLLARED = "collared", CUFFED = "cuffed", CLAMPED = "clamped", GAGGED = "gagged", NAKED = "naked"; final REDRESS = "redress"; @@ -1003,15 +1004,41 @@ def sessionRelease = { goodToy -> } show(null); }; -def playtime = { +def playWait = { + present([DRESSED,nTEASE], [ + ["Hello,", "Hi,", "Hey there,"], + ["toy.", "slut.", "slave."], + ["On your knees,", "On the floor,", "Down... at my feet,",], + ["wait there.", "wait patiently.", "don't move."], + ["I'll be with you shortly.", "I won't be a moment."]]); + showButtonGT("Yes, mistress", "ok", 10, 1); + setImage(null); + show(null); + wait(20 + getRandom(20)); +}; +def playSchedule = { lastPlay -> + if (lastPlay < getTime() - (4 * HOUR)) { + addEventIfMissing(PLAY, getTime() + 120 + getRandom(480), PLAY, true); // 2-10mins + } + else { + addEventIfMissing(PLAY, getTime() + 1200 + getRandom(5400), PLAY, false); // 20-90mins + } +}; +def playEvent = { rt = true, first = true -> + if (!rt) return; dress([[DRESSED,nTEASE],[DRESSED,TEASE],[TITS]]); if (sessionSummon([DRESSED,nTEASE])) { + if (first.asBoolean()) { + playWait(); + } sessionPlay(); sessionRelease(sessionAborted == null); + save("toy.lastPlay", getTime()); } else { adjustPunish(25); } + playSchedule(getTime()); } def bedtime = { dress([[LINGERIE,nTITS]]); @@ -1156,6 +1183,9 @@ def setupPlans = { setupPlan(SHOPPING, 14.5, 15.5, 16.0, 18.0) setupPlan(PARTY, 19, 20, 22.0, 25.0) }; +def setupEvents = { + playSchedule(loadInteger("toy.lastPlay") ?: 0); +}; def setDefault = { prop, val -> if (loadString(prop) == null) { save(prop, val); @@ -1194,6 +1224,7 @@ def beginPlan = { plan -> // Initial - basic checks and defaults namedEvents = [ // name: func(arg, schedTime rt) + play: { arg, schedTime, rt -> playEvent(rt, arg) }, redress: { arg, schedTime, rt -> redress(rt) }, permit: { arg, schedTime, rt -> givePermission(arg) } ]; @@ -1249,6 +1280,7 @@ def setupInitial = { setDefault("toy.punishment", 0); setupPlans(); execEvents(false); + setupEvents(); }; def setupShowState = { show( @@ -1335,7 +1367,7 @@ while (true) { [ lbl: "Back", act: null ], ]; if (is("DEBUG")) { - opts.push([ lbl: "Play", act: playtime ]); + opts.push([ lbl: "Play", act: playEvent, arg: true ]); opts.push([ lbl: "Begin plan", act: beginPlan, arg: LUNCH ]); } if (is(NAKED)) { @@ -1360,9 +1392,6 @@ while (true) { else if (plannedCheck(PARTY)) { beginPlan(PARTY); } - else if (getRandom(1000) == 0) { - playtime(); - } execEvents(true); addAvail(cycleTime); } -- cgit v1.2.3