crossfit_north_box.qsrc 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. act 'Start the exercise':
  36. menu_off = 1
  37. if last_crossfit_workout = daystart:
  38. msg'<b><font color = red>You already did this workout today. That''s enough for one day.</font></b>'
  39. else
  40. *clr & cla
  41. last_crossfit_workout = daystart
  42. crossfit_first = 1
  43. abonement -= 1
  44. 'You start with the workout.'
  45. gs 'crossfit_north_wod', $todays_crossfit_wod
  46. gs 'exercise', 'tier4', 20, 'stren_exp', 'vital_exp', 'agil_exp'
  47. '<center><video autoplay loop src="<<$crossfit_north_image_dir>><<$wod_video[$todays_crossfit_wod]>>.mp4"></video></center>'
  48. current_wod_score = max(1,(100 - ((100 * pcs_health * (rand(40,100) + pcs_sleep + pcs_vital + pcs_agil + pcs_stren))/ (healthmax * 500))))
  49. cla
  50. act 'Check your score':
  51. cla
  52. $resultstring = func('crossfit_north_record', 'recordstring', $todays_crossfit_wod, current_wod_score)
  53. 'You successfully finish the workout <<$todays_crossfit_wod>> in <<$resultstring>>'
  54. if personal_wod_record[$todays_crossfit_wod] = 0:
  55. personal_wod_record[$todays_crossfit_wod] = current_wod_score
  56. elseif current_wod_score < personal_wod_record[$todays_crossfit_wod]:
  57. 'This is a new personal record!'
  58. personal_wod_record[$todays_crossfit_wod] = current_wod_score
  59. end
  60. if box_wod_record[$todays_crossfit_wod] = 0:
  61. box_wod_record[$todays_crossfit_wod] = current_wod_score
  62. $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
  63. elseif current_wod_score < box_wod_record[$todays_crossfit_wod]:
  64. 'Not only that, it''s also a new best record for the whole box!'
  65. $prevrecordstring = func('crossfit_north_wod', 'recordstring', $todays_crossfit_wod, box_wod_record[$todays_crossfit_wod])
  66. if $box_wod_record_holder[$todays_crossfit_wod] ! $pcs_nickname:
  67. $previous_record_holder = $box_wod_record_holder[$todays_crossfit_wod]
  68. 'You beat <<$previous_record_holder>>''s record of <<$prevrecordstring>>'
  69. else
  70. 'You beat your own old box record of <<$prevrecordstring>>'
  71. end
  72. killvar '$prevrecordstring'
  73. box_wod_record[$todays_crossfit_wod] = current_wod_score
  74. $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
  75. end
  76. killvar 'current_wod_score'
  77. act 'Finish and go to the changing room':
  78. gt 'fit', 'dressing room'
  79. end
  80. end
  81. end
  82. end
  83. end
  84. --- crossfit_north_box ---------------------------------