hourly_events.qsrc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. # hourly_events
  2. !!===========================================================================!!
  3. !! !!
  4. !! Hourly events. !!
  5. !! !!
  6. !!===========================================================================!!
  7. if pcs_nerd > 0:
  8. if daystart = lastreadday:
  9. !!<font color="green">You are completely healthy shine and a healthy glow.</font>
  10. if pcs_mood < 90: pcs_mood += rand(5,10)
  11. $mudnerd = '<font color="green">You are lost in a fantasy after reading a book.</font>'
  12. elseif daystart = lastreadday + 1:
  13. $mudnerd = '<font color="black">You are a little bored and want to plunge into a book.</font>'
  14. elseif daystart = lastreadday + 2:
  15. if pcs_mood > 50: pcs_mood -= rand(5,10)
  16. $mudnerd = '<font color="red">You really want to read something.</font>'
  17. elseif daystart => lastreadday + 3:
  18. if pcs_mood > 10: pcs_mood -= rand(5,10)
  19. $mudnerd = '<font color="red"><b>You have an incredibly strong desire to read!!!</b></font>'
  20. pcs_nerd = max(0, pcs_nerd / 10 - stat['body_count'])
  21. end
  22. end
  23. if pcs_nerd <= 0:
  24. killvar 'pcs_nerd'
  25. killvar '$mudnerd'
  26. end
  27. if obkvsdam > 0: obkvsdam = rand(2, 5)
  28. if scpopt > 1: scpopt = 0
  29. if insleep = 1:
  30. pcs_energy -= (succublvl / 2)
  31. pcs_hydra -= (succublvl / 2)
  32. pcs_stam += iif(pcs_sleep > 90, stammax/2, iif(pcs_sleep > 80, stammax/4, stammax/8))
  33. if alko > 0: alko -= 1
  34. pcs_willpower_feeder += willpowermax * 4
  35. pcs_willpwr += pcs_willpower_feeder / 100
  36. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  37. else
  38. pcs_energy -= succublvl
  39. pcs_hydra -= succublvl
  40. if hypnoAddict > 0: dynamic $hypnoAddiction
  41. if InSleepWake <= hour or InSleepWake[1] < daystart: pcs_sleep -= 4
  42. if pcs_sleep <= 0 and succublvl = 0:
  43. pcs_condition['lack_of_sleep'] += 2
  44. if pcs_mood['slpredcheck'] = 1: pcs_mood -= 5
  45. pcs_mood['slpredcheck'] = 1
  46. else
  47. pcs_mood['slpredcheck'] = 0
  48. end
  49. if pcs_energy <= 0:
  50. if pcs_mood['nrgredcheck'] = 1: pcs_mood -= 5
  51. pcs_mood['nrgredcheck'] = 1
  52. else
  53. pcs_mood['nrgredcheck'] = 0
  54. end
  55. if pcs_hydra <= 0:
  56. if pcs_mood['hydredcheck'] = 1: pcs_mood -= 5
  57. pcs_mood['hydredcheck'] = 1
  58. else
  59. pcs_mood['hydredcheck'] = 0
  60. end
  61. if pcs_stam <= 0:
  62. pcs_mood -= rand(5,10)
  63. pcs_sleep -= rand(3,6)
  64. elseif pcs_stam < stammax / 5 and stammax > 50:
  65. pcs_mood -= rand(2,5)
  66. end
  67. if pcs_energy > 20: pcs_stam += stammax / max(5, 110-pcs_energy)
  68. pcs_willpower_feeder += willpowermax*4/3
  69. pcs_willpwr += pcs_willpower_feeder/100
  70. pcs_willpower_feeder = pcs_willpower_feeder mod 100
  71. end
  72. gs 'drugs', 'smoke', 'hourly_events'
  73. gs 'drugs', 'joint', 'hourly_events'
  74. gs 'drugs', 'heroin', 'hourly_events'
  75. gs 'drugs', 'cocaine', 'hourly_events'
  76. gs 'drugs', 'amphetamine', 'hourly_events'
  77. gs 'drugs', 'aphrodisiac', 'hourly_events'
  78. !!=======================================================!!
  79. !! !!Willpower!! !!
  80. !!=======================================================!!
  81. if pcs_willpwr > willpowermax: pcs_willpwr = willpowermax
  82. if pcs_mood <= 20: will_counter -= 2
  83. if willpowermax > 100:
  84. if pcs_willpwr < 25: will_counter -= 1
  85. else
  86. if pcs_willpwr < willpowermax/4: will_counter -= 1
  87. end
  88. if will_counter <= -10:
  89. willpowermax -= 1
  90. will_counter = 0
  91. end
  92. if pcs_stam > stammax: pcs_stam = stammax
  93. !!=======================================================!!
  94. gs 'femcyc'
  95. if Insleep = 0 and pcs_period['period_warning'] = 0 and placebopart > 0 and LutH > 0 and knowpreg = 0:
  96. pcs_period['period_warning'] = 1
  97. msg'Your stomach suddenly twinges, muscles contracting so tightly that they start to cramp. It seems your period is on its way.'
  98. elseif pcs_period['period_warning'] = 1 and LutH_Max-LutH <= 2:
  99. pcs_period['period_warning'] = 2
  100. if isprok = 1:
  101. msg'Your stomach twinges again. Another cramp of pain. It must mean your period is about to start. Good thing you''re already put a tampon in.'
  102. elseif $location_type = 'private' and isprokp = 1:
  103. msg'Your stomach twinges again. Another cramp of pain. You''re pretty sure you know what''s happening but take advantage of the privacy pull down your panties anyways to confirm; Yup. Your pad is already spotting, which must mean your period is imminent. Good thing you''re already prepared.'
  104. elseif $location_type = 'private' and $pantyworntype ! 'none':
  105. msg'Your stomach twinges again. Another cramp of pain. You''re pretty sure you know what''s happening but take advantage of the privacy pull down your panties anyways to confirm; Yup. Your underwear is already spotting. Your period is imminent.'
  106. else
  107. msg'Your stomach twinges again. Another cramp of pain. It must mean your period is about to start. You really need to get a tampon in there ASAP.'
  108. end
  109. elseif mesec > 0:
  110. period['cramp'] = 0
  111. end
  112. !! code to trigger vomitting based on morning sickness, hangovers, or just plain bad luck
  113. if Insleep = 0:
  114. vomit['daily_check'] = 0
  115. !!if Insleep = 1:
  116. else
  117. if vomit['daily_check'] = 0:
  118. vomit['daily_check'] = 1
  119. if alko > 4:
  120. vomit['hangover'] = 1
  121. elseif pregchem > 600 and pregchem < 2160 and rand(1,4) = 4:
  122. vomit['morning_sick'] = 1
  123. elseif rand(1,100) = 100:
  124. vomit['unlucky'] = 1
  125. end
  126. end
  127. end
  128. !!Mana regen
  129. pcs_mana += manamax / 20
  130. if alko > 0 and alkoblock = 0:
  131. if alko >= 6:
  132. if pcs_run > 0: run_deg -= 1
  133. if vball_lvl >= 50: vball_deg -= 1
  134. if alko >= 10:
  135. if pcs_stren > 10: stren_deg -= 1
  136. if pcs_vital > 10: vital_deg -= 1
  137. if pcs_intel > 10: intel_deg -= 1
  138. alko -= rand (0,1)
  139. end
  140. end
  141. alko -= rand (0,1)
  142. elseif alko < 0:
  143. alko = 0
  144. end
  145. if shame > 0:
  146. shame -= 1
  147. pcs_mood -= 5
  148. end
  149. if $pantyworntype = 'none' and PCloPants > 0 and PCloPanties = 0 and $clothingworntype ! 'nude' and pcs_traits['commando_lvl'] < 2:
  150. !! mosol += (2 - pcs_traits['commando_lvl'])
  151. if pcs_traits['commando_lvl'] < 1:
  152. mosol += 2
  153. elseif pcs_traits['commando_lvl'] = 1:
  154. mosol += 1
  155. end
  156. if mosol >= 100: pcs_mood -= 5
  157. if mosol >= 60 and pain['pubic'] < 80: gs 'pain', 1, 'pubic', 'ache'
  158. end
  159. if pcs_energy > 100:
  160. fat += (pcs_energy - 100) / 4
  161. pcs_energy = 100
  162. elseif pcs_energy <= (10 + vitalbuf / 25) and fat > (2 + vitalbuf / 25):
  163. fat -= 2
  164. pcs_energy += 6
  165. end
  166. if pcs_hydra > 200: pcs_hydra = 200
  167. if mosol > 0:
  168. if $pantyworntype ! 'none' or $clothingworntype = 'nude' or PCloPanties = 1:
  169. mosol -= rand(0,1)
  170. end
  171. end
  172. if pcs_lipbalm > 0: pcs_lipbalm -= 1
  173. if sickstage = 1:
  174. sick += 1
  175. sicktimer += 1
  176. if sicktimer >= 80:
  177. sickstage = 2
  178. sicktimer = 0
  179. end
  180. end
  181. if sickstage = 2:
  182. if sick > 0: sick -= 1
  183. if sick <= 0:
  184. sick = 0
  185. sickstage = 0
  186. end
  187. end
  188. !!STDs which hurt mod
  189. if Gerpes >= 3 or Sifilis >= 21 or Triper > 2 and pcs_mood >= 15:
  190. pcs_mood -= 5
  191. end
  192. if perkice > 0: perkice -= 1
  193. if frost > 0: frost -= 1
  194. if KGOLpers > 0:
  195. if KGHP < KGHPMAX: KGHP += 10
  196. if KGMana < KGManaMax: KGMana += 10
  197. end
  198. !! pain[0] = pain['total'] , pain[1] = pain['damage'] , pain[2] = pain['relief']
  199. i = arrsize('pain')
  200. :statpainloop
  201. if i > 0:
  202. i -= 1
  203. pain[i] -= rand(0,1)
  204. if pain[i] < 0: pain[i] = 0
  205. jump 'statpainloop'
  206. end
  207. !! Panty happiness gain
  208. if pcs_mood < 60 and $pantyworntype = 'cats': pcs_mood += 2
  209. if pcs_mood < 60 and $braworntype = 'cats': pcs_mood += 2
  210. !!Arousal adjustments
  211. if (PanThinness >= 5 and BraThinness >= 5) and pcs_horny < 25:
  212. pcs_horny += 10
  213. elseif pcs_horny < 10 and (PanThinness >= 5 or BraThinness >= 5):
  214. pcs_horny += 5
  215. end
  216. if $pantyworntype ! 'none' and clit_size >= 25 and pcs_horny < 60:
  217. pcs_horny += 20
  218. end
  219. if insleep = 0:
  220. gs 'sweat', 'add', rand(0,1)
  221. if temper >= 20: gs 'sweat', 'add', rand(0,1)
  222. end
  223. ! Leg and pubes hair growth
  224. if lashair ! 1:
  225. if pcs_traits['jungle_jane'] = 0:
  226. if stat['leg_hair_growth_timer'] < totminut - 1440:
  227. stat['leg_hair_growth_timer'] = totminut
  228. pcs_leghair += 1
  229. end
  230. if stat['pube_growth_timer'] < totminut - 2880:
  231. stat['pube_growth_timer'] = totminut
  232. pcs_pubes += 1
  233. end
  234. !!Pubic hair growth at 1/2 per night
  235. else
  236. !! if trait is active, growth speed is doubled
  237. if stat['leg_hair_growth_timer'] < totminut - 720:
  238. stat['leg_hair_growth_timer'] = totminut
  239. pcs_leghair += 1
  240. end
  241. if stat['pube_growth_timer'] < totminut - 1440:
  242. stat['pube_growth_timer'] = totminut
  243. pcs_pubes += 1
  244. end
  245. end
  246. gs 'body_desc', 'pube_desc_update'
  247. end
  248. ! vovan edition, from 1.2.5
  249. if huntersAndreisex > 0: huntersAndreisex -= 1
  250. if huntersSergeisex > 0: huntersSergeisex -= 1
  251. if huntersIgorsex > 0: huntersIgorsex -= 1
  252. if huntslutsex > 0: huntslutsex -= 1
  253. if mira_go_blok > 0: mira_go_blok -= 1
  254. if mira_no_home > 0: mira_no_home -= 1
  255. gs 'traits', 'hourly'
  256. gs 'katja_procedural', 'hourly'
  257. if (hour mod 2) = 0: gs 'outdoors', 'weather'
  258. !!===========================================================================!!
  259. !! !!
  260. !! ?Story triggers? !!
  261. !! !!
  262. !!===========================================================================!!
  263. !! I do not think that this should be here, but I put it here temporaly - rachels
  264. !! generate SMS for nerd games
  265. if nerd_game['invite_day'] < daystart and week = 1 and hour >= 11 and hour <= 15:
  266. if yearstart = 1 and (grupTipe = 3 or nerd_game['stage'] > 0 or rand(80,npc_rel['A152']) > 95):
  267. !! hour = 15 forces SMS if it hasn''t triggered yet.
  268. if rand(0, 2) = 0 or hour = 15:
  269. gs 'nerd_game_night', 'summer_invite_sms', 'Add SMS'
  270. end
  271. elseif yearstart > 1 and nerd_game['fixed_uni_day'] = 0 and (nerd_game['stage'] > 0 or rand(80,npc_rel['A152']) > 95):
  272. !! hour = 15 forces SMS if it hasn''t triggered yet.
  273. if rand(0, 2) = 0 or hour = 15:
  274. gs 'nerd_game_night', 'summer2_invite_sms', 'Add SMS'
  275. end
  276. end
  277. end
  278. !! Generate SMS for anushka''s band tour. Blame Nutluck
  279. if gopnikbandQW['on_tour'] = 1 and npc_rel['A144'] >= 50 and anushkaQW['tour_SMS_send'] < daystart and anushkaQW['num_tour_SMS_send'] < 11:
  280. if anushkaQW['num_tour_SMS_send'] <= 9 and week = 6 and (hour = 12 or hour = 13):
  281. if rand(0, 1) = 0 or hour = 13:
  282. gs 'band_tour_anushka_SMS', 'start'
  283. end
  284. elseif anushkaQW['num_tour_SMS_send'] = 10 and week = 2 and (hour = 19 or hour = 20):
  285. if rand(0, 1) = 0 or hour = 20:
  286. gopnikbandQW['on_tour'] = 0
  287. gs 'band_tour_anushka_SMS', 'start'
  288. end
  289. end
  290. end
  291. --- hourly_events ---------------------------------