Title:piet_quiz_1_code
Sex: Female T Male T Trans T
Require:
Limits:
listadd:'Jessika_all_zipped_up_9'
listadd:'Jessika_all_zipped_up_7'
listadd:'Jessika_all_zipped_up_10'
listadd:'Jessika_all_zipped_up_6'
listadd:'Jessika_all_zipped_up_11'
listadd:'Jessika_all_zipped_up_7'
listadd:'Jessika_all_zipped_up_16'
listadd:'Jessika_all_zipped_up_3'
listadd:'Jessika_all_zipped_up_16_2'
listadd:'Jessika_all_zipped_up_10'
listadd:'Jessika_all_zipped_up_13'
listadd:'Jessika_all_zipped_up_5'
listadd:'Jessika_all_zipped_up_15'
listadd:'Jessika_all_zipped_up_46_3'
listadd:'Jessika_all_zipped_up_45'
listadd:'Jessika_all_zipped_up_46_4'
listadd:'Jessika_all_zipped_up_44'
listadd:'Jessika_all_zipped_up_49'
listadd:'Jessika_all_zipped_up_39'
listadd:'Jessika_all_zipped_up_46_2'
;
; quiz_1
;
;================================================================
;====================== defining variables ======================
;================================================================
assign:taskName:'quiz_1'
use:gen
capture:hide
;
assign:dom_her1:'her'
if: 'DNAME' == 'James'
  assign:dom_her1:'his'
fi:
;
if:(S_IDENTIFY > 3)
  assign:he1:'she'
fi:
;
if:(S_IDENTIFY == 3)
  assign:he1:'they'
fi:
;
if:(S_IDENTIFY < 3)
  assign:he1:'he'
fi:
;
assign:maxRounds:10
loadquiz:$maxRounds
assign:curRound:0
assign:wrongAnswers:0
assign:maxSecondsPerAnswer:30
if: HARDCORE
  assign:maxSecondsPerAnswer:20
fi:
assign:punishmentLenghtPerFail:30
;
assign:allowedStrikes:7
if: L_PAIN_N == 4
  assign:allowedStrikes:5
fi:
if: L_PAIN_N == 5 || HARDCORE
  assign:allowedStrikes:3
fi:
if: L_PAIN_N == 5 && HARDCORE
  assign:allowedStrikes:2
fi:
if: L_PAIN_N == 5 && ADD_MIS.includes('R')
  assign:allowedStrikes:$allowedStrikes-1
fi:
;
assign:chanceToExpose:0
if: L_ONLINE == 3
  assign:chanceToExpose:33
fi:
if: L_ONLINE == 4
  assign:chanceToExpose:66
fi:
if: L_ONLINE == 5
  assign:chanceToExpose:88
fi:
if: L_ONLINE >= 1 && HARDCORE && $chanceToExpose < 33
  assign:chanceToExpose:20
fi:
;
if: T_NIPPLECLAMPS && (L_PAIN_N>2 || L_PAIN_N>0 && HARDCORE)
  assign:punishWithNippleClamps:true
else:
  assign:punishWithNippleClamps:false
fi:
assign:wasPunishedWithNippleClamps:false
assign:vidDescriptionLogWasShown:false
assign:cothespinsRipOffCounterWasShownBefore:false
assign:curImage:-1
assign:hardCockImageWasTaken:false
;
;================================================================
;====================== defining functions ======================
;================================================================
;
;----------------------------------------------------------------
function:nextImage
  ;----------------------------------------------------------------
  assign:curImage:$curImage+1
  settemp1:List[$curImage]
  image:taskimg/sets/jessika/TEMP1.jpg
end:
;
;----------------------------------------------------------------
function:askOneQuestion
  ;----------------------------------------------------------------
  wait:1
  settemp5:quiz_q[$curRound]
  assign:correctAnswerIndex:quiz_c[$curRound]
  settemp1:quiz_a0[$curRound].replaceAll(',','').replaceAll(':','').trim()
  settemp2:quiz_a1[$curRound].replaceAll(',','').replaceAll(':','').trim()
  settemp3:quiz_a2[$curRound].replaceAll(',','').replaceAll(':','').trim()
  settemp4:quiz_a3[$curRound].replaceAll(',','').replaceAll(':','').trim()
  ;
  assign:startTimeQuestion:TIMENOW
  assign:displayCurRound:$curRound+1
  show:$displayCurRound.TEMP5
  choice:TEMP1,TEMP2,TEMP3,TEMP4
  if: $correctAnswerIndex + 1 == LASTASK
    assign:gotQuestionRight:true
  else:
    assign:gotQuestionRight:false
  fi:
  assign:endTimeQuestion:TIMENOW
  if: ($endTimeQuestion-$startTimeQuestion) > ($maxSecondsPerAnswer*1000)
    assign:answeredInTime:false
    assign:neededTime:Math.ceil(($endTimeQuestion-$startTimeQuestion)/1000)
  else:
    assign:answeredInTime:true
  fi:
end:
;
;----------------------------------------------------------------
function:doOneRound
  ;----------------------------------------------------------------
  if: HAS_PENIS && !INCHASTITY
    if: $curRound == 0
      show:To further distract you, I want you aroused. So before each question you will get your dick hard. Now do it and then present your hard dick with hands off. Make sure that I can see your dick on camera if I turn around! Right after the counter has finished, I will ask the first question.
    else:
      show:To see the next question present your hard dick with hands off.
    fi:
    button:Take photo (3 seconds delay)
    show:3...
    wait:1
    show:2...
    wait:1
    show:1...
    wait:1
    show:0!
    settemp1:Math.floor((Math.random() * 100) + 1)
    if: TEMP1 < 15
      cam:save:HARD_COCK_PIC_1
      assign:hardCockImageWasTaken:true
      log:Showing hard dick with hands not touching it.
    fi:
  fi:
  call:nextImage
  call:askOneQuestion
  call:nextImage
  if: $punishWithNippleClamps && ($wrongAnswers >= $allowedStrikes)
    call:maybeRipOffClothespins
  fi:
  if: !$gotQuestionRight || !$answeredInTime
    assign:wrongAnswers:$wrongAnswers+1
  fi:
  if: !$gotQuestionRight || !$answeredInTime
    call:wrongAnswerTalkAfterRound
  else:
    show:Correct!
    wait:2
  fi:
end:
;
;----------------------------------------------------------------
function:maybeShitTalk
  ;----------------------------------------------------------------
  assign:correctAnswers:($curRound+1-$wrongAnswers)
  if: $wrongAnswers - $correctAnswers > 2
    settemp1:Math.floor((Math.random() * 12) + 1)
    if: TEMP1 == 1
      show:That's already a lot of wrong answers, you really don't seem to be very smart.
      wait:5
    fi:
    if: TEMP1 == 2
      show:You got a lot questions wrong already, you really seem to be kind of stupid.
      wait:5
    fi:
    if: TEMP1 == 3
      show:Your current score is not very impressive. You don't seem to be the smartest slave around.
      wait:5
    fi:
    if: TEMP1 == 4
      show:You really suck at this. You don't seem to be the smartest slave.
      wait:5
    fi:
    if: TEMP1 == 5
      show:So you seem to be one of the dumber slaves.
      wait:5
    fi:
    if: TEMP1 == 6
      show:It looks like you are not one of the smart slaves.
      wait:5
    fi:
  fi:
end:
;
;----------------------------------------------------------------
function:doAllRounds
  ;----------------------------------------------------------------
  label:startOfRoundLabel
  call:doOneRound
  assign:curRound:$curRound+1
  if:$curRound < $maxRounds
    goto:startOfRoundLabel
  fi:
end:
;
;----------------------------------------------------------------
function:wrongAnswerTalkAfterRound
  ;----------------------------------------------------------------
  if: !$answeredInTime
    show:You took too long to answer ($neededTime instead of $maxSecondsPerAnswer seconds)
    wait:3
  else:
    show:That was not the correct answer.
    wait:3
  fi:
  if: $wrongAnswers == 1
    assign:strikeNumberText:'1st'
  fi:
  if: $wrongAnswers == 2
    assign:strikeNumberText:'2nd'
  fi:
  if: $wrongAnswers == 3
    assign:strikeNumberText:'3rd'
  fi:
  if: $wrongAnswers > 3
    assign:strikeNumberText:'$wrongAnswersth'
  fi:
  show:This was your $strikeNumberText wrong answer!
  wait:3
  call:maybeShitTalk
  if: $punishWithNippleClamps && ($wrongAnswers == $allowedStrikes) && ($curRound+1 != $maxRounds)
    show:Better show more effort, the next wrong answer will hurt your nipples!
    wait:4
  fi:
end:
;
;----------------------------------------------------------------
function:maybeRipOffClothespins
  ;----------------------------------------------------------------
  if: !$cothespinsRipOffCounterWasShownBefore
    show:From now on your nipples will be punished for wrong answers. So make sure that I can see your nipples, then attach the clothespins to them and wait for me to tell you whether this was the correct answer. If it was wrong, I will say <b>Rip off</b> and you'll have 2 seconds to rip the clothespins off by pulling on the thread. So better be quick! If it was correct, I will say nothing and you can just take the clothespins off.
    assign:cothespinsRipOffCounterWasShownBefore:true
  else:
    show:Make sure that I can see your nipples, then attach the clothespins to them and wait for me to tell you whether this was the correct answer. If it was wrong, I will say <b>Rip off</b> and you'll have 2 seconds to rip the clothespins off by pulling on the thread. If it was correct, I will say nothing and you can just take the clothespins off.
  fi:
  button:Waiting for your command
  if: !$gotQuestionRight || !$answeredInTime
    call:ripOffClothespins
  else:
    show:Wait
    wait:10
  fi:
end:
;
;----------------------------------------------------------------
function:ripOffClothespins
  ;----------------------------------------------------------------
  assign:wasPunishedWithNippleClamps:true
  settemp1:Math.floor((Math.random() * 100) + 1)
  if: TEMP1 < 33
    assign:takeVid:true
    if: !$vidDescriptionLogWasShown
      log:In all videos, the slave should be ripping off the clothespins from the nipples by only touching the thread. In the beginning the pins have to be on, at the end the pins have to be off.
      assign:vidDescriptionLogWasShown:true
    fi:
  else:
    assign:takeVid:false
  fi:
  show:Wait
  wait:10
  if: $takeVid
    vidrec:0
  fi:
  wait:1
  show:<h1>Rip off 2!</h1>
  speakjen:Rip off!
  wait:1
  show:<h1>Rip off 1!</h1>
  wait:1
  show:<h1>Rip off 0!</h1>
  if: $takeVid
    vidstop:0
    wait:1
  fi:
end:
;
;----------------------------------------------------------------
function:finalEvaluation
  ;----------------------------------------------------------------
  loadgtemp1:QUIZ_1_NUMBER_OF_WRONG_ANSWERS_LAST_PLAYER
  assign:lastPlayerWrongAnswers:TEMP1
  assign:lastPlayerCorrectAnswers:($maxRounds-TEMP1)
  loadgtemp1:QUIZ_1_NAME_OF_LAST_PLAYER
  assign:lastPlayerName:'TEMP1'
  assign:correctAnswers:($maxRounds-$wrongAnswers)
  image:taskimg/sets/jessika/Jessika_all_zipped_up_45.jpg
  if: $wasPunishedWithNippleClamps
    show:This was the last round. You got $correctAnswers/$maxRounds questions right. Let's see how you compare to the last slave who took this quiz. Let's hope that you were smarter, otherwise I will think about putting a picture of you in the temp expose gallery. And since you got so many questions wrong, attach the nipple clamps and leave them on until the end of the task. Make sure that at least your nipples are always in my view from now on.
    button:Clamps attached
    log:if there are more pictures after this, they all have to prove that the nipples are clamped.
  else:
    show:This was the last round. You got $correctAnswers/$maxRounds questions right. Let's see how you compare to the last slave who took this quiz. Let's hope that you were smarter, otherwise I will think about putting a picture of you in the temp expose gallery.
    button:Yes, Miss Jessica
  fi:
  show:So let me check..
  wait:1
  show:So let me check...
  wait:2
  show:So let me check....
  wait:3
  show:So let me check.....
  wait:4
  image:taskimg/sets/jessika/Jessika_all_zipped_up_46.jpg
  if: $correctAnswers > $lastPlayerCorrectAnswers
    show:The last slave got $lastPlayerCorrectAnswers/$maxRounds questions right. So your $correctAnswers are better, well done!
    button:Thank you, Miss Jessica
    log:The slave got $correctAnswers/$maxRounds questions right and was thus better than the last slave who took this quiz who only got $lastPlayerCorrectAnswers right. Based on this, you should give a good rating!
  fi:
  if: $correctAnswers == $lastPlayerCorrectAnswers
    show:The last slave also got $lastPlayerCorrectAnswers/$maxRounds questions right. You are not smarter than the other slave, but at least you are also not dumber. So you are lucky, I will not expose you.
    button:Thank, you Miss Jessica
    log:The slave got $correctAnswers/$maxRounds quiz questions right and was as good as the last slave who took this quiz. Based on this, you should give a neutral to good rating!
  fi:
  if: $correctAnswers < $lastPlayerCorrectAnswers
    if: '$lastPlayerName' == 'SNAME'
      show:The other slave was smarter than you and got $lastPlayerCorrectAnswers/$maxRounds questions right. You only got $correctAnswers questions right. So what are you?
      button:I am stupid
    else:
      show:The other slave ($lastPlayerName) was smarter than you and got $lastPlayerCorrectAnswers/$maxRounds questions right. You only got $correctAnswers questions right. So, who of you two is smarter?
      button:$lastPlayerName
    fi:
    image:taskimg/sets/jessika/Jessika_all_zipped_up_48.jpg
    ;
    if: HAS_PENIS
      assign:andStroke:'stroke your dick with your other hand.'
      assign:whileStroking:'while stroking the penis'
    else:
      assign:andStroke:'rub your pussy with your other hand.'
      assign:whileStroking:'while rubbing her pussy'
    fi:
    if: INCHASTITY
      assign:andStroke:'play with your cage with your other hand.'
      assign:whileStroking:'while playing with the cage'
    fi:
    ;
    assign:differenceCorrectAnswers:$lastPlayerCorrectAnswers - $correctAnswers
    assign:punishmentTime:$differenceCorrectAnswers*$punishmentLenghtPerFail
    if: $lastPlayerCorrectAnswers - $correctAnswers >= 3
      assign:veryStupid:true
      show:Exactly, get a sheet of paper and write 'I am stuped' on it. Yes, write 'stuped'! Since you are so much dumber than the other player, I can't assume that you would have known how to spell it without me telling you. Then get naked and hold the paper in front of you for a picture. Afterwards I will think about whether I'll put it in the temp expose gallery. <b>Hold the paper perfectly horizontally</b>. I hope you are at least able to do that, and while you do it $andStroke You will have to stand there for $punishmentLenghtPerFail sec for each correct answer that you had less than the other player. So for $punishmentTime seconds.
    else:
      assign:veryStupid:false
      show:Exactly, get a sheet of paper and write 'I am stupid' on it. Then get completely naked, hold the paper in front of you and get in full view of the camera. I will take a picture of you for the record, and afterwards I will think about whether I will put this picture in the temp expose gallery. <b>Hold the paper perfectly horizontally</b>. I hope you are at least able to do that, and while you do it $andStroke You will have to stand there for $punishmentLenghtPerFail sec for each correct answer that you had less than the other player. So for $punishmentTime seconds.
    fi:
    button:Get in position
    wait:7
    if: $veryStupid
      log:Naked slave holding a picture with 'I am stuped' on it $whileStroking. <b>Verify that it's 'stuped' not 'stupid' and that it's held perfectly horizontally!</b> Please mark as failed, if they were even too stupid to hold it horizontally.
    else:
      log:Naked slave holding a picture with 'I am stupid' on it $whileStroking. <b>Verify that it's held perfectly horizontally!</b> Please mark as failed, if they were even too stupid to hold it horizontally.
    fi:
    speakjen:Get in position
    settemp1:Math.floor(Math.random() * $punishmentTime)
    wait:TEMP1
    cam:
    wait:$punishmentTime-TEMP1
    cam:save:quiz_expose_picture
    wait:1
    sound:cam.mp3
    image:taskimg/sets/jessika/Jessika_all_zipped_up_46_2.jpg
    show:So let me now think about whether I will show this picture to everybody.
    button:Please don't
    show:Well, let me think..
    wait:1
    show:Well, let me think...
    wait:1
    show:Well, let me think....
    wait:1
    show:Well, let me think.....
    wait:1
    settemp1:Math.floor((Math.random() * 100) + 1)
    if: TEMP1 < $chanceToExpose
      settemp6:1+L_ONLINE
      expose:quiz_expose_picture:TEMP6
      show:Well, let me think......
      wait:1
      show:Well, let me think.......
      wait:1
      show:Well, let me think........
      wait:1
      image:taskimg/sets/jessika/Jessika_all_zipped_up_45.jpg
      show:Yes, I have exposed you. Everybody should know how stupid you are.
      button:I understand, Miss Jessica
      assign:exposureCaption:'SNAME is stupid, $he1 only got $correctAnswers/$maxRounds quiz questions right. The last player ($lastPlayerName) is smarter than SNAME and got $lastPlayerCorrectAnswers questions right'
      exptext:$exposureCaption
      log:The slave only got <b>$correctAnswers/$maxRounds</b> quiz questions right and was thus dumber than the previous slave who got $lastPlayerCorrectAnswers questions right. <b>Give a rating that you think is appropriate for this score!</b>
      assign:wasExposed:true
    else:
      image:taskimg/sets/jessika/Jessika_all_zipped_up_45.jpg
      show:You are lucky, I won't expose you this time.
      button:Thank you, Miss Jessica
      log:The slave only got <b>$correctAnswers/$maxRounds</b> quiz questions right and was thus dumber than the previous slave who got $lastPlayerCorrectAnswers questions right. <b>Give a rating that you think is appropriate for this score!</b>
      assign:wasExposed:false
    fi:
    if: '$lastPlayerName' != 'SNAME'
      call:congratulatePreviousPlayer
    fi:
    call:maybeStoreCockPicForOtherTasks
    if: $wasPunishedWithNippleClamps && (L_PAIN_N >= 4 || HARDCORE)
      show:As a final punishment, let's rip off the clothespins a last time. Make sure that I can see your clamped nipples and wait for my command to rip them off.
      button:Waiting for your command
      call:ripOffClothespins
    fi:
  fi:
end:
;
;----------------------------------------------------------------
function:maybeStoreCockPicForOtherTasks
  ;----------------------------------------------------------------
  if: $hardCockImageWasTaken && L_ONLINE >= 3 && $lastPlayerCorrectAnswers - $correctAnswers >= 2
    show:Since you were so much dumber than the other player, you will get an additional punishment. As a punishment I will humiliate you by showing a picture of your cock that I took during this task to somebody else during their next deep throating training. Now apologize for being that stupid.
    button:I'm sorry for being stupid
    settemp1:true
    savetemp1:USE_COCK_PIC_FOR_DEEPTHROAT_TASK
  fi:
end:
;
;----------------------------------------------------------------
function:congratulatePreviousPlayer
  ;----------------------------------------------------------------
  image:taskimg/sets/jessika/Jessika_all_zipped_up_46.jpg
  settemp1:'$lastPlayerName'
  settemp2:$lastPlayerCorrectAnswers
  settemp3:$correctAnswers
  if: $wasExposed
    assign:inAdditionToThis:'In addition to this'
  else:
    assign:inAdditionToThis:'But'
  fi:
  asktextp:$inAdditionToThis I want you to congratulate TEMP1 on their good score. Please type your congratulations below, I will then send them to TEMP1. Make sure that you mention their name (TEMP1), how many questions they got right (TEMP2), how many questions you got right (TEMP3), and mention in some way that they are smarter than you.
  assign:messageToOtherPlayer:'LASTASK'
  msg:TEMP1:SNAME took the quiz_1 task after you. You were better, so they were asked to congratulate you. You might want to send them a short thank you message in return. This is what they wrote...$messageToOtherPlayer.
  log:The slave was asked to congratulate the previous player. They at least have to mention the other players name (TEMP1), how many questions the other player got right (TEMP2), how many questions they themselves got right (TEMP3), and mention in some way that the other player is smarter than them.
end:
;
;================================================================
;======================= start of the task ======================
;================================================================
image:taskimg/sets/jessika/Jessika_all_zipped_up_1.jpg
show:Hey $snick, It's me, Miss Jessica! DTITLE DNAME wants to know how smart $dom_her1 slaves are. So we will do a short quiz of $maxRounds questions. And at the end I will compare your result to the result of the last slave who did this quiz. If you did worse, I will at least think about exposing you in the temp expose gallery. So better do your best!
button:Yes, Miss Jessica
if: $punishWithNippleClamps
  image:taskimg/sets/jessika/Jessika_all_zipped_up_2_clothespins.jpg
  show:For some extra motivation, we will hurt your nipples after every wrong answer. So get 2 clothespins, and connect them via a thread that allows you to pull them off your nipples. I will be nice though, the first $allowedStrikes wrong answers will not be taken out on your nipples. So don't attach them to your nipples, yet.
  button:Thank you, Miss Jessica
fi:
image:taskimg/sets/jessika/Jessika_all_zipped_up_8.jpg
show:I might try to distract you a little by taking off some clothes and flashing my tits or pussy during the time you have to answer the question. Try not to get too distracted by me though, you only have $maxSecondsPerAnswer seconds to answer a question.
button:I will do my best
if: !HAS_PENIS || INCHASTITY
  show:Ok, let's start with the first question.
  wait:3
fi:
call:doAllRounds
call:finalEvaluation
image:taskimg/sets/jessika/Jessika_all_zipped_up_49.jpg
show:See you next time, $snick!
button:See you, Miss Jessica
settemp1:$wrongAnswers
savegtemp1:QUIZ_1_NUMBER_OF_WRONG_ANSWERS_LAST_PLAYER
settemp1:'SNAME'
savegtemp1:QUIZ_1_NAME_OF_LAST_PLAYER
;

; </code>