sleep_events.qsrc 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. # sleep_events
  2. $sleep_loc = 'sleep_events'
  3. menu_off = 1
  4. !! Sleep events trigger during the sleep cycle and can either wake you up or you can continue to sleep
  5. !!
  6. !! Moved here from sleep
  7. !! When done: Move to dream_events, sleep or wakeup
  8. !!=====================================!!
  9. !! !!
  10. !! Event handlers !!
  11. !! !!
  12. !!=====================================!!
  13. if $ARGS[0] = 'start' or $ARGS[0] = '':
  14. menu_off = 1
  15. killvar '$sleep_events'
  16. killvar '$sleep_events_priority'
  17. if sleepVars['events_active'] = 1:
  18. sleepVars['events_done'] = 0
  19. if vibratorIN = 1:
  20. if pcs_horny >= 100:
  21. $sleep_events[] = 'gt ''sleep_events'', ''vibr_orgasm'' '
  22. end
  23. elseif pcs_horny > 80 and pcs_sleep >= 30 and rand(0, 59) = 0 and succubusQW ! 1 and succubusQW ! 2:
  24. $sleep_events[] = 'gt ''sleep_events'', ''wake_horny'' '
  25. end
  26. gs 'sleep_events', 'mod_sleepevents'
  27. end
  28. end
  29. if $ARGS[0] = 'mod_sleepevents':
  30. !! This location is here to allow mods to hook into the system.
  31. !! Either check for: if $sleep_loc = 'sleep_events' and $ARGS[0] = 'mod_sleepevents'
  32. !!
  33. !! You can add events as: $sleep_events[] = 'gs ''mod_loc'' ''mod_args0'' '
  34. !! A random event will be chosen from amongst the added ones.
  35. !! If an event MUST trigger (due to quest timing), add it tp $sleep_events_priority[] = 'gs ''mod_loc'' ''mod_args0'' '
  36. !!
  37. !! If the event does not break the sleep cycle (merely interupts it) it needs to end with gs 'sleep_events', 'event_end'
  38. !! If the event removed Sveta from her location (aka her sleep is cut short and/or she leaves her bed), you must call gs 'sleep_events', 'exit'
  39. !!
  40. !! This is to cleanup all necessary variables.
  41. !!
  42. !! DO NOT DIRECTLY GOTO/GOSUB OUTOF THIS LOCATION. ALWAYS ADD IT TO THE QUEUEs!!!!
  43. !! IT WILL ALMOST CERTIANLY END BADLY WHEN MORE THAN 1 MOD IS INVOLVED.
  44. gs 'LOCA', 'mod_sleepevents'
  45. gs 'sleep_events', 'event_handler'
  46. end
  47. if $ARGS[0] = 'event_handler':
  48. if sleepVars['events_done'] < 1:
  49. if arrsize('$sleep_events_priority') > 0:
  50. xgt 'sleep_events', 'event_handler2', 'priority'
  51. elseif arrsize('$sleep_events') > 0:
  52. xgt 'sleep_events', 'event_handler2'
  53. end
  54. end
  55. gs 'sleep_events', 'continue', 'no_interupt'
  56. end
  57. if $ARGS[0] = 'event_handler2':
  58. sleepVars['events_done'] += 1
  59. if $ARGS[1] = 'priority':
  60. temp_slev_id = rand(0, arrsize('$sleep_events_priority')-1)
  61. $temp_sleep_event_chosen = $sleep_events_priority[temp_slev_id]
  62. killvar '$sleep_events_priority', temp_slev_id
  63. else
  64. temp_slev_id = rand(0, arrsize('$sleep_events')-1)
  65. $temp_sleep_event_chosen = $sleep_events[temp_slev_id]
  66. killvar '$sleep_events', temp_slev_id
  67. end
  68. killvar 'temp_slev_id'
  69. dynamic $temp_sleep_event_chosen
  70. gs 'sleep_events', 'event_end', 'sleep'
  71. end
  72. if $ARGS[0] = 'event_end':
  73. killvar '$temp_sleep_event_chosen'
  74. !! if arrsize('$sleep_events_priority') > 0:
  75. !! gt 'bed_events', 'event_handler2', 'priority'
  76. !! end
  77. if $ARGS[1] = 'dream':
  78. gs 'sleep_events', 'continue', 'dream'
  79. elseif $ARGS[1] = 'wake':
  80. gs 'sleep_events', 'exit'
  81. gs 'wakeup', 'start'
  82. elseif $ARGS[1] = 'no_interupt':
  83. gs 'sleep_events', 'continue', 'no_interupt'
  84. elseif $ARGS[1] = 'sleep':
  85. gs 'sleep_events', 'continue', 'sleep'
  86. else
  87. gs 'sleep_events', 'continue', 'sleep'
  88. end
  89. end
  90. if $ARGS[0] = 'exit':
  91. sleepVars['events_done'] = 0
  92. killvar '$sleep_loc'
  93. killvar '$sleep_events'
  94. killvar '$sleep_events_priority'
  95. killvar 'temp_slev_id'
  96. killvar '$temp_sleep_event_chosen'
  97. end
  98. if $ARGS[0] = 'continue':
  99. sleepVars['events_done'] = 0
  100. killvar '$sleep_loc'
  101. killvar '$sleep_events'
  102. killvar '$sleep_events_priority'
  103. killvar 'temp_slev_id'
  104. killvar '$temp_sleep_event_chosen'
  105. if $ARGS[1] = 'sleep':
  106. xgt 'sleep', 'sleep_handler'
  107. elseif $ARGS[1] = 'dream':
  108. gt 'sleep', 'start'
  109. else
  110. !! Empty on purpose
  111. end
  112. end
  113. !!=====================================!!
  114. !! !!
  115. !! Events !!
  116. !! !!
  117. !!=====================================!!
  118. if $ARGS[0] = 'vibr_orgasm':
  119. menu_off = 1
  120. pcs_horny = 0
  121. orgasm += 1
  122. minut += 5
  123. gs 'stat'
  124. '<center><img <<$set_imgh>> src="images/shared/sex/oface/o_face.jpg"></center>'
  125. *nl
  126. 'You abruptly wake up in the throes of an orgasm. As you recover, you check the time, <<func(''alarmclock'', ''alarm_display'', hour, minut)>>.'
  127. act 'Go back to sleep':
  128. gt 'sleep_events', 'event_end', 'dream'
  129. end
  130. act 'Give up trying to sleep':
  131. *clr & cla
  132. '<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
  133. *nl
  134. 'Maybe trying to sleep with a vibrator in your pussy wasn''t such a good idea.'
  135. gs 'sleep_events', 'event_end', 'wake'
  136. end
  137. exit
  138. end
  139. !! Exclusions for succubus dreams as they set horny to 100 and will always get overridden otherwise
  140. if $ARGS[0] = 'wake_horny':
  141. menu_off = 1
  142. InSleep = 1
  143. SleepHorny += 1
  144. gs 'stat'
  145. if $pantyworntype = 'none':
  146. if SleepHorny = 1:
  147. '<center><img <<$set_imgh>> src="images/shared/home/sleep_horny.jpg"></center>'
  148. elseif SleepHorny = 2:
  149. '<center><img <<$set_imgh>> src="images/shared/sex/mast/klit.jpg"></center>'
  150. elseif SleepHorny >= 3:
  151. '<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
  152. end
  153. else
  154. if SleepHorny = 1:
  155. '<center><img <<$set_imgh>> src="images/shared/sex/mast/start.jpg"></center>'
  156. elseif SleepHorny = 2:
  157. '<center><img <<$set_imgh>> src="images/shared/sex/undress/kiska.jpg"></center>'
  158. elseif SleepHorny >= 3:
  159. '<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
  160. end
  161. end
  162. *nl
  163. 'You glance at your alarm clock. It reads <<func(''alarmclock'', ''alarm_display'', hour, minut)>>.'
  164. *nl
  165. if SleepHorny = 1:
  166. 'Your wet dream and overall horniness rouse you from your sleep. From one moment to the next, you are wide awake and very much aware that your pussy is hot and wet.'
  167. *nl
  168. 'You could try and go back to sleep, of course, but it''s doubtful that you would find this kind of sleep very restful; not to mention the frustration that comes with ignoring your needs, but masturbating is an option, too, and not the worst one in this situation. It might take some time, but you''d be able to sleep like a baby after.'
  169. *nl
  170. 'Of course, you could always just give up on trying to sleep and just get up.'
  171. elseif SleepHorny = 2:
  172. 'You''re so horny that you''ve woken a second time. Your pussy is still wet and wanting attention.'
  173. *nl
  174. 'You could try and get back to sleep again, but it''s doubtful that you will get much sleep, and continuously ignoring your needs won''t help; maybe you should masturbate, and make the most of the time that''s left.'
  175. *nl
  176. 'Soon you will have to get up one way or another.'
  177. elseif SleepHorny >= 3:
  178. 'Once again your horniness has roused you from your sleep. This is getting ridiculous! You are finding it very difficult to get any sleep at all.'
  179. *nl
  180. 'Going back to sleep almost feels like a waste of time at this point; you won''t get much rest at all, at least until you fix the problem.'
  181. *nl
  182. if $pantyworntype ! 'none':
  183. gs 'underwear', 'remove'
  184. 'You''ve removed your underwear, as your panties were soaked through.'
  185. *nl
  186. end
  187. 'Maybe you should just get up.'
  188. end
  189. if $loc = 'bedrPar' and sisterLesb = 6 and hour < 6:
  190. *nl
  191. 'Or... you could wake up Anya and see if your dearest sister would be willing to help you with that.'
  192. elseif $loc = 'FedorEv4':
  193. *nl
  194. 'Or... you could wake up Fedor and see if your boyfriend can''t help you with that.'
  195. elseif $loc = 'bedr' and husband > 0:
  196. *nl
  197. 'Or... you could wake up <<$husName>> and see if your husband can''t help you with that.'
  198. end
  199. act 'Try and go back to sleep':
  200. pcs_mood -= 10
  201. pcs_sleep -= 5
  202. gt 'sleep_events', 'event_end', 'dream'
  203. end
  204. act 'Masturbate':
  205. InSleep = 0
  206. gs 'sleep_events', 'exit'
  207. gt 'selfplay', 'start'
  208. end
  209. act 'Get out of bed (0:10)':
  210. minut += 10
  211. gt 'sleep_events', 'event_end', 'wake'
  212. end
  213. if strip_here = 1:
  214. act 'Get out of bed and get dressed (0:15)':
  215. minut += 15
  216. gs 'clothing', 'wear', $lastwornclothingtype['bed'], lastwornclothingnumber['bed']
  217. gs 'panties', 'wear', $lastwornpantytype['bed'], lastwornpantynumber['bed']
  218. gs 'bras', 'wear', $lastwornbratype['bed'], lastwornbranumber['bed']
  219. if $bed['shoetype'] ! 'none':
  220. gs 'shoes', 'wear', $bed['shoetype'], bed['shoenumber']
  221. end
  222. gt 'sleep_events', 'event_end', 'wake'
  223. end
  224. end
  225. if $loc = 'bedrPar' and sisterLesb = 6 and hour < 6:
  226. act 'Wake Anya and see if she''s in the mood':
  227. strip_here = 0
  228. InSleep = 0
  229. gs 'sleep_events', 'exit'
  230. gt 'sistersleep', 'sister_sleep'
  231. end
  232. elseif $loc = 'FedorEv4':
  233. act 'Wake Fedor and see if he''s in the mood':
  234. strip_here = 0
  235. InSleep = 0
  236. gs 'sleep_events', 'exit'
  237. gt 'FedorEv4', 'Bedroom 1'
  238. end
  239. !!Intro text doesn''t quite fit event (but doesn''t quite fit - try for baby - scenario either) - custom scene from VK?
  240. elseif ($loc = 'bedr' or $loc = 'bedr2x') and husband > 0:
  241. act 'Wake your husband and see if he''s in the mood':
  242. strip_here = 0
  243. InSleep = 0
  244. gs 'sleep_event', 'exit'
  245. gt 'husbSex', 'variant'
  246. !!Should be custom scene - maybe boyfriend/husband overhaul can cover this?
  247. end
  248. end
  249. end
  250. --- sleep_events ---------------------------------