lact_lib.qsrc 64 KB

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