# pav_library_nerdstudy
!2021/10/05

if $ARGS[0] = 'nerd_study_night':
	*clr & cla
	gs 'stat'
	nerdstudynight['start_time'] = totminut
	nerdstudynight['day'] = daystart
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/nerdsstudy/nerds_study' + rand(1,5) + '.jpg"></center>'
	if grupTipe = 3:
		'You arrive at the library and see all of your fellow nerds have already gathered around one of the tables. Some are grabbing some books or looking up things on their laptop, while others are sitting and chatting before the study session begins. You sit down with your fellow students and start studying.'
	elseif grupTipe = 5:
		'You arrive at the library and see the nerds have already gathered around one of the tables. Some are grabbing some books or looking up things on their laptop, while others are sitting and chatting before the study session begins. When they see you, they all go quiet, they look back and forth a bit and finally Feofan speaks up. "Do you need something?"'
		'You smile to him and the rest. "My grades are not as good as I would like, so I thought I would come study with the smartest kids in school."'
		'They exchange looks again and this time Artem speaks up. "Yeah ok, but we are here to study." Then they go back to studying among each other.'
	elseif fame['pav_slut'] >= 250:
		'You arrive at the library and see the nerds have already gathered around one of the tables. Some are grabbing some books or looking up things on their laptop, while others are sitting and chatting before the study session begins. When they see you, they all go quiet, they look back and forth a bit and finally Feofan speaks up. "Do you need something?"'
		'You smile to him and the rest. "My grades are not as good as I would like, so I thought I would come study with the smartest kids in school."'
		'They exchange looks again and this time they huddle up a bit and start whispering back and forth it seems like they are arguing but finally Artem looks up at you and says. "Yeah ok, we know your reputation and we want no part of it, we are here to study and thats it, so no funny business." Then they go back to studying among each other.'
	else
		'You arrive at the library and see the nerds have already gathered around one of the tables. Some are grabbing some books or looking up things on their laptop, while others are sitting and chatting before the study session begins. When they see you, they all go quiet, they look back and forth a bit and finally Feofan speaks up. "Do you need something?"'
		'You smile to him and the rest. "My grades are not as good as I would like, so I thought I would come study with the smartest kids in school."'
		'They exchange looks again and this time Artem speaks up. "We don''t want any trouble."'
		'You give them a reassuring smile. "I promise I am not here to cause problems, I just need help with my school work."'
		'They exchange looks and a few of them nod before Feofan speaks up again. "Ok sure you can study with us."'
	end
	act 'Leave': gt 'pav_library'
	act 'Study': gt 'pav_library_nerdstudy', 'nerd_study_night1'
	act 'Chat': gt 'pav_library_nerdstudy', 'nerd_study_night2'
end

if $ARGS[0] = 'nerd_study_night1':
	*clr & cla
	menu_off = 1
	grupvalue[3] += 3
	gs 'stat'
	if totminut < nerdstudynight['start_time'] + 25:
		lern += rand(4, 8)
		gs 'exp_gain', 'intel', rand(1, 2)
		gs 'exp_gain', 'prcptn', rand(0,1)
		if lernHome > 1:
			gs 'grades', 'homework', 'school', 'yes', 2, 3, 100
		elseif lernHome = 1:
			gs 'grades', 'homework', 'school', 'yes', 1, 3, 100
		end
	elseif totminut < nerdstudynight['start_time'] + 45:
		lern += rand(2, 4)
		gs 'exp_gain', 'intel', rand(0, 1)		
		gs 'exp_gain', 'prcptn', rand(0,1)
		if lernHome >= 1:
			gs 'grades', 'homework', 'school', 'yes', 1, 3, 100
		end	
	else
		lern += rand(1, 2)
		gs 'exp_gain', 'intel', rand(0, 1)	
	end
	if (totminut - nerdstudynight['start_time']) < 60: minut += (60 -totminut + nerdstudynight['start_time'])
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/nerdsstudy/nerds_study' + rand(1,5) + '.jpg"></center>'
	'You help each other out, debate topics and discuss answers. You have a very enjoyable time and feel like you''ve learned a fair bit about your subject.'
	act 'Pack up': gt 'pav_library_nerdstudy', 'nerd_study_night_over'
end

if $ARGS[0] = 'nerd_study_night2':
	*clr & cla
	$loc_arg = 'nerd_study_night2'
	$loc = 'pav_library_nerdstudy'
	$location_type = 'public_indoors'
	$menu_loc = 'pav_library_nerdstudy'
	$menu_arg = 'nerd_study_night2'
	menu_off = 0
	gs 'stat'
	if totminut >= nerdstudynight['start_time'] +60: gt 'pav_library_nerdstudy', 'nerd_study_night_over'
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/nerdsstudy/nerds_study' + rand(1,5) + '.jpg"></center>'
	'You can''t help but be a little distracted. You''re not sure why, but you''re just not feeling the desire to study. Maybe one of your fellow nerds would like to chat instead?'
	act 'Study': gt 'pav_library_nerdstudy', 'nerd_study_night1'
	if nerdstudynight['Feofan'] = 0:
		act 'Chat to Feofan':
			*clr & cla
			minut += 5
			nerdstudynight['Feofan'] = 1
			gs 'npc_relationship', 'modify', 'A152', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big152.jpg"></center>'
			if npc_rel['A152'] >= 60 and grupTipe = 3:
				'You talk to Feofan about a variety of topics but soon it turns into talking about the game night and him teasing you with some of the stuff he has planned. After a while, he talks about an upcoming convention he wants to go to and cosplay at. The conversation soon comes to an end as he returns to his studies.'
			elseif npc_rel['A152'] <= 20 or fame['pav_slut'] >= 250:
				'Feofan isn''t really interested in talking to you, but you insist and try to keep up a conversation until he finally stops you. "Hey, I''ve gotta finish this homework." he says awkwardly and focuses on studying while ignoring you.'
			else
				'You strike up a conversation with Feofan. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Artem'] = 0:
		act 'Chat to Artem':
			*clr & cla
			minut += 5
			nerdstudynight['Artem'] = 1
			gs 'npc_relationship', 'modify', 'A2', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big2.jpg"></center>'
			if artemQW['bf'] = 1:
				'Artem scoots his chair over closer to you. "I was worried you wouldn''t show up today." he jokes, but you can tell there''s a part of him that was being sincere. Artem isn''t one for public affection, but he still can''t go without some kind of physical contact with you, which leaves him sitting close enough to you that your legs bump and rub against each other under the table as you talk.'
			elseif npc_rel['A2'] >= 60 and grupTipe = 3:
				'"There you are <<$pcs_nickname>>. How''s it going?" Artem greets you. "I figure we can get a head-start on Yenotin''s lesson while we talk." he says, moving the textbook towards you so you can look at it. While you work, Artem keeps up a lively conversation, talking about a range of different topics.'
			elseif npc_rel['A2'] <= 20 or fame['pav_slut'] >= 250:
				'You try to chat with Artem, but he doesn''t seem all that interested in the conversation. His answers are short and he doesn''t even bother to stop writing in his notebook as you talk.'
			else
				'You strike up a conversation with Artem. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Zinaida'] = 0:
		act 'Chat to Zinaida':
			*clr & cla
			minut += 5
			nerdstudynight['Zinaida'] = 1
			gs 'npc_relationship', 'modify', 'A142', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big142.jpg"></center>'
			if npc_rel['A142'] >= 60 and grupTipe = 3:
				'You chat about the latest video games with Zinaida. "Hey, look at this. I got into the top ten with my last score." With a small smile, Zinaida shows you her phone, and sure enough she''s number five on the leaderboard. You congratulate her, which causes her cheeks to flush slightly as she tries to downplay it. The two of you go back to some idle chatter about video games.'
			elseif npc_rel['A142'] <= 20 or fame['pav_slut'] >= 250:
				'Zinaida is focused on studying the book in front of her and taking notes, so she rarely says anything back as you try and talk to her. "I''d like to talk, but I''m busy trying to study. I need to finish this." she says quietly while looking up at you through her messy hair that hangs down onto her face. She resumes her studying while ignoring you.'
			else
				'You strike up a conversation with Zinaida. She seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Gerasim'] = 0:
		act 'Chat to Gerasim':
			*clr & cla
			minut += 5
			nerdstudynight['Gerasim'] = 1
			gs 'npc_relationship', 'modify', 'A153', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big153.jpg"></center>'
			if npc_rel['A153'] >= 60 and grupTipe = 3:
				'You greet Gerasim with a smile and make a point to ask him how his day is going, subtly hinting to the fact that you know other students like to make him do their school work. With a shy smile, Gerasim shrugs his shoulders. "I''m fine." he says, his smile growing. "Thanks for worrying about me though <<$pcs_nickname>>." You engage in some idle banter for a while.'
			elseif npc_rel['A153'] <= 20 or fame['pav_slut'] >= 250:
				'Gerasim isn''t really interested in talking to you, but you insist and try to keep up a conversation until he finally stops you. "Hey, I really need to study. Maybe we can talk some other time?" he says halfheartedly with an awkward laugh, then focuses on studying.'
			else
				'You strike up a conversation with Gerasim. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Julia'] = 0:
		act 'Chat to Julia':
			*clr & cla
			minut += 5
			nerdstudynight['Julia'] = 1
			gs 'npc_relationship', 'modify', 'A12', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big12.jpg"></center>'
			if npc_rel['A12'] >= 60 and grupTipe = 3:
				'Usually, Julia is quiet and lets others do most of the talking, but with you, she participates more in the conversation with some friendly banter.'
			elseif npc_rel['A12'] <= 20 or fame['pav_slut'] >= 250:
				'You try to talk to Julia, but the conversation becomes completely one-sided, with you doing all the talking while Julia busies herself with schoolwork.'
			else
				'You strike up a conversation with Julia. She seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Petka'] = 0:
		act 'Chat to Petka':
			*clr & cla
			minut += 5
			nerdstudynight['Petka'] = 1
			gs 'npc_relationship', 'modify', 'A6', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big6.jpg"></center>'
			if npc_rel['A6'] >= 60 and grupTipe = 3:
				'"You really have to read this book <<$pcs_nickname>>! I''m pretty sure it''s one you''d enjoy." Petka says excitedly. He starts to tell you about an interesting part he just read, but stops himself with a laugh. "Don''t worry, I won''t spoil it for you." The two of you chat about some recent books you have read.'
			elseif npc_rel['A6'] <= 20 or fame['pav_slut'] >= 250:
				'"Can we talk later? I really want to finish studying this chapter before we call it a night." Petka says, only briefly looking up from his book to address you before burying his nose right back into it.'
			else
				'You strike up a conversation with Petka. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Natasha'] = 0:
		act 'Chat to Natasha':
			*clr & cla
			minut += 5
			nerdstudynight['Natasha'] = 1
			gs 'npc_relationship', 'modify', 'A16', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big16.jpg"></center>'
			if npc_rel['A16'] >= 60 and grupTipe = 3:
				'"Hey <<$pcs_nickname>>! Have you seen this new makeup line coming out? It''s expensive but I looove the colors!" Natasha says as she holds up the magazine ad for said makeup. She talks about how she can''t afford nice things like this and this ends up bringing her down. You quickly change the subject and start complimenting her on her sense of style and grades and reminding her she''s a top student in school, which brings a smile to her face.'
			elseif npc_rel['A16'] <= 20 or fame['pav_slut'] >= 250:
				'Natasha isn''t really interested in talking to you, but you persist in trying to keep up a conversation for awhile before she says. "Hey, I''ve got to... study. Maybe we can talk later?" she says halfheartedly and goes back to studying.'
			else
				'You strike up a conversation with Natasha. She seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Evgeny'] = 0:
		act 'Chat to Evgeny':
			*clr & cla
			minut += 5
			nerdstudynight['Evgeny'] = 1
			gs 'npc_relationship', 'modify', 'A151', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big151.jpg"></center>'
			if npc_rel['A151'] >= 60 and grupTipe = 3:
				'You strike up a conversation with Evgeny, mostly about school work at first as he is focused on it, but eventually it drifts over to talking about chess before he abruptly stops talking and focuses on studying again.'
			elseif npc_rel['A151'] <= 20 or fame['pav_slut'] >= 250:
				'You try talking to Evgeny, but it''s very one-sided with you doing all of the talking until he finally speaks up. "I don''t want to sound rude, but we''re not really friends so I''m not sure why you''d want to talk to me." he says quietly. "Anyways, I''ve got to finish studying, so if you don''t mind..." He goes back to studying while ignoring you.'
			else
				'You strike up a conversation with Evgeny. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
	if nerdstudynight['Natalia'] = 0:
		act 'Chat to Natalia':
			*clr & cla
			minut += 5
			nerdstudynight['Natalia'] = 1
			gs 'npc_relationship', 'modify', 'A240', 'like'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big240.jpg"></center>'
			if npc_rel['A240'] >= 60 and grupTipe = 3:
				'As you approach Natalia, she closes her notebook and waves at you. "Hey <<$pcs_nickname>>, come and have a seat." You sit next to Natalia and discuss current events while occasionally gossiping about your classmates.'
			elseif npc_rel['A240'] <= 20 or fame['pav_slut'] >= 250:
				'You try to talk to Natalia, but the conversation becomes completely one-sided, with you doing all the talking while Natalia busies herself with her notebook, keeping others and esspecially you, from seeing what she is doing.'
			else
				'You strike up a conversation with Natalia. She seems a bit hesitant at first, but quickly engages you in some idle chatter about school.'
			end
			act 'Start studying': gt 'pav_library_nerdstudy', 'nerd_study_night1'
			act 'Chat to someone else': gt 'pav_library_nerdstudy', 'nerd_study_night2'
		end
	end
end

if $ARGS[0] = 'nerd_study_night_over':
	*clr & cla
	menu_off = 1
	nerdstudynight['Feofan'] = 0
	nerdstudynight['Artem'] = 0
	nerdstudynight['Zinaida'] = 0
	nerdstudynight['Gerasim'] = 0
	nerdstudynight['Julia'] = 0
	nerdstudynight['Petka'] = 0
	nerdstudynight['Natasha'] = 0
	nerdstudynight['Evgeny'] = 0
	nerdstudynight['Natalia'] = 0
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/nerdsstudy/nerds_study' + rand(1,5) + '.jpg"></center>'
	'After an hour, everyone starts packing up and talking about heading home. A few text their parents to let them know they''re leaving the library. You gather up your stuff and leave with the group.'
	act 'Leave': gt 'pav_library'
end
	
--- pav_library_nerdstudy ---------------------------------
