From bd71aae1b0f2dfee94eab130ec3f26ea57bef244 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Jun 2019 15:00:20 +0100 Subject: Extract cbt into a module --- scripts/toy.groovy | 83 +----------------------------------------------- scripts/toy/cbt.groovy | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 82 deletions(-) create mode 100644 scripts/toy/cbt.groovy diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 1f76ae9..9601e82 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -438,86 +438,6 @@ return new Object() { showButtonGT("Back, ${dommeTitle()}", "back", 60, 1); sessionToys[HANDCUFFS] = getTime(); } - def playBeatBalls = { - final BEATS = [ - // bpm:30, len:60 ], - [ bpm:90, len:45 ], - [ bpm:165, len:30 ], - [ bpm:180, len:30 ], - [ bpm:240, len:20 ], - ]; - getSpoon(); - present([DRESSED], [ - ["Good.", "Right."], - ["Take those balls in one hand", "In one hand, hold your balls"], - ["and in the other, get ready to beat them.", "and get ready to beat them with other."]]); - showButtonGT("Yes, ${dommeTitle()}", "ok", 10, 1); - present([DRESSED], [ - ["You concentrate on beating,", "Don't worry,"], - ["I'll be keeping count.", "I'll count them for you."]]); - wait(3); - present(null, [["Ready"]]); - wait(1); - present(null, [["Set"]]); - wait(1); - present(null, [["Go!"]]); - def beats = 0; - (4 + getRandom(7)).times({ - def beatNo = getRandom(BEATS.size()); - def beat = BEATS[beatNo]; - def len = getRandom(beat.len - 5) + 5; - playBackgroundSound("toy/${beat.bpm}bpm.mp3"); - wait(len); - playBackgroundSound(null); - beats += (int)((beat.bpm * len) / 60.0); - present(null, [ - ["$beats.", "That's $beats.", "$beats so far."], - ["Keep going.", "Don't stop!", "Just a few more.", "Harder!"]]); - }); - present([DRESSED], [ - ["Stop!", "Ok, you can stop now."], - ["They look a little sore.", "Is that a nice tingly feeling?"]]); - showButtonG("Thank you, ${dommeTitle()}.", "ok"); - show(null); - wait(5); - return beats / 10.0; - }; - def playBeatCock = { - preRelease(); - harden([DRESSED,nTITS]); - getSpoon(); - present([DRESSED], [ - ["Good.", "Right."], - ["When I crack my whip... you beat the head my little cock."], - ["Don't hold back,", "Be brave for me,"], - ["it's meant to hurt!", "it's fun for me to watch."]]); - wait(5); - def count = 0; - def n = (2 + getRandom((int)(getPunish() / 150))); - n.times({ - randRange(10, 20).times({ - playBackgroundSound("shortwhip.wav"); - count += 1; - wait(randRange(3, 5)); - }); - if (it < n - 1) { - def sh = getSelectedValue("Still hard?", [ - gagText("Yes, ${dommeTitle()}", "yes"), gagText("No, ${dommeTitle()}", "no")]); - if (sh == 1) { - harden([DRESSED, nTITS]); - } - else { - present([DRESSED], [ - ["Good", "Good boy", "Excellent"]]); - wait(randRange(3, 5)); - } - present([DRESSED], [ - ["Again!", "More!"]]); - wait(1); - } - }) - return count * 5; - }; def playKneel = { present([DRESSED], [ ["Right, slut.", "Come here, toy."], @@ -803,8 +723,6 @@ return new Object() { 'preCollar': preCollar, 'preClamps': preClamps, 'playKneel': playKneel, - 'playBeatBalls': playBeatBalls, - 'playBeatCock': playBeatCock, 'playClamps': playClamps, 'playNothing': playNothing, 'playBondage': playBondage, @@ -1249,6 +1167,7 @@ return new Object() { /* * Resources * scripts/toy.groovy + * scripts/toy/cbt.groovy * scripts/toy/chastity.groovy * scripts/toy/confession.groovy * scripts/toy/imagery.groovy diff --git a/scripts/toy/cbt.groovy b/scripts/toy/cbt.groovy new file mode 100644 index 0000000..1492180 --- /dev/null +++ b/scripts/toy/cbt.groovy @@ -0,0 +1,86 @@ +{ toy -> + toy.metaClass.playBeatBalls = { + final BEATS = [ + // bpm:30, len:60 ], + [ bpm:90, len:45 ], + [ bpm:165, len:30 ], + [ bpm:180, len:30 ], + [ bpm:240, len:20 ], + ]; + getSpoon(); + present([DRESSED], [ + ["Good.", "Right."], + ["Take those balls in one hand", "In one hand, hold your balls"], + ["and in the other, get ready to beat them.", "and get ready to beat them with other."]]); + showButtonGT("Yes, ${dommeTitle()}", "ok", 10, 1); + present([DRESSED], [ + ["You concentrate on beating,", "Don't worry,"], + ["I'll be keeping count.", "I'll count them for you."]]); + pause(3); + present(null, [["Ready"]]); + pause(1); + present(null, [["Set"]]); + pause(1); + present(null, [["Go!"]]); + def beats = 0; + (4 + getRandom(7)).times({ + def beatNo = getRandom(BEATS.size()); + def beat = BEATS[beatNo]; + def len = getRandom(beat.len - 5) + 5; + playBackgroundSound("toy/${beat.bpm}bpm.mp3"); + pause(len); + playBackgroundSound(null); + beats += (int)((beat.bpm * len) / 60.0); + present(null, [ + ["$beats.", "That's $beats.", "$beats so far."], + ["Keep going.", "Don't stop!", "Just a few more.", "Harder!"]]); + }); + present([DRESSED], [ + ["Stop!", "Ok, you can stop now."], + ["They look a little sore.", "Is that a nice tingly feeling?"]]); + showButtonG("Thank you, ${dommeTitle()}.", "ok"); + show(null); + pause(5); + return beats / 10.0; + }; + + toy.metaClass.playBeatCock = { + preRelease(); + harden([DRESSED,nTITS]); + getSpoon(); + present([DRESSED], [ + ["Good.", "Right."], + ["When I crack my whip... you beat the head my little cock."], + ["Don't hold back,", "Be brave for me,"], + ["it's meant to hurt!", "it's fun for me to watch."]]); + pause(5); + def count = 0; + def n = (2 + getRandom((int)(getPunish() / 150))); + n.times({ + randRange(10, 20).times({ + playBackgroundSound("shortwhip.wav"); + count += 1; + pause(randRange(3, 5)); + }); + if (it < n - 1) { + def sh = getSelectedValue("Still hard?", [ + gagText("Yes, ${dommeTitle()}", "yes"), gagText("No, ${dommeTitle()}", "no")]); + if (sh == 1) { + harden([DRESSED, nTITS]); + } + else { + present([DRESSED], [ + ["Good", "Good boy", "Excellent"]]); + pause(randRange(3, 5)); + } + present([DRESSED], [ + ["Again!", "More!"]]); + pause(1); + } + }) + return count * 5; + }; + + toy.addActivity("playBeatCock", { toy.playBeatCock() }); + toy.addActivity("playBeatBalls", { toy.playBeatBalls() }); +} -- cgit v1.2.3