1
0

uni_lessons.qsrc 4.4 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 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 rand(0,19)= 0: gt 'uni_events', 'lecture_hall_events'
  76. *clr & cla
  77. '<center><b><font color="maroon">Lecture Building Hallway</font></b></center>'
  78. '<center><img <<$set_imgh>> src="images/locations/city/island/university/lecture_hall/lecture_hall.jpg"></center>'
  79. 'Walking down the halls, you are still amazed at how well maintained the buildings are compared to your old school.'
  80. gs 'uni_lessons', 'schedule'
  81. act 'Go to the university plaza': gt 'uni_grounds', 'main'
  82. end
  83. if $ARGS[0] = 'schedule':
  84. gs 'stat'
  85. if uni_period['first'] ! daystart and hour > 6 and hour < 9:
  86. gs 'uni_programs', 'uni_period_first'
  87. elseif uni_period['second'] ! daystart and hour = 10:
  88. gs 'uni_programs', 'uni_period_second'
  89. elseif uni_period['third'] ! daystart and (hour = 12 or (hour = 13 and minut < 15)):
  90. gs 'uni_programs', 'uni_period_third'
  91. end
  92. end
  93. if $ARGS[0] = 'exam_schedule':
  94. gs 'stat'
  95. if uni_period['exam'] ! daystart and hour > 6 and hour < 9:
  96. gs 'uni_programs', 'exam'
  97. end
  98. end
  99. --- uni_lessons ---------------------------------