lact_lib.qsrc 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631
  1. # lact_lib
  2. if $ARGS[0] = 'lactate_optout':
  3. !! func('lact_lib','lactate_optout')
  4. !! use gs 'lact_lib','lactate_optout'
  5. !! Used for switching off all lactation related content
  6. lactate = 0
  7. prolactinlvl = 0
  8. lactatemess = 0
  9. lact_engorgement = 0
  10. lactatemv = 0
  11. lactatemm = 0
  12. lactaterate = 0
  13. milk_demand = 0
  14. end
  15. if $ARGS[0] = 'view_milk_bottles':
  16. !! func('lact_lib', 'view_milk_bottles', location_id)
  17. !! use gs 'lact_lib','view_milk_bottles', 2
  18. !! locations
  19. !! 0 = lost
  20. !! 1 = in svetas hand
  21. !! 2 = in svetas bag
  22. !! 3 = parent bathroom
  23. !! 4 = parent fridge
  24. !! 5 = Resident Area Appartment Bathroom
  25. !! 6 = Resident Area Appartment Fridge
  26. !! 7 = Grandparents Bathroom
  27. !! 8 = Villa Bathroom
  28. !! 9 = Villa Fridge
  29. !! 10 = Shared Apartment Bathroom
  30. !! 11 = Shared Apartment Fridge
  31. !! Locations are not used yet but are implemented. I will add this on another day.
  32. !! milk bottle array indices
  33. !! mbarrtype: Size of milk bottle. Normal bottles are 150ml and large bottles are 250ml. Values are ml*10
  34. !! mbarrfill: Filled milk volume in the bottle. Values are in ml*10 and can''t surpass mbarrtype
  35. !! mbarrmage: timestamp the milk was pumped.
  36. !! mbarrcool: Is the milk cooled? 0 = no, 1 = normal cooler, 2 = deep freezer
  37. !! $mbarrstat: State of the milk: fresh, normal, old, rancid
  38. !! $mbarrtemp: Temperature of the milk: hot, warm, normal, cold, frozen
  39. !! mbarrloca: Location of the bottle.
  40. *clr
  41. cla
  42. !! Checking for unregistered bottles.
  43. gs 'lact_lib', 'reg_bottle_count'
  44. 'You check the bottles that you store here.<br>'
  45. temp_var = (bpbottlem + bpbottles) - 1
  46. vmb_i = 0
  47. milkedvolume = 0
  48. :vmbloop
  49. if vmb_i <= temp_var:
  50. if mbarrloca[vmb_i] = ARGS[1]:
  51. gs 'lact_lib', 'update_mbottle', vmb_i
  52. if mbarrfill[vmb_i] <=0:
  53. mbarrfill[vmb_i] = 0
  54. '<br><<vmb_i + 1>>. - An empty <<mbarrtype[vmb_i]/10>>ml bottle. You can use it to store your breast milk.'
  55. else
  56. '<br><<vmb_i + 1>>. - A <<mbarrtype[vmb_i]/10>>ml bottle. There is <<mbarrfill[vmb_i]/10>>ml of milk in the bottle. <a href="exec:msg ''<center>You open the bottle and check the milk inside.<br>You can feel the milk is <<$mbarrtemp[vmb_i]>> and it smells <<$mbarrstat[vmb_i]>>.</center>''">Check the content</a>'
  57. milkedvolume += mbarrfill[vmb_i]
  58. !! '| <a href="exec:func(''lact_lib'',''empty_milk_bottle'',''vmb_i'')">Empty the bottle</a>'
  59. end
  60. end
  61. vmb_i += 1
  62. jump 'vmbloop'
  63. end
  64. if milkedvolume > 0:
  65. '<br><a href="exec:gt''lact_lib'',''empty_milk_bottles''">Pour the milk into the sink</a>'
  66. end
  67. act 'Back':gt 'lact_lib', 'bp_milking'
  68. end
  69. !! empty bottle function
  70. if $ARGS[0] = 'empty_milk_bottles':
  71. !! use gt 'lact_lib', 'empty_milk_bottles'
  72. *clr
  73. cla
  74. temp_var = (bpbottlem + bpbottles) - 1
  75. emb_i = 0
  76. :emb_loop
  77. if emb_i <= temp_var:
  78. mbarrfill[emb_i] = 0
  79. mbarrmage[emb_i] = 0
  80. mbarrcool[emb_i] = 0
  81. $mbarrstat[emb_i] = 'none'
  82. $mbarrtemp[emb_i] = 'none'
  83. emb_i += 1
  84. jump 'emb_loop'
  85. end
  86. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  87. '<center>You pour all of your collected breast milk into the sink and clean up the bottles.</center>'
  88. minute += temp_var
  89. act 'Finish':menu_off = 0 & gt $loc, $metka
  90. !!gt 'lact_lib','view_milk_bottles',1
  91. end
  92. !! fill a bottle function
  93. if $ARGS[0] = 'fill_milk_bottle':
  94. !! use func('lact_lib','fill_milk_bottle',bottle_id,milk_amount)
  95. !! example func('lact_lib','fill_milk_bottle',3,300)
  96. if ARGS[2] > mbarrtype[ARGS[1]]:
  97. 'ERROR - More milk going into bottle than the bottle can hold.'
  98. else
  99. mbarrfill[ARGS[1]] = ARGS[2]
  100. mbarrmage[ARGS[1]] = func('lact_lib','time_stamp')
  101. mbarrcool[ARGS[1]] = 0
  102. $mbarrstat[ARGS[1]] = 'fresh'
  103. $mbarrtemp[ARGS[1]] = 'warm'
  104. end
  105. end
  106. !! Time Stamp function for milk bottles.
  107. if $ARGS[0] = 'time_stamp':
  108. !! use func('lact_lib','time_stamp')
  109. !! This function creates a time stamp in minutes. It takes the current in game time and converts it to total minutes from year 01.01.0000 to in game now.
  110. !! Used to check breast milk age in bottles. Can be used for other functions if needed.
  111. temp_timestamp = 0
  112. temp_timestamp += year * 365 * 24 * 60
  113. ts_i = 1
  114. if month > 1:
  115. :ts_loop
  116. if (month - 1) => ts_i:
  117. if ts_i = 1 or ts_i = 3 or ts_i = 5 or ts_i = 7 or ts_i = 8 or ts_i = 10 or ts_i = 12:
  118. temp_timestamp += 44640
  119. elseif ts_i = 4 or ts_i = 6 or ts_i = 9 or ts_i = 11:
  120. temp_timestamp += 43200
  121. elseif ts_i = 2:
  122. temp_timestamp += 40320
  123. if (year mod 4) = 0 and (year mod 100) ! 0 or (year mod 400) = 0:
  124. temp_timestamp += 1440
  125. end
  126. end
  127. ts_i += 1
  128. jump 'ts_loop'
  129. end
  130. end
  131. temp_timestamp += (day - 1) * 24 * 60
  132. temp_timestamp += hour * 60
  133. temp_timestamp += minut
  134. result = temp_timestamp
  135. end
  136. !! Update Milk bottle function
  137. if $ARGS[0] = 'update_mbottle':
  138. !! func('lact_lib', 'update_mbottle', bottle_id)
  139. !! use result = func('lact_lib','update_mbottle', '0')
  140. !! this function is used to update milk bottles whenever the milk is pumped or sveta checkes the bottles in her stash.
  141. !! Room temperature. Freshly expressed breast milk can be kept at room temperature for up to six hours. However, use or proper storage within four hours is optimal. If the room is especially warm, the limit is also four hours.
  142. !! Insulated cooler. Freshly expressed breast milk can be stored in an insulated cooler with ice packs for up to one day.
  143. !! Refrigerator. Freshly expressed breast milk can be stored in the back of the refrigerator for up to five days in clean conditions. However, use or freezer storage within three days is optimal.
  144. !! Deep freezer. Freshly expressed breast milk can be stored in the back of a deep freezer for up to 12 months. However, using the frozen milk within six months is optimal.
  145. !! milk bottle array indices
  146. !! mbarrtype: Size of milk bottle. Normal bottles are 150ml and large bottles are 250ml. Values are ml*10
  147. !! mbarrfill: Filled milk volume in the bottle. Values are in ml*10 and can''t surpass mbarrtype
  148. !! mbarrmage: timestamp the milk was pumped.
  149. !! mbarrcool: Is the milk cooled? 0 = no, 1 = normal cooler, 2 = deep freezer
  150. !! $mbarrstat: State of the milk: fresh, normal, old, rancid
  151. !! $mbarrtemp: Temperature of the milk: hot, warm, normal temparture, cold, frozen
  152. !! mbarrloca: Location of the bottle.
  153. if mbarrfill[ARGS[1]] > 0:
  154. if mbarrfill[ARGS[1]] > mbarrtype[ARGS[1]]: mbarrfill[ARGS[1]] = mbarrtype[ARGS[1]]
  155. if mbarrmage[ARGS[1]] <= 0: mbarrmage[ARGS[1]] = func('lact_lib','time_stamp')
  156. if mbarrcool[ARGS[1]] = 0:
  157. if (mbarrmage[ARGS[1]] + 60) >= func('lact_lib','time_stamp'):
  158. $mbarrtemp[ARGS[1]] = 'warm'
  159. $mbarrstat[ARGS[1]] = 'fresh'
  160. elseif (mbarrmage[ARGS[1]] + 60) < func('lact_lib','time_stamp') and (mbarrmage[ARGS[1]] + 360) >= func('lact_lib','time_stamp'):
  161. $mbarrtemp[ARGS[1]] = 'normal temparture'
  162. $mbarrstat[ARGS[1]] = 'normal'
  163. elseif (mbarrmage[ARGS[1]] + 360) < func('lact_lib','time_stamp') and (mbarrmage[ARGS[1]] + 1440) >= func('lact_lib','time_stamp'):
  164. $mbarrtemp[ARGS[1]] = 'normal temparture'
  165. $mbarrstat[ARGS[1]] = 'old'
  166. else
  167. $mbarrtemp[ARGS[1]] = 'normal temparture'
  168. $mbarrstat[ARGS[1]] = 'rancid'
  169. end
  170. elseif mbarrcool[ARGS[1]] = 1:
  171. if (mbarrmage[ARGS[1]] + 1440) >= func('lact_lib','time_stamp'):
  172. $mbarrtemp[ARGS[1]] = 'cold'
  173. $mbarrstat[ARGS[1]] = 'fresh'
  174. elseif (mbarrmage[ARGS[1]] + 1440) < func('lact_lib','time_stamp') and (mbarrmage[ARGS[1]] + 4320) >= func('lact_lib','time_stamp'):
  175. $mbarrtemp[ARGS[1]] = 'cold'
  176. $mbarrstat[ARGS[1]] = 'normal'
  177. elseif (mbarrmage[ARGS[1]] + 4320) < func('lact_lib','time_stamp') and (mbarrmage[ARGS[1]] + 7200) >= func('lact_lib','time_stamp'):
  178. $mbarrtemp[ARGS[1]] = 'cold'
  179. $mbarrstat[ARGS[1]] = 'old'
  180. else
  181. $mbarrtemp[ARGS[1]] = 'cold'
  182. $mbarrstat[ARGS[1]] = 'rancid'
  183. end
  184. elseif mbarrcool[ARGS[1]] = 2:
  185. if (mbarrmage[ARGS[1]] + 10080) >= func('lact_lib','time_stamp'):
  186. $mbarrtemp[ARGS[1]] = 'frozen'
  187. $mbarrstat[ARGS[1]] = 'fresh'
  188. elseif (mbarrmage[ARGS[1]] + 10080) < func('lact_lib','time_stamp') and (mbarrmage[ARGS[1]] + 262080) >= func('lact_lib','time_stamp'):
  189. $mbarrtemp[ARGS[1]] = 'frozen'
  190. $mbarrstat[ARGS[1]] = 'normal'
  191. elseif (mbarrmage[ARGS[1]] + 262080) < func('lact_lib','time_stamp') and (mbarrmage[ARGS[1]] + 525600) >= func('lact_lib','time_stamp'):
  192. $mbarrtemp[ARGS[1]] = 'frozen'
  193. $mbarrstat[ARGS[1]] = 'old'
  194. else
  195. $mbarrtemp[ARGS[1]] = 'frozen'
  196. $mbarrstat[ARGS[1]] = 'rancid'
  197. end
  198. else
  199. $mbarrtemp[ARGS[1]] = 'warm'
  200. $mbarrstat[ARGS[1]] = 'fresh'
  201. end
  202. else
  203. $mbarrtemp[ARGS[1]] = 'none'
  204. $mbarrstat[ARGS[1]] = 'none'
  205. mbarrmage[ARGS[1]] = 0
  206. mbarrfill[ARGS[1]] = 0
  207. end
  208. end
  209. if $ARGS[0] = 'useable_sbottle_count':
  210. !! use result = func('lact_lib','useable_sbottle_count',)
  211. !! function will give you the amount of 150ml bottles that sveta can use at the moment.
  212. usbc_i = 0
  213. bottlecounter = 0
  214. if reg_bottles_count > 0:
  215. :usbc_loop
  216. if usbc_i <= (reg_bottlem_count + reg_bottles_count):
  217. if mbarrtype[usbc_i] = 1500 and mbarrfill[usbc_i] = 0:
  218. bottlecounter += 1
  219. end
  220. usbc_i += 1
  221. jump 'usbc_loop'
  222. end
  223. end
  224. result = bottlecounter
  225. end
  226. if $ARGS[0] = 'useable_mbottle_count':
  227. !! use result = func('lact_lib','useable_mbottle_count')
  228. !! function will give you the amount of 250ml bottles that sveta can use at the moment.
  229. umbc_i = 0
  230. bottlecounter = 0
  231. if reg_bottlem_count > 0:
  232. :umbc_loop
  233. if umbc_i <= (reg_bottlem_count + reg_bottles_count):
  234. if mbarrtype[umbc_i] = 2500 and mbarrfill[umbc_i] = 0:
  235. bottlecounter += 1
  236. end
  237. umbc_i += 1
  238. jump 'umbc_loop'
  239. end
  240. end
  241. result = bottlecounter
  242. end
  243. if $ARGS[0] = '$get_bfat_tissue':
  244. !! func('lact_lib', 'get_bfattissue', npc_nbsize, npc_lactatemm)
  245. !! function to get breast fat tissue amount. Can be used for NPC as well as PC.
  246. !! ARGS[1] = npc_nbsize - the natural bust size of the NPC/PC.
  247. !! ARGS[2] = npc_lactatemm - he lactatemm of the NPC/PC.
  248. !! RESULT = Fat amount in ccm * 10.
  249. !! function for cup size volume in ccm y = 0,0002023*x^3 + 0,029199*x^2 + 4,3791*x + 70
  250. !! x = ((ARGS[1]/5) + 1)*10
  251. !! this function is based on the x figures for pcs_bust size (moving in steps of 5) and the actual cup sizes from a wikipedia table, which can be found here: https://en.wikipedia.org/wiki/Bra_size
  252. !! The function was estimated with excel using a trend line estimation for polynoms of third grade and a y = 0 at 70ccm
  253. !! https://www.ncbi.nlm.nih.gov/pubmed/11936199
  254. !! The percentage of fat volume in the total breast volume varied from 7 to 56% and the percentage of fat weight in the total breast weight varied from 3.6 to 37.6%. This great variability in the respective proportions of fat and glands in the evaluated specimens was not significantly correlated to age and body mass index.
  255. if ARGS[1] > 0:
  256. temp_var = ((ARGS[1]/5) + 1)*10
  257. temp_var2 = (((2023*temp_var*temp_var*temp_var)/10000000)+((29199*temp_var*temp_var)/1000000)+((43791*temp_var)/10000)+70)*10
  258. if temp_var2 > ARGS[2]:
  259. RESULT = temp_var2 - (ARGS[2] + ARGS[2]/50)
  260. elseif temp_var2 = ARGS[2]:
  261. RESULT = 0
  262. else
  263. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_bfat_tissue</i>!</font> - Node ARGS[1] - more mammary gland tissue available then total breast tissue.</b>'
  264. end
  265. else
  266. if ARGS[2] > 700:
  267. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_bfat_tissue</i>!</font> - Node ARGS[2] - more mammary gland tissue available then total breast tissue.</b>'
  268. else
  269. RESULT = 700
  270. end
  271. end
  272. end
  273. if $ARGS[0] = '$calc_npc_lactatemm_0':
  274. !! func('lact_lib', 'calc_npc_lactatemm_0', npc_glandamount, npc_prodstate, npc_breastage, npc_breastcount)
  275. !! New calc lactatemm function usuable for NPCs. Test function number one.
  276. !! ARGS[1] = npc_glandamount - The glandamount of the npc per breast. Glandamount here is actually the alveoli amount per breast. The value is 4500 to 150000 per breast depending on the genetics or if the npc went through pregnancy already.
  277. !! ARGS[2] = npc_prodstate - The breast production state of the npc. State can be "none", "induced" or "natural".
  278. !! ARGS[3] = npc_breastage - State can be "virgin" or "mature". Virgin in this case means that the breasts did not go through pregnancy changes yet, while mature is a fully developed breast that had all the changes during pregnancy.
  279. !! To determine the breastage, just check if the NPC has gone through pregnancy or not.
  280. !! ARGS[4] = npc_breastcount - The breast count of the NPC. If 0 the result will always be 0. Could be used for amputation events or multiple breasts events.
  281. !! The function will return something even if there is no lactation currently happening. this could be used for special events where sudden lactation is induced with the help of drugs. For example a lactation pill that will cause the NPC to lactate immediately without classical induction or natural growth during pregnancy.
  282. !! RESULT = lactatemm in ml*10
  283. if ARGS[2] = 'none':
  284. if ARGS[3] = 'virgin':
  285. temp_var = 2
  286. elseif ARGS[3] = 'mature':
  287. temp_var = 2
  288. else
  289. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Node ARGS[2] "none".</b>'
  290. end
  291. elseif ARGS[2] = 'induced':
  292. if ARGS[3] = 'virgin':
  293. temp_var = 20
  294. elseif ARGS[3] = 'mature':
  295. temp_var = 80
  296. else
  297. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Node ARGS[2] "induced".</b>'
  298. end
  299. elseif ARGS[2] = 'natural':
  300. if ARGS[3] = 'virgin':
  301. temp_var = 20
  302. elseif ARGS[3] = 'mature':
  303. temp_var = 80
  304. else
  305. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Node ARGS[2] "natural".</b>'
  306. end
  307. else
  308. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Root Node ARGS[2].</b>'
  309. end
  310. if ARGS[1] <= 0:
  311. RESULT = 0
  312. else
  313. RESULT = (ARGS[1]*temp_var*ARGS[4])/1000
  314. end
  315. end
  316. if $ARGS[0] = '$calc_lactatemm':
  317. !! func('lact_lib', 'calc_lactatemm')
  318. !! No arguments at the moment. Information is taken from the global variables 'nbsize', 'lactate','lactateinduced','kid'.
  319. !! lactatemm should be calculated every day, so if the breasts size is changed naturally the lactatemm will get higher. No change when silicone tits happen. Only natural breast tissue should make milk.
  320. !! Usage: lactatemm = func('lact_lib','$calc_lactatemm')
  321. !! RESULT = lactatemm in ml*10
  322. if lactate = 0:
  323. RESULT = 0
  324. elseif lactate >0:
  325. temp_breastsize = 0
  326. temp_breastsize += (nbsize + magicf2b)
  327. temp_var = 0
  328. !! This if needs to be changed later. If the kid is lost during the pregnancy, Sveta may still went through full breast development. If changing something here, please contact milky_boobs in the forums.
  329. if kid <= 0:
  330. temp_var = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))/4
  331. RESULT = temp_var
  332. else
  333. RESULT = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))
  334. end
  335. else
  336. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_lactatemm</i>!</font></b>'
  337. end
  338. end
  339. if $ARGS[0] = '$get_breastmilk_time':
  340. !! func('lact_lib','$get_breastmilk_time', sucktion_type, milk_demand)
  341. !! ARGS[1] = sucktion_type: the type of sucktion. adult_mouth [0], child_mouth [1], baby_mouth [2], manual_breastpump [3] , electric_breastpump [4], hand_expressing [5], cow milker [6], weak baby_mouth [7], stimulation during sex/sex play [8]
  342. !! ARGS[2] = milk_demand: how much milk is demanded. Warning: Should be ml and not in ml*10 for ease of use. :D
  343. !! RESULT = Time in Minutes
  344. !! Usage: breastmilktimetoget = func('lact_lib','$get_breastmilk_time', 2, 150)
  345. !! This function is just calculating the amount of time needed to get a specific amount of milk from svetas breasts. It is not pumping milk from her or changes anything else.
  346. !! If you want to milk sveta, use get_breastmilk.
  347. if lactate > 0:
  348. !! 'suck_flow_rate initialized' Base Rate of sucking is 10ml/minute.
  349. if ARGS[1] = 0:
  350. !! 'adult sucking'
  351. suck_flow_rate = 120
  352. elseif ARGS[1] = 1:
  353. !! 'child sucking'
  354. suck_flow_rate = 110
  355. elseif ARGS[1] = 2:
  356. !! 'baby sucking'
  357. suck_flow_rate = 80
  358. elseif ARGS[1] = 3:
  359. !! 'manual_breastpump sucking'
  360. suck_flow_rate = 180
  361. elseif ARGS[1] = 4:
  362. !! 'electric_breastpump sucking'
  363. suck_flow_rate = 400
  364. elseif ARGS[1] = 5:
  365. !! 'hand expression'
  366. suck_flow_rate = 105
  367. elseif ARGS[1] = 6:
  368. !! 'cow milker sucking'
  369. suck_flow_rate = 1000
  370. elseif ARGS[1] = 7:
  371. !! 'weak baby sucking'
  372. suck_flow_rate = 50
  373. temp_var = pcs_mood + ARGS[2]
  374. if temp_var > 100:
  375. pcs_mood = 100
  376. else
  377. pcs_mood += ARGS[2]
  378. end
  379. elseif ARGS[1] = 8:
  380. !! 'manual stimulation during sex/sex play'
  381. suck_flow_rate = 60
  382. else
  383. !! 'suck flow else branch'
  384. suck_flow_rate = 100
  385. end
  386. if pcs_nips > 0:
  387. max_nip_flow_rate = 60
  388. elseif pcs_nips > 20:
  389. max_nip_flow_rate = 80
  390. elseif pcs_nips > 40:
  391. max_nip_flow_rate = 100
  392. elseif pcs_nips > 60:
  393. max_nip_flow_rate = 120
  394. elseif pcs_nips > 80:
  395. max_nip_flow_rate = 140
  396. elseif pcs_nips > 100:
  397. max_nip_flow_rate = 160
  398. else
  399. max_nip_flow_rate = 100
  400. end
  401. if breastcounter > 0:
  402. temp_var = breastcounter/10
  403. soreness_mod += temp_var
  404. if soreness_mod > 20: soreness_mod = 20
  405. if nipple_cream = 1:
  406. soreness_mod += 20
  407. nipple_cream = 0
  408. end
  409. end
  410. nip_flow_mod = 1
  411. temp_var = breastcounter/10
  412. nip_flow_mod += temp_var
  413. if nip_flow > 30: nip_flow_mod = 30
  414. max_nip_flow_rate += nip_flow_mod
  415. if (lactaterate/60) < 1 and lactaterate > 0:
  416. temp_lactaterate = 1
  417. else
  418. temp_lactaterate = lactaterate/60
  419. end
  420. if lactatemv >= (ARGS[2]*10):
  421. if max_nip_flow_rate <= suck_flow_rate:
  422. temp_var = (ARGS[2]*10)/max_nip_flow_rate
  423. else
  424. temp_var = (ARGS[2]*10)/suck_flow_rate
  425. end
  426. RESULT = temp_var
  427. elseif lactatemv > 0 and lactatemv < (ARGS[2]*10):
  428. if max_nip_flow_rate <= suck_flow_rate:
  429. temp_var = lactatemv/max_nip_flow_rate
  430. temp_var2 = (ARGS[2]*10) - lactatemv
  431. if max_nip_flow_rate <= temp_lactaterate:
  432. temp_var += temp_var2/max_nip_flow_rate
  433. else
  434. temp_var += temp_var2/(temp_lactaterate*10)
  435. end
  436. else
  437. temp_var = lactatemv/suck_flow_rate
  438. temp_var2 = (ARGS[2]*10) - lactatemv
  439. if suck_flow_rate <= temp_lactaterate:
  440. temp_var += temp_var2/suck_flow_rate
  441. else
  442. temp_var += temp_var2/(temp_lactaterate*10)
  443. end
  444. end
  445. RESULT = temp_var
  446. elseif lactatemv <=0:
  447. if max_nip_flow_rate <= suck_flow_rate:
  448. if max_nip_flow_rate <= temp_lactaterate:
  449. temp_var = (ARGS[2]*10)/max_nip_flow_rate
  450. else
  451. temp_var = (ARGS[2]*10)/(temp_lactaterate*10)
  452. end
  453. else
  454. if suck_flow_rate <= temp_lactaterate:
  455. temp_var = (ARGS[2]*10)/suck_flow_rate
  456. else
  457. temp_var = (ARGS[2]*10)/(temp_lactaterate*10)
  458. end
  459. end
  460. RESULT = temp_var
  461. else
  462. RESULT = 0
  463. end
  464. else
  465. RESULT = 0
  466. end
  467. end
  468. if $ARGS[0] = '$get_breastmilk':
  469. !! func('lact_lib','$get_breastmilk', sucktion_type, sucktion_time)
  470. !! ARGS[1] = sucktion_type: the type of sucktion. adult_mouth [0], child_mouth [1], baby_mouth [2], manual_breastpump [3] , electric_breastpump [4], hand_expressing [5], cow milker [6], weak baby_mouth [7], stimulation during sex/sex play [8]
  471. !! ARGS[2] = sucktion_time: how many minutes the sucking/pumping takes place
  472. !! Usage: breastmilkvolume = func('lact_lib','$get_breastmilk', 4, 20)
  473. !! RESULT = Milk in ml*10
  474. !! Sveta, someone or something tries to milk Svetas breasts, so the daily variable breastpumped is switched on. This is used for the femcycle. If this is not switched on, possible changes like prolactinlvl etc go down.
  475. breastpumped = 1
  476. if soreness_mod <= 0: soreness_mod = 1
  477. !! what type of sucktion is happening? different sucktion can cause a different demand of breastmilk. Base rate of sucktion is 10ml/minute x 10. So if the sucktion rate is 10ml/min then suck_flow_rate = 100.
  478. if ARGS[1] = 0:
  479. !! 'adult sucking'
  480. suck_flow_rate = 120
  481. temp_var = pcs_mood +(ARGS[2]/8)
  482. if temp_var > 100:
  483. pcs_mood = 100
  484. else
  485. pcs_mood += ARGS[2]/8
  486. end
  487. elseif ARGS[1] = 1:
  488. !! 'child sucking'
  489. suck_flow_rate = 110
  490. temp_var = pcs_mood + (ARGS[2]/2)
  491. if temp_var > 100:
  492. pcs_mood = 100
  493. else
  494. pcs_mood += ARGS[2]/2
  495. end
  496. elseif ARGS[1] = 2:
  497. !! 'baby sucking'
  498. suck_flow_rate = 80
  499. temp_var = pcs_mood + ARGS[2]
  500. if temp_var > 100:
  501. pcs_mood = 100
  502. else
  503. pcs_mood += ARGS[2]
  504. end
  505. elseif ARGS[1] = 3:
  506. !! 'manual_breastpump sucking'
  507. suck_flow_rate = 180
  508. elseif ARGS[1] = 4:
  509. !! 'electric_breastpump sucking'
  510. suck_flow_rate = 400
  511. elseif ARGS[1] = 5:
  512. !! 'hand expression'
  513. suck_flow_rate = 105
  514. elseif ARGS[1] = 6:
  515. !! 'cow milker sucking'
  516. suck_flow_rate = 1000
  517. elseif ARGS[1] = 7:
  518. !! 'weak baby sucking'
  519. suck_flow_rate = 50
  520. temp_var = pcs_mood + ARGS[2]
  521. if temp_var > 100:
  522. pcs_mood = 100
  523. else
  524. pcs_mood += ARGS[2]
  525. end
  526. elseif ARGS[1] = 8:
  527. !! 'manual stimulation during sex/sex play'
  528. suck_flow_rate = 60
  529. else
  530. !! 'suck flow else branch'
  531. suck_flow_rate = 100
  532. end
  533. !! If you pump and work your breast more, soreness will decrease after pumping. This can also decline if your breasts arent worked for a longer time.
  534. if breastcounter > 0:
  535. temp_var = breastcounter/10
  536. soreness_mod += temp_var
  537. if soreness_mod > 30: soreness_mod = 30
  538. if nipple_cream = 1:
  539. soreness_mod += 20
  540. nipple_cream = 0
  541. end
  542. end
  543. !! If Sveta is not lactating we still need to do some actions. This is handled in here. Nipple pain + breast pain are applied as well as stamina is used.
  544. if lactate <= 0:
  545. if milkoverdemand <= 0: milkoverdemand = 0
  546. pump_stop_brake = 0
  547. !! This is how much milk demand is applied to the breasts. In this function it is needed to calculate the nipple pain and breast pain.
  548. max_sucktion_demand = suck_flow_rate*ARGS[2]
  549. if pain['nipples'] <= 60:
  550. suck_until_pain = (((60 - pain['nipples'])*soreness_mod)*10)/(suck_flow_rate/18)
  551. end
  552. temp_var = pain['nipples'] + max_sucktion_demand/(soreness_mod*100)
  553. if temp_var > 60:
  554. pain['nipples'] = 65
  555. pump_stop_brake = 1
  556. pumptime = suck_until_pain
  557. max_sucktion_demand = suck_flow_rate*pumptime
  558. else
  559. pain['nipples'] += max_sucktion_demand/(soreness_mod*100)
  560. end
  561. temp_var = pain['breasts'] + max_sucktion_demand/10000
  562. if temp_var > 20:
  563. pain['breasts'] = 25
  564. else
  565. pain['breasts'] += max_sucktion_demand/10000
  566. end
  567. !! Pumping breasts is exhausting even if no milk comes. Pumping will impact the stamina of Sveta if she is not lactating.
  568. temp_var = pcs_stam - max_sucktion_demand/300
  569. if temp_var < 0:
  570. pcs_stam = 0
  571. !! energy usage flag on.
  572. energytomilkpump = 1
  573. pcs_sweat += pumptime/30
  574. else
  575. pcs_stam -= max_sucktion_demand/300
  576. pcs_sweat += pumptime/30
  577. !! energy usage flag on.
  578. energytomilkpump = 1
  579. end
  580. if pumptime < 10:
  581. breastcounter += 1
  582. else
  583. breastcounter += pumptime/10
  584. end
  585. milkoverdemand += max_sucktion_demand
  586. RESULT = 0
  587. elseif lactate > 0:
  588. !! How much milk can go through the nipple. Base rate is 10ml/minute (100) when sucktion is applied to the nipple. If the demand is higher than the nipple can push through, nipple soreness will happen more quickly.
  589. if pcs_nips > 0:
  590. max_nip_flow_rate = 60
  591. elseif pcs_nips > 20:
  592. max_nip_flow_rate = 80
  593. elseif pcs_nips > 40:
  594. max_nip_flow_rate = 100
  595. elseif pcs_nips > 60:
  596. max_nip_flow_rate = 120
  597. elseif pcs_nips > 80:
  598. max_nip_flow_rate = 140
  599. elseif pcs_nips > 100:
  600. max_nip_flow_rate = 160
  601. else
  602. max_nip_flow_rate = 100
  603. end
  604. !! If you pump more, more milk will be able to flow out, disregarding nipplesize. Svetas nipples will get used to have milk stream through them, grows and drops with the breastcounter.
  605. nip_flow_mod = 1
  606. nip_flow_mod += breastcounter
  607. if nip_flow > 400: nip_flow_mod = 400
  608. max_nip_flow_rate += nip_flow_mod
  609. !! How much milk demand is applied to the breasts.
  610. max_sucktion_demand = suck_flow_rate*ARGS[2]
  611. !! We want to know if we can just suck out what is already stored or if additional milk production is needed to go through the whole pumping/sucking.
  612. !! If we only need 20ml from a 100ml storage, we would only substract 20ml, leaving 80ml inside the breasts.
  613. !! Also lets make sure we start at zero from the stuff we get from Sveta.
  614. milkedvolume = 0
  615. !! Case: Enough milk in Svetas breasts, covering the demand
  616. if lactatemv >= max_sucktion_demand:
  617. !! Checking if svetas nipple flow is enough to serve the demand. If yes - get the demand; If no - get what she is able to give us.
  618. if max_nip_flow_rate >= suck_flow_rate:
  619. milkedvolume = max_sucktion_demand
  620. lactatemv -= max_sucktion_demand
  621. else:
  622. milkedvolume = max_nip_flow_rate*ARGS[2]
  623. lactatemv -= milkedvolume
  624. end
  625. !! Case: Not enough milk in Svetas breasts.
  626. elseif lactatemv < max_sucktion_demand:
  627. !! We have two sub cases in this one. Sveta has no lactatemv and Sveta has not enough lactatemv. This means she has to produce more milk, but first we need to know how much is needed.
  628. !! temp_var will be the amount of milk Sveta has to produce to serve the demand. pump time left is the time left after lactatemv is drained.
  629. if lactatemv <= 0:
  630. temp_var = max_sucktion_demand
  631. pumptime_left = ARGS[2]
  632. else
  633. temp_var = max_sucktion_demand - lactatemv
  634. if max_nip_flow_rate >= suck_flow_rate:
  635. pumptime_left = ARGS[2] - (lactatemv/suck_flow_rate)
  636. else
  637. pumptime_left = ARGS[2] - (lactatemv/max_nip_flow_rate)
  638. end
  639. if pumptime_left < 0: pumptime_left = 0
  640. end
  641. !! Now we know how much time we have and how much demand we have. Time to check if Sveta can do it.
  642. !! For the case, that svetas milk flow is not big enough pumptime left will be 0, therefore this is handled here.
  643. if pumptime_left >0:
  644. if max_nip_flow_rate >= suck_flow_rate:
  645. !! the lactaterate is per hour, so it is possible that lactaterate will end up being zero when devided by 60. therefore everything here is multiplied by 100.
  646. if (suck_flow_rate*100) <= ((lactaterate*100)/60):
  647. milkedvolume += suck_flow_rate*pumptime_left
  648. else
  649. milkedvolume += ((((lactaterate*100)/60)*pumptime_left)/100)
  650. breastcounter += 2
  651. end
  652. else
  653. !! Same here as above.
  654. if (max_nip_flow_rate*100) <= ((lactaterate*100)/60):
  655. milkedvolume += max_nip_flow_rate*pumptime_left
  656. breastcounter += 2
  657. else
  658. milkedvolume += ((((lactaterate*100)/60)*pumptime_left)/100)
  659. breastcounter += 2
  660. end
  661. end
  662. !! Produced milk needs to be subtracted from the hourly lactate rate, so femcycle is only adding the milk that was not produced yet in the next hour
  663. if pumptime_left > 60:
  664. if ((pumptime_left*100)/60) > 100:
  665. lactaterate_use -= ((((lactaterate*100)/60)*(pumptime_left mod 60))/100)
  666. else
  667. lactaterate_use = lactaterate
  668. end
  669. else
  670. if lactaterate >= lactaterate_use:
  671. lactaterate_use -= milkedvolume
  672. else
  673. lactaterate_use = lactaterate
  674. end
  675. end
  676. if lactaterate_use <= 0: lactaterate_use = 0
  677. !! Sveta had to make milk, so she needs to use some of her body resources to make the milk.
  678. if milkedvolume > 0:
  679. !! energy usage flag on. Can be used in events to show that sveta is getting hungry or thirsty
  680. energytomilkpump = 1
  681. pcs_stam -= max_sucktion_demand/300
  682. if pcs_stam <= 0: pcs_stam = 0
  683. pcs_sweat += pumptime/30
  684. pcs_hydra -= milkedvolume/120
  685. if pcs_hydra < 1: pcs_hydra = 1
  686. pcs_energy -= milkedvolume/1200
  687. end
  688. end
  689. !! Now we check if sveta was able to make it or not. If not we have milk overdemand which will be used in femcycle to make her produce more milk next day.
  690. if temp_var > milkedvolume:
  691. milkoverdemand += (temp_var - milkedvolume)
  692. end
  693. !! time to add the pumped lactatemv to the milkedvolume and empty lactatemv.
  694. milkedvolume += lactatemv
  695. lactatemv = 0
  696. !! Here we have nipple and breastpain. The idea is - if there is more sucktion than the nipples can take more pain is applied. If the breasts make less milk then demanded pain to the breasts is applied.
  697. !! Else - there will only be nipple pain.
  698. if max_nip_flow_rate < suck_flow_rate:
  699. temp_var = pain['nipples'] + ((suck_flow_rate - max_nip_flow_rate)*100*ARGS[2])/2000 - (soreness_mod*ARGS[2])*15
  700. if temp_var >= 60:
  701. pain['nipples'] = 65
  702. elseif temp_var <= 0:
  703. pain['nipples'] += 1
  704. else
  705. pain['nipples'] += (((suck_flow_rate - max_nip_flow_rate)*100*ARGS[2])/2000 - (soreness_mod*ARGS[2])*15)
  706. end
  707. else
  708. if ARGS[2] < 10:
  709. pain['nipples'] += 1
  710. elseif ARGS[2] >= 10 and soreness_mod > ARGS[2]:
  711. pain['nipples'] += 1
  712. else
  713. pain['nipples'] += (ARGS[2]/10 - soreness_mod/10)
  714. end
  715. end
  716. if max_nip_flow_rate >= suck_flow_rate:
  717. if (suck_flow_rate*100) > ((lactaterate*100)/60):
  718. temp_var = pain['breasts'] + (((suck_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  719. if temp_var > 20:
  720. pain['breasts'] = 20
  721. else
  722. pain['breasts'] += (((suck_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  723. end
  724. end
  725. else
  726. if (max_nip_flow_rate*100) > ((lactaterate*100)/60):
  727. temp_var = pain['breasts'] + (((max_nip_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  728. if temp_var > 20:
  729. pain['breasts'] = 20
  730. else
  731. pain['breasts'] += (((max_nip_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  732. end
  733. end
  734. end
  735. end
  736. if pumptime < 10:
  737. breastcounter += 1
  738. else
  739. breastcounter += pumptime/10
  740. end
  741. !! Done - Result is the milked volume.
  742. RESULT = milkedvolume
  743. end
  744. end
  745. !! bp_milking - breast pump milking
  746. !! use href="exec:gt ''lact_lib'',''bp_milking''"
  747. if $ARGS[0] = 'bp_milking':
  748. pumptime = 0
  749. pumptype = 0
  750. gs 'lact_lib', 'reg_bottle_count'
  751. if pump_bottletype < 1500: pump_bottletype = 1500
  752. if $location_type ! 'bathroom' and pcs_inhib < 30:
  753. 'You aren''t confident enough to do that here.'
  754. act 'Finish': menu_off = 0 & gt $loc, $metka
  755. elseif bp_unbox <= 0:
  756. 'You need to unbox your breast pump first.'
  757. act 'Finish': menu_off = 0 & gt $loc, $metka
  758. elseif bp_unbox = 1 and ($location_type = 'bathroom' or $location_type = 'private'):
  759. gt 'lact_lib', 'bp_unbox_event'
  760. else
  761. *clr
  762. cla
  763. '<center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  764. 'How long do you want to pump your breasts with the manual breast pump?'
  765. if func('lact_lib','useable_sbottle_count') > 0 and func('lact_lib','useable_mbottle_count') > 0:
  766. if func('lact_lib','useable_sbottle_count') > 0 and pump_bottletype = 1500:
  767. 'Current bottle size in use: &gt;150ml | <a href="exec:pump_bottletype = 2500 & gt ''lact_lib'', ''bp_milking''">250ml</a>'
  768. elseif func('lact_lib','useable_mbottle_count') > 0:
  769. pump_bottletype = 2500
  770. 'Current bottle size in use <a href="exec:pump_bottletype = 1500 & gt ''lact_lib'', ''bp_milking''">150ml</a> | &gt;250ml'
  771. else
  772. 'this should not end up here - got to tfg forums.'
  773. end
  774. elseif func('lact_lib','useable_sbottle_count') > 0 and func('lact_lib','useable_mbottle_count') <= 0:
  775. pump_bottletype = 1500
  776. 'You currently use a 150ml bottle on your breast pump.'
  777. elseif func('lact_lib','useable_sbottle_count') <= 0 and func('lact_lib','useable_mbottle_count') > 0:
  778. pump_bottletype = 2500
  779. 'You currently use a 250ml bottle on your breast pump.'
  780. else
  781. 'You have no bottles left to use. Please empty bottles or buy new ones in the pharmacy.'
  782. end
  783. if (bpbottlem + bpbottles) = 1:
  784. 'You have one bottle. You can check it <a href="exec:gs ''lact_lib'',''view_milk_bottles'', 1">here</a>'
  785. elseif (bpbottlem + bpbottles) > 1:
  786. 'You have <<bpbottlem + bpbottles>> bottles. You can check them <a href="exec:gs ''lact_lib'',''view_milk_bottles'', 1">here</a>'
  787. end
  788. if lactatemv > 0 and (func('lact_lib','useable_sbottle_count') > 0 or func('lact_lib','useable_mbottle_count') > 0):
  789. pumptime = (func('lact_lib','$get_breastmilk_time', 3, (lactatemv/10)))
  790. if pumptime > 5:
  791. pumptime -= 2
  792. end
  793. if pumptime > 60:
  794. act 'Pump until breasts are empty':
  795. *clr
  796. cla
  797. minut += 2
  798. 'As you prepare for pumping you weight your breasts in your hands. You feel that your breasts carry a large amount of milk and pumping will probably take a long time.'
  799. 'Getting relieve for your breasts with the manual breast pump will probably take at least <<pumptime>> minutes.'
  800. if pcs_know_mward <= 0:
  801. 'You concider visiting a hospital to get help or buying a better breastpump.'
  802. pcs_ask_mward_help = 1
  803. pcs_knows_electric_pump = 1
  804. end
  805. 'Do you want to continue?'
  806. act 'Don''t pump':gt $loc, $metka
  807. act 'Continue':
  808. gt 'lact_lib', 'milking'
  809. end
  810. end
  811. elseif pumptime <= 0:
  812. act 'Pump until breasts are empty':
  813. *clr
  814. cla
  815. minute += 2
  816. 'As you prepare for pumping you weight your breasts in your hands. Your breasts feel really empty. There is no need to pump now.'
  817. act 'Don''t pump':gt $loc, $metka
  818. act 'back':gt 'lact_lib', 'bp_milking'
  819. end
  820. else
  821. act 'Pump until breasts are empty':
  822. pumptime = func('lact_lib','$get_breastmilk_time', 3, (lactatemv/10))
  823. if pumptime > 5:
  824. pumptime -= 2
  825. end
  826. gt 'lact_lib', 'milking'
  827. end
  828. end
  829. end
  830. if (func('lact_lib','useable_sbottle_count') > 0 or func('lact_lib','useable_mbottle_count') > 0):
  831. act '15 Minutes':
  832. pumptime = 15
  833. gt 'lact_lib', 'milking'
  834. end
  835. act '30 Minutes':
  836. pumptime = 30
  837. gt 'lact_lib', 'milking'
  838. end
  839. act 'Custom':
  840. pumptime = input ("How long do you plan to pump your breasts? (Not more than 60 minutes)")
  841. if pumptime <= 0 or pumptime > 60:
  842. minut += 2
  843. act 'Don''t pump':menu_off = 0 & gt $loc, $metka
  844. act 'back':gt 'lact_lib', 'bp_milking'
  845. elseif pumptime > 0 and pumptime <= 60:
  846. gt 'lact_lib', 'milking'
  847. end
  848. end
  849. end
  850. act 'Massage your breasts': gt 'lact_lib','man_milking'
  851. act 'Don''t pump':menu_off = 0 & gt $loc, $metka
  852. end
  853. end
  854. !! man_milking - manual (with hands) milking
  855. !! use href="exec:gt ''lact_lib'',''man_milking''"
  856. !! for manual milk expression in bathrooms etc. please use this function.
  857. if $ARGS[0] = 'massage':
  858. if breastcounter <= 0:
  859. temp_var = 50
  860. else
  861. temp_var = (50/breastcounter)
  862. end
  863. if (($location_type ! 'bathroom' and pcs_inhib >= 30) or $location_type = 'bathroom' and breastpump = 0) and pcs_horny >= temp_var:
  864. act 'Massage your breasts': gt 'lact_lib','man_milking'
  865. end
  866. end
  867. if $ARGS[0] = 'man_milking':
  868. pumptime = 0
  869. *clr
  870. cla
  871. gs 'lact_lib', 'reg_bottle_count'
  872. 'How long do you want to massage your breasts?'
  873. if lactatemv > 0:
  874. pumptime = (func('lact_lib','$get_breastmilk_time', 5, (lactatemv/10)))
  875. if pumptime > 60:
  876. act 'Express until breasts are empty':
  877. *clr
  878. cla
  879. minut += 2
  880. 'You prepare yourself and weight your breasts in your hands. You feel that your breasts carry a large amount of milk and manually expressing it will probably take a long time.'
  881. 'Getting relieve for your breasts with manual expression will probably take at least <<pumptime>> minutes.'
  882. if breastpump <= 0 and bp_unbox <= 1:
  883. 'You should concider buying a breastpump'
  884. elseif breastpump = 1 and bp_unbox <= 1 and pain['nipples'] <= 60:
  885. 'You should concider using your breastpump.'
  886. else
  887. 'You should concider the use of a breastpump.'
  888. end
  889. 'Do you want to continue?'
  890. act 'Don''t express':menu_off = 0 & gt $loc, $metka
  891. act 'Express your milk':
  892. gt 'lact_lib', 'hand_milking'
  893. end
  894. end
  895. elseif pumptime <= 0:
  896. act 'Express milk until breasts are empty':
  897. *clr
  898. cla
  899. minute += 2
  900. 'As you prepare yourself you feel your breasts in your hands. Your breasts feel really empty. There is no need to express now.'
  901. act 'Don''t express milk':menu_off = 0 & gt $loc, $metka
  902. act 'back':gt 'lact_lib', 'man_milking'
  903. end
  904. else
  905. act 'Express until breasts are empty':
  906. pumptime = func('lact_lib','$get_breastmilk_time', 5, (lactatemv/10))
  907. gt 'lact_lib', 'hand_milking'
  908. end
  909. end
  910. end
  911. act '5 Minutes':
  912. pumptime = 5
  913. gt 'lact_lib', 'hand_milking'
  914. end
  915. act '10 Minutes':
  916. pumptime = 10
  917. gt 'lact_lib', 'hand_milking'
  918. end
  919. act 'Custom':
  920. pumptime = input ("How long do you plan to massage your breasts? (Not more than 60 minutes)")
  921. if pumptime <= 0 or pumptime > 60:
  922. minut += 2
  923. act 'Don''t express':gt $loc, $metka
  924. act 'back':gt 'lact_lib', 'man_milking'
  925. elseif pumptime > 0 and pumptime <= 60:
  926. gt 'lact_lib', 'hand_milking'
  927. end
  928. end
  929. act 'Don''t express':menu_off = 0 & gt $loc, $metka
  930. end
  931. if $ARGS[0] = 'bp_unbox_event':
  932. if bp_unbox <= 0:
  933. *clr
  934. cla
  935. minut += 5
  936. if $location_type = 'bathroom':
  937. 'You push down the toilet seat to sit down and slowly start to unbox your newly aquirred breast pump.'
  938. elseif $location_type = 'private' and $locclass = 'bedr':
  939. 'You sit down on your bed and slowly start to unbox your newly aquirred breast pump.'
  940. elseif $location_type = 'private':
  941. 'You sit down and slowly start to unbox your newly aquirred breast pump.'
  942. end
  943. if kid <= 0 and preg <= 0 and pregtimes <= 0 and pregchem <= 0 and bp_unbox <= 0:
  944. 'While examining it, you think about why you bought it in the first place. You are not pregnant nor do you have a kid that needs breast milk.'
  945. if lactate <= 0:
  946. 'Your breasts haven''t got any milk in them too, so it seems this pump is a bit useless.'
  947. else
  948. 'At least it can help to get the milk out of your breasts.'
  949. end
  950. end
  951. if $location_type = 'private':
  952. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing.jpg"></center>'
  953. elseif $location_type = 'bathroom':
  954. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing_bath.jpg"></center>'
  955. else
  956. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing_bath.jpg"></center>'
  957. end
  958. !! creating first 150ml bottle
  959. bpbottles += 1
  960. gs 'lact_lib', 'reg_bottle_count'
  961. !! Actions
  962. if (pcs_inhib > 40 and $location_type = 'private') or $location_type = 'bathroom':
  963. act 'Try out how it works':
  964. *clr
  965. cla
  966. 'You pull up your top to release your breasts'
  967. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center><br>'
  968. 'Your fingers glide around the sucktion cup of the breast pump, while your other hand holds the pump.'
  969. 'Making sure that no one is around, you lift the breast pump to your left breast. The cold cone feels uncomfortable on your nipple.'
  970. milkedvolume = func('lact_lib','$get_breastmilk', 3, 1)
  971. minut += 1
  972. bp_unbox = 2
  973. if lactate > 0 and milkedvolume > 0:
  974. if milkedvolume <= 50:
  975. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  976. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  977. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  978. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  979. elseif milkedvolume > 50 and milkedvolume <= 1500:
  980. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  981. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  982. 'You go on for a minute and then detach the pump. You collected <<milkedvolume/10>>ml of your breastmilk.'
  983. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_half.jpg"></center>'
  984. else
  985. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  986. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  987. 'You go on for a minute and then detach the pump. You easily filed the breast pump bottle with your breast milk just with this little pumping.'
  988. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_full.jpg"></center>'
  989. end
  990. 'You nod at the breast pump, thinking it will come in handy.'
  991. elseif lactate > 0 and milkedvolume <= 0:
  992. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  993. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  994. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  995. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  996. else
  997. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  998. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  999. 'You go on for a minute and then detach the pump. As expected no milk was collected in the bottle.'
  1000. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  1001. end
  1002. if lactate > 0 and pain['nipples'] < 60 and pcs_knowsaboutlactation <= 0:
  1003. if pcs_usedbreastpumponherself > 0 and pcs_massagedherbreasts <= 0:
  1004. 'You are surprised to see that you are lactating!'
  1005. lactateinduced = 1
  1006. elseif pcs_usedbreastpumponherself <= 0 and pcs_massagedherbreasts > 0:
  1007. 'Regularily massaging your breasts probably made you lactate!<br>'
  1008. lactateinduced = 1
  1009. elseif pcs_usedbreastpumponherself > 0 and pcs_massagedherbreasts > 0:
  1010. 'All that pumping and massaging your breasts probably caused you to lactate!<br>'
  1011. lactateinduced = 1
  1012. else
  1013. 'To your surprise it is milk. You started lactating!<br>'
  1014. if thinkpreg = 1 or knowpreg = 1:
  1015. 'This is probably happening because you are pregnant.'
  1016. else
  1017. 'You should have this checked out by a doctor. You could be pregnant.'
  1018. end
  1019. lactateinduced = 0
  1020. end
  1021. pcs_knowsaboutlactation = 1
  1022. end
  1023. act 'continue':
  1024. *clr
  1025. cla
  1026. if milkedvolume > 50 and $location_type = 'private':
  1027. 'You look at the milk in the bottle and then around the room. Having no idea what to do with the excess milk, you look at it and suddenly sip it down.'
  1028. 'It is your milk, so it should be okay to drink it.'
  1029. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  1030. '<center>The milk is still warm from your breasts.</center>'
  1031. pcs_health += milkedvolume/400
  1032. pcs_energy += milkedvolume/500
  1033. if pcs_hydra >= 100:
  1034. pcs_hydra += milkedvolume/200
  1035. else
  1036. pcs_hydra += milkedvolume/100
  1037. end
  1038. minut += ((milkedvolume/1000) + 3)
  1039. act 'Finish': menu_off = 0 & gt $loc, $metka
  1040. else
  1041. 'You clean up your pump and cover your breasts again.'
  1042. act 'Finish': menu_off = 0 & gt $loc, $metka
  1043. end
  1044. end
  1045. bp_unbox = 2
  1046. end
  1047. end
  1048. act 'Don''t try it here':
  1049. *clr
  1050. cla
  1051. 'You look around you, not feeling to comfortable to use the breast pump here.'
  1052. bp_unbox = 1
  1053. act 'Finish': menu_off = 0 & gt $loc, $metka
  1054. end
  1055. elseif bp_unbox = 1:
  1056. if $location_type = 'private' and pcs_inhib < 40:
  1057. 'You can''t do this here'
  1058. act 'Finish': menu_off = 0 & gt $loc, $metka
  1059. else
  1060. 'You pull up your top to release your breasts'
  1061. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center><br>'
  1062. 'Your fingers glide around the sucktion cup of the breast pump, while your other hand holds the pump.'
  1063. 'Making sure that no one is around, you lift the breast pump to your left breast. The cold cone feels uncomfortable on your nipple.'
  1064. milkedvolume = func('lact_lib','$get_breastmilk', 3, 1)
  1065. minut += 1
  1066. bp_unbox = 2
  1067. if lactate > 0 and milkedvolume > 0:
  1068. if milkedvolume <= 50:
  1069. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  1070. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  1071. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  1072. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  1073. elseif milkedvolume > 50 and milkedvolume <= 1500:
  1074. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  1075. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  1076. 'You go on for a minute and then detach the pump. You collected <<milkedvolume/10>>ml of your breastmilk.'
  1077. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_half.jpg"></center>'
  1078. else
  1079. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  1080. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  1081. 'You go on for a minute and then detach the pump. You easily filed the breast pump bottle with your breast milk just with this little pumping.'
  1082. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_full.jpg"></center>'
  1083. end
  1084. 'You nod at the breast pump, thinking it will come in handy.'
  1085. elseif lactate > 0 and milkedvolume <= 0:
  1086. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  1087. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  1088. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  1089. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  1090. else
  1091. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  1092. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  1093. 'You go on for a minute and then detach the pump. As expected no milk was collected in the bottle.'
  1094. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  1095. end
  1096. act 'continue':
  1097. *clr
  1098. cla
  1099. if milkedvolume > 50 and $location_type = 'private':
  1100. 'You look at the milk in the bottle and then around the room. Having no idea what to do with the excess milk, you look at it and suddenly sip it down.'
  1101. 'It is your milk, so it should be okay to drink it.'
  1102. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  1103. '<center>The milk is still warm from your breasts.</center>'
  1104. pcs_health += milkedvolume/400
  1105. pcs_energy += milkedvolume/500
  1106. if pcs_hydra >= 100:
  1107. pcs_hydra += milkedvolume/200
  1108. else
  1109. pcs_hydra += milkedvolume/100
  1110. end
  1111. minut += ((milkedvolume/1000) + 3)
  1112. act 'Finish': menu_off = 0 & gt $loc, $metka
  1113. else
  1114. 'You clean up your pump and cover your breasts again.'
  1115. act 'Finish': menu_off = 0 & gt $loc, $metka
  1116. end
  1117. end
  1118. end
  1119. elseif bp_unbox >= 2:
  1120. *clr
  1121. cla
  1122. 'You unboxed your breast pump already.'
  1123. act 'Finish': menu_off = 0 & gt $loc, $metka
  1124. end
  1125. end
  1126. if $ARGS[0] = 'reg_bottle_count':
  1127. if reg_bottles_count <= 0: reg_bottles_count = 0
  1128. if reg_bottlem_count <= 0: reg_bottlem_count = 0
  1129. if (reg_bottlem_count + reg_bottles_count) < (bpbottlem + bpbottles):
  1130. :rbc_loop
  1131. rbc_index = (reg_bottlem_count + reg_bottles_count) - 1
  1132. if (bpbottles - reg_bottles_count) > 0:
  1133. reg_bottles_count += 1
  1134. rbc_index = (reg_bottlem_count + reg_bottles_count) - 1
  1135. mbarrtype[rbc_index] = 1500
  1136. mbarrfill[rbc_index] = 0
  1137. mbarrmage[rbc_index] = 0
  1138. mbarrcool[rbc_index] = 0
  1139. $mbarrstat[rbc_index] = 'none'
  1140. $mbarrtemp[rbc_index] = 'none'
  1141. mbarrloca[rbc_index] = 1
  1142. jump 'rbc_loop'
  1143. end
  1144. if (bpbottlem - reg_bottlem_count) > 0:
  1145. reg_bottlem_count += 1
  1146. rbc_index = (reg_bottlem_count + reg_bottles_count) - 1
  1147. mbarrtype[rbc_index] = 2500
  1148. mbarrfill[rbc_index] = 0
  1149. mbarrmage[rbc_index] = 0
  1150. mbarrcool[rbc_index] = 0
  1151. $mbarrstat[rbc_index] = 'none'
  1152. $mbarrtemp[rbc_index] = 'none'
  1153. mbarrloca[rbc_index] = 1
  1154. jump 'rbc_loop'
  1155. end
  1156. end
  1157. end
  1158. !! milking
  1159. !! never use directly. Always use bp_milking, man_milking or sex_milking
  1160. if $ARGS[0] = 'milking':
  1161. gs 'lact_lib', 'reg_bottle_count'
  1162. if lactate > 0 and pain['nipples'] < 60:
  1163. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  1164. !!act 'Finish':menu_off = 0 & gt $loc, $metka
  1165. bp_used_mbottle = 0
  1166. bp_used_sbottle = 0
  1167. bp_useable_sbottle = func('lact_lib','useable_sbottle_count')
  1168. bp_useable_mbottle = func('lact_lib','useable_mbottle_count')
  1169. pump_timestamp = func('lact_lib','time_stamp')
  1170. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_lactating.jpg"></center>'
  1171. if pumptime > 1:
  1172. 'You attach the pump to your breast and start rythmically squeezing the bulb for <<pumptime>> minutes.'
  1173. else
  1174. 'You attach the pump to your breast and start rythmically squeezing the bulb for one minute.'
  1175. end
  1176. if milkedvolume > pump_bottletype and (bp_useable_sbottle*1500 + bp_useable_mbottle*2500) = pump_bottletype:
  1177. 'During pumping you have to empty the collecting bottle as it filled up with your milk.'
  1178. 'You give it a few more pumps and detach the pump.<br>You filled the bottle with <<pump_bottletype/10>>ml of your milk.'
  1179. 'To collect all your pumped milk you should probably check if the pharmacy has additional bottles for your breast pump.'
  1180. if (bp_useable_sbottle - bp_used_sbottle) > 0:
  1181. bottlecounter = 0
  1182. :sbottle_loneloop
  1183. if bottlecounter < (bpbottlem + bpbottles) and milkedvolume > 1500:
  1184. if mbarrtype[bottlecounter] = 1500 and mbarrfill[bottlecounter] = 0:
  1185. func('lact_lib','fill_milk_bottle',bottlecounter,1500)
  1186. jump 'bottlefull_loopbreak'
  1187. end
  1188. bottlecounter += 1
  1189. jump 'sbottle_loneloop'
  1190. end
  1191. elseif (bp_useable_mbottle - bp_used_mbottle) > 0 and milkedvolume > 2500:
  1192. bottlecounter = 0
  1193. :mbottle_loneloop
  1194. if bottlecounter < (bpbottlem + bpbottles):
  1195. if mbarrtype[bottlecounter] = 2500 and mbarrfill[bottlecounter] = 0:
  1196. func('lact_lib','fill_milk_bottle',bottlecounter,2500)
  1197. jump 'bottlefull_loopbreak'
  1198. end
  1199. bottlecounter += 1
  1200. jump 'mbottle_loneloop'
  1201. end
  1202. else
  1203. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  1204. 'first fork case'
  1205. 'bp_used_mbottle: <<bp_used_mbottle>>'
  1206. 'bp_used_sbottle: <<bp_used_sbottle>>'
  1207. 'milkedvolume: <<milkedvolume>>'
  1208. 'pump_bottletype: <<pump_bottletype>>'
  1209. 'bp_useable_sbottle: <<bp_useable_sbottle>>'
  1210. 'bp_useable_mbottle: <<bp_useable_mbottle>>'
  1211. end
  1212. :bottlefull_loopbreak
  1213. elseif milkedvolume > pump_bottletype and (bp_useable_sbottle*1500 + bp_useable_mbottle*2500) > pump_bottletype:
  1214. !! Checking which bottletype is used and filling those bottles up before the other type is used.
  1215. :sbottleloop
  1216. if pump_bottletype < 2500 and milkedvolume >= 1500 and bp_used_sbottle < bp_useable_sbottle:
  1217. bp_used_sbottle += 1
  1218. milkedvolume -= 1500
  1219. bottlecounter = 0
  1220. :sbottle_searchloop
  1221. if bottlecounter < (bpbottlem + bpbottles):
  1222. if mbarrtype[bottlecounter] = 1500 and mbarrfill[bottlecounter] = 0:
  1223. func('lact_lib','fill_milk_bottle',bottlecounter,1500)
  1224. jump 'sbottle_searchloopbreak'
  1225. end
  1226. bottlecounter += 1
  1227. jump 'sbottle_searchloop'
  1228. end
  1229. :sbottle_searchloopbreak
  1230. jump 'sbottleloop'
  1231. end
  1232. :mbottleloop
  1233. if pump_bottletype >= 2500 and milkedvolume >= 2500 and bp_used_mbottle < bp_useable_mbottle:
  1234. bp_used_mbottle += 1
  1235. milkedvolume -= 2500
  1236. bottlecounter = 0
  1237. :mbottle_searchloop
  1238. if bottlecounter < (bpbottlem + bpbottles):
  1239. if mbarrtype[bottlecounter] = 2500 and mbarrfill[bottlecounter] = 0:
  1240. func('lact_lib','fill_milk_bottle',bottlecounter,2500)
  1241. jump 'mbottle_searchloopbreak'
  1242. end
  1243. bottlecounter += 1
  1244. jump 'mbottle_searchloop'
  1245. end
  1246. :mbottle_searchloopbreak
  1247. jump 'mbottleloop'
  1248. end
  1249. !! Checking for the milkedvolume and if there are bottles left. if yes - use these bottles
  1250. if milkedvolume > 0 and (((bp_useable_mbottle - bp_used_mbottle) > 0) or ((bp_useable_sbottle - bp_used_sbottle) > 0)):
  1251. :altfill01
  1252. if pump_bottletype < 2500 and milkedvolume >= 2500 and bp_used_mbottle < bp_useable_mbottle:
  1253. bp_used_mbottle += 1
  1254. milkedvolume -= 2500
  1255. bottlecounter = 0
  1256. :sbottle_altsearchloop
  1257. if bottlecounter < (bpbottlem + bpbottles):
  1258. if mbarrtype[bottlecounter] = 2500 and mbarrfill[bottlecounter] = 0:
  1259. func('lact_lib','fill_milk_bottle',bottlecounter,2500)
  1260. jump 'sbottle_altsearchloopbreak'
  1261. end
  1262. bottlecounter += 1
  1263. jump 'sbottle_altsearchloop'
  1264. end
  1265. :sbottle_altsearchloopbreak
  1266. jump 'altfill01'
  1267. end
  1268. :altfill02
  1269. if pump_bottletype >= 2500 and milkedvolume >= 1500 and bp_used_sbottle < bp_useable_sbottle:
  1270. bp_used_sbottle += 1
  1271. milkedvolume -= 1500
  1272. bottlecounter = 0
  1273. :mbottle_altsearchloop
  1274. if bottlecounter < (bpbottlem + bpbottles):
  1275. if mbarrtype[bottlecounter] = 1500 and mbarrfill[bottlecounter] = 0:
  1276. func('lact_lib','fill_milk_bottle',bottlecounter,1500)
  1277. jump 'mbottle_altsearchloopbreak'
  1278. end
  1279. bottlecounter += 1
  1280. jump 'mbottle_altsearchloop'
  1281. end
  1282. :mbottle_altsearchloopbreak
  1283. jump 'altfill02'
  1284. end
  1285. end
  1286. !! by this point all bottles should have been used up. Everything else needs to end up in the drain.
  1287. if milkedvolume > 0 and bp_useable_mbottle = bp_used_mbottle and bp_useable_sbottle = bp_used_sbottle:
  1288. 'During pumping you have to switch the collecting bottle as it filled up with your milk. Unfortunately you don''t have enough bottles to collect all your milk.'
  1289. 'You had to pour <<milkedvolume/10>>ml of your breast milk into the sink.'
  1290. milkedvolume = ((bp_used_mbottle*2500) + (bp_used_sbottle*1500))
  1291. elseif milkedvolume > 0 and milkedvolume < 1500 and (bp_useable_sbottle - bp_used_sbottle) > 0:
  1292. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  1293. elseif milkedvolume > 0 and milkedvolume < 2500 and milkedvolume > 1500 and (bp_useable_mbottle - bp_used_mbottle) > 0:
  1294. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  1295. else
  1296. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  1297. end
  1298. if bp_used_mbottle >= 1 or bp_used_sbottle >= 1:
  1299. '<center><img <<$set_imgh>> src="images/pc/body/tits/bottles_full.jpg"></center>'
  1300. if milkedvolume = ((bp_used_mbottle*2500) + (bp_used_sbottle*1500)):
  1301. 'You pumped <<milkedvolume/10>>ml of milk from your breasts, collecting it in:'
  1302. if bp_useable_sbottle = 1:
  1303. 'One 150ml bottle'
  1304. elseif bp_used_sbottle > 1:
  1305. '<<bp_used_sbottle>> x 150ml bottles'
  1306. end
  1307. if bp_used_mbottle = 1:
  1308. 'One 250ml bottle'
  1309. elseif bp_used_mbottle > 1:
  1310. '<<bp_used_mbottle>> x 250ml bottles'
  1311. end
  1312. else
  1313. 'You pumped <<((bp_used_mbottle*2500)+(bp_used_sbottle*1500)+milkedvolume)/10>>ml of milk from your breasts collecting it in:'
  1314. if bp_used_sbottle = 1:
  1315. 'One 150ml bottle'
  1316. elseif bp_used_sbottle > 1:
  1317. '<<bp_used_sbottle>> x 150ml bottles'
  1318. end
  1319. if bp_used_mbottle = 1:
  1320. 'One 250ml bottle'
  1321. elseif bp_used_mbottle > 1:
  1322. '<<bp_used_mbottle>> x 250ml bottles'
  1323. end
  1324. if (bp_useable_sbottle - bp_used_sbottle) > 0 and milkedvolume <= 1500:
  1325. bottlecounter = 0
  1326. :sbottle_restsearchloop
  1327. if bottlecounter < (bpbottlem + bpbottles):
  1328. if mbarrtype[bottlecounter] = 1500 and mbarrfill[bottlecounter] = 0:
  1329. func('lact_lib','fill_milk_bottle',bottlecounter,milkedvolume)
  1330. jump 'sbottlefilled_break'
  1331. end
  1332. bottlecounter += 1
  1333. jump 'sbottle_restsearchloop'
  1334. end
  1335. :sbottlefilled_break
  1336. 'You also stored <<milkedvolume/10>>ml of breast milk in a 150ml bottle.'
  1337. elseif (bp_useable_mbottle - bp_used_mbottle) > 0 and milkedvolume <= 2500:
  1338. bottlecounter = 0
  1339. :mbottle_restsearchloop
  1340. if bottlecounter < (bpbottlem + bpbottles):
  1341. if mbarrtype[bottlecounter] = 2500 and mbarrfill[bottlecounter] = 0:
  1342. func('lact_lib','fill_milk_bottle',bottlecounter,milkedvolume)
  1343. jump 'mbottlefilled_break'
  1344. end
  1345. bottlecounter += 1
  1346. jump 'mbottle_restsearchloop'
  1347. end
  1348. :mbottlefilled_break
  1349. 'You also stored <<milkedvolume/10>>ml of breast milk in a 250ml bottle.'
  1350. else
  1351. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  1352. 'second fork case'
  1353. 'bp_used_mbottle: <<bp_used_mbottle>>'
  1354. 'bp_used_sbottle: <<bp_used_sbottle>>'
  1355. 'milkedvolume: <<milkedvolume>>'
  1356. 'pump_bottletype: <<pump_bottletype>>'
  1357. 'bp_useable_sbottle: <<bp_useable_sbottle>>'
  1358. 'bp_useable_mbottle: <<bp_useable_mbottle>>'
  1359. end
  1360. milkedvolume += bp_used_mbottle*2500 + bp_used_sbottle*1500
  1361. end
  1362. else
  1363. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  1364. 'third fork case'
  1365. 'bp_used_mbottle: <<bp_used_mbottle>>'
  1366. 'bp_used_sbottle: <<bp_used_sbottle>>'
  1367. 'milkedvolume: <<milkedvolume>>'
  1368. 'pump_bottletype: <<pump_bottletype>>'
  1369. 'bpbottles: <<bpbottles>>'
  1370. 'bpbottlem: <<bpbottlem>>'
  1371. end
  1372. else
  1373. 'You give it a few more pumps and detach the pump.<br>You filled the bottle with <<milkedvolume/10>>ml of your milk.'
  1374. if (bp_useable_sbottle - bp_used_sbottle) > 0 and milkedvolume <= 1500:
  1375. bottlecounter = 0
  1376. :single_sbottle_searchloop
  1377. if bottlecounter < (bpbottlem + bpbottles):
  1378. if mbarrtype[bottlecounter] = 1500 and mbarrfill[bottlecounter] = 0:
  1379. func('lact_lib','fill_milk_bottle',bottlecounter,milkedvolume)
  1380. jump 'single_sbottlefilled_break'
  1381. end
  1382. bottlecounter += 1
  1383. jump 'single_sbottle_searchloop'
  1384. end
  1385. :single_sbottlefilled_break
  1386. elseif (bp_useable_mbottle - bp_used_mbottle) > 0 and milkedvolume <= 2500:
  1387. bottlecounter = 0
  1388. :single_mbottle_searchloop
  1389. if bottlecounter < (bpbottlem + bpbottles):
  1390. if mbarrtype[bottlecounter] = 2500 and mbarrfill[bottlecounter] = 0:
  1391. func('lact_lib','fill_milk_bottle',bottlecounter,milkedvolume)
  1392. jump 'single_mbottlefilled_break'
  1393. end
  1394. bottlecounter += 1
  1395. jump 'single_mbottle_searchloop'
  1396. end
  1397. :single_mbottlefilled_break
  1398. else
  1399. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  1400. 'second fork case'
  1401. 'bp_used_mbottle: <<bp_used_mbottle>>'
  1402. 'bp_used_sbottle: <<bp_used_sbottle>>'
  1403. 'milkedvolume: <<milkedvolume>>'
  1404. 'pump_bottletype: <<pump_bottletype>>'
  1405. 'bp_useable_sbottle: <<bp_useable_sbottle>>'
  1406. 'bp_useable_mbottle: <<bp_useable_mbottle>>'
  1407. end
  1408. milkedvolume += bp_used_mbottle*2500 + bp_used_sbottle*1500
  1409. end
  1410. breastcounter += 1
  1411. if energytomilkpump > 0 and pcs_energy = 0:
  1412. '<br>During pumping you feel really hungry, producing breast milk seems to be more exhausing then thought.'
  1413. energytomilkpump = 0
  1414. elseif energytomilkpump > 0:
  1415. '<br>You feel a bit thirsty after pumping.'
  1416. energytomilkpump = 0
  1417. end
  1418. if bcream_used = 1:
  1419. pcs_nips += rand(0,2)
  1420. bcream_used = 0
  1421. end
  1422. minut += pumptime
  1423. elseif lactate > 0 and pain['nipples'] < 60 and pcs_knowsaboutlactation <= 0:
  1424. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  1425. if pcs_usedbreastpumponherself > 0 and pcs_massagedherbreasts <= 0:
  1426. 'As usual, you attach the pump, but after a few pumps white liquid suddenly starts flowing from your nipples.<br>Using the breast pump regularily probably made you lactate!'
  1427. lactateinduced = 1
  1428. elseif pcs_usedbreastpumponherself <= 0 and pcs_massagedherbreasts > 0:
  1429. 'You attach the pump but after a few pumps white liquid suddenly comes from your nipples. Regularily massaging your breasts probably made you lactate!<br>'
  1430. lactateinduced = 1
  1431. elseif pcs_usedbreastpumponherself > 0 and pcs_massagedherbreasts > 0:
  1432. 'You attach the pump but after a few pumps white liquid suddenly comes from your nipples. All that pumping and massaging your breasts probably caused you to lactate!<br>'
  1433. lactateinduced = 1
  1434. else
  1435. 'You attach the pump and give it a few pumps. To your surprise white liquid suddenly comes from your nipples. You started lactating!<br>'
  1436. if thinkpreg = 1 or knowpreg = 1:
  1437. 'This is probably happening because you are pregnant.'
  1438. else
  1439. 'You should have this checked out by a doctor. You could be pregnant.'
  1440. end
  1441. lactateinduced = 0
  1442. end
  1443. pcs_usedbreastpumponherself = 0
  1444. pcs_massagedherbreasts = 0
  1445. pcs_knowsaboutlactation = 1
  1446. elseif lactate = 0 and pain['nipples'] < 60:
  1447. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  1448. pcs_usedbreastpumponherself += 1
  1449. '<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center>'
  1450. if breastcounter < 100:
  1451. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels uncomfortable on your nipples.'
  1452. elseif breastcounter >= 100 and breastcounter < 200:
  1453. 'You attach the pump to your nipples and start squeezing the bulb. You are used to the vacuum on your nipples.'
  1454. else
  1455. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels good on your nipples.'
  1456. end
  1457. if prolactinlvl > 100: 'A few droplets of liquid come out of your nipples but it is not milk.'
  1458. breastcounter += 1
  1459. if pump_stop_brake = 1:
  1460. 'During pumping your nipples start to hurt extremely. You have to stop after <<pumptime>> minutes, because you couldn''t go on.'
  1461. end
  1462. if prolactinlvl > 100:
  1463. if rand(0,10) > 9:
  1464. pumpinggrowth += 1
  1465. end
  1466. 'After finishing, your breasts feel weirdly engorged.'
  1467. end
  1468. if bcream_used = 1:
  1469. pcs_nips += rand(0,2)
  1470. bcream_used = 0
  1471. end
  1472. minut += pumptime
  1473. else
  1474. 'Your nipples feel too sore to use the pump right now.'
  1475. end
  1476. if milkedvolume > 0:
  1477. lact_engorgement = 0
  1478. lactatemess = 0
  1479. act 'Pour it into the sink':
  1480. *clr
  1481. cla
  1482. piits_i = 0
  1483. :piits_emptyloop
  1484. if piits_i < (bpbottlem + bpbottles):
  1485. if mbarrmage[piits_i] = (pump_timestamp):mbarrfill[piits_i] = 0
  1486. piits_i += 1
  1487. jump 'piits_emptyloop'
  1488. end
  1489. if milkedvolume > 1500 and bpbottles <= 1:
  1490. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  1491. '<center>You pour 150ml of your breast milk into the sink and clean up your breastpump.</center>'
  1492. else
  1493. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  1494. '<center>You pour <<milkedvolume/10>>ml of your breast milk into the sink and clean up your breastpump.</center>'
  1495. end
  1496. minute += ((milkedvolume/1500) + 3)
  1497. act 'Finish':
  1498. milkedvolume = 0
  1499. menu_off = 0 & gt $loc, $metka
  1500. end
  1501. end
  1502. act 'Leave it here':
  1503. *clr
  1504. cla
  1505. 'You screw the cap onto the bottle and put it away.'
  1506. act 'Finish':
  1507. milkedvolume = 0
  1508. menu_off = 0 & gt $loc, $metka
  1509. end
  1510. end
  1511. if pcs_hydra < 100:
  1512. act 'Drink it':
  1513. *clr
  1514. cla
  1515. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  1516. '<center>You drink your own breast milk and clean up your breastpump.</center>'
  1517. '<center>The milk is still warm from your breasts.</center>'
  1518. di_i = 0
  1519. :di_emptyloop
  1520. if di_i < (bpbottlem + bpbottles):
  1521. if mbarrmage[di_i] = (pump_timestamp):mbarrfill[di_i] = 0
  1522. di_i += 1
  1523. jump 'di_emptyloop'
  1524. end
  1525. pcs_health += milkedvolume/400
  1526. pcs_energy += milkedvolume/500
  1527. if pcs_hydra >= 100:
  1528. pcs_hydra += milkedvolume/200
  1529. else
  1530. pcs_hydra += milkedvolume/100
  1531. end
  1532. minute += ((milkedvolume/1000) + 3)
  1533. act 'Finish':
  1534. milkedvolume = 0
  1535. menu_off = 0 & gt $loc, $metka
  1536. end
  1537. end
  1538. end
  1539. else
  1540. act 'Finish':menu_off = 0 & gt $loc, $metka
  1541. end
  1542. end
  1543. !! engorged_morning
  1544. !! use href="exec:gt ''lact_lib'',''engorged_morning''"
  1545. if $ARGS[0] = 'engorged_morning':
  1546. minut += 5
  1547. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  1548. 'You wake up and your breasts hurt. As you look down, you can see that you have a heavy letdown. You should pump your breasts as soon as possible.'
  1549. act 'Finish':menu_off = 0 & gt $loc, $metka
  1550. end
  1551. if $ARGS[0] = 'hand_milking':
  1552. *clr
  1553. cla
  1554. if lactate > 0 and pain['nipples'] <= 60:
  1555. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple.'
  1556. 'Several small streams of your milk start to jet out of your nipples.'
  1557. 'You go on for <<pumptime>> minutes until you stop. You clean yourself up and everything else that got wet from your milk.<br>'
  1558. '<center><video autoplay loop src="images/pc/body/tits/bathroom_milking.mp4"></video></center>'
  1559. milkedvolume = func('lact_lib','$get_breastmilk', 5, pumptime)
  1560. minut += pumptime
  1561. elseif lactate > 0 and pain['nipples'] < 60 and pcs_knowsaboutlactation <= 0:
  1562. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  1563. if pcs_usedbreastpumponherself > 0 and pcs_massagedherbreasts <= 0:
  1564. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple. After a few squeezes white liquid suddenly starts flowing from your nipples.<br>Using the breast pump regularily probably made you lactate!'
  1565. lactateinduced = 1
  1566. elseif pcs_usedbreastpumponherself <= 0 and pcs_massagedherbreasts > 0:
  1567. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple. After a few squeezes white liquid suddenly starts flowing from your nipples. Regularily massaging your breasts probably made you lactate!<br>'
  1568. lactateinduced = 1
  1569. elseif pcs_usedbreastpumponherself > 0 and pcs_massagedherbreasts > 0:
  1570. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple. After a few squeezes white liquid suddenly starts flowing from your nipples. All that pumping and massaging your breasts probably caused you to lactate!<br>'
  1571. lactateinduced = 1
  1572. else
  1573. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple. To your surprise white liquid suddenly starts flowing from your nipples. You started lactating!<br>'
  1574. if thinkpreg = 1 or knowpreg = 1:
  1575. 'This is probably happening because you are pregnant.'
  1576. else
  1577. 'You should have this checked out by a doctor. You could be pregnant.'
  1578. end
  1579. lactateinduced = 0
  1580. end
  1581. pcs_usedbreastpumponherself = 0
  1582. pcs_massagedherbreasts = 0
  1583. pcs_knowsaboutlactation = 1
  1584. elseif lactate = 0 and pain['nipples'] <= 60:
  1585. pcs_massagedherbreasts += 0
  1586. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple,'
  1587. 'kneading your breasts as well.'
  1588. '<center><video autoplay loop src="images/pc/body/tits/bathroom_massage.mp4"></video></center>'
  1589. milkedvolume = func('lact_lib','$get_breastmilk', 5, pumptime)
  1590. minut += pumptime
  1591. else
  1592. 'Your nipples are too sore to hand massage right now.'
  1593. end
  1594. act 'Finish':menu_off = 0 & gt $loc, $metka
  1595. end
  1596. --- lact_lib ---------------------------------