sleep_events.qsrc 9.2 KB

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