1
0

uni_lessons.qsrc 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # uni_lessons
  2. close all
  3. !2021/22/12
  4. !! This file includes the code to make sure that the player characters can go to class and exams when they are enrolled in the university.
  5. !! The file does not include the selection of classes depending upon which program they are enrolled in only the part of the code that don''t depend on the program.
  6. !! The code for the individual programs is in uni_programs
  7. if $ARGS[0] = 'cikl':
  8. !! Setting the weeks in the university semester and making sure that the grades are calculated at the right times
  9. if university['semester_week'] = 0 and (month = 8 or month = 1) and (day - week) >= 20:
  10. university['semester_week'] = -1
  11. else
  12. if week = 1:
  13. if university['semester_week'] = -1:
  14. university['semester_week'] = 1
  15. elseif university['semester_week'] > 0 and university['semester_week'] < 15:
  16. university['semester_week'] += 1
  17. if university['enrolled_in_semester'] > university['semester_passed']:
  18. gs 'grades', 'calculate_grade', 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>'
  19. gs 'grades', 'assing_grade_description', 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>'
  20. end
  21. elseif university['semester_week'] = 15:
  22. university['semester_week'] = 0
  23. university['exam_week'] = 1
  24. if university['enrolled_in_semester'] > university['semester_passed']:
  25. gs 'grades', 'calculate_grade', 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>'
  26. gs 'grades', 'assing_grade_description', 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>'
  27. end
  28. elseif university['exam_week'] = 1:
  29. university['exam_week'] = 2
  30. elseif university['exam_week'] = 2:
  31. university['exam_week'] = 0
  32. if university['enrolled_in_semester'] > university['semester_passed']:
  33. i = 0
  34. passed_count = 0
  35. class_count = 0
  36. :passed_exams_loop
  37. if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
  38. class_count += 1
  39. if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_grade'']') > 40 and dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_exam_done'']') = 1:
  40. passed_count += 1
  41. elseif dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_exam_done'']') = 0:
  42. dynamic 'class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_grade''] = 0'
  43. university['expelled_for_missing_exam'] = 1
  44. end
  45. end
  46. i += 1
  47. if ARRSIZE('class_list_institution') >= i: jump 'passed_exams_loop'
  48. killvar 'i'
  49. if passed_count = class_count:
  50. university['semester_passed'] = university['enrolled_in_semester']
  51. else
  52. university['expelled'] = 1
  53. university['student'] = 0
  54. end
  55. if university['semester_passed'] = 8:
  56. university['diploma'] = 1
  57. university['student'] = 0
  58. end
  59. killvar 'class_count'
  60. killvar 'passed_count'
  61. end
  62. end
  63. end
  64. end
  65. !! Sets the variable university['break'] to 1 if it is in the break between semesters, 0 otherwise.
  66. if university['exam_week'] > 0 or university['semester_week'] > 0:
  67. university['break'] = 0
  68. else
  69. university['break'] = 1
  70. end
  71. end
  72. if $ARGS[0] = 'short_break':
  73. $location_type = 'public_indoors'
  74. menu_off = 1
  75. if hour = 9: minut += 90 - minut
  76. if hour = 10 and minut < 30: minut += 30 - minut
  77. if hour = 11: minut += 90 - minut
  78. if hour = 12 and minut < 30: minut += 30 - minut
  79. if hour = 13: minut += 105 - minut
  80. if hour = 14 and minut < 45: minut += 45 - minut
  81. gs 'stat'
  82. if katjaQW['QWstage'] < 2 and hour >= 14 and npc_rel['A14'] >= 70 and fame['city_slut'] < 150 and pcs_makupskl >= 40 and pcs_hotcat >= 6: gt 'katja_uni', 'dorm_room_invite'
  83. if week = 4 and hour > 14 and nerd_game['fixed_uni_day'] = 0 and (npc_rel['A153'] >= 50 or nerd_game['stage'] > 0) and nerd_game['invite_day'] ! 2147483647: gt 'nerd_game_night', 'invite_uni'
  84. if rand(0,19)= 0: gt 'uni_events', 'lecture_hall_events'
  85. *clr & cla
  86. '<center><b><font color="maroon">Lecture Building Hallway</font></b></center>'
  87. '<center><img <<$set_imgh>> src="images/locations/city/island/university/lecture_hall/lecture_hall.jpg"></center>'
  88. 'Walking down the halls, you are still amazed at how well maintained the buildings are compared to your old school.'
  89. gs 'katja_pantyquest', 'uni'
  90. gs 'uni_lessons', 'schedule'
  91. act 'Go to the university plaza': gt 'uni_grounds', 'main'
  92. end
  93. if $ARGS[0] = 'schedule':
  94. gs 'stat'
  95. if uni_period['first'] ! daystart and hour > 6 and hour < 9:
  96. gs 'uni_programs', 'uni_period_first'
  97. elseif uni_period['second'] ! daystart and hour = 10:
  98. gs 'uni_programs', 'uni_period_second'
  99. elseif uni_period['third'] ! daystart and (hour = 12 or (hour = 13 and minut < 15)):
  100. gs 'uni_programs', 'uni_period_third'
  101. end
  102. end
  103. if $ARGS[0] = 'exam_schedule':
  104. gs 'stat'
  105. if uni_period['exam'] ! daystart and hour > 6 and hour < 9:
  106. gs 'uni_programs', 'exam'
  107. end
  108. end
  109. --- uni_lessons ---------------------------------