123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- # havana_crossfit
- menu_off = 0
- if $ARGS[0] = 'box':
- gs 'shortgs', 'setloc', 'havana_crossfit', 'box'
- $sexloc = 'havana_crossfit'
- $location_type = 'public_indoors'
- act 'Leave': gt 'havana', 'dressing_room'
- if crossfit_random_choice < daystart OR $todays_crossfit_wod = '':
- gs 'havana_crossfit_funcs', 'setup_wod'
- $todays_crossfit_wod = $crossfit_wods[rand(0, ARRSIZE('$crossfit_wods') - 1)]
- crossfit_random_choice = daystart
- end
- if $previous_record_holder ! '' and pcs_lover < 3 and last_crossfit_workout < daystart:
- gt 'havana_crossfit', 'girlmeet'
- end
- '<center><b><font color="maroon">Crossfit North St. Petersburg</font></b></center>'
- '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/crossfit/start.jpg"></center>'
- 'This crossfit box might not look like it, but is said to be one of the best ones in the region.'
- 'Today''s exercise is <<$todays_crossfit_wod>>.'
- 'It consists of:'
- gs 'havana_crossfit_funcs', $todays_crossfit_wod
- if crossfit_first = 1:
- act 'Check personal records':
- cla
- menu_off = 1
- gt 'havana_crossfit', 'view_records'
- end
- end
- if pcs_energy >= 20 and pcs_stam >= stammax / 5:
- act 'Start the exercise':
- menu_off = 1
- if last_crossfit_workout = daystart:
- msg'<b><font color = red>You already did this workout today. That''s enough for one day.</font></b>'
- else
- *clr & cla
- last_crossfit_workout = daystart
- crossfit_first = 1
- abonement -= 1
- 'You start with the workout.'
- gs 'havana_crossfit_funcs', $todays_crossfit_wod
- gs 'exercise', 'tier4', 20, 'stren', 'vital', 'agil'
- '<center><video autoplay loop src="images/locations/city/citycenter/gym/crossfit/<<$wod_video[$todays_crossfit_wod]>>.mp4"></video></center>'
- current_wod_score = max(1,(100 - ((100 * pcs_health * (rand(40,100) + pcs_sleep + pcs_vital + pcs_agil + pcs_stren))/ (healthmax * 500))))
- cla
- act 'Check your score':
- cla
- $resultstring = func('havana_crossfit_funcs', 'recordstring', $todays_crossfit_wod, current_wod_score)
- 'You successfully finish the workout <<$pcs_nickname>> in <<$resultstring>>'
- if personal_wod_record[$todays_crossfit_wod] = 0:
- personal_wod_record[$todays_crossfit_wod] = current_wod_score
- elseif current_wod_score < personal_wod_record[$todays_crossfit_wod]:
- 'This is a new personal record!'
- personal_wod_record[$todays_crossfit_wod] = current_wod_score
- end
- if box_wod_record[$todays_crossfit_wod] = 0:
- box_wod_record[$todays_crossfit_wod] = current_wod_score
- $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
- elseif current_wod_score < box_wod_record[$todays_crossfit_wod]:
- 'Not only that, it''s also a new best record for the whole box!'
- $prevrecordstring = func('havana_crossfit_funcs', 'recordstring', $todays_crossfit_wod, box_wod_record[$todays_crossfit_wod])
- if $box_wod_record_holder[$todays_crossfit_wod] ! $pcs_nickname:
- $previous_record_holder = $box_wod_record_holder[$todays_crossfit_wod]
- 'You beat <<$previous_record_holder>>''s record of <<$prevrecordstring>>'
- else
- 'You beat your own old box record of <<$prevrecordstring>>'
- end
- killvar '$prevrecordstring'
- box_wod_record[$todays_crossfit_wod] = current_wod_score
- $box_wod_record_holder[$todays_crossfit_wod] = $pcs_nickname
- end
- killvar 'current_wod_score'
- act 'Finish and go to the changing room': gt 'havana', 'dressing_room'
- end
- end
- end
- elseif pcs_stam >= stammax / 5:
- act 'Start the exercise': '<br><font color="red">You feel too hungry to do this exercise now.</font>'
- else
- 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>'
- end
- end
- if $ARGS[0] = 'view_records':
- menu_off = 1
- *clr & cla
- gs 'havana_crossfit_funcs', 'update_box_records'
- '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/crossfit/records.jpg"></center>'
- 'You look at the board outlining the personal records'
- '<center><table border=1><tr><th>Workout</th><th>Personal Best</th><th>Box Record (Women)</th><th>Box Record Holder</th></tr>'
- record_table_counter = 0
- :recordloop
- $crossfit_wod = $crossfit_wods[record_table_counter]
- '<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>'
- record_table_counter += 1
- if record_table_counter < arrsize('$crossfit_wods'): jump 'recordloop'
- '</table></center>'
- killvar 'record_table_counter'
- killvar '$crossfit_wod'
- act 'Go back': gt $loc, $loc_arg
- end
- if $ARGS[0] = 'girlmeet':
- menu_off = 1
- !! generate a girlfriend
- gs 'npcgeneratec', 1
- gs 'boyStat', $npclastgenerated
- $boydesc = $previous_record_holder
- $boyClo = 'wearing workout clothes'
- killvar '$previous_record_holder'
- minut += 5
- gs 'stat'
- '<center><img <<$set_imgh>> src="images/characters/shared/headshots_generic/<<lover_picrand[$boy]>>.jpg"></center>'
- 'As you enter the crossfit box, you notice <<$boybody_pref>> girl with <<$boybod_pref>> body and <<$boyface>> hair.
- She is <<$boyClo>>'
- 'As she notices you, she greets you "Hi. My name is <<$boydesc>>. I heard you beat my old record, very impressive!"'
- act 'Thank her':
- cla
- 'You reply: "Oh thank you. That is a tough workout and your score was not easy to beat."'
- act 'Ask her if she comes around often':
- cla
- '"Do you visit this box often?", you ask.'
- 'She replies: "Yeah, I am here two or three times a week."'
- '<<$boydesc>> looks at you and asks: "I just got finished with my workout for today, would you like to hang out afterwards?"'
- act 'Agree to a date':
- cla
- '"Sure, sounds like fun, I would love to."'
- '"Great!" answers <<$boydesc>> "So, what do you want to do?".'
- gs 'dateF', 'date_choice'
- end
- act 'Decline':
- *clr & cla
- '<center><img <<$set_imgh>> src="images/characters/shared/headshots_generic/<<lover_picrand[$boy]>>.jpg"></center>'
- '"I''m sorry but I don''t feel myself attracted to you enough and I don''t want to lead you on."'
- '<<$boydesc>> looks at you disappointed. "Oh well, I didn''t know if I had a chance but you can''t blame me for trying."'
- 'The two of you say goodbye to each other.'
- act 'Return': gt $loc, $loc_arg
- end
- end
- act 'Say goodbye':
- cla
- 'You check your watch and tell her: "Sorry, I got to run now, see you around!"'
- act 'Leave': gt $loc, $loc_arg
- end
- end
- act 'Pretend you''re busy':
- cla
- 'You check your watch and pack your things, ignoring the girl.'
- act 'Leave': gt $loc, $loc_arg
- end
- end
- --- havana_crossfit ---------------------------------
|