# uni_library

!!This is the file containing the university library

if $ARGS[0] = 'start':
	$sexloc = 'uni_library'
    $location_type = 'public_indoors'
	cla & *clr
	minut += 5
	$menu_loc = 'uni_library'
	$menu_arg = 'start'
	menu_off = 0
	gs 'stat'
	gs 'themes', 'indoors'
	'<center><b><font color="maroon">The University Library</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/library.jpg"></center>'
	'One of the medium sized buildings is the university''s library. It is three stories tall and filled with books, sections with tables scattered around to study or relax at and computer stations to help students with their studying.'
	if (week < 6 or hour < 23) and hour > 7:
		act 'Study': gt 'uni_library', 'study'
		act 'Wander around': gt 'uni_library', 'wander'
	else
		'The library is closing'
	end
	act 'Leave':
		minut += 2
		gt 'uni_grounds', 'main'
	end
end

if $ARGS[0] = 'study':
	$sexloc = 'uni_library'
	cla & *clr
	minut += 5
	gs 'stat'
	'<center><b><font color="maroon">The University Library</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/study' + rand(1,7) + '.jpg"></center>'
	'You spend some time collecting some books on your subjects and grab one of the library''s laptops before finding a quiet place to sit.' 
	if university['semester_week'] > 0:
		i = 0
		:study_loop
		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
			if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
				dynamic '	act ''Study for your <<$class_list_name[i]>> class (30 minuts)'': gt ''uni_library'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'' '
			else
				*nl
				'You don''t need to study any more this week for your <<$class_list_name[i]>> class.'
			end
		end
		
		i += 1
		if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
		killvar 'i'
	elseif university['exam_week'] > 0:
		i = 0
		:exam_loop
		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>' and func('uni_programs', 'exam', 'is_over', $class_list_name[i]) = 0:
			dynamic '	act ''Study intensely for your <<$class_list_name[i]>> exam (30 minuts)'': gt ''uni_library'', ''studying_exam'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'' '
		end
		
		i += 1
		if ARRSIZE('class_list_institution') >= i: jump 'exam_loop'
		killvar 'i'
	end	
	act 'Leave':
		minut += 5
		gt 'uni_grounds', 'main'
	end
	act 'Return to entrance':
		minut += 2
		gt 'uni_library', 'start'
	end
	act 'Wander around': gt 'uni_library', 'wander'
end

if $ARGS[0] = 'studying':
	cla & *clr
	'<center><b><font color="maroon">The University Library</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/study' + rand(1,7) + '.jpg"></center>'
	minut += 30
	gs 'grades', 'optional_activity_attribute', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'yes', min(pcs_intel+10,100)
	gs 'stat'
	'You open the books and start studying for your <<$ARGS[2]>> class. The library is mostly quiet, but you hear occasional noises, some of them hard to make out and some of them fairly suspicious. Despite this, it is a good environment to study in and you can see a number of other students studying as well.'
	*nl
	if dyneval ('RESULT = class[''<<$ARGS[1]>>_<<$ARGS[2]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$ARGS[1]>>_<<$ARGS[2]>>_optional_weekly_max'']'):
		'You study for half an hour and can tell that you will need to study more if you want to completly understand this week''s material.'
	else
		'You study for half an hour and believe you now understand everything that is being covered this week.'
	end
	act 'Leave':
		minut += 5
		gt 'uni_grounds', 'main'
	end
	if (week < 6 or hour < 23) and hour > 7:
		act 'Return to entrance':
			minut += 2
			gt 'uni_library', 'start'
		end
		act 'Keep studying': gt 'uni_library', 'study'
		act 'Wander around': gt 'uni_library', 'wander'
	else
		'The library is closing for the night.'
	end
end

if $ARGS[0] = 'studying_exam':
	cla & *clr
	'<center><b><font color="maroon">The University Library</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/study' + rand(1,7) + '.jpg"></center>'
	!!Nerds like studying and so their mood improves a little. Everybody else gets in a worse mood by studying.
	intel_exp += max(0,rand(-1,1))
	pcs_mood += (traits['nerd_status']*5 -10)
	minut += 30
	'You open the books and start studying for your <<$ARGS[2]>> exam. The library is mostly quiet, but you hear occasional noises, some of them hard to make out and some of them fairly suspicious. Despite this, it is a good environment to study in and you can see a number of other students studying as well.'
	if pcs_sleep < 5:
		no_study = 1
		'You are so tired that you are constantly falling asleep. You get no studying done in this condition.'
	elseif pcs_sleep < 30:
		study_mod -= 20
		'You are very tired and have a hard time keeping you eyes open.'
	end
	if alko >= 6:
		no_study = 1
		'You are so drunk that your eyes can''t make sense of the letters written in the books. Holding your pen is also a problem.'
	elseif alko >= 4:
		study_mod -= 40
		'You are drunk and have trouble concentrating on reading the books. When you look at the notes you''ve made, a lot of them are incomprehensible.'
	elseif alko >= 2:
		study_mod -= 20
		'You are feeling a little tipsy, but feel like your studying is going great. However, when you look at your notes afterwards, you notice that a lot of them make no sense.'
	end
	if mentats_dose >= 1: study_mod += 30
	If pcs_mood < 50:
		study_mod -= 20
		'You are in a bad mood and it clearly affects your studying.'
	end
	if StrongNarkota > 0 or jointhigh > 0:
		study_mod -= 40
		'You are stoned, which makes it hard to concentrate on studying.'
	end
	if amphHigh > 0: study_mod += 20
	if pcs_energy < 5:
		study_mod -= 20
		'You are extremely hungry and it is hard to think about anything else other than food.'
	elseif pcs_energy < 10:
		study_mod -= 10
		'You are very hungry and it affects your ability to concentrate.'
	elseif pcs_energy < 20:
		study_mod -=10
		'You are hungry and your thoughts often drift to food, affecting your performance negatively.'
	end
	if pcs_horny > 90:
		study_mod -= 10
		'You are extremely horny and your thoughts often drift to sex, affecting your ability to study.'
	end
	if pain['total'] > 90:
		no_study = 1
		'You are in so much pain that you can''t study.'
	elseif pain['total'] > 75:
		study_mod -= 40
		'You are in so much pain that you have a very hard time concentrating on studying.'
	elseif pain['total'] > 60:
		study_mod -= 20
		'Your pain is constantly bothering you and makes it hard to study.'
	end
	*nl
 	study_mod = max(0,(rand(30 + study_mod,pcs_intel + study_mod) + 10)/33)
	if no_study = 1:
		'You try to study for half an hour, but get nothing done.'
	else
		if study_mod = 0:
			'You study for half an hour, but you don''t think you are improving.'
		elseif study_mod = 1:
			'You study for half an hour and think you are improving a little.'
		elseif study_mod = 2:
			'You study for half an hour and believe that you''re making good progress in getting ready for the exam.'
		else
			'You study for half an hour and believe that you''re improving a lot.'
		end		
		gs 'grades', 'grade_award', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'yes', study_mod
	end
	
	gs 'stat'
	
	killvar 'study_mod'
	killvar 'nod_study'
	
	act 'Leave':
		minut += 5
		gt 'uni_grounds', 'main'
	end
	if (week < 6 or hour < 23) and hour > 7:
		act 'Return to entrance':
			minut += 2
			gt 'uni_library', 'start'
		end
		act 'Keep studying': gt 'uni_library', 'study'
		act 'Wander around': gt 'uni_library', 'wander'
	else
		'The library is closing for the night.'
	end
end

if $ARGS[0] = 'wander':
	$sexloc = 'uni_library'
	cla & *clr
	minut += 15
	gs 'stat'
	'<center><b><font color="maroon">The University Library</font></b></center>'
	temp = rand(1,20)
	if temp = 1:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/accident_panty_flash.jpg"></center>'
		'As you wander around, you spot two girls in one of the rows of books. One of them starts climbing the shelf to get at a book out of reach and her short skirt rides up as she does, showing off her panties to everyone looking. You can''t help but smile as you continue on.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 2:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/accident_pussy_flash.jpg"></center>'
		'As you wander around, you spot a girl in one of the rows of books. She starts climbing the shelf to get at a book out of reach and her short skirt rides up as she does, showing off her pussy to everyone looking. You can''t help but smile as you continue on.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 3:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/asian_titflash.jpg"></center>'
		'As you wander around, you stop inside of one of the rows of books before it opens up into another one of the small study areas. Before you are several guys, sitting at a table encouraging an Asian girl to pull up her shirt. She keeps refusing, but you can tell she is getting aroused and excited by the attention they are giving her. Finally, blushing a little, she pulls up her shirt and holds it up, showing off her firm little breasts. The guys all grin and quietly clap before she pulls her shirt down and walks away blushing. You wonder if she regrets doing it before you continue on your way.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 4:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/black_titflash.jpg"></center>'
		'As you wander around, you stop inside of one of the rows of books before it opens up into another one of the small study areas. Before you are several guys, sitting at a table encouraging a chubby black girl to pull up her shirt. She keeps refusing, but you can tell she is getting aroused and excited by the attention they are giving her. A few seconds later, she finally exposes her large, saggy breasts to them. The guys all grin and quietly clap before she pulls her shirt down and goes back to studying. You wonder if she regrets doing it before you continue on your way.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 5:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/girl_sleeping.jpg"></center>'
		'As you wander around, you spot a girl with her head down on one of the work stations, apparently having fallen asleep while studying. She snores softly, a few of the other students occasionally glancing over and laughing at her softly. You shake your head and leave the girl to sleep in peace.'
	elseif temp = 6:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/laying_in_row.jpg"></center>'
		'As you wander around, you start down one of the rows, only to find a girl lying in the middle of the aisle on her stomach, reading a book. She briefly glances up at you before going back to her book and ignoring you. Not able to easily get past her and not wanting to be rude by trying to step over her, even if she is being rude in the first place, you decide to just walk over to the next aisle and continue your wandering.'
	elseif temp = 7:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/naked_run.jpg"></center>'
		'As you wander around, you glimpse what appears to be a naked girl dashing between two aisles of books. You glance into the aisle she went down and see her continue running down the aisle. You have no clue where her clothes are or why she''s doing it, but with how fast she''s running, you doubt she is enjoying it. She quickly disappears down another row of shelves.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 8:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/naked_walk.jpg"></center>'
		'As you turn to head down an aisle, you come nearly face to face with a pretty blond girl standing there naked. She just smiles at you and says hello. You respond in kind and she walks past you like nothing is wrong. You shake your head and continue on your way. A few seconds later, you come across a guy holding a girl''s clothes while glancing down each aisle. You can only assume he is looking for the naked girl you seen and so point in the direction you saw her. He smiles and nods before jogging in that direction.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 9:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/pussy_flash.jpg"></center>'
		'As you wander around, you go through one of the small study areas. Before you are several guys sitting at a table, encouraging a girl standing just inside of one of the aisles to flash them. She keeps refusing, but you can tell she is getting aroused and excited by the attention they are giving her. Finally, she lifts her skirt and flashes her neatly trimmed pussy at them. One of the guys briefly woops loudly, but is promptly hit by his friends and told to be quiet. Several others look over at the boys, but the girl has already dropped her skirt back in place and walks off with a grin on her face. You wonder if she regrets doing it as you continue on your way.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 10:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/tit_flash.jpg"></center>'
		'As you wander around, you go through one of the small study areas. Before you are several guys sitting at a table, encouraging a girl standing just inside of one of the aisles to flash them. She keeps refusing, but you can tell she is getting aroused and excited by the attention they are giving her. Finally, she lifts her shirt and flashes her breasts at them. One of the guys briefly woops loudly, but is promptly hit by his friends and told to be quiet. Several others look over at the boys, but the girl has already dropped her shirt back in place and walks off with a grin on her face. You wonder if she regrets doing it as you continue on your way.'
		gs 'arousal', 'erotic_nudity', 3
		gs 'stat'
	elseif temp = 11:
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/events/sex/bj.jpg"></center>'
		'As you walk around, you hear some moaning, and glancing down one of the rows of shelves, you see a boy sitting at one of the work stations. It takes a moment for you to notice the girl under the desk on her knees bobbing her head up and down in his lap. You watch for a few more seconds, feeling aroused at the scene before you decide to move on before you''re spotted.'
		gs 'arousal', 'erotic', 3
		gs 'stat'
	else
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/library.jpg"></center>'
		'You wander around the library for a while, looking at all the books. You pass by several of your fellow students, some quietly studying, reading or just looking through the bookshelves. You don''t come across anything of interest.'
	end
	act 'Leave':
		minut += 5
		gt 'uni_grounds', 'main'
	end
	if (week < 6 or hour < 23) and hour > 7:
		act 'Return to entrance':
			minut += 2
			gt 'uni_library', 'start'
		end
		act 'Wander around':
			gt 'uni_library', 'wander'
		end 
	else
		'The library is closing for the night.'
	end
end

--- uni_library ---------------------------------

