body_structure.qsrc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. # body_structure
  2. ! Get the bmi-strength class
  3. ! bs_class = func('body_structure', 'get_class', pcs_bmi, strenbuf)
  4. if $ARGS[0] = 'get_class':
  5. ! bmi
  6. if ARGS[1] < 16:
  7. result = 0
  8. elseif ARGS[1] < 19:
  9. result = 100
  10. elseif ARGS[1] < 22:
  11. result = 200
  12. elseif ARGS[1] < 25:
  13. result = 300
  14. elseif ARGS[1] < 30:
  15. result = 400
  16. elseif ARGS[1] < 35:
  17. result = 500
  18. elseif ARGS[1] < 40:
  19. result = 600
  20. elseif ARGS[1] < 45:
  21. result = 700
  22. else
  23. result = 800
  24. end
  25. ! strenbuf
  26. if ARGS[2] <= 5:
  27. result += 0
  28. elseif ARGS[2] <= 10:
  29. result += 1
  30. elseif ARGS[2] <= 15:
  31. result += 2
  32. elseif ARGS[2] <= 25:
  33. result += 3
  34. elseif ARGS[2] <= 35:
  35. result += 4
  36. elseif ARGS[2] <= 50:
  37. result += 5
  38. elseif ARGS[2] <= 70:
  39. result += 6
  40. elseif ARGS[2] <= 100:
  41. result += 7
  42. elseif ARGS[2] <= 110:
  43. result += 8
  44. elseif ARGS[2] <= 120:
  45. result += 9
  46. elseif ARGS[2] <= 130:
  47. result += 10
  48. elseif ARGS[2] <= 140:
  49. result += 11
  50. elseif ARGS[2] <= 150:
  51. result += 12
  52. elseif ARGS[2] <= 160:
  53. result += 13
  54. elseif ARGS[2] <= 170:
  55. result += 14
  56. elseif ARGS[2] <= 180:
  57. result += 15
  58. elseif ARGS[2] <= 190:
  59. result += 16
  60. else
  61. result += 17
  62. end
  63. end
  64. ! Get the bmi description:
  65. ! $bodyVars['bmi_desc'] = func('body_structure', pcs_bmi)
  66. if $ARGS[0] = 'bmi_desc':
  67. if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
  68. bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], 30)
  69. if bs_temp_bs_class < 100:
  70. $result = 'You are severely underweight.'
  71. elseif bs_temp_bs_class < 200:
  72. $result = 'You are underweight'
  73. elseif bs_temp_bs_class < 300:
  74. $result = 'You have a normal, healthy weight.'
  75. elseif bs_temp_bs_class < 400:
  76. $result = 'You have a normal, healthy weight.'
  77. elseif bs_temp_bs_class < 500:
  78. $result = 'You are overweight.'
  79. elseif bs_temp_bs_class < 600:
  80. $result = 'You are moderately obese.'
  81. elseif bs_temp_bs_class < 700:
  82. $result = 'You are severely obese.'
  83. elseif bs_temp_bs_class < 800:
  84. $result = 'You are very severely obese.'
  85. else
  86. $result = 'You are morbidly obese.'
  87. end
  88. killvar 'bs_temp_bs_class'
  89. end
  90. ! Get the appearance bonus
  91. ! Appearance_bonus = func('body_structure', 'appearance_bonus', pcs_bmi, strenbuf, succubusflag)
  92. if $ARGS[0] = 'appearance_bonus':
  93. if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
  94. if arrsize('ARGS') = 2: ARGS[2] = strenbuf
  95. if arrsize('ARGS') = 3: ARGS[3] = succubusflag
  96. if ARGS[3] = 1: ARGS[2] = 90
  97. bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
  98. if bs_temp_bs_class < 100:
  99. ! starving: bmi < 16
  100. result = -10
  101. elseif bs_temp_bs_class < 200:
  102. ! underweight: 16 <= bmi < 16
  103. result = 25
  104. elseif bs_temp_bs_class < 300:
  105. ! slender: 19 <= bmi < 21
  106. result = 50
  107. elseif bs_temp_bs_class < 400:
  108. ! healthy: 21 <= bmi < 25
  109. result = 50
  110. elseif bs_temp_bs_class < 500:
  111. ! overweight: 26 <= bmi < 30
  112. result = 25
  113. elseif bs_temp_bs_class < 600:
  114. ! moderately obese: 30 <= bmi < 35
  115. result = 10
  116. elseif bs_temp_bs_class < 700:
  117. ! severely obese: 35 <= bmi < 40
  118. result = -15
  119. elseif bs_temp_bs_class < 800:
  120. ! very severely obese: 40 <= bmi < 45
  121. result = -40
  122. else
  123. ! morbidly obese: 45 <= bmi
  124. result = -80
  125. end
  126. bs_temp_bs_class = bs_temp_bs_class mod 100
  127. if bs_temp_bs_class = 0:
  128. ! 0 <= strenbuf <= 5
  129. result -= 30
  130. elseif bs_temp_bs_class = 1:
  131. ! 5 < strenbuf <= 10
  132. result -= 20
  133. elseif bs_temp_bs_class = 2:
  134. ! 10 < strenbuf <= 15
  135. result -= 15
  136. elseif bs_temp_bs_class = 3:
  137. ! 15 < strenbuf <= 25
  138. result -= 10
  139. elseif bs_temp_bs_class = 4:
  140. ! 25 < strenbuf <= 35
  141. result -= 5
  142. elseif bs_temp_bs_class = 5:
  143. ! 35 < strenbuf <= 50
  144. result += 0
  145. elseif bs_temp_bs_class = 6:
  146. ! 50 < strenbuf <= 70
  147. result += 5
  148. elseif bs_temp_bs_class = 7:
  149. ! 70 < strenbuf <= 100
  150. result += 10
  151. elseif bs_temp_bs_class = 8:
  152. ! 100 < strenbuf <= 110
  153. result += 5
  154. elseif bs_temp_bs_class = 9:
  155. ! 110 < strenbuf <= 120
  156. result += 0
  157. elseif bs_temp_bs_class = 10:
  158. ! 120 < strenbuf <= 130
  159. result -= 5
  160. elseif bs_temp_bs_class = 11:
  161. ! 130 < strenbuf <= 140
  162. result -= 15
  163. elseif bs_temp_bs_class = 12:
  164. ! 140 < strenbuf <= 150
  165. result -= 30
  166. elseif bs_temp_bs_class = 13:
  167. ! 150 < strenbuf <= 160
  168. result -= 45
  169. elseif bs_temp_bs_class = 14:
  170. ! 160 < strenbuf <= 170
  171. result -= 60
  172. elseif bs_temp_bs_class = 15:
  173. ! 170 < strenbuf <= 180
  174. result -= 75
  175. elseif bs_temp_bs_class = 16:
  176. ! 180 < strenbuf <= 190
  177. result -= 100
  178. else
  179. ! 190 < strenbuf <= 200
  180. result -= 130
  181. end
  182. killvar 'bs_temp_bs_class'
  183. end
  184. ! Get the body shape image
  185. ! $bodyVars['img'] = func('body_structure', 'body_img', pcs_bmi, strenbuf, succubusflag)
  186. if $ARGS[0] = 'body_img':
  187. ! ======= Pregnant ======= !
  188. if bdsetlock = 0 and (knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or PregChem > 3600))):
  189. if PregChem <= 2687:
  190. $result = 'images/pc/body/shape/default_preg/0.jpg'
  191. elseif PregChem <= 6215:
  192. $result = 'images/pc/body/shape/default_preg/<<((PregChem - 2184)/504)>>.jpg'
  193. else
  194. $result = 'images/pc/body/shape/default_preg/8.jpg'
  195. end
  196. exit
  197. end
  198. if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
  199. if arrsize('ARGS') = 2: ARGS[2] = strenbuf
  200. if arrsize('ARGS') = 3: ARGS[3] = succubusflag
  201. if ARGS[3] = 1: ARGS[2] = 80
  202. bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
  203. if bdsetlock = 1:
  204. if fixbodset = 0:
  205. bs_temp_bs_class = 100 * (bs_temp_bs_class / 100) + 4
  206. elseif fixbodset = 1:
  207. bs_temp_bs_class = 100 * (bs_temp_bs_class / 100) + 6
  208. elseif fixbodset = 2:
  209. bs_temp_bs_class = 100 * (bs_temp_bs_class / 100) + 8
  210. else
  211. $result = func('body_structure', 'custom_body_img', bs_temp_bs_class)
  212. killvar 'bs_temp_bs_class'
  213. exit
  214. end
  215. end
  216. ! ======= starving ======= !
  217. ! ----- bmi < 16 ----- !
  218. if bs_temp_bs_class <= 17:
  219. ! 0 <= strenbuf <= 200
  220. $result = 'images/pc/body/shape/0.jpg'
  221. ! ======= underweight ======= !
  222. ! ----- 16 <= bmi < 19 ----- !
  223. elseif bs_temp_bs_class <= 105:
  224. ! 0 <= strenbuf <= 50
  225. $result = 'images/pc/body/shape/default_low/1.jpg'
  226. elseif bs_temp_bs_class <= 107:
  227. ! 51 <= strenbuf <= 100
  228. $result = 'images/pc/body/shape/default_mid/1.jpg'
  229. elseif bs_temp_bs_class <= 117:
  230. ! 101 <= strenbuf <= 200
  231. $result = 'images/pc/body/shape/default_high/1.jpg'
  232. ! ======= slender ======= !
  233. ! ----- 19 <= bmi < 21 ----- !
  234. elseif bs_temp_bs_class <= 205:
  235. ! 0 <= strenbuf <= 50
  236. $result = 'images/pc/body/shape/default_low/2.jpg'
  237. elseif bs_temp_bs_class <= 207:
  238. ! 51 <= strenbuf <= 100
  239. $result = 'images/pc/body/shape/default_mid/2.jpg'
  240. elseif bs_temp_bs_class <= 217:
  241. ! 101 <= strenbuf <= 200
  242. $result = 'images/pc/body/shape/default_high/2.jpg'
  243. ! ======= healthy ======= !
  244. ! ----- 21 <= bmi < 25 ----- !
  245. elseif bs_temp_bs_class <= 305:
  246. ! 0 <= strenbuf <= 50
  247. $result = 'images/pc/body/shape/default_low/3.jpg'
  248. elseif bs_temp_bs_class <= 307:
  249. ! 51 <= strenbuf <= 100
  250. $result = 'images/pc/body/shape/default_mid/3.jpg'
  251. elseif bs_temp_bs_class <= 317:
  252. ! 101 <= strenbuf <= 200
  253. $result = 'images/pc/body/shape/default_high/3.jpg'
  254. ! ======= overweight ======= !
  255. ! ----- 26 <= bmi < 30 ----- !
  256. elseif bs_temp_bs_class <= 405:
  257. ! 0 <= strenbuf <= 50
  258. $result = 'images/pc/body/shape/default_low/4.jpg'
  259. elseif bs_temp_bs_class <= 407:
  260. ! 51 <= strenbuf <= 100
  261. $result = 'images/pc/body/shape/default_mid/4.jpg'
  262. elseif bs_temp_bs_class <= 417:
  263. ! 101 <= strenbuf <= 200
  264. $result = 'images/pc/body/shape/default_high/4.jpg'
  265. ! ======= moderately obese ======= !
  266. ! ----- 30 <= bmi < 35 ----- !
  267. elseif bs_temp_bs_class <= 505:
  268. ! 0 <= strenbuf <= 50
  269. $result = 'images/pc/body/shape/default_low/5.jpg'
  270. elseif bs_temp_bs_class <= 507:
  271. ! 51 <= strenbuf <= 100
  272. $result = 'images/pc/body/shape/default_mid/5.jpg'
  273. elseif bs_temp_bs_class <= 517:
  274. ! 101 <= strenbuf <= 200
  275. $result = 'images/pc/body/shape/default_high/5.jpg'
  276. ! ======= severely obese ======= !
  277. ! ----- 35 <= bmi < 40 ----- !
  278. elseif bs_temp_bs_class <= 617:
  279. ! 0 <= strenbuf <= 200
  280. $result = 'images/pc/body/shape/6.jpg'
  281. ! ======= very severely obese ======= !
  282. ! ----- 40 <= bmi < 45 ----- !
  283. elseif bs_temp_bs_class <= 717:
  284. ! 0 <= strenbuf <= 200
  285. $result = 'images/pc/body/shape/7.jpg'
  286. ! ======= morbidly obese ======= !
  287. ! ----- 45 <= bmi ----- !
  288. else
  289. ! 0 <= strenbuf <= 200
  290. $result = 'images/pc/body/shape/8.jpg'
  291. end
  292. killvar 'bs_temp_bs_class'
  293. end
  294. if $ARGS[0] = 'custom_body_img':
  295. ARGS[1] = ARGS[1] / 100
  296. if ARGS[1] = 0 or ARGS[1] >= 6:
  297. if dyneval('result = imset<<ARGS[1]>>ovr[<<fixbodset>>]') = 0:
  298. $result = 'images/pc/body/shape/<<ARGS[1]>>.jpg'
  299. exit
  300. end
  301. end
  302. $result = 'images/pc/body/shape/<<$bodimgsets[((fixbodset * 10) + 9)]>>/<<ARGS[1]>>.jpg'
  303. end
  304. ! Get the body description
  305. ! $bodyVars['desc'] = func('body_structure', 'body_desc', pcs_bmi, strenbuf, succubusflag)
  306. if $ARGS[0] = 'body_desc':
  307. if knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or PregChem > 3600)):
  308. if PregChem <= 2687:
  309. $result = 'pregnant, but not showing'
  310. elseif PregChem <= 3191:
  311. $result = 'glowing'
  312. elseif PregChem <= 3695:
  313. $result = 'starting to show'
  314. elseif PregChem <= 4199:
  315. $result = 'clearly showing'
  316. elseif PregChem <= 4703:
  317. $result = 'fairly pregnant'
  318. elseif PregChem <= 5207:
  319. $result = 'quite pregnant'
  320. elseif PregChem <= 5711:
  321. $result = 'very pregnant'
  322. elseif PregChem <= 6215:
  323. $result = 'extremely pregnant'
  324. else
  325. $result = 'ready to pop'
  326. end
  327. exit
  328. end
  329. if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
  330. if arrsize('ARGS') = 2: ARGS[2] = strenbuf
  331. if arrsize('ARGS') = 3: ARGS[3] = succubusflag
  332. if ARGS[3] = 1: ARGS[2] = 80
  333. bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
  334. ! ======= starving ======= !
  335. ! ----- bmi < 16 ----- !
  336. if bs_temp_bs_class <= 17:
  337. ! 0 <= strenbuf <= 200
  338. $result = 'starving'
  339. ! ======= underweight ======= !
  340. ! ----- 16 <= bmi < 19 ----- !
  341. elseif bs_temp_bs_class <= 105:
  342. ! 0 <= strenbuf <= 50
  343. $result = 'underweight'
  344. elseif bs_temp_bs_class <= 107:
  345. ! 51 <= strenbuf <= 100
  346. $result = 'slight'
  347. elseif bs_temp_bs_class <= 117:
  348. ! 101 <= strenbuf <= 200
  349. $result = 'wiry'
  350. ! ======= slender ======= !
  351. ! ----- 19 <= bmi < 21 ----- !
  352. elseif bs_temp_bs_class <= 205:
  353. ! 0 <= strenbuf <= 50
  354. $result = 'slender'
  355. elseif bs_temp_bs_class <= 207:
  356. ! 51 <= strenbuf <= 100
  357. $result = 'skinny'
  358. elseif bs_temp_bs_class <= 217:
  359. ! 101 <= strenbuf <= 200
  360. $result = 'lean'
  361. ! ======= healthy ======= !
  362. ! ----- 21 <= bmi < 25 ----- !
  363. elseif bs_temp_bs_class <= 305:
  364. ! 0 <= strenbuf <= 50
  365. $result = 'healthy'
  366. elseif bs_temp_bs_class <= 307:
  367. ! 51 <= strenbuf <= 100
  368. $result = 'toned'
  369. elseif bs_temp_bs_class <= 317:
  370. ! 101 <= strenbuf <= 200
  371. $result = 'ripped'
  372. ! ======= overweight ======= !
  373. ! ----- 26 <= bmi < 30 ----- !
  374. elseif bs_temp_bs_class <= 405:
  375. ! 0 <= strenbuf <= 50
  376. $result = 'overweight'
  377. elseif bs_temp_bs_class <= 407:
  378. ! 51 <= strenbuf <= 100
  379. $result = 'curvy'
  380. elseif bs_temp_bs_class <= 417:
  381. ! 101 <= strenbuf <= 200
  382. $result = 'heavy set'
  383. ! ======= moderately obese ======= !
  384. ! ----- 30 <= bmi < 35 ----- !
  385. elseif bs_temp_bs_class <= 517:
  386. ! 0 <= strenbuf <= 200
  387. $result = 'moderately obese'
  388. ! ======= severely obese ======= !
  389. ! ----- 35 <= bmi < 40 ----- !
  390. elseif bs_temp_bs_class <= 617:
  391. ! 0 <= strenbuf <= 200
  392. $result = 'severely obese'
  393. ! ======= very severely obese ======= !
  394. ! ----- 40 <= bmi < 45 ----- !
  395. elseif bs_temp_bs_class <= 717:
  396. ! 0 <= strenbuf <= 200
  397. $result = 'very severely obese'
  398. ! ======= morbidly obese ======= !
  399. ! ----- 45 <= bmi ----- !
  400. else
  401. ! 0 <= strenbuf <= 200
  402. $result = 'morbidly obese'
  403. end
  404. killvar 'bs_temp_bs_class'
  405. end
  406. --- body_structure ---------------------------------