crossfit_north_box.qsrc 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # crossfit_north_box
  2. $loc = $CURLOC
  3. $locM = 'crossfit_north_box'
  4. $sexloc = 'crossfit_north_box'
  5. $location_type = 'public_indoors'
  6. $metka = 'box'
  7. $metkaM = 'box'
  8. $crossfit_north_image_dir = 'images/locations/city/citycenter/gym/crossfit/'
  9. if $ARGS[0] = 'box':
  10. if crossfit_random_choice < daystart OR $todays_crossfit_wod = '':
  11. gs 'crossfit_north_wod', 'setup_wod'
  12. $todays_crossfit_wod = $crossfit_wods[rand(0, ARRSIZE('$crossfit_wods') - 1)]
  13. crossfit_random_choice = daystart
  14. end
  15. if $previous_record_holder ! '' and pcs_lover < 3 and last_crossfit_workout < daystart:
  16. gt 'crossfit_north_girlmeet', 'start'
  17. end
  18. '<center><b><font color="maroon">Crossfit North St. Petersburg</font></b></center>'
  19. '<center><img <<$set_imgh>> src="<<$crossfit_north_image_dir>>start.jpg"></center>'
  20. 'This crossfit box might not look like it, but is said to be one of the best ones in the region.'
  21. 'Today''s exercise is <<$todays_crossfit_wod>>.'
  22. 'It consists of:'
  23. gs 'crossfit_north_wod', $todays_crossfit_wod
  24. if crossfit_first = 1:
  25. act 'Check personal records':
  26. cla
  27. gt 'crossfit_north_record', 'view_records'
  28. end
  29. end
  30. act 'Start the exercise':
  31. if last_crossfit_workout = daystart:
  32. msg'<b><font color = red>You already did this workout today. That''s enough for one day.</font></b>'
  33. else
  34. cla
  35. *clr
  36. last_crossfit_workout = daystart
  37. crossfit_first = 1
  38. abonement -= 1
  39. 'You start with the workout.'
  40. gs 'crossfit_north_wod', $todays_crossfit_wod
  41. gs 'exercise', 'tier4', 20, 'stren_exp', 'vital_exp', 'agil_exp'
  42. '<center><video autoplay loop src="<<$crossfit_north_image_dir>><<$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('crossfit_north_record', 'recordstring', $todays_crossfit_wod, current_wod_score)
  48. 'You successfully finish the workout <<$todays_crossfit_wod>> 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('crossfit_north_wod', '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':
  73. gt 'fit', 'dressing room'
  74. end
  75. end
  76. end
  77. end
  78. act 'Turn around and leave':
  79. gt 'fit', 'dressing room'
  80. end
  81. end
  82. --- crossfit_north_box ---------------------------------