uni_lessons.qsrc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 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. end
  66. if $ARGS[0] = 'short_break':
  67. menu_off = 1
  68. if hour = 9: minut += 90 - minut
  69. if hour = 10 and minut < 30: minut += 30 - minut
  70. if hour = 11: minut += 90 - minut
  71. if hour = 12 and minut < 30: minut += 30 - minut
  72. if hour = 13: minut += 105 - minut
  73. if hour = 14 and minut < 45: minut += 45 - minut
  74. gs 'stat'
  75. if katjaQW['QWstage'] > 2 and hour > 14 and npc_rel['A14'] >= 70 and fame['city_slut'] < 150 and pcs_makupskl >= 40 and hotcat >= 6: gt 'katja_uni', 'dorm_room_invite'
  76. if rand(0,19)= 0: gt 'uni_events', 'lecture_hall_events'
  77. *clr & cla
  78. '<center><b><font color="maroon">Lecture Building Hallway</font></b></center>'
  79. '<center><img <<$set_imgh>> src="images/locations/city/island/university/lecture_hall/lecture_hall.jpg"></center>'
  80. 'Walking down the halls, you are still amazed at how well maintained the buildings are compared to your old school.'
  81. gs 'uni_lessons', 'schedule'
  82. act 'Go to the university plaza': gt 'uni_grounds', 'main'
  83. end
  84. if $ARGS[0] = 'schedule':
  85. gs 'stat'
  86. if uni_period['first'] ! daystart and hour > 6 and hour < 9:
  87. gs 'uni_programs', 'uni_period_first'
  88. elseif uni_period['second'] ! daystart and hour = 10:
  89. gs 'uni_programs', 'uni_period_second'
  90. elseif uni_period['third'] ! daystart and (hour = 12 or (hour = 13 and minut < 15)):
  91. gs 'uni_programs', 'uni_period_third'
  92. end
  93. end
  94. if $ARGS[0] = 'exam_schedule':
  95. gs 'stat'
  96. if uni_period['exam'] ! daystart and hour > 6 and hour < 9:
  97. gs 'uni_programs', 'exam'
  98. end
  99. end
  100. --- uni_lessons ---------------------------------