Code:
def startStr;
def validStartTime
def scheduled = false;
def gameStart = {
if (model == "v") { setImage("waitinggame/vintro4.jpg") }
if (model == "n") { setImage("waitinggame/nintro4.jpg") }
if(!scheduled){
show("Alright. This is the last time you will need to click a button. The final check.")
wait (5)
show("You should: \n\n Have your dominant arm an d both legs tied. \n\n Have your e-stim device connected. \n\n Have the intensity set to extremely high. \n\n\n If this is all true, you may continue. I recommend placing your other arm on the arm rest, as if it was tied too. \n\n If you are experienced in self-bondage, you may tie the other arm as well, as you won't be using it anymore.")
showButton("Continue")
}
if (model == "v") {
setImage("waitinggame/vintro1.jpg")
show("**You just woke up.**")
wait(5)
show("**You try to move, but you can't.**")
wait(5)
show("**The only thing you can see is a pair of legs.**")
wait(5)
show("**Before you can try to speak, a voice interrupts you.**")
wait(5)
}
if (model == "v") { setImage("waitinggame/vintro2.jpg") }
if (model == "n") { setImage("waitinggame/nintro2.jpg") }
show("Hey! Good to see you're awake. \n We were concerned that we gave you too strong of a dose.")
wait(5)
show("You're tied to the chair. \n We've connected a very powerful shock device to your body.")
wait(5)
show("And we're going to use it well. \n We will have our revenge.")
wait(5)
show("You're going to sit there, \n I'm going to be talking just like I am now..")
if (guaranteedShock == 1) { playSound("waitinggame/gamepulse_low.wav"); }
wait(2)
show("And just when you expect it the least. \n She will hit a button, and the pain will come.")
wait(5)
show("Then you will wait. How long until the next shock? I don't know. You don't know.")
wait(5)
show("That's what makes it fun. Fun for us anyway.")
wait(5)
timeLeft = runTime * 60;
shockSession()
}
def shockCheck = {
while (checkingLevel == true) {
if (shocksGot >= shocksToGet) {
wait (1)
}
if (tutNot)
{
show("There are four different shocks that will be applied randomly. \n\n The harsher ones have lower chances, but they will come, sooner or later.")
wait(6)
show("Here you have the opportunity to test them, or you can just set the nicer ones, and let the harsh ones be a surprise.")
wait(6)
tutNot = false;
}
def shockTest = getSelectedValue("Which shock would you like to test?",["Nice shock", "Nice shock long", "Loud shock", "Loud shock long", "Done"])
switch(shockTest) {
case 0:
playSound("waitinggame/gamepulse_low.wav");
break;
case 1:
playSound("waitinggame/gamepulse_long_low.wav");
break;
case 2:
playSound("waitinggame/gamepulse.wav");
break;
case 3:
playSound("waitinggame/gamepulse_long.wav");
break;
case 4:
checkingLevel = false;
if(!scheduled){
gameStart()
}
break;
}
}
}
def validateTime = {
def validHours = false
def validMinutes = false
if(startStr.contains(":")){
def pieces = startStr.split(":")
try{
def hourInt = Integer.parseInt(pieces[0])
if( 0 <= hourInt && hourInt <= 24){
validHours = true
}
else{
show("Hours must be between 0 and 24")
wait(5)
}
}
catch (Exception e){
show("Hours must be an integer")
wait(5)
}
try{
def minuteInt = Integer.parseInt(pieces[1])
if( 0 <= minuteInt && minuteInt <= 59){
validMinutes = true
}
else{
show("Minutes must be between 0 and 59")
wait(5)
}
}
catch(Exception e){
show("Minutes must be an Integer")
wait(5)
}
}
else{
show("Time must contain \":\"")
wait(5)
}
validStartTime = validHours && validMinutes
}
def scheduleSession = {
while(!validStartTime){
startStr = getString("You would like to wait for the waiting game? \n\nEnter the time of day that you would like the game to start (HH:MM)", "")
validateTime()
}
scheduled = true
shockCheck()
//enter time in Calendar
def pieces = startStr.split(":")
java.util.Calendar start = java.util.Calendar.getInstance()
start.set(java.util.Calendar.HOUR_OF_DAY, Integer.parseInt(pieces[0]))
start.set(java.util.Calendar.MINUTE, Integer.parseInt(pieces[1]))
//find difference between current and entered times
java.util.Calendar now = java.util.Calendar.getInstance()
show("The game will begin at " + startStr)
def timeToStart = Math.floor((start.getTimeInMillis()-now.getTimeInMillis())/1000)
//if the entered time is earlier start tomarrow
if(timeToStart < 0){
timeToStart += 24*60*60;
}
wait(timeToStart)
playSound("waitinggame/gamepulse_low.wav")
wait(5)
gameStart()
}
def mainMenu = {
def mainMenu = true;
def tempSessions = loadInteger("waitinggame.sessions");
while (mainMenu) {
if (model == "v") { setImage("waitinggame/vintro3.jpg") }
if (model == "n") { setImage("waitinggame/nintro3.jpg") }
if (tempSessions == null)
{
menu = getSelectedValue ("Welcome to the Waiting Game, " + name + ". \n\n I can assure you it is much more exciting than the name.",["Tutorial & Start","Settings","Stats"])
if(menu==0) {
waitingTutorial()
}
if(menu==1) {
settingsMenu()
}
if(menu==2) {
infoMenu()
}
}
else
{
menu = getSelectedValue ("Welcome to the Waiting Game, " + name + ". \n\n I can assure you it is much more exciting than the name.",["Quick Start","Tutorial & Start","Settings","Stats","Schedule"])
if(menu==0) {
shockCheck()
mainMenu = 0;
}
if(menu==1) {
waitingTutorial()
}
if(menu==2) {
settingsMenu()
}
if(menu==3) {
infoMenu()
}
if(menu==4){
scheduleSession()
}
}
}
}
def validStartTime
def scheduled = false;
def gameStart = {
if (model == "v") { setImage("waitinggame/vintro4.jpg") }
if (model == "n") { setImage("waitinggame/nintro4.jpg") }
if(!scheduled){
show("Alright. This is the last time you will need to click a button. The final check.")
wait (5)
show("You should: \n\n Have your dominant arm an d both legs tied. \n\n Have your e-stim device connected. \n\n Have the intensity set to extremely high. \n\n\n If this is all true, you may continue. I recommend placing your other arm on the arm rest, as if it was tied too. \n\n If you are experienced in self-bondage, you may tie the other arm as well, as you won't be using it anymore.")
showButton("Continue")
}
if (model == "v") {
setImage("waitinggame/vintro1.jpg")
show("**You just woke up.**")
wait(5)
show("**You try to move, but you can't.**")
wait(5)
show("**The only thing you can see is a pair of legs.**")
wait(5)
show("**Before you can try to speak, a voice interrupts you.**")
wait(5)
}
if (model == "v") { setImage("waitinggame/vintro2.jpg") }
if (model == "n") { setImage("waitinggame/nintro2.jpg") }
show("Hey! Good to see you're awake. \n We were concerned that we gave you too strong of a dose.")
wait(5)
show("You're tied to the chair. \n We've connected a very powerful shock device to your body.")
wait(5)
show("And we're going to use it well. \n We will have our revenge.")
wait(5)
show("You're going to sit there, \n I'm going to be talking just like I am now..")
if (guaranteedShock == 1) { playSound("waitinggame/gamepulse_low.wav"); }
wait(2)
show("And just when you expect it the least. \n She will hit a button, and the pain will come.")
wait(5)
show("Then you will wait. How long until the next shock? I don't know. You don't know.")
wait(5)
show("That's what makes it fun. Fun for us anyway.")
wait(5)
timeLeft = runTime * 60;
shockSession()
}
def shockCheck = {
while (checkingLevel == true) {
if (shocksGot >= shocksToGet) {
wait (1)
}
if (tutNot)
{
show("There are four different shocks that will be applied randomly. \n\n The harsher ones have lower chances, but they will come, sooner or later.")
wait(6)
show("Here you have the opportunity to test them, or you can just set the nicer ones, and let the harsh ones be a surprise.")
wait(6)
tutNot = false;
}
def shockTest = getSelectedValue("Which shock would you like to test?",["Nice shock", "Nice shock long", "Loud shock", "Loud shock long", "Done"])
switch(shockTest) {
case 0:
playSound("waitinggame/gamepulse_low.wav");
break;
case 1:
playSound("waitinggame/gamepulse_long_low.wav");
break;
case 2:
playSound("waitinggame/gamepulse.wav");
break;
case 3:
playSound("waitinggame/gamepulse_long.wav");
break;
case 4:
checkingLevel = false;
if(!scheduled){
gameStart()
}
break;
}
}
}
def validateTime = {
def validHours = false
def validMinutes = false
if(startStr.contains(":")){
def pieces = startStr.split(":")
try{
def hourInt = Integer.parseInt(pieces[0])
if( 0 <= hourInt && hourInt <= 24){
validHours = true
}
else{
show("Hours must be between 0 and 24")
wait(5)
}
}
catch (Exception e){
show("Hours must be an integer")
wait(5)
}
try{
def minuteInt = Integer.parseInt(pieces[1])
if( 0 <= minuteInt && minuteInt <= 59){
validMinutes = true
}
else{
show("Minutes must be between 0 and 59")
wait(5)
}
}
catch(Exception e){
show("Minutes must be an Integer")
wait(5)
}
}
else{
show("Time must contain \":\"")
wait(5)
}
validStartTime = validHours && validMinutes
}
def scheduleSession = {
while(!validStartTime){
startStr = getString("You would like to wait for the waiting game? \n\nEnter the time of day that you would like the game to start (HH:MM)", "")
validateTime()
}
scheduled = true
shockCheck()
//enter time in Calendar
def pieces = startStr.split(":")
java.util.Calendar start = java.util.Calendar.getInstance()
start.set(java.util.Calendar.HOUR_OF_DAY, Integer.parseInt(pieces[0]))
start.set(java.util.Calendar.MINUTE, Integer.parseInt(pieces[1]))
//find difference between current and entered times
java.util.Calendar now = java.util.Calendar.getInstance()
show("The game will begin at " + startStr)
def timeToStart = Math.floor((start.getTimeInMillis()-now.getTimeInMillis())/1000)
//if the entered time is earlier start tomarrow
if(timeToStart < 0){
timeToStart += 24*60*60;
}
wait(timeToStart)
playSound("waitinggame/gamepulse_low.wav")
wait(5)
gameStart()
}
def mainMenu = {
def mainMenu = true;
def tempSessions = loadInteger("waitinggame.sessions");
while (mainMenu) {
if (model == "v") { setImage("waitinggame/vintro3.jpg") }
if (model == "n") { setImage("waitinggame/nintro3.jpg") }
if (tempSessions == null)
{
menu = getSelectedValue ("Welcome to the Waiting Game, " + name + ". \n\n I can assure you it is much more exciting than the name.",["Tutorial & Start","Settings","Stats"])
if(menu==0) {
waitingTutorial()
}
if(menu==1) {
settingsMenu()
}
if(menu==2) {
infoMenu()
}
}
else
{
menu = getSelectedValue ("Welcome to the Waiting Game, " + name + ". \n\n I can assure you it is much more exciting than the name.",["Quick Start","Tutorial & Start","Settings","Stats","Schedule"])
if(menu==0) {
shockCheck()
mainMenu = 0;
}
if(menu==1) {
waitingTutorial()
}
if(menu==2) {
settingsMenu()
}
if(menu==3) {
infoMenu()
}
if(menu==4){
scheduleSession()
}
}
}
}