pre_sleep_events.qsrc 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. # pre_sleep_events
  2. menu_off = 1
  3. !! Pre-sleep events trigger after deciding to go to sleep, but before dreaming and falling asleep (and thus before the auto-save).
  4. !!
  5. !! Moved here from pre_sleep
  6. !! When done: move to pre_sleep, pre_sleep2
  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 succubusQW = 2:
  19. $sleep_events_priority[] = 'gs ''pre_sleep_events'', ''suc_event'' '
  20. end
  21. if magf2bdo = 2:
  22. $sleep_events_priority[] = 'gs ''pre_sleep_events'', ''magb_event'' '
  23. end
  24. if nichGalaOpponent = 30 and hour >= 19 and nichDebug = 1:
  25. !! Start abduction
  26. !! TODO
  27. $sleep_events_priority[] = 'gs ''pre_sleep_events'', ''nichServentSleepEvents_handler'', 2 '
  28. elseif nichGalaContractTaras = 1 and daystart >= nichGalaContractTarasLast + rand(3, 10):
  29. !! Taras visits
  30. $sleep_events_priority[] = 'gs ''pre_sleep_events'', ''nichServentSleepEvents_handler'', 1 '
  31. end
  32. if $loc = 'HotelRoom' and $loc_arg = 'therapist' and locat['A186'] = 2:
  33. $sleep_events_priority[] = 'gs ''therapist_home'', ''pre_sleep'' '
  34. end
  35. if daystart > sleepVars['sleep_reflection_day']: gs 'sleep_reflections', 'event_check'
  36. xgt 'pre_sleep_events', 'mod_sleepevents'
  37. end
  38. xgt 'pre_sleep_events', 'continue'
  39. end
  40. if $ARGS[0] = 'mod_sleepevents':
  41. !! This location is here to allow mods to hook into the system.
  42. !! Check for: if $ARGS[0] = 'pre_sleep_events' and $ARGS[1] = 'mod_sleepevents'
  43. !!
  44. !! You can add events as: $sleep_events[] = 'gs ''mod_loc'' ''mod_args0'' '
  45. !! A random event will be chosen from amongst the added ones.
  46. !! If an event MUST trigger (due to quest timing), add it to $sleep_events_priority[] = 'gs ''mod_loc'' ''mod_args0'' '
  47. !!
  48. !! If the event does not break the sleep cycle (merely interupts it) it needs to end with gs 'pre_sleep_events', 'event_end'
  49. !! If the event removed Sveta from her location (aka her sleep is cut short and/or she leaves her bed), you must call gs 'pre_sleep_events', 'exit'
  50. !! Example: Act: 'Leave': gs 'pre_sleep_events', 'exit' & gt $new_loc, $new_log_arg
  51. !!
  52. !! This is to cleanup all necessary variables.
  53. !!
  54. !! DO NOT DIRECTLY GOTO/GOSUB OUTOF THIS LOCATION. ALWAYS ADD IT TO THE QUEUEs!!!!
  55. !! IT WILL ALMOST CERTIANLY END BADLY WHEN MORE THAN 1 MOD IS INVOLVED.
  56. gs 'LOCA', 'pre_sleep_events', 'mod_sleepevents'
  57. xgt 'pre_sleep_events', 'event_handler'
  58. end
  59. if $ARGS[0] = 'event_handler':
  60. if sleepVars['events_done'] < 1:
  61. if arrsize('$sleep_events_priority') > 0:
  62. gt 'pre_sleep_events', 'event_handler2', 'priority'
  63. elseif arrsize('$sleep_events') > 0:
  64. gt 'pre_sleep_events', 'event_handler2'
  65. end
  66. end
  67. xgt 'pre_sleep_events', 'continue'
  68. end
  69. if $ARGS[0] = 'event_handler2':
  70. sleepVars['events_done'] += 1
  71. if $ARGS[1] = 'priority':
  72. temp_slev_id = rand(0, arrsize('$sleep_events_priority')-1)
  73. $temp_sleep_event_chosen = $sleep_events_priority[temp_slev_id]
  74. killvar '$sleep_events_priority', temp_slev_id
  75. else
  76. temp_slev_id = rand(0, arrsize('$sleep_events')-1)
  77. $temp_sleep_event_chosen = $sleep_events[temp_slev_id]
  78. killvar '$sleep_events', temp_slev_id
  79. end
  80. killvar 'temp_slev_id'
  81. dynamic $temp_sleep_event_chosen
  82. xgt 'pre_sleep_events', 'event_end'
  83. end
  84. if $ARGS[0] = 'event_end':
  85. killvar '$temp_sleep_event_chosen'
  86. !! if arrsize('$sleep_events_priority') > 0:
  87. !! gt 'bed_events', 'event_handler2', 'priority'
  88. !! end
  89. xgt 'pre_sleep_events', 'event_handler'
  90. end
  91. if $ARGS[0] = 'exit':
  92. sleepVars['events_done'] = 0
  93. killvar '$sleep_events'
  94. killvar '$sleep_events_priority'
  95. killvar 'temp_slev_id'
  96. killvar '$temp_sleep_event_chosen'
  97. InSleep = 0
  98. end
  99. if $ARGS[0] = 'continue':
  100. sleepVars['events_done'] = 0
  101. killvar '$sleep_events'
  102. killvar '$sleep_events_priority'
  103. killvar 'temp_slev_id'
  104. killvar '$temp_sleep_event_chosen'
  105. xgt 'pre_sleep', 'pre_sleep2'
  106. end
  107. !!=====================================!!
  108. !! !!
  109. !! Events !!
  110. !! !!
  111. !!=====================================!!
  112. if $ARGS[0] = 'suc_event':
  113. gt 'pre_sleep_events', 'succhoice'
  114. end
  115. if $ARGS[0] = 'magb_event':
  116. gt 'pre_sleep_events', 'magbstchoice'
  117. end
  118. if $ARGS[0] = 'nichServentSleepEvents_handler':
  119. if ARGS[1] = 1:
  120. !! the 100 events return back to sleep!
  121. gt 'nichBedroomServant', 'sleepEvents', 100
  122. elseif ARGS[1] = 2:
  123. gs 'pre_sleep_events', 'exit'
  124. gt 'nichBedroomServant', 'sleepEvents', 1000
  125. end
  126. end
  127. if $ARGS[0] = 'succhoice':
  128. menu_off = 1
  129. minut += 15
  130. gs 'stat'
  131. cla
  132. if $clothingworntype ! 'nude':
  133. '<center><img <<$set_imgh>> src="images/shared/home/bed.jpg"></center>'
  134. else
  135. '<center><img <<$set_imgh>> src="images/shared/home/bedroom/son.jpg"></center>'
  136. end
  137. ''
  138. 'You toss and turn for a while, but the energy that has been buzzing under your skin since that dream just won''t let you sleep.'
  139. ''
  140. 'Thinking about it you realize that you could push the energy out or pull it in!'
  141. ''
  142. '<font color="red"><b>You also feel that both are <i>permanent</i> choices.</b></font>'
  143. act 'Try to ignore it and go to sleep': gs 'pre_sleep_events', 'event_end'
  144. act 'Push the Energy out for all time': gt 'pre_sleep_events', 'succhoiceNO'
  145. act 'Pull the Energy in and let it change you permanently': gt 'pre_sleep_events', 'succhoiceYES'
  146. end
  147. if $ARGS[0] = 'succhoiceNO':
  148. menu_off = 1
  149. if $clothingworntype ! 'nude':
  150. '<center><img <<$set_imgh>> src="images/shared/home/bed.jpg"></center>'
  151. else
  152. '<center><img <<$set_imgh>> src="images/shared/home/bedroom/son.jpg"></center>'
  153. end
  154. ''
  155. 'You push the energy out of you and it dissipates.'
  156. succubusQW = 3
  157. pcs_horny = 0
  158. minut +=5
  159. gs 'stat'
  160. act 'Go to sleep':
  161. gs 'pre_sleep_events', 'event_end'
  162. end
  163. end
  164. if $ARGS[0] = 'succhoiceYES':
  165. menu_off = 1
  166. if $clothingworntype ! 'nude':
  167. '<center><img <<$set_imgh>> src="images/shared/home/bed.jpg"></center>'
  168. else
  169. '<center><img <<$set_imgh>> src="images/shared/home/bedroom/son.jpg"></center>'
  170. end
  171. succubusQW = 4
  172. ''
  173. 'You pull the energy deeper into yourself and hold it there.'
  174. ''
  175. 'Then you feel pressure building...'
  176. wait 450
  177. minut += 5
  178. gs 'stat'
  179. 'BUILDING...'
  180. wait 450
  181. minut += 5
  182. gs 'stat'
  183. '<b>BUILDING...</b>'
  184. wait 450
  185. minut += 5
  186. gs 'stat'
  187. 'Power bursts through your body causing you to hop out of bed.'
  188. act 'Continue': gt 'pre_sleep_events', 'succubinit'
  189. end
  190. if $ARGS[0] = 'succubinit':
  191. menu_off = 1
  192. minut += 10
  193. gs 'stat'
  194. !!Sets the succubus flag, succubus level (succublvl), Initial lesbian sex count (suclezsnapshot), initial Succubus hunger (succhungry),
  195. !! & the succubus descriptor ($sucself1). The -2 on succhungry is to give th PC 2 days to get in the Succubus grove.
  196. succubusflag = 1
  197. succublvl = 1
  198. suclezsnapshot = lesbian
  199. succhungry = -2
  200. sucwalkday = daystart + 2 + rand(0,5)
  201. $sucself1 = 'that feeling'
  202. pcs_horny = 100
  203. sleepVars['slept_in'] = 0
  204. strip_here = 0
  205. '<center><img <<$set_imgh>> src="images/pc/body/succubusself.jpg"></center>'
  206. *nl
  207. '<font color="red">You feel the power flowing around your body for several minutes, leaking through your skin and making changes all throughout you, before fading to a presence deep in your core leaving you looking the same as before... but feeling so different! </font>'
  208. if preg = 1:
  209. gs 'medical_din', 'remove_preg'
  210. RecovH = 0
  211. end
  212. act 'Finish': gs 'pre_sleep_events', 'event_end'
  213. end
  214. if $ARGS[0] = 'magbstchoice':
  215. *clr & cla
  216. menu_off = 1
  217. tittmp = tits + 1
  218. '<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tittmp>>.jpg"></center>'
  219. killvar 'tittmp'
  220. 'You have an odd dream where you are looking at your naked chest in a mirror and your breasts seem larger...'
  221. 'As the dream starts to drift away, you find yourself gazing at the reflection of your breasts and think:'
  222. act 'Nice, I wish my breasts really would grow.':
  223. magf2bdo = 1
  224. magtarcup += 1
  225. killvar 'mgf2bnocnt'
  226. gs 'pre_sleep_events', 'event_end'
  227. end
  228. act 'Eh, I don''t like them like that.':
  229. magf2bdo = 0
  230. mgf2bnocnt += 1
  231. gs 'pre_sleep_events', 'event_end'
  232. end
  233. end
  234. --- pre_sleep_events ---------------------------------