crossfit_north_box.qsrc 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # crossfit_north_box
  2. $loc = 'crossfit_north_box'
  3. $locM = 'crossfit_north_box'
  4. $sexloc = 'crossfit_north_box'
  5. $location_type = 'public_indoors'
  6. $loc_arg = 'box'
  7. $locM_arg = 'box'
  8. $crossfit_north_image_dir = 'images/locations/city/citycenter/gym/crossfit/'
  9. $menu_loc = 'crossfit_north_box'
  10. $menu_arg = 'box'
  11. menu_off = 0
  12. if $ARGS[0] = 'box':
  13. act 'Leave': gt 'fit', 'dressing room'
  14. if crossfit_random_choice < daystart OR $todays_crossfit_wod = '':
  15. gs 'crossfit_north_wod', 'setup_wod'
  16. $todays_crossfit_wod = $crossfit_wods[rand(0, ARRSIZE('$crossfit_wods') - 1)]
  17. crossfit_random_choice = daystart
  18. end
  19. if $previous_record_holder ! '' and pcs_lover < 3 and last_crossfit_workout < daystart:
  20. gt 'crossfit_north_girlmeet', 'start'
  21. end
  22. '<center><b><font color="maroon">Crossfit North St. Petersburg</font></b></center>'
  23. '<center><img <<$set_imgh>> src="<<$crossfit_north_image_dir>>start.jpg"></center>'
  24. 'This crossfit box might not look like it, but is said to be one of the best ones in the region.'
  25. 'Today''s exercise is <<$todays_crossfit_wod>>.'
  26. 'It consists of:'
  27. gs 'crossfit_north_wod', $todays_crossfit_wod
  28. if crossfit_first = 1:
  29. act 'Check personal records':
  30. cla
  31. menu_off = 1
  32. gt 'crossfit_north_record', 'view_records'
  33. end
  34. end
  35. if pcs_energy >= 20:
  36. act 'Start the exercise':
  37. menu_off = 1
  38. if last_crossfit_workout = daystart:
  39. msg'<b><font color = red>You already did this workout today. That''s enough for one day.</font></b>'
  40. else
  41. *clr & cla
  42. last_crossfit_workout = daystart
  43. crossfit_first = 1
  44. abonement -= 1
  45. 'You start with the workout.'
  46. gs 'crossfit_north_wod', $todays_crossfit_wod
  47. gs 'exercise', 'tier4', 20, 'stren', 'vital', 'agil'
  48. '<center><video autoplay loop src="<<$crossfit_north_image_dir>><<$wod_video[$todays_crossfit_wod]>>.mp4"></video></center>'
  49. current_wod_score = max(1,(100 - ((100 * pcs_health * (rand(40,100) + pcs_sleep + pcs_vital + pcs_agil + pcs_stren))/ (healthmax * 500))))
  50. cla
  51. act 'Check your score':
  52. cla
  53. $resultstring = func('crossfit_north_record', 'recordstring', $todays_crossfit_wod, current_wod_score)
  54. 'You successfully finish the workout <<$pcs_nickname>> in <<$resultstring>>'
  55. if personal_wod_record[$todays_crossfit_wod] = 0:
  56. personal_wod_record[$todays_crossfit_wod] = current_wod_score
  57. elseif current_wod_score < personal_wod_record[$todays_crossfit_wod]:
  58. 'This is a new personal record!'
  59. personal_wod_record[$todays_crossfit_wod] = current_wod_score
  60. end
  61. if box_wod_record[$todays_crossfit_wod] = 0:
  62. box_wod_record[$todays_crossfit_wod] = current_wod_score
  63. $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
  64. elseif current_wod_score < box_wod_record[$todays_crossfit_wod]:
  65. 'Not only that, it''s also a new best record for the whole box!'
  66. $prevrecordstring = func('crossfit_north_record', 'recordstring', $todays_crossfit_wod, box_wod_record[$todays_crossfit_wod])
  67. if $box_wod_record_holder[$todays_crossfit_wod] ! $pcs_nickname:
  68. $previous_record_holder = $box_wod_record_holder[$todays_crossfit_wod]
  69. 'You beat <<$previous_record_holder>>''s record of <<$prevrecordstring>>'
  70. else
  71. 'You beat your own old box record of <<$prevrecordstring>>'
  72. end
  73. killvar '$prevrecordstring'
  74. box_wod_record[$todays_crossfit_wod] = current_wod_score
  75. $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
  76. end
  77. killvar 'current_wod_score'
  78. act 'Finish and go to the changing room':
  79. gt 'fit', 'dressing room'
  80. end
  81. end
  82. end
  83. end
  84. else
  85. act 'Start the exercise': '<br><font color="red">You feel too hungry to do this exercise now.</font>'
  86. end
  87. end
  88. --- crossfit_north_box ---------------------------------