pre_sleep.qsrc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. # pre_sleep
  2. $sleep_loc = 'pre_sleep'
  3. !! Deals with all the triggers that happen to prepare to for the sleep cycle, before the dream events start.
  4. !!
  5. !! Moved here from pre_sleep_events
  6. !! When done: Move to dream_events
  7. if $ARGS[0] = 'start' or $ARGS[0] = '':
  8. menu_off = 1
  9. gt 'pre_sleep_events', 'start'
  10. end
  11. if $ARGS[0] = 'pre_sleep2':
  12. menu_off = 1
  13. if clo_flag['bed'] = 0:
  14. clo_flag['bed'] = 1
  15. $lastwornclothingtype['bed'] = $clothingworntype
  16. lastwornclothingnumber['bed'] = clothingwornnumber
  17. $lastwornpantytype['bed'] = $pantyworntype
  18. lastwornpantynumber['bed'] = pantywornnumber
  19. $lastwornbratype['bed'] = $braworntype
  20. lastwornbranumber['bed'] = brawornnumber
  21. end
  22. if sleepVars['bedPanty'] = 2:
  23. gs 'underwear', 'remove'
  24. elseif sleepVars['bedPanty'] = 1:
  25. gs 'underwear', 'wear'
  26. end
  27. if $clothingworntype ! 'nude':
  28. strip_here = 1
  29. gs 'clothing', 'strip'
  30. end
  31. gt 'pre_sleep', 'prepare_sleep'
  32. end
  33. if $ARGS[0] = 'prepare_sleep':
  34. menu_off = 1
  35. if $clothingworntype ! 'nude':
  36. '<center><img <<$set_imgh>> src="images/shared/home/bed.jpg"></center>'
  37. else
  38. '<center><img <<$set_imgh>> src="images/shared/home/bedroom/son.jpg"></center>'
  39. end
  40. gs 'stat'
  41. *nl
  42. if alarmVars['alarmOn'] = 1:
  43. if alarmVars['alarm_holiday'] = 1 and kanikuli ! 0 or ((hour => alarmVars['timerEndH'] and (week = 5 or week = 6)) or (hour < alarmVars['timerEndH'] and (week = 6 or week = 7))):
  44. 'You run through your regular nightly routine, setting your alarm for <<func(''alarmclock'', ''alarm_display'', alarmVars[''timerEndH''], alarmVars[''timerEndM''])>>, you undress, and prepare for sleep:'
  45. else
  46. 'You run through your regular nightly routine, setting your alarm for <<func(''alarmclock'', ''alarm_display'', alarmVars[''timerH''], alarmVars[''timerM''])>>, you undress, and prepare for sleep:'
  47. end
  48. else
  49. 'You run through your regular nightly routine, not bothering to setting your alarm, you undress, and prepare for sleep:'
  50. end
  51. pcs_hairbsh = 0
  52. pain['killer'] = 0
  53. if mid($start_type, 1, 2) = 'sg' and $loc ! 'bedrPar' and SchoolAtestat = 0:
  54. sleepVars['notathomesleep'] += 1
  55. else
  56. sleepVars['notathomesleep'] = 0
  57. end
  58. if succubusflag = 1 and sucwalkday <= daystart and (succhungry < (0 - 1 - succublvl) or pcs_willpwr < ((succublvl * willpowermax) / 13) or sucpowzeroed >= 3): gs 'succubus', 'sucwalkinginit'
  59. if analplugIN = 1 and vibratorIN = 1:
  60. *nl
  61. if sleepVars['bedAnal'] = 1 and sleepVars['bedVibrator'] = 1:
  62. analplugIN = 0
  63. vibratorIN = 0
  64. gs 'stat'
  65. 'You remove your butt plug and your vibrator.'
  66. elseif sleepVars['bedAnal'] = 1 and sleepVars['bedVibrator'] = 0:
  67. vibratorIN = 0
  68. gs 'stat'
  69. 'You decide to leave your butt plug in, but remove your vibrator.'
  70. elseif sleepVars['bedAnal'] = 0 and sleepVars['bedVibrator'] = 1:
  71. analplugIN = 0
  72. gs 'stat'
  73. 'You decide to remove your butt plug, but leave your vibrator in.'
  74. else
  75. 'You decide to leave your butt plug and vibrator in.'
  76. end
  77. elseif analplugIN = 1 and vibratorIN = 0:
  78. *nl
  79. if sleepVars['bedAnal'] = 1:
  80. analplugIN = 0
  81. gs 'stat'
  82. 'You remove your butt plug.'
  83. else
  84. *nl
  85. 'You decide to leave your butt plug in.'
  86. end
  87. elseif analplugIN = 0 and vibratorIN = 1:
  88. *nl
  89. if sleepVars['bedVibrator'] = 1:
  90. vibratorIN = 0
  91. 'You remove your vibrator.'
  92. else
  93. 'You decide to leave your vibrator in.'
  94. end
  95. end
  96. if $shoeworntype = 'none':
  97. $bed['shoetype'] = 'none'
  98. else
  99. $bed['shoetype'] = $shoeworntype
  100. bed['shoenumber'] = shoewornnumber
  101. !! gs 'shoes', 'strip'
  102. end
  103. *nl
  104. if sleepVars['bedPanty'] = 1:
  105. if $pantyworntype = 'none' and $braworntype = 'none':
  106. 'You put on your bra and panties.'
  107. elseif $pantyworntype ! 'none' and $braworntype = 'none':
  108. 'You put on your bra.'
  109. elseif $pantyworntype ! 'none' and $braworntype ! 'none':
  110. 'You put on your panties.'
  111. else
  112. 'You change your bra and panties.'
  113. end
  114. elseif sleepVars['bedPanty'] = 2:
  115. if $pantyworntype ! 'none' or $braworntype ! 'none':
  116. 'You remove your bra and panties.'
  117. elseif $pantyworntype ! 'none' and $braworntype = 'none':
  118. 'You remove your panties.'
  119. elseif $braworntype ! 'none':
  120. 'You remove your bra.'
  121. end
  122. else
  123. 'You were too tired to worry about your underwear, so for tonight you left it as is.'
  124. end
  125. *nl
  126. if $hairstyle ! '':
  127. $hairstyle
  128. else
  129. 'Your hair is loose and free.'
  130. end
  131. if pcs_makeup > 1 and cosmetic_tattoo = 0:
  132. pcs_makeup = 0
  133. vidageday -= 1
  134. gs 'body', 'SkinLoss', 'MakeUpSleep'
  135. *nl
  136. 'You went to bed wearing your makeup, which will smear your face as you sleep; your skin will age faster from this!'
  137. end
  138. if fat > 5 and stringimplant = 1: silicone += 1 & fat -= 5
  139. xgt 'pre_sleep', 'mod_sleeptriggers'
  140. end
  141. if $ARGS[0] = 'mod_sleeptriggers':
  142. !! This location is here to allow mods to hook into the system.
  143. !! Either check for: if $sleep_loc = 'pre_sleep' and $ARGS[0] = 'mod_triggers'
  144. !!
  145. !! This is NOT for events!!
  146. xgt 'pre_sleep', 'end'
  147. end
  148. if $ARGS[0] = 'end':
  149. act 'Sleep...':
  150. !!flag to stop autosave breaking my awesome clothing thingy
  151. clo_flag['bed'] = 0
  152. InSleep = 1
  153. gs 'stat'
  154. gt 'sleep', 'start'
  155. end
  156. end
  157. --- pre_sleep ---------------------------------