pre_sleep_events.qsrc 8.0 KB

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