1
0

sleep_events.qsrc 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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[] = 'gs ''sleep_events'', ''vibr_orgasm'' '
  22. end
  23. elseif pcs_horny > 80 and pcs_sleep >= 30 and rand (0, 299) = 0 and succubusQW ! 1 and succubusQW ! 2:
  24. $sleep_events[] = 'gs ''sleep_events'', ''wake_horny'' '
  25. end
  26. gs 'sleep_events', 'mod_events'
  27. end
  28. end
  29. if $ARGS[0] = 'mod_events':
  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_events'
  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 'sleep_events', 'event_handler'
  45. end
  46. if $ARGS[0] = 'event_handler':
  47. if sleepVars['events_done'] < 1:
  48. if arrsize('$sleep_events_priority') > 0:
  49. xgt 'sleep_events', 'event_handler2', 'priority'
  50. elseif arrsize('$sleep_events') > 0:
  51. xgt 'sleep_events', 'event_handler2'
  52. end
  53. end
  54. gs 'sleep_events', 'continue', 'dream'
  55. end
  56. if $ARGS[0] = 'event_handler2':
  57. sleepVars['events_done'] += 1
  58. if $ARGS[1] = 'priority':
  59. temp_slev_id = rand(0, arrsize('$sleep_events_priority')-1)
  60. $temp_sleep_event_chosen = $sleep_events_priority[temp_slev_id]
  61. killvar '$sleep_events_priority', temp_slev_id
  62. else
  63. temp_slev_id = rand(0, arrsize('$sleep_events')-1)
  64. $temp_sleep_event_chosen = $sleep_events[temp_slev_id]
  65. killvar '$sleep_events', temp_slev_id
  66. end
  67. killvar 'temp_slev_id'
  68. dynamic $temp_sleep_event_chosen
  69. end
  70. if $ARGS[0] = 'event_end':
  71. killvar '$temp_sleep_event_chosen'
  72. !! if arrsize('$sleep_events_priority') > 0:
  73. !! gt 'bed_events', 'event_handler2', 'priority'
  74. !! end
  75. if $ARGS[1] = '' or $ARGS[1] = 'sleep':
  76. gs 'sleep_events', 'continue', 'sleep'
  77. elseif $ARGS[1] = 'dream':
  78. gs 'sleep_events', 'continue', 'dream'
  79. else
  80. gt 'wakeup', 'start'
  81. end
  82. end
  83. if $ARGS[0] = 'exit':
  84. sleepVars['events_done'] = 0
  85. killvar '$sleep_loc'
  86. killvar '$sleep_events'
  87. killvar '$sleep_events_priority'
  88. killvar 'temp_slev_id'
  89. killvar '$temp_sleep_event_chosen'
  90. end
  91. if $ARGS[0] = 'continue':
  92. sleepVars['events_done'] = 0
  93. killvar '$sleep_loc'
  94. killvar '$sleep_events'
  95. killvar '$sleep_events_priority'
  96. killvar 'temp_slev_id'
  97. killvar '$temp_sleep_event_chosen'
  98. if $ARGS[1] = '' or $ARGS[1] = 'sleep':
  99. xgt 'sleep', 'sleep_handler'
  100. elseif $ARGS[1] = 'dream':
  101. !! empty on purpose
  102. else
  103. gt 'dream_events', 'start'
  104. end
  105. end
  106. !!=====================================!!
  107. !! !!
  108. !! Events !!
  109. !! !!
  110. !!=====================================!!
  111. if $ARGS[0] = 'vibr_orgasm':
  112. *clr & cla
  113. pcs_horny = 0
  114. orgasm += 1
  115. minut += 5
  116. gs 'stat'
  117. '<center><img <<$set_imgh>> src="images/shared/sex/oface/o_face.jpg"></center>'
  118. *nl
  119. 'You abruptly wake up in the throes of an orgasm. As you recover, you check the time, <<func(''bed2'', ''alarm_display'', hour, minut)>>.'
  120. act 'Go back to sleep':
  121. gs 'dream_events', 'event_end'
  122. end
  123. act 'Give up trying to sleep':
  124. *clr & cla
  125. '<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
  126. *nl
  127. 'Maybe trying to sleep with a vibrator in your pussy wasn''t such a good idea.'
  128. gs 'dream_events', 'event_end', 'wake'
  129. end
  130. exit
  131. end
  132. !! Exclusions for succubus dreams as they set horny to 100 and will always get overridden otherwise
  133. if $ARGS[0] = 'wake_horny':
  134. menu_off = 1
  135. InSleep = 1
  136. SleepHorny += 1
  137. gs 'stat'
  138. if $pantyworntype = 'none':
  139. if SleepHorny = 1:
  140. '<center><img <<$set_imgh>> src="images/shared/home/sleep_horny.jpg"></center>'
  141. elseif SleepHorny = 2:
  142. '<center><img <<$set_imgh>> src="images/shared/sex/mast/klit.jpg"></center>'
  143. elseif SleepHorny >= 3:
  144. '<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
  145. end
  146. else
  147. if SleepHorny = 1:
  148. '<center><img <<$set_imgh>> src="images/shared/sex/mast/start.jpg"></center>'
  149. elseif SleepHorny = 2:
  150. '<center><img <<$set_imgh>> src="images/shared/sex/undress/kiska.jpg"></center>'
  151. elseif SleepHorny >= 3:
  152. '<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
  153. end
  154. end
  155. *nl
  156. 'You glance at your alarm clock. It reads <<func(''bed2'', ''alarm_display'', hour, minut)>>.'
  157. *nl
  158. if SleepHorny = 1:
  159. '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.'
  160. *nl
  161. '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.'
  162. *nl
  163. 'Of course, you could always just give up on trying to sleep and just get up.'
  164. elseif SleepHorny = 2:
  165. 'You''re so horny that you''ve woken a second time. Your pussy is still wet and wanting attention.'
  166. *nl
  167. '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.'
  168. *nl
  169. 'Soon you will have to get up one way or another.'
  170. elseif SleepHorny >= 3:
  171. '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.'
  172. *nl
  173. '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.'
  174. *nl
  175. if $pantyworntype ! 'none':
  176. gs 'underwear', 'remove'
  177. 'You''ve removed your underwear, as your panties were soaked through.'
  178. *nl
  179. end
  180. 'Maybe you should just get up.'
  181. end
  182. if $loc = 'bedrPar' and sisterLesb = 6 and hour < 6:
  183. *nl
  184. 'Or... you could wake up Anya and see if your dearest sister would be willing to help you with that.'
  185. elseif $loc = 'FedorEv4':
  186. *nl
  187. 'Or... you could wake up Fedor and see if your boyfriend can''t help you with that.'
  188. elseif $loc = 'bedr' and husband > 0:
  189. *nl
  190. 'Or... you could wake up <<$husName>> and see if your husband can''t help you with that.'
  191. end
  192. act 'Try and go back to sleep':
  193. pcs_mood -= 10
  194. pcs_sleep -= 5
  195. gs 'sleep_events', 'exit'
  196. gt 'dream_events', 'dream'
  197. end
  198. act 'Masturbate':
  199. InSleep = 0
  200. gs 'sleep_events', 'exit'
  201. gt 'selfplay', 'start'
  202. end
  203. act 'Get out of bed (0:10)':
  204. minut += 10
  205. gs 'sleep_events', 'event_end', 'wake'
  206. end
  207. if strip_here = 1:
  208. act 'Get out of bed and get dressed (0:15)':
  209. minut += 15
  210. gs 'clothing', 'wear', $lastwornclothingtype['bed'], lastwornclothingnumber['bed']
  211. gs 'panties', 'wear', $lastwornpantytype['bed'], lastwornpantynumber['bed']
  212. gs 'bras', 'wear', $lastwornbratype['bed'], lastwornbranumber['bed']
  213. if $bed['shoetype'] ! 'none':
  214. gs 'shoes', 'wear', $bed['shoetype'], bed['shoenumber']
  215. end
  216. gs 'sleep_events', 'event_end', 'wake'
  217. end
  218. end
  219. if $loc = 'bedrPar' and sisterLesb = 6 and hour < 6:
  220. act 'Wake Anya and see if she''s in the mood':
  221. strip_here = 0
  222. InSleep = 0
  223. gs 'sleep_events', 'exit'
  224. gt 'sistersleep', 'sister_sleep'
  225. end
  226. elseif $loc = 'FedorEv4':
  227. act 'Wake Fedor and see if he''s in the mood':
  228. strip_here = 0
  229. InSleep = 0
  230. gs 'sleep_events', 'exit'
  231. gt 'FedorEv4', 'Bedroom 1'
  232. end
  233. !!Intro text doesn''t quite fit event (but doesn''t quite fit - try for baby - scenario either) - custom scene from VK?
  234. elseif ($loc = 'bedr' or $loc = 'bedr2x') and husband > 0:
  235. act 'Wake your husband and see if he''s in the mood':
  236. strip_here = 0
  237. InSleep = 0
  238. gs 'sleep_event', 'exit'
  239. gt 'husbSex', 'variant'
  240. !!Should be custom scene - maybe boyfriend/husband overhaul can cover this?
  241. end
  242. end
  243. end
  244. --- sleep_events ---------------------------------