havana_crossfit.qsrc 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # havana_crossfit
  2. menu_off = 0
  3. if $ARGS[0] = 'box':
  4. gs 'shortgs', 'setloc', 'havana_crossfit', 'box'
  5. $sexloc = 'havana_crossfit'
  6. $location_type = 'public_indoors'
  7. act 'Leave': gt 'havana', 'dressing_room'
  8. if crossfit_random_choice < daystart OR $todays_crossfit_wod = '':
  9. gs 'havana_crossfit_funcs', 'setup_wod'
  10. $todays_crossfit_wod = $crossfit_wods[rand(0, ARRSIZE('$crossfit_wods') - 1)]
  11. crossfit_random_choice = daystart
  12. end
  13. if $previous_record_holder ! '' and pcs_lover < 3 and last_crossfit_workout < daystart:
  14. gt 'havana_crossfit', 'girlmeet'
  15. end
  16. '<center><b><font color="maroon">Crossfit North St. Petersburg</font></b></center>'
  17. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/crossfit/start.jpg"></center>'
  18. 'This crossfit box might not look like it, but is said to be one of the best ones in the region.'
  19. 'Today''s exercise is <<$todays_crossfit_wod>>.'
  20. 'It consists of:'
  21. gs 'havana_crossfit_funcs', $todays_crossfit_wod
  22. if crossfit_first = 1:
  23. act 'Check personal records':
  24. cla
  25. menu_off = 1
  26. gt 'havana_crossfit', 'view_records'
  27. end
  28. end
  29. if pcs_energy >= 20 and pcs_stam >= stammax / 5:
  30. act 'Start the exercise':
  31. menu_off = 1
  32. if last_crossfit_workout = daystart:
  33. msg'<b><font color = red>You already did this workout today. That''s enough for one day.</font></b>'
  34. else
  35. *clr & cla
  36. last_crossfit_workout = daystart
  37. crossfit_first = 1
  38. abonement -= 1
  39. 'You start with the workout.'
  40. gs 'havana_crossfit_funcs', $todays_crossfit_wod
  41. gs 'exercise', 'tier4', 20, 'stren', 'vital', 'agil'
  42. '<center><video autoplay loop src="images/locations/city/citycenter/gym/crossfit/<<$wod_video[$todays_crossfit_wod]>>.mp4"></video></center>'
  43. current_wod_score = max(1,(100 - ((100 * pcs_health * (rand(40,100) + pcs_sleep + pcs_vital + pcs_agil + pcs_stren))/ (healthmax * 500))))
  44. cla
  45. act 'Check your score':
  46. cla
  47. $resultstring = func('havana_crossfit_funcs', 'recordstring', $todays_crossfit_wod, current_wod_score)
  48. 'You successfully finish the workout <<$pcs_nickname>> in <<$resultstring>>'
  49. if personal_wod_record[$todays_crossfit_wod] = 0:
  50. personal_wod_record[$todays_crossfit_wod] = current_wod_score
  51. elseif current_wod_score < personal_wod_record[$todays_crossfit_wod]:
  52. 'This is a new personal record!'
  53. personal_wod_record[$todays_crossfit_wod] = current_wod_score
  54. end
  55. if box_wod_record[$todays_crossfit_wod] = 0:
  56. box_wod_record[$todays_crossfit_wod] = current_wod_score
  57. $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
  58. elseif current_wod_score < box_wod_record[$todays_crossfit_wod]:
  59. 'Not only that, it''s also a new best record for the whole box!'
  60. $prevrecordstring = func('havana_crossfit_funcs', 'recordstring', $todays_crossfit_wod, box_wod_record[$todays_crossfit_wod])
  61. if $box_wod_record_holder[$todays_crossfit_wod] ! $pcs_nickname:
  62. $previous_record_holder = $box_wod_record_holder[$todays_crossfit_wod]
  63. 'You beat <<$previous_record_holder>>''s record of <<$prevrecordstring>>'
  64. else
  65. 'You beat your own old box record of <<$prevrecordstring>>'
  66. end
  67. killvar '$prevrecordstring'
  68. box_wod_record[$todays_crossfit_wod] = current_wod_score
  69. $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
  70. end
  71. killvar 'current_wod_score'
  72. act 'Finish and go to the changing room': gt 'havana', 'dressing_room'
  73. end
  74. end
  75. end
  76. elseif pcs_stam >= stammax / 5:
  77. act 'Start the exercise': '<br><font color="red">You feel too hungry to do this exercise now.</font>'
  78. else
  79. act 'Start the exercise': '<br><font color="red">You are to exhausted to do this. Recover your stamina before trying to do this exercise.</font>'
  80. end
  81. end
  82. if $ARGS[0] = 'view_records':
  83. menu_off = 1
  84. *clr & cla
  85. gs 'havana_crossfit_funcs', 'update_box_records'
  86. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/crossfit/records.jpg"></center>'
  87. 'You look at the board outlining the personal records'
  88. '<center><table border=1><tr><th>Workout</th><th>Personal Best</th><th>Box Record (Women)</th><th>Box Record Holder</th></tr>'
  89. record_table_counter = 0
  90. :recordloop
  91. $crossfit_wod = $crossfit_wods[record_table_counter]
  92. '<tr><td><<$crossfit_wod>></td><td>' & func('havana_crossfit_funcs', 'recordstring', $crossfit_wod, personal_wod_record[$crossfit_wod]) & '</td><td>' & func('havana_crossfit_funcs', 'recordstring', $crossfit_wod, box_wod_record[$crossfit_wod]) & '</td><td><<$box_wod_record_holder[$crossfit_wod]>></td></tr>'
  93. record_table_counter += 1
  94. if record_table_counter < arrsize('$crossfit_wods'): jump 'recordloop'
  95. '</table></center>'
  96. killvar 'record_table_counter'
  97. killvar '$crossfit_wod'
  98. act 'Go back': gt $loc, $loc_arg
  99. end
  100. if $ARGS[0] = 'girlmeet':
  101. menu_off = 1
  102. !! generate a girlfriend
  103. gs 'npcgeneratec', 1
  104. gs 'boyStat', $npclastgenerated
  105. $boydesc = $previous_record_holder
  106. $boyClo = 'wearing workout clothes'
  107. killvar '$previous_record_holder'
  108. minut += 5
  109. gs 'stat'
  110. '<center><img <<$set_imgh>> src="images/characters/shared/headshots_generic/<<lover_picrand[$boy]>>.jpg"></center>'
  111. 'As you enter the crossfit box, you notice <<$boybody_pref>> girl with <<$boybod_pref>> body and <<$boyface>> hair.
  112. She is <<$boyClo>>'
  113. 'As she notices you, she greets you "Hi. My name is <<$boydesc>>. I heard you beat my old record, very impressive!"'
  114. act 'Thank her':
  115. cla
  116. 'You reply: "Oh thank you. That is a tough workout and your score was not easy to beat."'
  117. act 'Ask her if she comes around often':
  118. cla
  119. '"Do you visit this box often?", you ask.'
  120. 'She replies: "Yeah, I am here two or three times a week."'
  121. '<<$boydesc>> looks at you and asks: "I just got finished with my workout for today, would you like to hang out afterwards?"'
  122. act 'Agree to a date':
  123. cla
  124. '"Sure, sounds like fun, I would love to."'
  125. '"Great!" answers <<$boydesc>> "So, what do you want to do?".'
  126. gs 'dateF', 'date_choice'
  127. end
  128. act 'Decline':
  129. *clr & cla
  130. '<center><img <<$set_imgh>> src="images/characters/shared/headshots_generic/<<lover_picrand[$boy]>>.jpg"></center>'
  131. '"I''m sorry but I don''t feel myself attracted to you enough and I don''t want to lead you on."'
  132. '<<$boydesc>> looks at you disappointed. "Oh well, I didn''t know if I had a chance but you can''t blame me for trying."'
  133. 'The two of you say goodbye to each other.'
  134. act 'Return': gt $loc, $loc_arg
  135. end
  136. end
  137. act 'Say goodbye':
  138. cla
  139. 'You check your watch and tell her: "Sorry, I got to run now, see you around!"'
  140. act 'Leave': gt $loc, $loc_arg
  141. end
  142. end
  143. act 'Pretend you''re busy':
  144. cla
  145. 'You check your watch and pack your things, ignoring the girl.'
  146. act 'Leave': gt $loc, $loc_arg
  147. end
  148. end
  149. --- havana_crossfit ---------------------------------