stat.qsrc 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065
  1. # stat
  2. !!This is error catching to prevent stat from running too early
  3. if opPRE > 0: exit
  4. if Enable_Android = 0:
  5. clr
  6. !only clear status and renew object in non-Android mode
  7. gs 'obj_din', 'old'
  8. end
  9. if daystart_start < 100:
  10. pl '<BR>Did you start at the <a href="exec:daystart_start = 239 & gs''daystart'' & gs''stat''">end of August</a> or <a href="exec:daystart_start = 153 & gs''daystart'' & gs''stat''">beginning of June</a>?'
  11. exit
  12. end
  13. $BACKIMAGE = ''
  14. view
  15. rand1 = rand(0,100)
  16. $stat_msg=''
  17. if daystage = 1:
  18. $daystage['desc'] = 'dawn'
  19. elseif daystage = 2:
  20. $daystage['desc'] = 'mid_day'
  21. elseif daystage = 3:
  22. $daystage['desc'] = 'sunset'
  23. elseif daystage = 4:
  24. $daystage['desc'] = 'early_night'
  25. elseif daystage = 5:
  26. $daystage['desc'] = 'mid_night'
  27. elseif daystage = 6:
  28. $daystage['desc'] = 'pre_dawn'
  29. end
  30. if $start_type[1] ! 'nomagic': magik_exp = orgasm + magik_adj
  31. if insleep = 0: gs 'stat_sklattrib'
  32. if cheatHealth = 1: dynamic $cheatmenu['std_cure']
  33. if InfWillpwer = 1: pcs_willpwr = willpowermax
  34. if stat['vaginal'] = 0 and stat['vaginal_fist'] = 0 and stat['vaginal_dildo'] = 0 and stat['vaginal_strap'] = 0:
  35. stat['think_virgin'] = 1
  36. else
  37. stat['think_virgin'] = 0
  38. end
  39. if (analplay >= 2 and pcs_ass <= 10) or (analplay >= 4 and pcs_ass <= 15) or (analplay >= 8 and pcs_ass <= 20): pcs_ass += 1 & analplay = 0
  40. !!This is a temporary stop-gap measure for the accomadation skill and will be removed
  41. if succubusflag = 1 and sucskill >= 4:
  42. if pain['throat'] > 0: pain['throat'] = 0 & sucexcess -= 1
  43. if pain['asshole'] > 0: pain['asshole'] = 0 & sucexcess -= 1
  44. if pain['vaginal'] > 0: pain['vaginal'] = 0 & sucexcess -= 1
  45. if vgape > 0: vgape = 0 & vgapetime = 0 & sucexcess -= 1
  46. if agape > 0: agape = 0 & agapetime = 0 & sucexcess -= 1
  47. end
  48. !!mouth cleaning for drinks
  49. if pcs_hydra > hydra_check:
  50. cumspclnt = 2
  51. gs 'cum_cleanup'
  52. end
  53. !!cosmetic tattoo
  54. if cosmetic_tattoo > 0:
  55. if pcs_makeup ! (cosmetic_tattoo+1): pcs_makeup = (cosmetic_tattoo+1)
  56. end
  57. !!!CHEATS!!!
  58. if cheatWork = 1:work = 0
  59. if cheatWorkKiskis = 1:young_shop_miss = 0
  60. if cheatHapri = 1:pcs_hairbsh = 1
  61. ! Moved from cheats to settings under 'Enema realism'
  62. if cheatKlisma = 0:klismaday = daystart & klismaday1 = 1
  63. if cheatNomakeup = 1 and cosmetic_tattoo = 0:
  64. if pcs_makeup = 0: pcs_makeup = 1
  65. end
  66. if cheatNoSweat = 1 and pcs_sweat > 0: pcs_sweat = 0
  67. if cheatNoEat = 1:
  68. if pcs_energy < 60: pcs_energy = 60
  69. end
  70. if cheatShaveLegs = 1:
  71. if pcs_leghair > 0: pcs_leghair = 0
  72. end
  73. if cheatNoDrink = 1:
  74. if pcs_hydra < 60: pcs_hydra = 60
  75. end
  76. if cheatNoSleep = 1:
  77. if pcs_sleep < 35: pcs_sleep = 35
  78. end
  79. if cheatBandit = 1 and npc_horny['A66'] < 19: npc_horny['A66'] = 19
  80. if alko > 0 and frost > 0:frost = 0
  81. if StrongNarkota >= 20:
  82. if alko > 0:alko = 0
  83. end
  84. if lernSkill >= 8: gs 'exp_gain', 'intel', 1 & lernSkill = 0
  85. if lern >= 10: gs 'exp_gain', 'intel', 1 & lern = 0
  86. shameless = guy + stat['bj'] + stat['anal'] + stat['hj'] + ((slutty + gang) * 2)
  87. moneySUM = money + karta + stolmoney
  88. cumSUM = cumsumbod/40
  89. if husbizvradd > 5:izvratH = 1
  90. if husbharmin > 10:harakHusb = 0
  91. if husband = 0:
  92. husbizvradd = 0
  93. husbharmin = 0
  94. husbandMark = 0
  95. houseslut = 0
  96. end
  97. if SNarkvnesh = 0:SNarkvnesh = 1
  98. if SNarkTimes >= SNarkvnesh * 25:
  99. SNarkvnesh += 1
  100. vidage += 1
  101. end
  102. if food_loc > 0 and $food_loc <> $loc: killvar 'food_loc'
  103. if gopota >= 20 and gnewQW = 1:gnewQW = 2
  104. if workDisk = 4 and week > 5:workDisk = 1
  105. if workDisk = 3 and week > 5:workDiskAtkPlayer = 1
  106. if bfa < 0: bfa = 0
  107. if pcs_vag > 36: pcs_vag = 36
  108. if pcs_throat > 36: pcs_throat = 36
  109. if pcs_ass > 36: pcs_ass = 36
  110. if NarkImmune = 1:
  111. if narkoman ! 0:narkoman = 0
  112. elseif nark >= 30 and narkoman = 0 and NarkImmune = 0:
  113. narkoman = 1
  114. elseif nark = 0 and narkoman = 1:
  115. narkoman = 0
  116. end
  117. if cheatSlut = 1 or succubusflag = 1:
  118. !!Succubus cannot get pregnant
  119. mesec = 0
  120. FocH = 0
  121. EggRH = 0
  122. Ovulate = 0
  123. fertegg = 0
  124. UnfertEgg = 0
  125. PregChem = 0
  126. preg = 0
  127. LutH = 0
  128. RecovH = 0
  129. babyembryo = 0
  130. cycle = 1
  131. end
  132. if succubusflag = 1 and succublvl > 2 and rape > rape_count:
  133. !!High Level Succubus cannot get raped
  134. orgasm += 1
  135. rape = rape_count
  136. pcs_mood = 100
  137. end
  138. if pcs_horny < 50 and cheatHorny = 1: pcs_horny = 50
  139. !!These will be made obsolete with the combat system overhaul
  140. boxing = pcs_jab + pcs_punch + pcs_kick + pcs_def
  141. if boxing > 100: boxing = 100
  142. manamax = (pcs_intel * pcs_magik) + pcs_magik * 100 + pcs_vital * 10 + rikudo
  143. !! Set the massage displayed each time the magik attribute is increased.
  144. if $start_subtype ! 'nomagic':
  145. if pcs_magik > magikhigh:
  146. magikhigh = pcs_magik
  147. rikudo += pcs_magik * 100
  148. $stat_msg += '<BR><b>You feel like a strength has been revealed within you, and you gush with magic, lifting you to a new energy level.</b>'
  149. !! This will be replaced when a more advanced physical system is made
  150. if (pcs_magik mod 2 ! 0) and pcs_eyesize < 2: pcs_eyesize += 1
  151. if (pcs_magik mod 2 = 0) and pcs_lashes < 2: pcs_lashes += 1
  152. end
  153. else
  154. !!This is for error catching but also broke manamax calc which is why its now above this
  155. killvar 'pcs_magik'
  156. killvar 'rikudo'
  157. killvar 'pcs_splcstng'
  158. end
  159. if pcs_dom < 0: SUB = SUB - pcs_dom & pcs_dom = 0
  160. if SUB < 0: pcs_dom = pcs_dom - SUB & SUB = 0
  161. if pcs_dom > 100: pcs_dom = 100
  162. if SUB > 100: SUB = 100
  163. if SUB >= pcs_dom and pcs_dom > 0:SUB = SUB - pcs_dom & pcs_dom = 0
  164. if pcs_dom >= SUB and SUB > 0:pcs_dom = pcs_dom - SUB & SUB = 0
  165. if pcs_horny < 0: pcs_horny = 0
  166. if pcs_inhib < 0:
  167. pcs_inhib = 0
  168. elseif pcs_inhib > 100:
  169. pcs_inhib = 100
  170. end
  171. healthmax = (pcs_vital * 10 + pcs_stren * 5)
  172. stammax = (30* (2 * pcs_vital + pcs_agil + pcs_stren) +1000)/ 13 - pregchem/10
  173. speed = (2 * (pcs_stren + pcs_agil) + pcs_vital) / 5 - pregchem/100
  174. if healthmax < 1: healthmax = 1
  175. if willpowermax < 50: willpowermax = 50
  176. if stammax < 1: stammax = 1
  177. if manamax < 1: manamax = 1
  178. !pre-calc max value for later display
  179. if fairycurse >= daystart and fairyshoo > 0: pcs_horny = 90
  180. if min_arousal > pcs_horny: pcs_horny = min_arousal
  181. if Enable_lockhorny > 0 and pcs_horny < Enable_lockhorny - 1: pcs_horny = Enable_lockhorny - 1
  182. if pcs_horny < 0: pcs_horny = 0
  183. if pcs_health > healthmax: pcs_health = healthmax
  184. if pcs_willpwr > willpowermax: pcs_willpwr = willpowermax
  185. if pcs_stam > stammax: pcs_stam = stammax
  186. if pcs_mana > manamax: pcs_mana = manamax
  187. if pcs_mood > 100: pcs_mood = 100
  188. !!set hair flow free
  189. if hbraids > 5 and pcs_hairbsh = 0: hbraids -= rand(3,5) & pcs_hairbsh = 1
  190. if pcs_hairbsh <= 0:
  191. if hscrunchw <> 0: hscrunchw = 0
  192. if hpingripw <> 0: hpingripw = 0
  193. if hpigtail <> 0: hpigtail = 0
  194. if hbraids <> 0: hbraids = 0
  195. end
  196. !!Add mood_trauma to events to lower max mood for a period of time
  197. if mood_trauma > 0:
  198. mood_max_calc = 100 - (mood_trauma * 5)
  199. mood_max = max(10, mood_max_calc)
  200. if pcs_mood > mood_max: pcs_mood = mood_max
  201. killvar 'mood_max_calc'
  202. elseif mood_trauma < 0:
  203. mood_trauma = 0
  204. end
  205. if hypnoAddict = 1 and pcs_horny < 30:
  206. pcs_horny = 30
  207. elseif hypnoAddict = 2 and pcs_horny < 50:
  208. pcs_horny = 50
  209. end
  210. if cumloc[0] = 1 or cumloc[3] = 1 or hypnoAddict = 0:
  211. killvar 'missCum'
  212. elseif missCum > timeTresh:
  213. if pcs_horny < 90: pcs_horny = 90
  214. if preziktype = 0 or preziktype = 2:
  215. if mc_inventory['normal_condoms'] > 0 and mc_inventory['sabotaged_condoms'] < rand(2,3): dynamic $din_Do_Condom_Counts, 4
  216. if preziktype <> 2 and mc_inventory['sabotaged_condoms'] > 0: dynamic $din_Do_Condom_Counts, 3
  217. end
  218. end
  219. !!!!!!!!!!!
  220. !!!TIME!!!
  221. !!!!!!!!!!!
  222. !! total amount of minutes since the start of the game
  223. if nminut ! minut or nhour ! hour:
  224. prevtotmin = totminut
  225. ! sync totminut with daystart
  226. totminut = daystart - 1
  227. ! Hours
  228. totminut = totminut * 24 + hour
  229. ! Minutes
  230. totminut = totminut * 60 + minut
  231. nminut = minut
  232. nhour = hour
  233. end
  234. ! Execute time based spells
  235. gs 'spellTimer', prevtotmin, totminut
  236. ! Determine Incoming Telephone Calls
  237. gs 'telefon', 'IncomingCheck', prevtotmin, totminut
  238. !! deodorant
  239. if deodorant_on = 1 and totminut > deodorant_time: gs 'sweat', 'remove_deo'
  240. !!painkiller
  241. if pain['killer'] > 0:
  242. if pain['killer'] = 1: pain_timer = totminut - 2
  243. pain['killer'] = totminut - pain_timer
  244. if pain['killer'] >= 243: pain['killer'] = 0
  245. end
  246. ! WD: 'daystart' Should start at 1
  247. if daystart = 0: daystart = 1
  248. !!Gaping of vagina recovery time
  249. !! [1] stored gape value
  250. !! [3] timer
  251. !! [4] time between each reduction in gape
  252. if agape[4] = 0: agape[4] = 10
  253. if vgape[4] = 0: vgape[4] = 10
  254. if vgape > vgape[1]:
  255. vgape[3] = totminut
  256. vgape[1] = vgape
  257. elseif vgape > 0:
  258. if (totminut - vgape[3])/vgape[4] >= 1: vgape -= 1
  259. vgape[1] = vgape
  260. else
  261. vgape[3] = 0
  262. end
  263. !!Gaping of anus recovery time
  264. if agape > agape[1]:
  265. agape[3] = totminut
  266. agape[1] = agape
  267. elseif agape > 0:
  268. if (totminut - agape[3])/agape[4] >= 1: agape -= 1
  269. if agape = 0: agape[3] = 0
  270. agape[1] = agape
  271. else
  272. agape[3] = 0
  273. end
  274. !!Recovery from spanking - will be superseded by pain system
  275. if spanked > 0:
  276. if spankedtime = 0: spankedtime = totminut
  277. if (spankedtime + 2040) <= totminut:spanked -= 1 & spankedtime = 0
  278. elseif spankedtime ! 0:
  279. killvar 'spankedtime'
  280. end
  281. !! Orgasmic cooldown
  282. if orgasmic ! 0:
  283. if orgasmic < totminut - 30: orgasmic = 0 & pcs_horny = 0
  284. end
  285. !!!!!!!!!!!!!!! Heels pain and skill gain
  286. !! This compares the player heels skill to the skill required to wear any heels the player
  287. !! currently wears. If the skill needed is greater than the player currently possesses,
  288. !! the pain in the feet increases and the player earns heels skill. If the skill required
  289. !! is lower, the player might still get experience, depending on how much greater the
  290. !! player skill is.
  291. !! Variables
  292. !! pcs_heels is the main heels skill
  293. !! heels_exp is used when the player gains experience using heels
  294. !! heels_deg is used when the player neglects their heels
  295. !! PShoHeels tracks the height of the heels currently worn
  296. !! heelsminut tracks when the heels skill was last changed
  297. !! heelsRequiredskill substitutes PShoHeels to allow comparison with pcs_heels
  298. !! heelsSkilldiff tracks difference between the players current and skill required by heels
  299. !! Required skill for various heel sizes
  300. !! 1 flats - 0
  301. !! 2 low heel - 5
  302. !! 3 Mid heel - 15
  303. !! 4 High heel - 25
  304. !! 5 ultra high heel - 40
  305. !! 6 fetish heel - 60
  306. !! Only run if at least X minutes have passed since last time
  307. if heelsminut > totminut: heelsminut = totminut & !! fix for time cheat
  308. if totminut >= heelsminut + 30:
  309. killvar 'tmp'
  310. heelstime = totminut-heelsminut
  311. heelsminut = totminut
  312. !! Only check experience and pain gain and if the player wears heels, flats give nothing
  313. if PShoHeels > 1:
  314. if PShoHeels = 2:
  315. heelsRequiredskill = 5
  316. elseif PShoHeels = 3:
  317. heelsRequiredskill = 15
  318. elseif PShoHeels = 4:
  319. heelsRequiredskill = 25
  320. elseif PShoHeels = 5:
  321. heelsRequiredskill = 40
  322. elseif PShoHeels = 6:
  323. heelsRequiredskill = 60
  324. end
  325. !! stat is called a lot, there should be a limit to how much exp and pain you can accumulate...
  326. !! If the player skill is below the required skill, give heel_exp and apply ache
  327. if pcs_heels < heelsRequiredskill:
  328. heelsSkilldiff = heelsRequiredskill - pcs_heels
  329. if heelsSkilldiff <= 5:
  330. tmp = rand(min(3,heelstime/30),min(6,heelstime/15))
  331. if pain['feet'] < 40: gs 'pain', rand(heelstime/30,heelstime/15), 'feet', 'ache'
  332. elseif heelsSkilldiff <= 10:
  333. tmp = rand(min(5,heelstime/20),min(9,heelstime/10))
  334. if pain['feet'] < 50: gs 'pain', rand(heelstime/25,heelstime/12), 'feet', 'ache'
  335. elseif heelsSkilldiff <= 15:
  336. tmp = rand(min(7,heelstime/15),min(12,heelstime/8))
  337. if pain['feet'] < 60: gs 'pain', rand(heelstime/20,heelstime/10), 'feet', 'ache'
  338. elseif heelsSkilldiff <= 20:
  339. tmp = rand(min(9,heelstime/10),min(15,heelstime/5))
  340. if pain['feet'] < 70: gs 'pain', rand(heelstime/15,heelstime/8), 'feet', 'ache'
  341. else
  342. tmp = rand(min(12,heelstime/5),min(20,heelstime/2))
  343. if pain['feet'] < 80: gs 'pain', rand(heelstime/10,heelstime/5), 'feet', 'ache'
  344. end
  345. !! Player skill is equal to or higher than the required skill
  346. !! Maybe have excessive skill result in no gain, or even a degrading skill?
  347. else
  348. heelsSkilldiff = pcs_heels - heelsRequiredskill
  349. gs 'pain', max(0, rand(heelstime/10,heelstime/5) - heelsSkilldiff), 'feet', 'ache'
  350. if heelsSkilldiff <= 5:
  351. tmp = rand(-2,0) + rand(min(8,heelstime/6),min(12,heelstime/3))
  352. elseif heelsSkilldiff <= 10:
  353. tmp = rand(-3,0) + rand(min(6,heelstime/10),min(9,heelstime/5))
  354. elseif heelsSkilldiff <= 15:
  355. tmp = rand(-4,0) + rand(min(5,heelstime/15),min(7,heelstime/10))
  356. elseif heelsSkilldiff <= 20:
  357. tmp = rand(-5,0) + rand(min(4,heelstime/20),min(6,heelstime/15))
  358. else
  359. tmp = rand(-6,0) + rand(min(3,heelstime/30),min(4,heelstime/20))
  360. end
  361. end
  362. !! If not wearing heels, degrade heels skill
  363. else
  364. tmp = rand(heelstime/30,heelstime/15)*-1
  365. end
  366. if tmp > 0:
  367. gs 'exp_gain', 'heels', tmp
  368. elseif tmp < 0:
  369. heels_deg += tmp
  370. end
  371. killvar 'tmp'
  372. killvar 'heelstime'
  373. killvar 'heelsSkilldiff'
  374. killvar 'heelsRequiredskill'
  375. end
  376. !!!!!!!!!!!!!!! End heels
  377. !! Hourly Changes
  378. ~^stat_hourly_changes
  379. if minut >= 60:
  380. :loopmin
  381. hour += 1
  382. minut -= 60
  383. gs 'hourly_events'
  384. if minut >= 60:jump 'loopmin'
  385. end
  386. ~$gs:stat_hourly_changes
  387. !! End of Hourly Changes
  388. if hour >= 24: gs 'cikl'
  389. if minut < 10:
  390. $nilmin = '0'
  391. else
  392. $nilmin = ''
  393. end
  394. if kid > 0:
  395. i = arrsize('yearkid')
  396. :LoopKidAgeCounter
  397. if i >= 0:
  398. if yearkid[i] = year + 1 and monthkid[i] = month and daykid[i] = day: msg'It is <<$kidname[i]>>''s birthday today.'
  399. i -= 1
  400. jump 'LoopKidAgeCounter'
  401. end
  402. end
  403. if bimbolevel > 0:
  404. if bimbowithdrawal = 0:
  405. $bimbostatus = '<font color = #FF1493>You''re, like, super hawt today.</font>'
  406. $bimbo_tooltip = 'You''re, like, super hawt today.'
  407. elseif bimbowithdrawal = 1:
  408. $bimbostatus = '<font color="green">You feel, like, kind of lame today.</font>'
  409. $bimbo_tooltip = 'You feel, like, kind of lame today.'
  410. elseif bimbowithdrawal < 4:
  411. $bimbostatus = '<font color="grey">You feel, like, totally lame today.</font>'
  412. $bimbo_tooltip = 'You feel, like, totally lame today.'
  413. elseif bimbowithdrawal < 6:
  414. if pcs_mood > 50: pcs_mood -= 10
  415. $bimbostatus = '<font color="red">You really feel, like, awful today.</font>'
  416. $bimbo_tooltip = 'You really feel, like, awful today.'
  417. elseif bimbowithdrawal >= 6:
  418. if pcs_mood > 10: pcs_mood -= 10
  419. $bimbostatus= '<font color="red"><b>You feel that, like, horrible today!</b></font>'
  420. $bimbo_tooltip = 'You feel that, like, horrible today!'
  421. end
  422. else
  423. bimbowithdrawal = 0
  424. $bimbostatus = ''
  425. end
  426. ~^stat_15minutes_changes
  427. !
  428. ! WD: Triggers every 15 minutes if not sleeping
  429. ! Update to remove long iterations on loading saves from previous versions
  430. ! Do Nothing if sleeping, invalid Trig15Minute value or more than 6 hours 16 minute pass
  431. if insleep ! 0 or Trig15Minute > totminut or (totminut - Trig15Minute) >= 376:
  432. set Trig15Minute = totminut
  433. ! More than 15 minutes since last check
  434. else
  435. if (totminut - Trig15Minute) >= 15:
  436. ! begin Loop
  437. :Trig15MinuteLoop
  438. ! Horny Actions
  439. if pcs_horny > 100:
  440. set Trig15Minute = totminut
  441. else
  442. set Trig15Minute += 15
  443. ! WD: Fix vibrator arousal to trigger every 15 minutes, moved from 'time' location
  444. if vibratorin = 1:pcs_horny += rand(1, 5)
  445. ! WD: Fixed Piecing arousal to trigger every 15 minutes, instead of once per day
  446. if pcs_horny < 70:
  447. hornystat = 0
  448. if pirsF > 0 and pirsF < 10000:hornystat += 1
  449. if pirsG > 0 and pirsG < 10000:hornystat += 1
  450. hornyStat = hornystat * 4
  451. if pirsA > 0 and pirsA < 10000:hornystat += 1
  452. if pirsB > 0 and pirsB < 10000:hornystat += 1
  453. if pirsC > 0 and pirsC < 10000:hornystat += 1
  454. if pirsD > 0 and pirsD < 10000:hornystat += 1
  455. if pirsE > 0 and pirsE < 10000:hornystat += 1
  456. if pirsN > 0 and pirsN < 10000:hornystat += 1
  457. set pcs_horny += hornyStat / 4 + rand(1,4) <= hornyStat mod 4 & ! Apply 1/4 of value on average
  458. end
  459. ! WD: Clothing
  460. if CloStyle = 4 and pcs_horny < 70:set pcs_horny += rand(0, 2)
  461. if (PCloSkirt > 5 or PCloPants > 5) and pcs_horny < 50:set pcs_horny += rand(0, 1)
  462. if PCloTopCut = 4 and pcs_horny < 50:set pcs_horny += rand(0, 1)
  463. end
  464. !!SECTION: Bimbo (15 minute interval update checks)
  465. if bimbolevel > 0:
  466. if (pcs_mood < 100): pcs_mood += (pcs_mood / 100) * max(0, (rand(bimbowithdrawal*-1,bimbolevel)))
  467. if pcs_horny < max(0, 30 - bimbowithdrawal * bimbolevel): pcs_horny = max(0, 30 - bimbowithdrawal * bimbolevel)
  468. if pcs_horny < 100: pcs_horny += max(0, rand(bimbowithdrawal/-2, bimbolevel))
  469. end
  470. !!SECTION: Commando trait (15 minute interval update checks)
  471. if $clothingworntype ! 'nude':
  472. if $pantyworntype = 'none':
  473. !! Addition to trait exp/lvls
  474. if pcs_traits['commando_lvl'] = 0:
  475. if PCloSkirt > 0:
  476. pcs_traits['commando_exp'] += 2
  477. else
  478. pcs_traits['commando_exp'] += 1
  479. end
  480. if pcs_traits['commando_exp'] >= 1000:
  481. pcs_traits['commando_exp'] = 50
  482. pcs_traits['commando_lvl'] = 1
  483. msg'You have gained the Commando trait! You have become accustomed to the idea you don''t have to wear panties all the time and can now comfortably wear skirts without panties. Pants are still a little itchy though...'
  484. end
  485. elseif pcs_traits['commando_lvl'] = 1:
  486. pcs_traits['commando_exp'] += 2
  487. if pcs_traits['commando_exp'] >= 1000:
  488. pcs_traits['commando_exp'] = 50
  489. pcs_traits['commando_lvl'] = 2
  490. msg'You have gained the 2nd level of the Commando trait! You have become very comfortable without panties and the raw insides of your pants no longer irritate your pussy.'
  491. end
  492. elseif pcs_traits['commando_lvl'] = 2:
  493. mosol = 0
  494. pcs_traits['commando_exp'] += 2
  495. if pcs_traits['commando_exp'] >= 1000:
  496. pcs_traits['commando_exp'] = 500
  497. pcs_traits['commando_lvl'] = 3
  498. msg'You have gained the 3rd level of the Commando trait! You have become so accustomed to going commando that any kind of underwear over your hips just feels <i>wrong</i>. You suffer mood penalties while wearing panties.'
  499. end
  500. elseif pcs_traits['commando_lvl'] = 3:
  501. pcs_traits['commando_exp'] += 1
  502. end
  503. elseif pcs_traits['commando_lvl'] > 0:
  504. !!Reduction from exp/lvls
  505. if pcs_traits['commando_lvl'] = 3:
  506. pcs_traits['commando_exp'] -= 1
  507. pcs_mood -= 1
  508. if pcs_traits['commando_exp'] <= 0:
  509. pcs_traits['commando_exp'] = 500
  510. pcs_traits['commando_lvl'] = 2
  511. msg'You have lost the 3rd level of the Commando trait! You are now only comfortable not wearing panties and will not suffer irritation from wearing pants while going commando.'
  512. end
  513. else
  514. pcs_traits['commando_exp'] -= 1
  515. if pcs_traits['commando_exp'] <= -0:
  516. pcs_traits['commando_exp'] = 900
  517. pcs_traits['commando_lvl'] -= 1
  518. end
  519. end
  520. end
  521. !!{
  522. if $braworntype = 'none':
  523. end}
  524. end
  525. !! This is the Succubus non-direct injection (pun intented) sex to sexnutrition and the sexnutrition conversion handling
  526. if succubusflag = 1:
  527. if hypnoAddict > 0: dynamic $RestTherapyVariables
  528. if pcs_horny < 50: pcs_horny = 50
  529. if pcs_horny < 100: pcs_horny += succublvl
  530. if succhungry > 0:
  531. pcs_energy -= succhungry * succublvl
  532. pcs_hydra -= succhungry * succublvl
  533. pcs_sleep -= succhungry * succublvl
  534. end
  535. if arrsize('sparrvol') > 0:
  536. suctempi = -1
  537. :SuccAbsorbLoop
  538. suctempi += 1
  539. if suctempi <= 1 or suctempi = 3 or suctempi = 4 or suctempi >= 8:
  540. suctemparr = arrpos('sparrloc',suctempi)
  541. if suctemparr >= 0 and sparrloc[suctemparr] = suctempi and sparrvol[suctemparr] > 0:
  542. scfeed = succublvl + rand(1,4)
  543. sexnutrition += 30 * scfeed
  544. succubxp += 5
  545. cumsumbod -= sparrvol[suctemparr]
  546. ! msg "we've got xp!" + sparrloc[suctemparr]
  547. sucabscum = 1
  548. gs 'cum_cleanup', 'cleandeposit', suctemparr
  549. cumloc[suctempi] = 0
  550. !debug code $stat_msg += '<BR>Absorb ext <<sexnutrition>>'
  551. end
  552. end
  553. if suctempi < 17:jump 'SuccAbsorbLoop'
  554. cumspclnt = 20 & gs 'cum_cleanup'
  555. end
  556. if suclezsex < lesbian:
  557. sexnutrition += succublvl * 20
  558. suclezsex = lesbian
  559. succubxp += 5
  560. sucabslez = 1
  561. end
  562. if sexnutrition > 0:
  563. if sucskill >= 3 and succublvl >= 2: sexnutrition += (sexnutrition * 2) / 10
  564. if sucabslez = 1 and sucabscum = 1:
  565. $sucabs1 = 'absorbed energy from the woman you had sex with'
  566. $sucabs2 = ' and you '
  567. $sucabs3 = 'absorb the semen in your body'
  568. elseif sucabscum = 1:
  569. $sucabs3 = 'absorb the semen in your body'
  570. elseif sucabslez = 1:
  571. $sucabs1 = 'absorbed energy from the woman you had sex with'
  572. else
  573. !!Debug code
  574. $stat_msg += '<BR>SOMETHING HAPPENED!'
  575. end
  576. $stat_msg += '<BR>You <<$sucabs1>><<$sucabs2>><<$sucabs3>>, gaining nourishment.'
  577. sucabslez = 0 & sucabscum = 0
  578. $sucabs1 = '' & $sucabs2 = '' & $sucabs3 = ''
  579. if (pcs_mood < 100): pcs_mood += ((pcs_mood / 100) * 5)
  580. if pcs_energy > 100: entemp = (pcs_energy - 100)
  581. if sucexcess < 0 and sexnutrition > 20 and pcs_energy > 30:
  582. if sexnutrition - 20 >= (0 - sucexcess) * 2:
  583. sexnutrition += sucexcess * 2
  584. sucexcess = 0
  585. else
  586. sucexcess += (sexnutrition - 20) / 2
  587. sexnutrition = 20
  588. end
  589. end
  590. pcs_energy += sexnutrition / 2
  591. pcs_hydra += sexnutrition
  592. pcs_sleep += sexnutrition / 20
  593. if succhungry > 0: succhungry = 0
  594. sexnutrition = 0
  595. if pcs_energy > 100: sucexcess += (pcs_energy - entemp - 100) & pcs_energy = 100 + entemp & killvar 'entemp'
  596. end
  597. end
  598. !! safeguards to prevent bimbolevel from going above or below its intended limits
  599. if bimbolevel > 3: bimbolevel = 3
  600. if bimbolevel < 0: bimbolevel = 0
  601. ! do loop
  602. if (totminut - Trig15Minute) >= 15:jump 'Trig15MinuteLoop'
  603. end
  604. end
  605. ~$gs:stat_15minutes_changes
  606. !!!!!!!!!!!!!
  607. !!!ENERGY!!!
  608. !!!!!!!!!!!!!
  609. if succubusflag = 1:
  610. if pcs_energy < 0:
  611. if fat >= 1:
  612. if cheatNoFat = 0: fat -= 2
  613. pcs_energy += 8 + succublvl
  614. else
  615. pcs_energy += 8 + succublvl
  616. sucexcess -= (8 + succublvl) * (6 - succublvl)
  617. end
  618. end
  619. if pcs_health < 0:
  620. pcs_health = 10
  621. sucexcess -= 25 * (9 - succublvl)
  622. end
  623. if pcs_willpwr < 0:
  624. pcs_willpwr = 10
  625. sucexcess -= 20 * (9 - succublvl)
  626. sucpowzeroed = 4
  627. end
  628. end
  629. if pcs_sleep < 0:
  630. pcs_sleep = 0
  631. pcs_mood -= 5
  632. end
  633. if pcs_energy < 0:
  634. pcs_energy = 0
  635. pcs_health -= 5
  636. if pcs_mass['body'] = 0 and pcs_stren + pcs_vital > 0:
  637. stren_deg -= 1
  638. vital_deg -= 1
  639. pcs_energy += 8
  640. elseif pcs_mass['body'] = 0 and pcs_stren + pcs_vital <= 0:
  641. if Enable_nogameover = 0 :
  642. over = 3
  643. if $loc ! 'gameover': gt 'gameover'
  644. exit
  645. else
  646. $stat_msg += '<BR><font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
  647. fat = 1
  648. end
  649. elseif pcs_mass['body'] > 0:
  650. if cheatNoFat = 0: fat -= 1
  651. pcs_energy += 8
  652. end
  653. end
  654. if pcs_hydra <= 0:
  655. pcs_hydra = 1
  656. pcs_health -= 5
  657. end
  658. !!Set hydra_check value
  659. hydra_check = pcs_hydra
  660. if pcs_mood <= 0:
  661. pcs_mood = 1
  662. pcs_health -= 5
  663. end
  664. if pcs_health < 0:
  665. if Enable_nogameover = 0 :
  666. over = 1
  667. if $loc ! 'gameover': gt 'gameover'
  668. exit & !nogameover by illume
  669. else
  670. $stat_msg += '<BR><font color=red><B>You died from injuries, but Cheat Mode keeps you Alive.</B></font>'
  671. pcs_health = 0
  672. end
  673. end
  674. if pcs_willpwr <= 0 :
  675. !this will set willpower to 0 correctly; then check mana =1 for insane-gameover(pcs_willpwr=0&mana=1).
  676. if pcs_mood <= 1:
  677. if Enable_nogameover = 0 :
  678. over = 2
  679. if $loc ! 'gameover': gt 'gameover'
  680. exit & !nogameover by illume
  681. else
  682. $stat_msg += '<BR><font color=red><B>You are insane, but Cheat Mode keeps you Alive.</B></font>'
  683. !pcs_mood already checked for >=1 in line 1113 if pcs_mood <= 0, no need to set another one
  684. end
  685. end
  686. pcs_willpwr = 0
  687. end
  688. !!cars-increase/depressed mood after orgasm/rape
  689. if rape > 0 and rape ! rape_count and orgasm = orgasm_count:
  690. pcs_mood = 10
  691. rape_count = rape
  692. elseif orgasm > 0 and orgasm ! orgasm_count:
  693. pcs_mood = 100
  694. orgasm_count = orgasm
  695. elseif rape > 0 and rape ! rape_count and orgasm > 0 and orgasm ! orgasm_count:
  696. pcs_mood = 100
  697. orgasm_count = orgasm
  698. rape_count = rape
  699. end
  700. !! Drug stats
  701. if StrongNarkota <= 0:
  702. if SNarkTimes >= 3 and SLomka = 0:SLomka = 1
  703. end
  704. if amphCount > 3 and amphHigh <= 0:
  705. addictChance = rand(1,10)
  706. if addictChance > 8:
  707. amphWithdrawl = 2
  708. end
  709. end
  710. if StrongNarkota > 0:
  711. if SLomka > 0:SLomka = 0
  712. pcs_mood = 100
  713. end
  714. !!Health, Willpower, Auto Birth Control pregnancy check
  715. gs 'body', 'RegularUpdate'
  716. gs 'body', 'Update_Appearance'
  717. if pcs_health >= healthmax:
  718. $pcs_health = '<font color="green">You are very healthy.</font>'
  719. elseif pcs_health >= healthmax * 75 / 100:
  720. $pcs_health = '<font color=#0064FF>You are healthy.</font>'
  721. elseif pcs_health >= healthmax * 50 / 100:
  722. $pcs_health = '<font color="brown">You are not healthy.</font>'
  723. elseif pcs_health >= healthmax * 25 / 100:
  724. $pcs_health = '<font color="red">You are sick.</font>'
  725. else
  726. $pcs_health = '<font color="red">You are on the verge of death.</font>'
  727. end
  728. if pcs_willpwr >= willpowermax:
  729. $pcs_willpwr = '<font color="green">You feel in charge of your actions.</font>'
  730. elseif pcs_willpwr >= willpowermax * 75 / 100:
  731. $pcs_willpwr = '<font color=#0064FF>You are mostly in control.</font>'
  732. elseif pcs_willpwr >= willpowermax * 50 / 100:
  733. $pcs_willpwr = '<font color="brown">You might have to make some concessions.</font>'
  734. elseif pcs_willpwr >= willpowermax * 25 / 100:
  735. $pcs_willpwr = '<font color="red">You will have to toe the line.</font>'
  736. else
  737. $pcs_willpwr = '<font color="red">You are completely at other people''s mercy.</font>'
  738. end
  739. !!stop auto birth control pill taking if the player believes they are pregnant or are pregnant
  740. if thinkpreg = 1 or knowpreg = 1:
  741. if tabletkicheck = 1: tabletkicheck = 0
  742. if birth_control['remind_hour'] > 0:
  743. birth_control['remind_hour'] = 0
  744. if birth_control['remind_icon'] = 1: birth_control['remind_icon'] = 0
  745. end
  746. elseif birth_control['remind_hour'] > 0 and hour >= birth_control['remind_hour'] and hour <= birth_control['remind_hour'] + 1 and tabletkiday ! daystart:
  747. birth_control['remind_icon'] = 1
  748. else
  749. birth_control['remind_icon'] = 0
  750. end
  751. if tabletkicheck = 1 and tabletkichday < daystart and birth_control['auto_hour'] > 0 and hour >= birth_control['auto_hour'] and hour <= birth_control['auto_hour'] + 1 and InSleep = 0 and menu_off = 0 and $location_type ! 'event' and $location_type ! 'event_outdoors':
  752. gs 'fertility', 'auto_pill'
  753. end
  754. !! detected change in pillcon
  755. if pillcon ! birth_control['old_pillcon'] or pillcon2 ! birth_control['old_pillcon2']: gs 'fertility', 'update'
  756. gs 'cum_manage', 'cum_decay'
  757. !!Mood
  758. if cheatNoMood = 0:
  759. maxmood = 100 - moodmodifier
  760. if pcs_mood > 100:
  761. pcs_mood = 100
  762. elseif pcs_mood < 0:
  763. pcs_mood = 0
  764. !! Asylum: basically this means clinically insane, like court-ordered committed, saliva dripping, blubbering... Ordinarily irreversible at this stage meaning Game Over, but cheat can help
  765. end
  766. else
  767. pcs_mood = 100
  768. mood_trauma = 0
  769. end
  770. if Gerpes >= 3 or Sifilis >= 21 or Triper > 2:
  771. $msg_extra = ' it is being reduced due to an STD'
  772. else
  773. killvar '$msg_extra'
  774. end
  775. if pcs_mood >= 80:
  776. $pcs_mood = '<font color="green">You are in a great mood<<$msg_extra>>.</font>'
  777. elseif pcs_mood >= 60:
  778. $pcs_mood = '<font color=#0064FF>You are in a good mood<<$msg_extra>>.</font>'
  779. elseif pcs_mood >= 40:
  780. $pcs_mood = '<font color="brown">You are in an OK mood<<$msg_extra>>.</font>'
  781. elseif pcs_mood >= 20:
  782. $pcs_mood = '<font color="orange">You are in a bad mood<<$msg_extra>>.</font>'
  783. elseif pcs_mood >= 5:
  784. $pcs_mood = '<font color="red">You are in a terrible mood<<$msg_extra>>.</font>'
  785. else
  786. $pcs_mood = '<font color="red">You are really depressed and need to improve your mood<<$msg_extra>>.</font>'
  787. end
  788. if pcs_energy >= 80:
  789. $pcs_energy = '<font color="green">You couldn''t eat one more bite.</font>'
  790. elseif pcs_energy >= 40:
  791. $pcs_energy = '<font color=#0064FF>You''re not really hungry, but a small snack would be very welcome.</font>'
  792. elseif pcs_energy >= 8:
  793. $pcs_energy = '<font color="brown">You are hungry.</font>'
  794. else
  795. $pcs_energy = '<font color="red">You are very hungry.</font>'
  796. end
  797. if pcs_hydra >= 80:
  798. $pcs_hydra = '<font color="green">You are not thirsty at all.</font>'
  799. elseif pcs_hydra >= 40:
  800. $pcs_hydra = '<font color=#0064FF>You are slightly thirsty.</font>'
  801. elseif pcs_hydra >= 8:
  802. $pcs_hydra = '<font color="brown">You are thirsty.</font>'
  803. else
  804. $pcs_hydra = '<font color="red">You are very thirsty.</font>'
  805. end
  806. if pcs_sleep >= 80:
  807. $pcs_sleep = '<font color="green">You are well rested.</font>'
  808. elseif pcs_sleep >= 40:
  809. $pcs_sleep = '<font color=#0064FF>You are slightly tired.</font>'
  810. elseif pcs_sleep >= 8:
  811. $pcs_sleep = '<font color="brown">You are tired.</font>'
  812. else
  813. $pcs_sleep = '<font color="red">You are very tired.</font>'
  814. end
  815. if workFabrika = 1 and week => 1 and week <= 5 and hour > 8 and age => 16 and age < 18 and FabrikaProgulDay ! day or workFabrika = 1 and week => 1 and week <= 5 and hour > 16 and age > 18 and FabrikaProgulDay ! day:
  816. !!absence from work in a factory in Pavlovsk
  817. FabrikaProgul += 1
  818. FabrikaProgulDay = day
  819. end
  820. if hotelRoom['pav_hotel'] > 0:
  821. if hotelRoomDays['pav_hotel'] - 1 = daystart:
  822. $stat_msg += '<BR>You have 1 night left on your Pavlosk hotel booking.'
  823. elseif hotelRoomDays['pav_hotel'] = daystart and hour < 11:
  824. $stat_msg += '<BR>Your room at the Pavlosk hotel has check out today at 11:00'
  825. elseif hotelRoomDays['pav_hotel'] = daystart:
  826. hotelRoom['pav_hotel'] = 0
  827. end
  828. end
  829. if hotelRoom['city_hotel'] > 0:
  830. if hotelRoomDays['city_hotel'] - 1 = daystart:
  831. $stat_msg += '<BR>You have 1 night left on your St Petersburg hotel booking.'
  832. elseif hotelRoomDays['city_hotel'] = daystart and hour < 11:
  833. $stat_msg += '<BR>Your room at the St Petersburg hotel has check out today at 11:00'
  834. elseif hotelRoomDays['city_hotel'] = daystart:
  835. hotelRoom['city_hotel'] = 0
  836. end
  837. end
  838. if hour >= 8 and hour < 14 and week < 6 and mid($start_type,1,2) = 'sg' and SchoolAtestat = 0 and isSchoolHoliday = 0 and schoolProgulDay ! daystart:
  839. !!absence from school
  840. schoolprogul += 1
  841. schoolProgulDay = daystart
  842. end
  843. if cumcondslip <= 0: cumcondslip_deep = 0
  844. !!Sex stat update
  845. stat['mast'] += mastr & mastr = 0
  846. stat['hj'] += hj & hj = 0
  847. stat['bj'] += bj & bj = 0
  848. stat['vaginal'] += sex & sex = 0
  849. stat['anal'] += anal & anal = 0
  850. stat['cuni'] += kuni & kuni = 0
  851. stat['anal_strap_give'] += pegging & pegging = 0
  852. !!Pain calculation
  853. gs 'pain', 'calc'
  854. pain['relief'] = 0
  855. if alko > 9:
  856. pain['relief'] = 70
  857. elseif alko > 6:
  858. pain['relief'] = 40
  859. elseif alko > 3:
  860. pain['relief'] = 15
  861. end
  862. if StrongNarkota > 0:
  863. pain['relief'] = 90
  864. elseif nark > 0:
  865. pain['relief'] = 60
  866. elseif pain['killer'] > 12 and alko <= 9:
  867. pain['relief'] = 50
  868. end
  869. if pain['relief'] ! 0:
  870. if (pain['total'] / pain['relief']) > 0:
  871. pain['total'] = pain['total'] / pain['relief']
  872. elseif pain['total'] > 0:
  873. pain['total'] = 0
  874. end
  875. end
  876. if pain['total'] > 80:
  877. if (pcs_health * 5) >= healthmax: pcs_health = pcs_health * 20 / 100
  878. if (pcs_mood * 5) >= 100: pcs_mood = pcs_mood * 20 / 100
  879. elseif pain['total'] > 60:
  880. if (pcs_health * 5 / 2) >= healthmax: pcs_health = pcs_health * 40 / 100
  881. if (pcs_mood * 5 / 2) >= 100: pcs_mood = pcs_mood * 40 / 100
  882. elseif pain['total'] > 40:
  883. if (pcs_health * 5 / 3) >= healthmax: pcs_health = pcs_health * 60 / 100
  884. if (pcs_mood * 5 / 3) >= 100: pcs_mood = pcs_mood * 60 / 100
  885. elseif pain['total'] > 20:
  886. if (pcs_health * 5 / 4) >= healthmax: pcs_health = pcs_health * 80 / 100
  887. if (pcs_mood * 5 / 4) >= 100: pcs_mood = pcs_mood * 80 / 100
  888. elseif pain['total'] > 0:
  889. if (pcs_health * 10 / 9) >= healthmax: pcs_health = pcs_health * 90 / 100
  890. if (pcs_mood * 10 / 9) >= 100: pcs_mood = pcs_mood * 90 / 100
  891. end
  892. !!--------------------------pain calculation end--------------------------------
  893. !!update skills and attributes to pcs_ from there _lvl values plus adjustments based on condition
  894. gs 'stat_sklattrib_lvlset'
  895. !!Sleep variable cap
  896. if pcs_sleep > 100: pcs_sleep = 100
  897. if insleep = 0: gs 'stat_display'
  898. gs 'family_schedule'
  899. !!--------------------------Job Checks For Icons--------------------------------
  900. if (acting['shoot_day'] = daystart and actress_cast = 1) or (audition['day'] = daystart):
  901. acting['icon'] = 1
  902. else
  903. acting['icon'] = 0
  904. end
  905. if model_job_week < 2 and model['status'] = 1:
  906. model['icon'] = 1
  907. else
  908. model['icon'] = 0
  909. end
  910. if pfilmday[0] > 0:
  911. pornstar['icon'] = 1
  912. else
  913. pornstar['icon'] = 0
  914. end
  915. if hypnoSchedule = 1:
  916. if therapist_weekly_block = 0 and week = 4 and therapistday ! daystart and remindedtherapyday ! daystart:
  917. if menu_off = 0 and workDolg = 0:
  918. if (hour >= 18 and (minut > 45 or hour >= 19)) _
  919. and (hour < 20 and (minut < 15 or hour < 19)):
  920. gs 'therapist_reminder'
  921. end
  922. end
  923. end
  924. end
  925. !!--------------------------Booty Call SMSs--------------------------------
  926. if arrsize('$FuckBuddy') > 0 and hour > 1: gs 'booty_call', 'SMS raiser'
  927. --- stat ---------------------------------