1
0
Эх сурвалжийг харах

Merge branch 'Edited-QSP9' into SchoolOverhaul

Stephan Fuchs 1 жил өмнө
parent
commit
1d3bd84893
62 өөрчлөгдсөн 807 нэмэгдсэн , 792 устгасан
  1. 14 1
      qrsc_to_tw.py
  2. 2 2
      sugarcube/src/activities/school/chats/gossip.tw
  3. 4 4
      sugarcube/src/activities/school/deprecated/gschool_lessons2.tw
  4. 1 1
      sugarcube/src/activities/school/gschool_boys_bathroom.tw
  5. 9 9
      sugarcube/src/activities/school/gschool_break.tw
  6. 6 6
      sugarcube/src/activities/school/gschool_chats.tw
  7. 18 18
      sugarcube/src/activities/school/gschool_cheerleading.tw
  8. 47 47
      sugarcube/src/activities/school/gschool_coolkid_chats.tw
  9. 3 3
      sugarcube/src/activities/school/gschool_detention.tw
  10. 12 12
      sugarcube/src/activities/school/gschool_events1.tw
  11. 2 2
      sugarcube/src/activities/school/gschool_girls_bathroom.tw
  12. 54 54
      sugarcube/src/activities/school/gschool_gopnik_chats.tw
  13. 38 38
      sugarcube/src/activities/school/gschool_jock_chats.tw
  14. 2 2
      sugarcube/src/activities/school/gschool_lessons.tw
  15. 58 58
      sugarcube/src/activities/school/gschool_lessonsev1.tw
  16. 45 45
      sugarcube/src/activities/school/gschool_lessonsev2.tw
  17. 35 35
      sugarcube/src/activities/school/gschool_lessonsev3.tw
  18. 2 2
      sugarcube/src/activities/school/gschool_lunch.tw
  19. 10 10
      sugarcube/src/activities/school/gschool_outcast_chats.tw
  20. 14 14
      sugarcube/src/activities/school/gschool_post_shower.tw
  21. 2 2
      sugarcube/src/activities/school/gschool_sex.tw
  22. 41 41
      sugarcube/src/activities/school/gschool_socialchg.tw
  23. 1 1
      sugarcube/src/autogenerated/unsorted/NikoEv.tw
  24. 10 10
      sugarcube/src/autogenerated/unsorted/NikoWhore.tw
  25. 4 4
      sugarcube/src/autogenerated/unsorted/dimaRevenge.tw
  26. 2 2
      sugarcube/src/autogenerated/unsorted/gdksport.tw
  27. 8 8
      sugarcube/src/autogenerated/unsorted/gopnik_initiation.tw
  28. 5 5
      sugarcube/src/autogenerated/unsorted/journal.tw
  29. 53 53
      sugarcube/src/autogenerated/unsorted/journal_school.tw
  30. 25 25
      sugarcube/src/autogenerated/unsorted/journal_uni.tw
  31. 5 5
      sugarcube/src/autogenerated/unsorted/natalia_pavlova.tw
  32. 2 2
      sugarcube/src/autogenerated/unsorted/natbel_friend.tw
  33. 10 10
      sugarcube/src/autogenerated/unsorted/nerd_game_night.tw
  34. 5 5
      sugarcube/src/autogenerated/unsorted/nyp_school.tw
  35. 15 15
      sugarcube/src/autogenerated/unsorted/pav_aptcourtev.tw
  36. 47 47
      sugarcube/src/autogenerated/unsorted/pav_beach_chat.tw
  37. 11 11
      sugarcube/src/autogenerated/unsorted/pav_library_nerdstudy.tw
  38. 8 8
      sugarcube/src/autogenerated/unsorted/pav_park_sex.tw
  39. 17 17
      sugarcube/src/autogenerated/unsorted/pav_parkev.tw
  40. 4 4
      sugarcube/src/autogenerated/unsorted/petkaEv.tw
  41. 1 1
      sugarcube/src/autogenerated/unsorted/police_station.tw
  42. 3 3
      sugarcube/src/autogenerated/unsorted/soniadisco.tw
  43. 1 1
      sugarcube/src/autogenerated/unsorted/soniahome.tw
  44. 1 1
      sugarcube/src/autogenerated/unsorted/stat.tw
  45. 2 2
      sugarcube/src/locations/city/city_coffee_hole.tw
  46. 6 6
      sugarcube/src/locations/pavlov/disco/pav_disco.tw
  47. 38 38
      sugarcube/src/locations/pavlov/disco/pav_disco_coolkids.tw
  48. 37 37
      sugarcube/src/locations/pavlov/disco/pav_disco_gopniks.tw
  49. 29 29
      sugarcube/src/locations/pavlov/disco/pav_disco_jocks.tw
  50. 3 3
      sugarcube/src/locations/pavlov/lake/pav_lake.tw
  51. 1 1
      sugarcube/src/locations/pavlov/residential/pav_complex.tw
  52. 2 2
      sugarcube/src/npcs/katja/katjaEv.tw
  53. 2 2
      sugarcube/src/npcs/katja/katja_uni.tw
  54. 1 1
      sugarcube/src/npcs/school/Albina/albina_starlets.tw
  55. 1 1
      sugarcube/src/npcs/school/Artem/artem_date_events.tw
  56. 1 1
      sugarcube/src/npcs/school/Artem/artem_sex.tw
  57. 8 8
      sugarcube/src/npcs/school/Artem/artemhome.tw
  58. 1 1
      sugarcube/src/npcs/therapist/therapist.tw
  59. 5 5
      sugarcube/src/start/city/intro_city_select.tw
  60. 6 6
      sugarcube/src/start/intro_sg_select_custom.tw
  61. 5 5
      sugarcube/src/start/schoolgirl/intro_sg_select.tw
  62. 2 0
      variables.py

+ 14 - 1
qrsc_to_tw.py

@@ -1168,6 +1168,19 @@ replaces = [
 		r"""<span class="innerThought">\1</span>""",
 		1
 	],
+	# Group Membership
+	[r'(?:getvar\(")?\$grupTipe(?:"\))?\s*==\s*1',r"$q.school.func('isGroupMember','cool')",1],
+	[r'(?:getvar\(")?\$grupTipe(?:"\))?\s*==\s*2',r"$q.school.func('isGroupMember','jocks')",1],
+	[r'(?:getvar\(")?\$grupTipe(?:"\))?\s*==\s*3',r"$q.school.func('isGroupMember','nerds')",1],
+	[r'(?:getvar\(")?\$grupTipe(?:"\))?\s*==\s*4',r"$q.school.func('isGroupMember','gopniks')",1],
+	[r'(?:getvar\(")?\$grupTipe(?:"\))?\s*==\s*5',r"$q.school.func('isGroupMember','outcasts')",1],
+	[r'(?:getvar\(")?\$grupTipe(?:"\))?\s*==\s*6',r"$q.school.func('isGroupMember','teachers')",1],
+	[r'<<set(?:init)?\s+\$grupTipe(?:"\))?\s*=\s*1>>',r"<<run $q.school.func('setGroupMembership','cool')>>",1],
+	[r'<<set(?:init)?\s+\$grupTipe(?:"\))?\s*=\s*2>>',r"<<run $q.school.func('setGroupMembership','jocks')>>",1],
+	[r'<<set(?:init)?\s+\$grupTipe(?:"\))?\s*=\s*3>>',r"<<run $q.school.func('setGroupMembership','nerds')>>",1],
+	[r'<<set(?:init)?\s+\$grupTipe(?:"\))?\s*=\s*4>>',r"<<run $q.school.func('setGroupMembership','gopniks')>>",1],
+	[r'<<set(?:init)?\s+\$grupTipe(?:"\))?\s*=\s*5>>',r"<<run $q.school.func('setGroupMembership','outcasts')>>",1],
+	[r'<<set(?:init)?\s+\$grupTipe(?:"\))?\s*=\s*6>>',r"<<run $q.school.func('setGroupMembership','teachers')>>",1],
 ]
 
 purge_messes=[
@@ -1280,7 +1293,7 @@ os.makedirs(tw_sources_path, exist_ok=True)
 #	print(replace[0])
 
 restrictfiles = []
-#restrictfiles = ['intro_city_select']
+#restrictfiles = ['gschool_gopnik_chats']
 
 files  = os.listdir(qsp_sources_path)
 file_counter = 0

+ 2 - 2
sugarcube/src/activities/school/chats/gossip.tw

@@ -422,7 +422,7 @@
 		<p>"Have you noticed $pc.name_nick hanging out with Vitek lately?"</p>
 		<p>"You think she's a gopnik now? Oh god, maybe she's fucking him!"</p>
 		<p>"Ew, I didn't need that mental image!"</p>
-	<<elseif getvar("$chat_rand") == 80 and $npcs.get('A9','rel') >= 45 and getvar("$grupTipe") == 4>>
+	<<elseif getvar("$chat_rand") == 80 and $npcs.get('A9','rel') >= 45 and $q.school.func('isGroupMember','gopniks')>>
 		<p>"Even for a gopnik, $pc.name_nick has been hanging around Vitek a lot more lately."</p>
 		<p>"You know, I heard he sells drugs. You think he's selling some to her?"</p>
 		<p>"Pfft, obviously! I mean they're both gopniks, so of course all they do is drink, be loud and do drugs."</p>
@@ -478,7 +478,7 @@
 		"There''s no way someone like that made the team."
 		"Of course she didn''t. They laughed her right out of the place."
 		<p>"Did someone record it? I bet it would be hilarious to watch."</p>
-	<<elseif getvar("$chat_rand") == 92 and $q.cheerleading?.get('quest_stage') > 1 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2)>>
+	<<elseif getvar("$chat_rand") == 92 and getvar("$cheerleadingQW['quest_stage']") > 1 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks'))>>
 		<p>"So I heard $pc.name_nick joined the cheerleading squad."</p>
 		<<set '"Well yeah, she is one of them. You know, ' + iif(grupTipe = 1, 'popular', 'sporty') + ' enough to pass their judgemental selection process?"'>>
 		"It's pretty harsh I know. I can only imagine Anushka on the team if they allowed it, running around the field flashing everyone during a game."

+ 4 - 4
sugarcube/src/activities/school/deprecated/gschool_lessons2.tw

@@ -25,7 +25,7 @@
 				<<run $pc.skillExperienceGain('computer',rand(0,1))>>
 				<<run $pc.skillExperienceGain('intelligence',rand(0,1))>>
 				<<image "locations/pavlovsk/school/classroom/ask.jpg">>
-				<<if getvar("$grupTipe") == 3>>
+				<<if $q.school.func('isGroupMember','nerds')>>
 					Mr. Ivanov nods approvingly. He happily spends some extra time explaining the topic again to you, and answers any extra questions you might have. You feel like you learned a lot, thoroughly understanding today''s lessons now.
 				<<else>>
 					<p>Mr. Ivanov audibly sighs. "Why are you unable to grasp this? I know you're not the smartest student, but this is really very simple. Even a small child should be able to grasp it." He goes on to explain the part you asked about again, but he does so in a completely belittling manner.</p>
@@ -320,7 +320,7 @@
 		<<if getvar("$time.daydream") == 1>>
 			<<image "locations/pavlovsk/school/classroom/caughtsleeping.jpg">>
 			<p>Today's lessons doesn't particularly interest you and you find yourself drifting off constantly. After a while, you notice Mr. Ivanov has stopped talking and is looking at you intently, asking you to pay attention. This is apparently the third time he has asked; you missed the first two while you were lost in your own thoughts. The whole class is looking at you.</p>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				<p>"Miss $pc.name_last, please pay attention, this is very important. Today's topic is going to be on the exam."</p>
 			<<else>>
 				<p>"Miss $pc.name_last, if you don't want to listen and learn, then I suggest you stop coming to class. Now stop wasting my time and pay attention!"</p>
@@ -390,7 +390,7 @@
 
 		<<elseif getvar("$time.daydream") == 2>>
 			<<if getvar("$class['school_comp_grade']") >= 80>>
-				<<if getvar("$grupTipe") == 3>>
+				<<if $q.school.func('isGroupMember','nerds')>>
 					<<image "locations/pavlovsk/school/classroom/sleeping.jpg">>
 					You're far too tired to pay attention in class today. You don't even know what the lesson is about as you keep dozing off.
 					You're snapped back to consciousness when you hear Mr. Ivanov call your name. Everyone looks at you expectantly, and you realize that you were just asked a question about the topic.
@@ -467,7 +467,7 @@
 							You decide to have some fun. You quickly slide the phone between your legs and snap some photos under your skirt.
 							<p>When Mr. Ivanov arrives at your desk, he sternly asks "I'm not going to ask twice $pc.name_last. Hand it over!"</p>
 							You give him a sly smile as you hand over your phone with the last picture you took still on the screen.
-							<<if getvar("$grupTipe") == 3>>
+							<<if $q.school.func('isGroupMember','nerds')>>
 								<p>He looks at the screen and shakes his head before stuffing your phone in his pocket. "You're better than this Miss $pc.name_last. I urge you not to start down this path." he says before returning to the front of the class and continuing his lesson.</p>
 							<<else>>
 								'He looks at the screen and doesn''t react at first. He walks back to the front of the class, looks at the image a final time then puts the phone in his desk while shaking his head.'+iif(npc_rel['A69'] >+50, ' "You're better than this Miss <<$pc.name_last>>. I urge you not to start down this path." He then continues his lesson.', ' "I expected nothing less from you <<$pc.name_last>>. You never fail to fall down to your lowest potential." He then continues his lesson.')

+ 1 - 1
sugarcube/src/activities/school/gschool_boys_bathroom.tw

@@ -1422,7 +1422,7 @@
 				<</actCLA>>
 
 		<</actCLA>>
-	<<elseif (getvar("$grupTipe") == 4 and $pc.hotcat >= 6 and $pc.fame('pav_slut') > 150)>>
+	<<elseif ($q.school.func('isGroupMember','gopniks') and $pc.hotcat >= 6 and $pc.fame('pav_slut') > 150))>>
 		<p>"I saw you in the mirror, girl!" he says menacingly as he pushes the door open, the menacing look soon replaced with a hungry, lustful one. "Well well well, what do we have here? I remember girls like you, always spreading those legs for any boy that would look your way." He waits a few seconds and snarls at you when you don't move. "Strip! Now!"</p>
 		<<actCLA 'Strip'>>
 			<<gt 'gschool_boys_bathroom' 'caughtb2_slut'>>

+ 9 - 9
sugarcube/src/activities/school/gschool_break.tw

@@ -123,7 +123,7 @@
 		<<gs 'gschool_break' 'restroom_actions'>>
 	<<elseif getvar("$girls_event_rand") == 12>>
 		<<image "locations/pavlovsk/school/bathroom/gopniks.jpg">>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			As you enter the restroom, you see Pauline, Lena and Lera hanging around the stalls, chatting and tormenting some of the other girls. You exchange smiles with them as you go about your business.
 		<<else>>
 			As you enter the restroom, you see Pauline, Lena and Lera hanging around the stalls, chatting and tormenting some of the other girls. As you go about your business, they start taunting you as well, but you know better than to say something back. You do your best to ignore them as you go about your business.
@@ -145,7 +145,7 @@
 	<<elseif getvar("$girls_event_rand") == 15 and !$pc.thinksIsVirgin>>
 		<<set $menu_off = 1>>
 		<<image "locations/pavlovsk/school/bathroom/sweettalk1.jpg">>
-		<<if getvar("$grupTipe") == 4 and $pc.hotcat >= 6>>
+		<<if $q.school.func('isGroupMember','gopniks') and $pc.hotcat >= 6>>
 			<p>As you enter the bathroom, you see Lena standing in the corner. She watches you as you come in, then bites her lower lip. You notice her watching you and decide to ask what's up. "You okay, Lena? You're looking a bit flushed."</p>
 			<p>She shakes her head. "No, that bitch Lera got me all worked up and then got herself in trouble, leaving me here with blue balls. How about you help me out with this little problem?" she asks before spreading her legs open.</p>
 			<<actCLA 'Sorry'>>
@@ -157,7 +157,7 @@
 			<<actCLA 'Help her out'>>
 				<<gt 'gschool_break' 'lena_gop'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>As you enter the bathroom, you see Lena standing in the corner. She watches you as you come in, then narrows her eyes a little. You notice her watching you and decide to ask what's up. "You okay Lena? You're looking a bit flushed."</p>
 			<p>She gives you a evil little smile. "No, that bitch Lera got me all worked up and then got herself in trouble, leaving me here with blue balls. So why don't you come over here and eat my pussy like a good little girl?" she says as she spreads her legs open.</p>
 				<<actCLA 'Refuse (will_cost Willpower)' undefined  `{willpower:['sex','resist']}`>>
@@ -184,7 +184,7 @@
 			<<actCLA 'Agree'>>
 				<<gt 'gschool_break' 'lena_dom'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 3 or getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','nerds') or $q.school.func('isGroupMember','outcasts')>>
 			<p>As you enter the bathroom, you see Lena standing in the corner. She watches you come in, then narrows her eyes a little. You notice her watching and decide to ask what's up. "You okay Lena? You're looking a bit flushed."</p>
 			She gives you a evil little smile. "No, that bitch Lera got me all worked up and then got herself in trouble, leaving me here with blue balls. So get over here, get on your knees and eat my pussy before I beat your ass and make you do it." she snarls as she spreads her legs open.
 
@@ -222,7 +222,7 @@
 	<<elseif getvar("$girls_event_rand") == 16 and !$pc.thinksIsVirgin and $uniform_steal_day != $time.daystart>>
 		<<set $menu_off = 1>>
 		<<image "locations/pavlovsk/school/bathroom/girlspose1.jpg">>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			As you walk in, you see a group of gopnik girls standing around chatting. You know who Lena, Lera, Pauline and Ekaterina are, but the others are from your brother''s class. They exchange causal greetings with you, but seem engrossed in their conversation.
 			<<actCLA 'Listen in'>>
 				<<image "locations/pavlovsk/school/bathroom/girlspose1.jpg">>
@@ -396,7 +396,7 @@
 					<<gt 'gschool_lessons' 'short_break'>>
 				<</actCLA>>
 			<</actCLA>>
-			<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks')>>
 				<<actCLA '"What a fucking slut!"'>>
 					<<run $npcs.dec('A25','rel',5)>>
 					<<video "locations/pavlovsk/school/bathroom/sex/soniabj.mp4">>
@@ -450,7 +450,7 @@
 					<<gt 'gschool_lessons' 'short_break'>>
 				<</actCLA>>
 			<</actCLA>>
-			<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks')>>
 				<<actCLA '"What a fucking slut!"'>>
 					<<run $npcs.dec('A25','rel',5)>>
 					<<image `'characters/pavlovsk/school/girl/sonia/sex/school/sonia.school1,'+rand(0,3)+'.jpg'`>>
@@ -786,7 +786,7 @@
 								<</actCLA>>
 							<</actCLA>>
 						<</actCLA>>
-					<<elseif getvar("$grupTipe") == 4 and $pc.hotcat <= 5>>
+					<<elseif $q.school.func('isGroupMember','gopniks') and $pc.hotcat <= 5>>
 						<p>You push the stall door open to get a better look. Lavrenti glances over at you as the door opens and seems a bit surprised to see you there. Alyona also glances up, but doesn't stop sucking Lavrenti's dick while he looks at you with a questioning look. "What the? Can't you see that we're busy here? Maybe if you took better care of yourself and didn't look like a cow, we might invite you to join us." he says with a laugh and Alyona seems to snicker with a mouth full of cock. "So if you don't mind, fuck off!" he yells before he closes the stall door. Knowing better than to try and spy again, you leave before things get worse.</p>
 						<<arouse 'voyeur_sex' 2 >>
 						<<arousalEnd>>
@@ -937,7 +937,7 @@
 														<<image "locations/pavlovsk/school/bathroom/sex/girls/causmo12.jpg">>
 														She reaches down and pulls you up into a kneeling position. She forces you to open your mouth and sticks her toes in your mouth. "You're not a bad little girl. You're just a dirty little girl. Now clean my feet." She makes you suck on her toes and lick both of her feet.
 														<<arouse 'foreplay' 2 `['sub']`>>
-														<<if getvar("$grupTipe") == 3 or getvar("$grupTipe") == 5 or $pc.thinksIsVirgin>>
+														<<if $q.school.func('isGroupMember','nerds') or $q.school.func('isGroupMember','outcasts') or $pc.thinksIsVirgin>>
 															She finally lets go of you and tosses you back your shirt. "Get dressed and get out before you make things worse for yourself." You gather up your shirt and walk out of the classroom. You button up your shirt with your ass still stinging.
 															<<actCLA 'Leave the restroom'>>
 																<<gt 'gschool_lessons' 'short_break'>>

+ 6 - 6
sugarcube/src/activities/school/gschool_chats.tw

@@ -115,7 +115,7 @@
 
 				<</if>>
 				<<gs 'npc_relationship' 'modify' 'A159' 'like'>>
-				<<if getvar("$grupTipe") == 3>>
+				<<if $q.school.func('isGroupMember','nerds')>>
 					<p>When you walk in, the room goes dead silent and everyone stares at you. Several of the nerds blush at the scandalous display of flesh from your uniform, or lack there of before Feofan finally speaks up. "What are you wearing?" Natasha butts in. "A better questions is why?" As you get closer, the nerds all share looks before looking at Feofan, who swallows. "Maybe you should go hang out somewhere else or go change or something?" They all close ranks, making sure not to give you space to walk up and talk to them. The outcasts, on the other hand, don't seem to care as much.</p>
 				<<else>>
 					When you walk in, the room goes dead silent and everyone stares at you. Several of the nerds blush at the scandalous display of flesh from your uniform, or lack there of before they all close ranks, making sure not to give you space to walk up and talk to them. The outcasts, on the other hand, don't seem to care as much.
@@ -183,7 +183,7 @@
 		/*<<if $q.school.func('isWearingSchoolUniform')>>
 			<<if $wardrobe.PCloInhibit <= 10>>
 				<font color="blue">This uniform is very conservative. Only the nerds would approve of you wearing it.</font>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<<run $q.school.func('groupRelInc','gopniks',-10)>>
 					<<run $q.school.func('groupMembersRelInc','gopniks',-5)>>
 					<<gs 'npc_relationship' 'modify' 'A189' 5>>
@@ -208,7 +208,7 @@
 					<<setinit $grupvalue[4] += 5>>
 					There are some nods of approval and positive comments made about your rebelious uniform style.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						You head to the stairwell that you and your fellow gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations.
 					<<else>>
 						You head to the stairwell that the gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations.
@@ -231,7 +231,7 @@
 					<<setinit $grupvalue[4] += 5>>
 					There are some nods of approval and positive comments made about your rebelious uniform style.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						You head to the stairwell that you and your fellow gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations. A few of them take note of your slightly risky uniform and seem to approve of it.
 					<<else>>
 						You head to the stairwell that the gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations. A few of them take note of your slightly risky uniform and seem to approve of it.
@@ -243,7 +243,7 @@
 					<<gt 'gschool_lessons' 'short_break'>>
 				<</actCLA>>
 			<<else>>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<<run $q.school.func('groupRelInc','gopniks',-3)>> <<run $pc.fameInc('pav','sex',1)>>
 
 				<</if>>
@@ -278,7 +278,7 @@
 					<<actCLA 'Leave'>>
 						<<gt 'gschool_lessons' 'short_break'>>
 					<</actCLA>>
-				<<elseif getvar("$grupTipe") == 4>>
+				<<elseif $q.school.func('isGroupMember','gopniks')>>
 					<p>You head to the stairwell that you and your fellow gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations. As you approach, Dan stands up and whistles. "Hey there, slut. Why don't you come over here and suck my dick?" Several of the other gopniks laugh and a few of the guys comment about being next in line. You feel yourself getting very nervous around them dressed the way you are and fear they might actually try something. No one comes down to this end of the school at this time of the day after all without a good reason.</p>
 					<<gs 'gschool_groups' 'gopniks'>>
 					<<actCLA 'Leave'>>

+ 18 - 18
sugarcube/src/activities/school/gschool_cheerleading.tw

@@ -21,16 +21,16 @@
 	<<image "locations/pavlovsk/school/afterschool/cheerleading/poster.jpg">>
 	Walking through the hallway, you notice a poster saying that a spot has opened up on the school''s cheerleading squad and that tryouts are being held after school today. The squad is ruled with an iron fist by Albina and is made up of only the most popular and athletic girls in school.
 	However, this hasn''t stopped some of the nerds from working out and even attending dancing lessons to try out for a spot, despite them spreading rumours about the squad, most of them sexual.
-	<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		You're just the kind of person that the squad is looking for and feel that Albina will heavily approve of you.
-	<<elseif getvar("$grupTipe") == 3 or getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','nerds') or $q.school.func('isGroupMember','gopniks')>>
 		You know that Albina would judge you harshly since you're not a jock or part of the cool group.
-	<<elseif getvar("$grupTipe") == 5>>
+	<<elseif $q.school.func('isGroupMember','outcasts')>>
 		<p>You're an outcast. Albina wouldn't even look at you, never mind give you a chance. Would it even be worth trying?</p>
 	<</if>>
 	<<actCLA 'Decide to give it a try'>>
 		<<run $q.cheerleading.set('quest_stage',1)>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"I'm one of them. They would be mad to not at least consider me! Those nerds and their rumours are just jealous losers." you think to yourself as you decide to attend the tryouts and show them that you deserve that spot.</p>
 		<<else>>
 			While you're not as athletically inclined and they have no respect for you, you decide that you're going to try anyway.
@@ -41,7 +41,7 @@
 	<<actCLA 'This doesn`t interest you'>>
 		<<run $q.cheerleading.set('reject',$time.daystart)>>
 		<<run $q.cheerleading.set('quest_stage',-1)>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			Even though you're capable enough to try out, prancing around on the field to amuse people doesn''t sound fun to you at all. You shake your head and continue on your way.
 		<<else>>
 			<p>"Why would I ever want to join a group of skimpily dressed sluts prancing around a field for the amusement of perverts?" you think to yourself as you walk away in disgust.</p>
@@ -54,7 +54,7 @@
 	Walking through the hallway, you notice the poster for the school''s cheerleading tryouts again. It looka like they still have that open spot and are trying to fill it. You recall how the squad only allows popular or athletic girls to join but that nerds still try out regardless. You also remember some of the sexual rumours you've heard about them.
 	<!-- !! Slightly different text if Sveta tried once already-->
 	<<if $q.cheerleading?.get('try_count') > 0>>
-		<<if getvar("$grupTipe") == 3>>
+		<<if $q.school.func('isGroupMember','nerds')>>
 			 * pl 'You already know you won''t be given a fair chance , just like last time.'
 			<<if $q.cheerleading?.get('try_social') < $npcs.get('A23','rel') + $grupvalue[$npcs.get('A23','grupTipe')] / 2 and $q.cheerleading?.get('try_physical') < $pc.skillLevel("agility") + $pc.vitality + $pc.skillLevel("dance") + $pc.skillLevel("cheerleading")>>
 				 * pl 'On the other hand , you've improved your relationship with Albina since then , and you're in better shape too! Maybe things will be different this time?'
@@ -63,13 +63,13 @@
 			<<elseif $q.cheerleading?.get('try_physical') < $pc.skillLevel("agility") + $pc.vitality + $pc.skillLevel("dance") + $pc.skillLevel("cheerleading")>>
 				 * pl 'On the other hand , you're in better shape than you were then , so maybe you'll have a chance this time?'
 			<</if>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<<if $q.cheerleading?.get('grupTipe') == $grupTipe>>
 				Albina and those other snooty bitches turned their noses up at you last time. They'll never accept you, no matter how good you are.
 			<<else>>
 				They didn''t accept you last time, so there''s no chance at all now that you're a gopnik.
 			<</if>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			<<if $q.cheerleading?.get('grupTipe') == $grupTipe>>
 				They laughed you right out of the hall last time. They'll never accept you, no matter how good you are, so there''s probably not much point in trying.
 			<<else>>
@@ -85,15 +85,15 @@
 			<</if>>
 		<</if>>
 	<<else>>
-		<<if getvar("$grupTipe") == 3 or getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','nerds') or $q.school.func('isGroupMember','gopniks')>>
 			You know that Albina would judge you harshly since you're not a jock or part of the cool group.
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			<p>You're an outcast. Albina wouldn't even look at you, never mind give you a chance. Would it even be worth trying?</p>
 		<</if>>
 	<</if>>
 	<<actCLA `iif(cheerleadingQW['try_count'] > 0, 'Decide to try one more time', 'Decide to give it a try this time')`>>
 		<<run $q.cheerleading.set('quest_stage',1)>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"I'm one of them. They would be mad to not at least consider me! Those nerds and their rumours are just jealous losers!" you think to yourself as you decide to attend the tryouts and show them that you deserve that spot.</p>
 		<<else>>
 			While you're not as athletically inclined and they have no respect for you, you decide that you're going to try anyway.
@@ -109,7 +109,7 @@
 	<<set _cheerleading_label += ' <font color="red">(Last chance to join cheerleading)</font>'>>
 	<<actCLA _cheerleading_label>>
 		<<run $q.cheerleading.set('quest_stage',-2)>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			Even though you're capable enough to try out, prancing around on the field to amuse people doesn''t sound fun to you at all. You shake your head and continue on your way.
 		<<else>>
 			<p>"Why would I ever want to join a group of skimpily dressed sluts prancing around a field for the amusement of perverts?" you think to yourself as you walk away in disgust.</p>
@@ -120,7 +120,7 @@
 <<if $location_var[$here][0] == 'tryouts'>>
 	<<run $q.cheerleading.inc('try_count',1)>>
 	<<image "locations/pavlovsk/school/afterschool/cheerleading/tryouts.jpg">>
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		<<run $q.cheerleading.set('quest_stage',-1)>>
 		<<run $q.cheerleading.set('reject',$time.daystart)>>
 		<<run $q.cheerleading.set('grupTipe',$grupTipe)>>
@@ -132,7 +132,7 @@
 		<<actCLA 'Flee'>>
 			<<gt 'school_grounds'>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<run $q.cheerleading.set('quest_stage',-1)>>
 		<<run $q.cheerleading.set('reject',$time.daystart)>>
 		<<run $q.cheerleading.set('grupTipe',$grupTipe)>>
@@ -155,7 +155,7 @@
 			<!-- !!  Nerds would need a lot of work 								~112 (0 rep + 20 friendship + 30 agi + 30 end + 15 dance + 15 talent)-->
 			<<run $q.cheerleading.set('try_physical',$pc.skillLevel("agility") + $pc.vitality + $pc.skillLevel("dance") + $pc.skillLevel("cheerleading"))>>
 			<<run $q.cheerleading.set('try_social',$npcs.get('A23','rel'))>>
-			<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 				<<run $q.cheerleading.inc('try_social',100)>>
 			<<else>>
 				<<run $q.cheerleading.inc('try_social',$grupvalue[$npcs.get('A23','grupTipe')] / 2)>>
@@ -171,7 +171,7 @@
 					While they clearly judge you more harshly than some of the other girls, you are able to impress Albina and some of the other girls with your physical abilities while <<npc 'A18'>><</npc>> just rolls her eyes and scoffs at you.
 				<</if>>
 				After you finish, they line the group up and start moving along, rejecting those who weren''t good enough until only you and one other girl remain.
-				<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 					<!-- !! Stage 3 = regular member-->
 					<<run $q.cheerleading.set('quest_stage',3)>>
 					<p>"You, $pc.name_nick, you actually impressed us'+iif(cheerleadingQW['try_count'] > 1, ' this time',')+'. '+iif(cheerleadingQW['try_physical'] < cheerleadingQW['try_social'],'Sure, you were a bumbling idiot in your execution, but we have a good feeling about you.','I didn't think you had it in you, but those moves really were something!')+' I expect to see you on time at our next practice session!"</p>
@@ -269,12 +269,12 @@
 <</if>>
 <<if $location_var[$here][0] == 'practice'>>
 	<<set $time.minutes += 5>>
-	<<if func('body_din','pregnancyVisibility') == 1 or getvar("$grupTipe") == 5>>
+	<<if func('body_din','pregnancyVisibility') == 1 or $q.school.func('isGroupMember','outcasts')>>
 		<<if func('body_din','pregnancyVisibility') == 1>>
 			<<gt 'gschool_cheerleading' 'cheerleaders_react'>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 5>>
+		<<if $q.school.func('isGroupMember','outcasts')>>
 			<<gt 'gschool_cheerleading' 'cheerleader_end'>>
 
 		<</if>>

+ 47 - 47
sugarcube/src/activities/school/gschool_coolkid_chats.tw

@@ -52,7 +52,7 @@
 						<p>Dimka sees you approaching and gives you a blank stare, his gaze cold and unblinking. "Do you really think I would talk to a whore like you?" he dryly states. He continues to stare you down until you finally leave.</p>
 					<</if>>
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<if $npcs.get('A1','rel') >= 50>>
 							<p>"Just the person I was hoping to see!" he smiles. "Take a look at this." He pulls out his phone and shows you some photos from his latest trip to Moscow. "You would've loved it out there. It really made me realize we're wasting away out here in a place like this." You then chat about the other places he has visited.</p>
 							<<if getvar("$dimarudorient") == 1>>
@@ -67,7 +67,7 @@
 						<<else>>
 							<p>Dimka is willing to entertain you for a few minutes, occasionally taking part in the conversation but letting you do most of the talking. "Hey, Bella!" he calls as he spots her walking by. "Sorry, I hope you don't mind." He follows after her before you can even reply. At least he let you talk to him.</p>
 						<</if>>
-					<<elseif getvar("$grupTipe") == 2>>
+					<<elseif $q.school.func('isGroupMember','jocks')>>
 						<<if $npcs.get('A1','rel') >= 50>>
 							<p>"Have I shown you my photos from my last trip?" he smiles. "Take a look at this." He pulls out his phone and shows you some photos from his latest trip to Moscow. "You would've loved it out there. It really made me realize we're wasting away out here in a place like this." You then chat about the other places he's visited.</p>
 							<<if getvar("$dimarudorient") == 1>>
@@ -83,7 +83,7 @@
 						<<else>>
 							<p>Dimka is willing to entertain you for a bit, occasionally taking part in the conversation but letting you do most of the talking. "Hey, Bella!" he calls as he spots her walking by. "Sorry, I hope you don't mind." He follows after her before you can even reply. At least he let you talk to him.</p>
 						<</if>>
-					<<elseif getvar("$grupTipe") == 3>>
+					<<elseif $q.school.func('isGroupMember','nerds')>>
 						<<if $npcs.get('A1','rel') >= 60>>
 							Dimka greets you with a friendly smile, making room for you in the group made up of Bella, Igor and a few other students. Some of them give you an odd look, obviously not sure why you're here, but Dimka makes you feel welcome. "Relax, she doesn''t have the plague," he playfully chides everyone and you're soon engaged in a conversation with Dimka.
 							<<if getvar("$dimarudorient") == 1>>
@@ -101,7 +101,7 @@
 							"I just wanted to say hi is all," you reply.
 							He looks around like this is a common burden. "Of course you did, everyone does." You try talking to him, but he acts like he is barely tolerating you, like a Tsar might a peasant in his court.
 						<</if>>
-					<<elseif getvar("$grupTipe") == 4>>
+					<<elseif $q.school.func('isGroupMember','gopniks')>>
 						<<if $npcs.get('A1','rel') >= 60>>
 							Dimka greets you with a friendly smile, making room for you in the group made up of Bella, Igor and a few other students. Some of them give you an odd look, obviously not sure why you're here, but Dimka makes you feel welcome. "Relax, she doesn''t have the plague," he playfully chides everyone and you're soon engaged in a conversation with Dimka.
 							<<if getvar("$dimarudorient") == 1>>
@@ -326,7 +326,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		func('npc_reactions', 'general', 'A4')
 		<<if $npcs.get('A4','rel') >= 50>>
 			<<if $npcs.get('A4','rel') >= 60 and $pc.hotcat >= 5 and getvar("$IgorQW['house_open']") == 0>>
@@ -371,7 +371,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		func('npc_reactions', 'general', 'A4')
 		<<if $npcs.get('A4','rel') >= 50>>
 			<<if $npcs.get('A4','rel') >= 60 and $pc.hotcat >= 5 and getvar("$IgorQW['house_open']") == 0>>
@@ -416,7 +416,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		func('npc_reactions', 'general', 'A4')
 		<<if $npcs.get('A4','rel') >= 50>>
 			<<if $npcs.get('A4','rel') >= 60 and $pc.hotcat >= 5 and getvar("$IgorQW['house_open']") == 0>>
@@ -461,7 +461,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		func('npc_reactions', 'general', 'A4')
 		<<if $npcs.get('A4','rel') >= 70>>
 			<<if $npcs.get('A4','rel') >= 75 and $pc.hotcat >= 5 and getvar("$IgorQW['house_open']") == 0>>
@@ -729,7 +729,7 @@
 					Katja doesn''t look too happy to see you and spends most of your awkwardly one sided conversation fumbling as she looks for a way out. As soon as the bell rings, she immediately dashes off.
 				<</if>>
 			<<else>>
-				<<if getvar("$grupTipe") == 1>>
+				<<if $q.school.func('isGroupMember','cool')>>
 					<<if $npcs.get('A14','rel') >= 50>>
 						You spend some time hanging around Kat''s locker, laughing and joking as she tells you some personal stories about Vicky. "She had been drinking all night and had to go, but all the stalls were full, so she drags me out behind the community center to go pee behind a bush." She breaks out into a fit of giggles.
 						<p>"She was so drunk, as she was squatting, she stumbled and fell into her own pee!"</p>
@@ -739,7 +739,7 @@
 					<<else>>
 						With Katja being a quiet girl, she doesn''t do much talking, but she seems to enjoy some lighthearted banter with you, so long as you're doing most of the talking. You get the feeling that if you were closer, she''d open up more, but for now you'll have to settle with this.
 					<</if>>
-				<<elseif getvar("$grupTipe") == 2>>
+				<<elseif $q.school.func('isGroupMember','jocks')>>
 					<<if $npcs.get('A14','rel') >= 50>>
 						<p>You approach Katja and have a lively conversation where you exchange funny stories about Vanya. "And that's how my sister fell in love with the biggest clown in school!" she laughs with a snort.</p>
 						<p>"And I wouldn't change him for the world!" Vicky adds with a smile.</p>
@@ -748,7 +748,7 @@
 					<<else>>
 						With Katja being a quiet girl, she doesn''t do much talking, but she seems to enjoy some lighthearted banter with you, so long as you're doing most of the talking. You get the feeling that if you were closer, she''d open up more, but for now you'll have to settle with this.
 					<</if>>
-				<<elseif getvar("$grupTipe") == 3>>
+				<<elseif $q.school.func('isGroupMember','nerds')>>
 					<<if $npcs.get('A14','rel') >= 50>>
 						<p>Katja smiles as you approach and you have a lively conversation about your favorite subjects and her plans for going to university after school. "I want to become a teacher. Helping others achieve their potential just sounds like the perfect job!" she gleefully states.</p>
 					<<elseif $npcs.get('A14','rel') <= 20>>
@@ -756,7 +756,7 @@
 					<<else>>
 						Although Katja is happy to see you, she doesn''t do much talking. You get the feeling that she''d open up more if you were closer, but for now you'll have to settle with this.
 					<</if>>
-				<<elseif getvar("$grupTipe") == 4>>
+				<<elseif $q.school.func('isGroupMember','gopniks')>>
 					<<if $npcs.get('A14','rel') >= 50>>
 						Katja takes a surprising interest in what you and your fellow gopniks get up to outside of school and listens carefully when you answer her numerous questions.
 					<<elseif $npcs.get('A14','rel') <= 20>>
@@ -939,7 +939,7 @@
 			<p>"Oh, it's you again." Bella sighs. "Shoo, slut!" she gestures you to leave.</p>
 			"Snob..." you murmur as you walk away.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A22','rel') >= 60>>
 			<p>"Come here, you won't believe what happened!" Bella says while waving you over.</p>
 			<p>"What? Tell me!" you reply, intrigued.</p>
@@ -961,7 +961,7 @@
 			"Okay, no hurry." she assures you.
 		<</if>>
 		func('npc_reactions', 'general', 'A22')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A22','rel') >= 70>>
 			<p>You see Bella waving at you to get your attention. "Hey $pc.name_nick, can I take a quick look at your notes for the next class, thanks." She takes your notebook before you can even answer.</p>
 			<p>"Hello to you too. Of course, what are friends for?" you reply.</p>
@@ -983,7 +983,7 @@
 			<p>"Wait, how do you...?" You only get a sly wink as an answer.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A22')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A22','rel') >= 70>>
 			You brashly squeeze yourself between Bella and her friends, who all lighten up when you start sharing stories of the petty crimes and practical jokes the gopniks have been performing.
 			<p>"Psst $pc.name_nick, you're with them. Don't tell her we asked, but are the stories about Vitek's sister true?" Bella asks and the other girls start giggling.</p>
@@ -1172,7 +1172,7 @@
 		<<else>>
 			<p>"The current rumor is that you've sucked well over 100 dicks!" Lizaveta exclaims with a cruel laugh. "There's even a bet that you'll have sucked or fucked 1,000 dicks by the end of the year. Want to know if I'm betting against or for you?" she taunts before dismissing it as a joke, but you're not sure if she's telling the truth...</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		func('npc_reactions', 'general', 'A140')
 		<<if $npcs.get('A140','rel') >= 50>>
 			The perks of being a close friend of Liza go beyond just running in the same social circle. She tells you some gossip that no one else should know about.
@@ -1190,7 +1190,7 @@
 				<<gt 'gschool_coolkid_chats' 'lizaveta_latest_gossip'>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		func('npc_reactions', 'general', 'A140')
 		<<if $npcs.get('A140','rel') >= 50>>
 			You would think that being close friends with Lizaveta would mean getting some exclusive gossip from her, but she keeps her lips sealed. "I know everyone likes to say I can't keep my mouth shut, but even I need to have some secrets of my own." she winks.
@@ -1207,7 +1207,7 @@
 				<<gt 'gschool_coolkid_chats' 'lizaveta_latest_gossip'>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		func('npc_reactions', 'general', 'A140')
 		<<if $npcs.get('A140','rel') >= 50>>
 			When you sit on the floor next to Lizaveta, she smiles at you and the two of you are soon talking about a variety of subjects. However, she can't help herself and soon starts asking you all sorts of questions about your fellow nerds. You can barely even get a word in edge wise as she pumps you for gossip. You can't help yourself and start letting some stuff slip as the two of you talk.
@@ -1219,7 +1219,7 @@
 		<<else>>
 			When you sit on the floor next to Lizaveta, she starts asking you all sorts of questions about your fellow nerds. You can barely get a word in edge wise as she pumps you for gossip. You just can't help yourself and start letting some stuff slip as the two of you talk.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		func('npc_reactions', 'general', 'A140')
 		<<if $npcs.get('A140','rel') >= 50>>
 			When you sit on the floor next to Lizaveta, she smiles at you and the two of you are soon talking about a variety of subjects. However, she can't help herself and starts asking you all sorts of questions about your fellow gopniks. You can barely even get a word in edge wise as she pumps you for gossip. You can't help yourself and start letting some stuff slip as the two of you talk.
@@ -1335,7 +1335,7 @@
 		<<else>>
 			<p>You walk up to Marcus and try to talk to him. He mostly ignores you, with only the occasional "uh-huh" for an answer. You notice the others giving you disgusted looks and he finally speaks up. "Look, I don't mean to be rude, but we're not friends and I don't want to talk to you." You sigh and nod before walking away.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		func('npc_reactions', 'general', 'A146')
 		<<if $npcs.get('A146','rel') >= 50>>
 			<p>Talking with Marcus is always fun. He always knows how to make you laugh with the stories he tells. "You should have seen his face!" He lets out a deep laugh. "We walk by the bathroom on the way to his room and BAM! There's his mom, butt naked, and we see it all! You ever seen someone change colors? Poor guy was as pink as... as his mom's nipples now that I think about it!"</p>
@@ -1345,7 +1345,7 @@
 		<<else>>
 			You walk up to Marcus and he gives you a small smile as you start talking to him. He responds and talks back, sharing a few stories of his time in America or when he first arrived here in Russia, but he spends just as much time talking to Andrey as he does you.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A146','rel') >= 50>>
 			You walk up to Marcus and he gives you a big smile as you start talking to him. The conversation quickly turns to sports, mostly sports in America. It seems he was a jock back home and loves watching and playing sports. He seems to really miss American football, his favorite sport to play, but is happy there is basketball here, his second favorite sport. He talks about his games back home, but also asks about how you are doing in sports yourself.
 		<<elseif $npcs.get('A146','rel') <= 20>>
@@ -1354,7 +1354,7 @@
 			You walk up to Marcus and he gives you a smile as you start talking to him. The conversation quickly turns to sports, mostly sports in America. It seems he was a jock back home and loves watching and playing sports. He seems to really miss American football, his favorite sport to play, but is happy there is basketball here, his second favorite sport. He talks about the games he played back home.
 		<</if>>
 		func('npc_reactions', 'general', 'A146')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A146','rel') >= 50>>
 			You walk up to Marcus and he gives you a smile as you start talking to him. You enjoy hearing the stories Marcus tells about his life in America, though he often talks about the differences between nerds here and there. He explains how nerds back home are less about grades and more about what school club you belonged to.
 			You spend the rest of break asking more questions about his home life and he's happy to tell you all about it.
@@ -1365,7 +1365,7 @@
 			You spend the rest of break asking more questions about his home life and he's happy to tell you all about it.
 		<</if>>
 		func('npc_reactions', 'general', 'A146')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A146','rel') >= 50>>
 			You walk up to Marcus and he gives you a smile as you start talking to him. You enjoy hearing the stories Marcus tells about his life in America. "You guys seem a lot more fun than I expected. I'm still trying to wrap my head around what a gopnik is. I know a lot of you are called that, but there are some big differences." You explain some of the differences between the collective term and what a real gopnik is, which just leads to him once again wondering why you all hang out together.
 		<<elseif $npcs.get('A146','rel') <= 20>>
@@ -1411,7 +1411,7 @@
 		<<else>>
 			<p>Andrey glances your way for a second before focusing back on looking through his locker, completely uninterested in you. "Shouldn't you be in the bathroom with the gopniks sucking them all off?" he remarks before turning away and ignoring you until you leave.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		func('npc_reactions', 'general', 'A147')
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Do you think Stasya will ever get over this whole... jealousy thing she has for Marcus?" Andrey confides in you with a look of exhaustion.</p>
@@ -1424,7 +1424,7 @@
 			<p>"Oh yeah?" You can't help but smile when you see the good mood he's in. "Did something happen recently?"</p>
 			<p>"No, it's just that hanging around him has made me more popular than ever! I mean, I was already pretty popular but this... Being his friend sure has its perks!"</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Hey, Andrey! How's it been?" you ask with a small smile.</p>
 			Andrey just shrugs. "Oh you know, Stasya and my parents still complain about Marcus, so the usual," he teases halfheartedly.
@@ -1437,7 +1437,7 @@
 			<p>"No, it's just that hanging around him, he is way more into sports than I am. But he got me into working out and jogging and you know what? I feel great." He goes on talking about the positive changes in his life since Marcus moved in.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A147')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Hey, Andrey! How's it been?" you ask with a small smile.</p>
 			<p>He gives you a slightly confused stare as to why you're talking to him. "Are you lost or something, nerd?"</p>
@@ -1452,7 +1452,7 @@
 			He gives you a slightly confused look as to why you're talking to him. "If I wanted to talk to you, I would come find you. Go away." He proceeds to ignore you and you can feel everyone else staring at you. Afraid someone might start picking on you, you quickly leave.
 		<</if>>
 		func('npc_reactions', 'general', 'A147')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Hey, Andrey! How's it been?" you ask with a small smile.</p>
 			<p>He gives you a smirk. "Come to see what it's like to be, well...liked? Or did you just get too drunk and get lost?"</p>
@@ -1495,7 +1495,7 @@
 			<p>"Some? More like all of them." You both laugh as he gives you a big and over dramatic hug.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A148')
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A148','rel') >= 50>>
 			<p>Hey $pc.name_nick, how's it going?</p>
 			You know there''s a hug coming regardless, so you make the first move and snuggle up to him.
@@ -1515,7 +1515,7 @@
 			You don't have much choice but to hug this soppy guy, but it does raise your mood.
 		<</if>>
 		func('npc_reactions', 'general', 'A148')
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A148','rel') >= 50>>
 			<p>"If it isn't my favourite jock, what's up?"</p>
 			"I'm good, plenty of training to be done. Got to keep up with the opposition."
@@ -1534,7 +1534,7 @@
 			You push him off you. "Yeah yeah, very funny."
 		<</if>>
 		func('npc_reactions', 'general', 'A148')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A148','rel') >= 50>>
 			<p>"Hi there brainiac, how's it going?"</p>
 			<p>"Work to do and grades to get, something you should be doing!" you say while poking him in the chest.</p>
@@ -1549,7 +1549,7 @@
 			"That's a good plan, just don't over do it."
 		<</if>>
 		func('npc_reactions', 'general', 'A148')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A148','rel') >= 50>>
 			<p>"Hey $pc.name_nick, still hanging around with those a-holes? You can do better than them."</p>
 			You flip him the bird and he laughs and gives you a hug.
@@ -1595,7 +1595,7 @@
 			<p>"Well, well, well, look who's taken a break from sucking cocks!" Vicky announces with a grin. She gives your ass a quick slap and you let out a surprised squeak.</p>
 			<p>"Oh don't act so innocent! We all know you've had that ass broken in plenty of times. Or maybe you're just sore from your last go?"</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A15','rel') >= 50>>
 			<p>As soon as Vicky sees you, she pulls you into a tight hug. "$pc.name_nick, my third favorite person!"</p>
 			<p>"Wait, third? I get Katja being second, but who's first?!" You pretend to be outraged and she plays along.</p>
@@ -1610,7 +1610,7 @@
 			"Bald. You will definitely be bald after a week of dying your hair..." You and Vicky then spend the rest of break joking back and forth.
 		<</if>>
 		func('npc_reactions', 'general', 'A15')
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A15','rel') >= 50>>
 			<p>"Hey $pc.name_nick, I'm working on a new flip for cheerleading and I could use a spotter."</p>
 			She finds an open space and you keep your hands under her back, as she casually does a slow backwards cartwheel. She repeats it a few times and gains the attention of most of the boys in the hallway and even some of the girls too, who shout out encouragements and some taking out their phones to take pictures of her. She thanks you for the help and spends a few minutes just chatting until the end of the break.
@@ -1621,7 +1621,7 @@
 			Vicky spends some time talking to you until the end of the break.
 		<</if>>
 		func('npc_reactions', 'general', 'A15')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A15','rel') >= 60>>
 			<p>"Hey $pc.name_nick, can you help me with this Math assignment? It really has me stumped," she says, showing you a page of her homework. You glace over it and point out a few simple mistakes she had made that were messing up her equations. She thanks you for the help and then spends the rest of the time during break talking to you about other things.</p>
 		<<elseif $npcs.get('A15','rel') <= 20>>
@@ -1632,7 +1632,7 @@
 			<p>It can be hard to follow Vicky as she keeps up a lively conversation, jumping from one topic to another; but you don't really mind and find her upbeat attitude intoxicating.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A15')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A15','rel') >= 60>>
 			<p>"Hey $pc.name_nick, can I ask you a favor? Could you keep an eye on my sister for me? I heard some guys are taking their interest in her too far. I'd like her to open up a bit, but not in the way they have in mind, if you know what I mean."</p>
 			She tells you a bit more about she's seen, then spends the rest of the break talking to you about random interests.
@@ -1720,7 +1720,7 @@
 	<<if $pc.fame('pav_slut') > 200>>
 		<<gs 'npc_relationship' 'modify' 'A139' 'dislike'>>
 		<p>Before you can even say a word, Stasya glares at you. "You better stay the fuck away from Andrey or you'll end up with some extra holes you can stuff with more cocks!" You're slammed into the lockers as she shoves past you.</p>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			When Stasya sees you, she pulls you into a quick hug. "Glad you showed up, I was starting to get bored... and desperate." she tells you with a dramatic sigh.
 			<p>"Desperate enough to hang out with Irina for the rest of the break?" you joke with a cheeky smile.</p>
@@ -1731,7 +1731,7 @@
 			<p>You spend some time conversing with Stasya until she holds out her hand to stop you from talking. "I don't mean to cut you off, but I need to get see Andrey before break ends." She gives you a half-assed apologetic smile before walking off in search of her elusive boyfriend.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A139')
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			As you walk up, Stasya gives her reflection in the little mirror hanging inside her locker one last look and asks Bella what she thinks of her lipstick.
 			Bella compliments her looks and tells her Andrey will lose it when he sees, which seems to make Stasya very happy.
@@ -1741,7 +1741,7 @@
 		<<else>>
 			<p>You spend some time conversing with Stasya until she holds out her hand to stop you from talking. "I don't mean to cut you off, but I need to get see Andrey before break ends." She gives you a half-assed apologetic smile before walking off in search of her elusive boyfriend.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			<p>She stares at you approaching. "Are you lost or something?" Bella and Irina giggle at her remark and she turns and ignores you, talking with Bella and Irina instead, who also ignore you. They sometimes respond to your comments or questions, mostly acting like how adults act when small children try to take part in adult conversations.</p>
 		<<elseif $npcs.get('A139','rel') <= 20>>
@@ -1750,7 +1750,7 @@
 			<p>She stares at you approaching. "What do you want? Never mind I don't want to know." She turns and ignores you, talking with Bella and Irina instead, who also ignore you. At least they don't chase you off.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A139')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			<p>She looks you over from head to toe before she scoffs. "What?"</p>
 			You smile at her. "I just wanted to talk."
@@ -1840,7 +1840,7 @@
 		<<else>>
 			<p>"I would rather have Petia stare at my tits until he creams himself than to talk to you, slut!" she hisses with disgust.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A17','rel') >= 60>>
 			<p>"God, look at that Natasha girl. She's so pathetic, right? She's so obsessed with us!" Irina narrates while giving her a fake smile as Natasha passes on her way to hang out with her fellow nerds. Once she's no longer looking, Irina rolls her eyes and the two of you chat for a while about a variety of topics.</p>
 		<<elseif $npcs.get('A17','rel') <= 20>>
@@ -1854,7 +1854,7 @@
 			<p>"What did she say?" you ask.</p>
 			"Oh I wouldn''t dare repeat the things she said. It would just leave a bad taste in my mouth." Irina shakes her head in disappointment, but you notice the hint of a smirk on her lips. "Jealousy is such an ugly look..." The two of you continue gossiping until the bell rings.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A17','rel') >= 70>>
 			"Back when we were kids, Bella tried to ride a cow," Irina giggles.
 			<p>"What, like a real life cow? How'd that go?" you ask curiously.</p>
@@ -1868,7 +1868,7 @@
 			You try to make small talk with Irina, and to your surprise, she doesn''t instantly turn you away. Seeing as though she hasn''t said anything yet, you keep talking to her, even though she hasn''t said much of anything yet. Falling quiet, you hear the faint sound of music and realize she's being wearing earpods the whole time.
 			<p>With comical timing, Irina pulls them out when she finally notices you standing next to her. "What do you want?" she sneers.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A17','rel') >= 80>>
 			<p>"I need to get my nails done, but I won't have time with all this stupid homework!" Irina whines with a pout.</p>
 			"I'm sure Feofan or Petka would be more than happy to help you out," you gently remind her.
@@ -1885,7 +1885,7 @@
 			<p>"He was young and cute in the originals! You know, A New Hope, Empire Strikes Back?" you explain.</p>
 			"I don't watch old movies. They're... old," she shrugs.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A17','rel') >= 80>>
 			<p>"You know that, I think it was in 9th grade, we girls had Lavrenti over because we wanted to borrow his camera for new shots for our social media and when he arrived, Bella suggested we kill the lights and see which one of us would dare get naked in front of him as a thank you. Of course, we were joking, so when the light were switched back on none of us were naked, but he had the biggest boner I'd ever seen!" she giggles.</p>
 			"Wow, you girls really surprise me sometimes..." you reply with a hint of disappointment, hoping for something more juicy.
@@ -1991,7 +1991,7 @@
 			<p>"Hey Sonia!" you greet her with a smile.</p>
 			"Hey..." She glances around and you can see many of the others giving you dirty looks. She mostly ignores you, but does talk at times. At least she isn''t insulting you or chasing you off.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A25','rel') >= 50>>
 			<p>"Oh man!" Sonia groans and stretches. "I can't WAIT for this day to be over!"</p>
 			<p>"What's wrong?" you ask.</p>
@@ -2009,7 +2009,7 @@
 			<p>"I think it's time I got rid of some of these..." Sonia sighs as she stares longingly at the stack. "But I can't bear throwing any of them away!"</p>
 			You can't help but laugh and tease her a little. In the end, the two of you end up reading through the magazines rather than throwing them out.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A25','rel') >= 50>>
 			<p>"Oh man!" Sonia groans and stretches. "I can't WAIT for this day to be over!"</p>
 			<p>"What's wrong?" You ask her.</p>
@@ -2029,7 +2029,7 @@
 			<p>"I think it's time I got rid of some of these..." Sonia sighs as she stares longingly at the stack. "But I can't bear throwing any of them away!"</p>
 			You can't help but laugh and tease her a little. In the end, the two of you end up reading through the magazines rather than throwing them out.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A25','rel') >= 50>>
 			<p>"Hey Sonia!" you greet her with a smile and she gives you a friendly little wave.</p>
 			<p>"What's up neeeeerd?" she asks with a giggle and you tell her you just wanted to hang out for a bit. With Sonia being so friendly, you slip into an easygoing banter with her for the rest of break.</p>
@@ -2045,7 +2045,7 @@
 			<p>"What's up $pc.name_nick?" she asks and you tell her you just wanted to hang out for a bit. "Sure, I've got some time."</p>
 			With Sonia being so friendly, you slip into an easygoing banter with her for the rest of break.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A25','rel') >= 50>>
 			<p>"Hey Sonia!" you greet her with a smile and she gives you a friendly little wave.</p>
 			<p>"What's up? Mind if I ask you some questions?" she asks and you shrug, causing her to launch into a barrage of questions about partying with your fellow gopniks. She seems very interested in what you and the other gopniks do for fun and you end up talking for a while, mostly sharing some of your favorite stories.</p>

+ 3 - 3
sugarcube/src/activities/school/gschool_detention.tw

@@ -60,12 +60,12 @@
 	<<set $wedgie_counter = 0>>
 	<<warn 'JUMP MARKER ENCOUNTERED: :wedgie_girl'>>
 	<<gs 'gschool_events' 'rand_girl_arg' 1 1 0 1 1 0>>
-	<<if getvar("$grupTipe") == 4 and getvar("$wedgie_counter") < 1000>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$wedgie_counter") < 1000>>
 		<<if $rand_girl != 'Pauline' and $rand_girl != 'Lena' and $rand_girl != 'Lera' and $rand_girl != 'Alyona'>>
 			<<setn $wedgie_counter += 1>>
 
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2 and getvar("$wedgie_counter") < 1000>>
+	<<elseif $q.school.func('isGroupMember','jocks') and getvar("$wedgie_counter") < 1000>>
 		<<if $rand_girl != 'Pauline' and $rand_girl != 'Lena' and $rand_girl != 'Lera' and $rand_girl != 'Alyona' and $rand_girl != '<<npc 'A18'>><</npc>>'>>
 			<<setn $wedgie_counter += 1>>
 
@@ -163,7 +163,7 @@
 <</if>>
 <<if $location_var[$here][0] == 'return_favor'>>
 	<<if $location_var[$here][1] == 'random' or $location_var[$here][1] == ''>>
-		<<if getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks')>>
 			<<actCLA 'Return the favor'>>
 				<<run $q.school.func('groupRelInc','gopniks',1)>>
 				<<run $npcs.inc('A#','rel',1)>>

+ 12 - 12
sugarcube/src/activities/school/gschool_events1.tw

@@ -422,7 +422,7 @@
 <</if>>
 <<if $location_var[$here][0] == 'rand_gopnic1'>>
 	<<set $menu_off = 1>>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<<image "characters/shared/headshots_main/big10.jpg">>
 		<p>You step away from Dan, pulling out of his reach as you turn around. You point your finger at him. "Don't make me hurt you! You know I will."</p>
 		<p>He laughs and steps up closer, crowding you a little, but keeps his hands to himself. "Come on, $pc.name_nick. You know you want to have some fun, so stop acting like you're not all hot and bothered by this. We can help you with that itch."</p>
@@ -555,7 +555,7 @@
 		<</actCLA>>
 	<<else>>
 		<<image "characters/shared/headshots_main/big10.jpg">>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>You look at Dan with contempt. "What the fuck, pervert?" He's not impressed in the slightest by your attitude.</p>
 			<<actCLA 'Continue'>>
 				<<set $pc.mood -= 20>>
@@ -755,7 +755,7 @@
 <</if>>
 <<if $location_var[$here][0] == 'rand_gopnic2'>>
 	<<set $menu_off = 1>>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<<image "characters/shared/headshots_main/big156.jpg">>
 		<p>You step away from Arkadi, pulling out of his reach as you turn around. You point your finger at him. "Don't make me hurt you! You know I will."</p>
 		<p>He laughs and steps up closer again, crowding you a little, but keeps his hands to himself. "Come on, $pc.name_nick. You know you want to have some fun, so stop acting like you're not all hot and bothered by this. We can help you with that itch."</p>
@@ -888,7 +888,7 @@
 		<</actCLA>>
 	<<else>>
 		<<image "characters/shared/headshots_main/big156.jpg">>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>You look at Arkadi with contempt. "What the fuck, pervert?" He's not impressed in the slightest by your attitude.</p>
 			<<actCLA 'Wait to see what they do'>>
 				<<set $pc.mood -= 20>>
@@ -1181,13 +1181,13 @@
 		<<else>>
 			<<set $Sweet_talk = -20>>
 		<</if>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<set $Sweet_talk += 10>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<set $Sweet_talk += 5>>
-		<<elseif getvar("$grupTipe") == 3>>
+		<<elseif $q.school.func('isGroupMember','nerds')>>
 			<<set $Sweet_talk += 20>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<<set $Sweet_talk -= 10>>
 		<</if>>
 		<<if $pc.skillLevel("charisma") < 20>>
@@ -1223,13 +1223,13 @@
 			<<set $Sweet_talk = 20>>
 		<</if>>
 		<!-- !!I tweaked the stats, I think it was backwards before with the nerds have a -40 which would have made sex more likely not less likely. I think now it is correct nerds less likely to get sex and the others more likely to get sex-->
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<set $Sweet_talk -= 10>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<set $Sweet_talk -= 10>>
-		<<elseif getvar("$grupTipe") == 3>>
+		<<elseif $q.school.func('isGroupMember','nerds')>>
 			<<set $Sweet_talk += 40>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<<set $Sweet_talk -= 20>>
 		<</if>>
 		<<if $pc.skillLevel("charisma") < 20>>

+ 2 - 2
sugarcube/src/activities/school/gschool_girls_bathroom.tw

@@ -328,7 +328,7 @@
 			<</actCLA>>
 		<</actCLA>>
 	<</if>>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<<actCLA 'Maybe later'>>
 			<<run $npcs.inc('A20','rel',5)>>
 			<<run $npcs.inc('A21','rel',5)>>
@@ -346,7 +346,7 @@
 			<</actCLA>>
 		<</actCLA>>
 	<</if>>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<<actCLA 'Fuck off'>>
 			<h2>Girls bathroom</h2>
 			<<image "system/image_needed.png">>

+ 54 - 54
sugarcube/src/activities/school/gschool_gopnik_chats.tw

@@ -58,7 +58,7 @@
 			<p>He laughs. "Who knew your mouth was good for anything other than sucking cock?" You put up with the comments and end up talking to him, managing to get him to talk a little but not much.</p>
 			func('npc_reactions', 'general', 'A9')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A9','rel') >= 70>>
 			<p>You sit on the stairs near Vitek and listen to him, Dan and Vasily telling stories. As you listen, Vitek starts talking about a dream he had about Bella, a sex dream of course. "Of course, just as I was getting to the best part, Lena wakes me up by slapping my dick. The fucking bitch laughed about it! Now that's a fucked up way to be woken up." The guys chuckle at his story.</p>
 			<p>"You think I'd have a shot with Bella? I saw her tight ass in gym class and damn, would I love to plow that. Would a BMW impress her?" He's brainstorming on how to get into the panties of the most beautiful girl in school.</p>
@@ -72,7 +72,7 @@
 			"I just wanted to say hi and talk is all," you reply.
 			He shrugs. "Whatever." He then goes back to telling stories and you ask him a few questions about some of his more exciting adventures. He only answers a few, but doesn''t completely ignore you.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A9','rel') >= 60>>
 			<p>You sit on the stairs near Vitek and listen to him, Dan and Vasily telling stories. "What do you want, $pc.name_nick?" Vitek asks when they notice you.</p>
 			"I just wanted to say hi and talk is all," you reply.
@@ -89,7 +89,7 @@
 			You just shake your head and listen to the guys talk about the girls they have banged or want to bang.
 			func('npc_reactions', 'general', 'A9')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A9','rel') >= 70>>
 			<p>You sit on the stairs near Vitek and listen to him, Dan and Vasily telling stories. "Hey, you're friends with Zinaida, right?" Vitek asks when they notice you.</p>
 			<p>"Yeah, why? Want her to help you with your studies or something?" you reply.</p>
@@ -103,7 +103,7 @@
 			<p>"Girls like me?" you reply.</p>
 			"You know... Whatever, just keep quiet." He lights his cigarette and returns to chatting with the boys.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A9','rel') >= 50>>
 			You sit on the stairs near Vitek and listen to him, Dan and Vasily telling stories. After a few questions, he starts telling you about some of his more exciting adventures and you're soon both laughing about them and telling them stories of your own.
 			func('npc_reactions', 'general', 'A9')
@@ -137,14 +137,14 @@
 	<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 	<<gs 'npc_relationship' 'modify' 'A154' 'like'>>
 	<<image "characters/shared/headshots_main/big154.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		"Well well well, if it isn''t my favorite groupie slut." Radomir says as you approach.
 		You smile and put up with the comments, knowing this is now your place among the gopniks. He tells you that you should stop by practice some time, saying the boys could use some "stress release", which leads to him talking about the band and where they will be playing.
 		func('npc_reactions', 'general', 'A154')
 	<<elseif $pc.fame('pav_slut') > 250>>
 		<<gs 'npc_relationship' 'modify' 'A154' 'dislike'>>
 		<p>As you start to say something to him, he interrupts you. "Get lost, slut! I can't be seen with the likes of you! I have a reputation to uphold!"</p>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A154','rel') >= 50>>
 			<<if $pc.hotcat >= 6>>
 				<p>Radomir is talking about the band's latest gig as you approach. He gives you a wink when he sees you. "What's up hot stuff?" You ask him how things are going for the band and he starts telling you about all the girls throwing their panties on stage. Asking him a few questions leads to the two of you talking about where the band's going and the success it will have.</p>
@@ -171,7 +171,7 @@
 				func('npc_reactions', 'general', 'A154')
 			<</if>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A154','rel') >= 50>>
 			<<if $pc.hotcat >= 6>>
 				Radomir is talking about the band''s latest gig as you approach. He notices you and gives you a wink as he looks your body up and down. "Nice to see all the working out is paying off. Looking good." You ask him how things are going for the band and he starts telling you about all the girls throwing their panties on stage. Asking him a few questions leads to the two of you talking about where the band''s going and the success it will have.
@@ -198,7 +198,7 @@
 				func('npc_reactions', 'general', 'A154')
 			<</if>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A154','rel') >= 50>>
 			<<if $pc.hotcat >= 6>>
 				Radomir is talking about the band''s latest gig as you approach. He gives you a wink when he sees you. "You know if you just dressed a little more sexy and showed off that hot little bod of yours more, you would be pretty good looking for a nerd." You ask him how things are going for the band and he starts telling you about all the girls throwing their panties on stage. Asking him a few questions leads to the two of you talking about where the band''s going and the success it will have.
@@ -225,7 +225,7 @@
 				func('npc_reactions', 'general', 'A154')
 			<</if>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A154','rel') >= 50>>
 			<<if $pc.hotcat >= 6>>
 				<p>Radomir is talking about the band's latest gig as you approach. He gives you a wink when he sees you. "Damn, you make even a school uniform look sexy as hell!" You ask him how things are going for the band and he starts telling you about all the girls throwing their panties on stage. Asking him a few questions leads to the two of you talking about where the band's going and the success it will have.</p>
@@ -269,7 +269,7 @@
 	<<elseif $pc.fame('pav_slut') > 250>>
 		<<gs 'npc_relationship' 'modify' 'A157' 'dislike'>>
 		As you approach Roman, he snarls at you. "If you so much as open your cum breath mouth at me, I'll toss you down these stairs." Not wishing to push your luck, you walk away.
-	<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		<<gs 'npc_relationship' 'modify' 'A157' `rand(0,1)`>>
 		<<if $npcs.get('A157','rel') >= 80>>
 			<p>"Well, what do you want?" Roman asks as you approach.</p>
@@ -285,7 +285,7 @@
 			<p>"Yeah, what about?" You banter with him for a while about a variety of things. He's rude and often insulting, but at least he doesn't threaten you.</p>
 		<</if>>
 		func('npc_reactions', 'general', 'A159')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<gs 'npc_relationship' 'modify' 'A157' `rand(0,1)`>>
 		<<if $npcs.get('A157','rel') >= 80>>
 			<p>"Well, what do you want?" Roman asks as you approach.</p>
@@ -301,7 +301,7 @@
 			"Whatever." You banter with him for a while about a variety of things. He spends most of his time making fun of you and you get the feeling that, regardless of what he thinks of you, he's going to pick on any nerd.
 		<</if>>
 		func('npc_reactions', 'general', 'A159')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<gs 'npc_relationship' 'modify' 'A157' 'like'>>
 		<<if $npcs.get('A157','rel') >= 50>>
 			"So listen to this, I was arguing with this old hag yesterday. She wouldn''t let go that I was swearing." Roman is telling one of his crazy stories to the group again.
@@ -330,13 +330,13 @@
 	
 	<<gs 'npc_relationship' 'modify' 'A10' 'like'>>
 	<<image "characters/shared/headshots_main/big10.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>"You lost or just looking for a cock to suck?" Dan asks as you approach.</p>
 		"I just wanted to say hi and talk is all," you reply.
 		"I bet that's rare. Not having your mouth full long enough to talk." You banter with him for a while. He rips on you a lot, but at least he talks to you.
 		func('npc_reactions', 'general', 'A10')
 	<<elseif $npcs.get('A10','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>"Hey Dan!" you greet him.</p>
 			<p>"What's up, $pc.name_nick?" he replies and the two of you engage in a friendly conversation.</p>
 		<<else>>
@@ -346,7 +346,7 @@
 		<</if>>
 		func('npc_reactions', 'general', 'A10')
 	<<elseif $npcs.get('A10','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>"Hey Dan!" you greet him.</p>
 			<p>He narrows his eyes at you. "What do you want?"</p>
 			"I just wanted to talk is all," you reply.
@@ -378,7 +378,7 @@
 	<<actCLA 'Time for the next class'>>
 		<<gt 'gschool_lessons' 'short_break'>>
 	<</actCLA>>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>He smiles as you approach. "What's up, $pc.name_nick?"</p>
 		You smile back. "Nothing much, just wanted to hang out and talk."
 		The two of you talk about a few things. He gets a little hands on with you at times, but you're used to it. As you're about to leave, he stops you. "Stop by the garage some time. I can always use a break and a quick fuck."
@@ -400,7 +400,7 @@
 			"I just wanted to talk is all," you reply.
 			<p>"Yeah? Well, I don't want to talk to you." Seeing the look he and the others are giving you, you decide to leave before something happens.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A158','rel') >= 50>>
 			<p>Valentin calls out to you as you approach. "Hey $pc.name_nick, coming over to slum it with us or did you realize you miss good music and some good fun?"</p>
 			<p>You smile and shake your head. "Not exactly. I just want to hang out a bit and say hi, you know?"</p>
@@ -425,7 +425,7 @@
 			He shrugs and you start talking to him. You wouldn''t say he's eager to talk to you, but he doesn''t seem to mind either.
 		<</if>>
 		func('npc_reactions', 'general', 'A158')
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A158','rel') >= 50>>
 			<p>Valentin calls out to you as you approach. "Hey $pc.name_nick."</p>
 			You smile as you reply. "You know, I've been busy lately, so I haven''t really been around here."
@@ -450,7 +450,7 @@
 			He shrugs and you start talking to him. You wouldn''t say he's eager to talk to you, but he doesn''t seem to mind either.
 		<</if>>
 		func('npc_reactions', 'general', 'A158')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A158','rel') >= 60>>
 			<p>Valentin calls out to you as you approach. "Hey $pc.name_nick, get lost? Or just wanting to take a peek at the wild side?"</p>
 			You smile as you reply. "No, nothing like that. I just wanted to say hi and see what you've been up to of late."
@@ -475,7 +475,7 @@
 			He shrugs and you start talking to him. You wouldn''t say he's eager to talk to you, but he doesn''t seem to mind either. After a few minutes, you break off the conversation and bid him farewell as the looks some of the other gopniks are giving you make you nervous.
 		<</if>>
 		func('npc_reactions', 'general', 'A158')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A158','rel') >= 50>>
 			<p>Valentin calls out to you as you approach. "Hey $pc.name_nick, do anything fun lately?"</p>
 			You smile as you reply. "You know, this and that, causing a bit of mayhem when I can."
@@ -521,12 +521,12 @@
 	
 	<<gs 'npc_relationship' 'modify' 'A11' 'like'>>
 	<<image "characters/shared/headshots_main/big11.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>"I'm surprised you don't walk bow legged the number of times you've been fucked, $pc.name_nick!" Vasily says with a laugh.</p>
 		You flip him the bird as you sit next to him. The two of you talk about a variety of things, although he keeps asking about who you've fucked or whose dick you just finished sucking.
 		func('npc_reactions', 'general', 'A11')
 	<<elseif $npcs.get('A11','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>Vasily calls out to you as you approach. "Hey $pc.name_nick, what's up?"</p>
 			You smile at him. "Not much. I thought I''d just come by and hang out with you."
 			The two of you engage in a friendly conversation about what''s been going on.
@@ -537,7 +537,7 @@
 		<</if>>
 		func('npc_reactions', 'general', 'A11')
 	<<elseif $npcs.get('A11','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>"Hey Vasily!" you greet him as you approach.</p>
 			<p>He frowns at you. "What do you want, $pc.name_nick?"</p>
 			"I just wanted to talk is all," you reply.
@@ -565,7 +565,7 @@
 	<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 	<<gs 'npc_relationship' 'modify' 'A156' 'like'>>
 	<<image "characters/shared/headshots_main/big156.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>As you approach, he cups his crotch and bounces it. "Yeah, you want this, don't you? Well, I don't have time to give it to you right now."</p>
 		"I just wanted to talk is all," you reply.
 		He snorts, but doesn''t refute what you say as you talk to him.
@@ -579,7 +579,7 @@
 		<<else>>
 			<p>"Get lost you disgusting whore!" he says before you even make it to him.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A156','rel') >= 70>>
 			You approach Arkadi. "Hey, I thought I''d just come by and hang out with you for a bit."
 			<p>He scoots over and makes room for you on the step he's sitting on. "That so princess? You want to hear what the world is like from a real man, huh?"</p>
@@ -595,7 +595,7 @@
 			You ignore his stares. You know he loves the city, so you ask him questions about it and soon you're both chatting away.
 			func('npc_reactions', 'general', 'A156')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A156','rel') >= 60>>
 			You approach Arkadi. "Hey, I thought I''d just come by and hang out with you for a bit."
 			<p>He scoots over and makes room for you on the step he's sitting on. "Oh yeah? What about?"</p>
@@ -610,7 +610,7 @@
 			You ignore his stares. You know he loves the city, so you ask him questions about it and soon you're both chatting away.
 		<</if>>
 		func('npc_reactions', 'general', 'A156')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A156','rel') >= 80>>
 			You approach Arkadi. "Hey, I thought I''d just come by and hang out with you for a bit."
 			<p>He snorts. "Why do you think I would hang out with a nerd like you?"</p>
@@ -623,7 +623,7 @@
 			You approach Arkadi. "Hey, I thought I''d just come by and hang out with you for a bit."
 			<p>He snorts. "Why do you think I would hang out with a nerd like you?" Before you can respond, he continues. "Why don't you go back to your fellow nerds and prance around pretending to be elves or some shit?" He laughs at you and several of the others join in. Everyone is soon making fun of you, so you turn around and flee.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A156','rel') >= 50>>
 			You approach Arkadi. "Hey, I thought I''d just come by and hang out with you for a bit."
 			<p>He scoots over and makes room for you on the step he's sitting on. "Sure, what do you want to talk about?"</p>
@@ -658,7 +658,7 @@
 	
 	<<gs 'npc_relationship' 'modify' 'A155' 'like'>>
 	<<image "characters/shared/headshots_main/big155.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>You approach Lavrenti as he leans against the wall near the stairs. "So, what's up with you Lavrenti?"</p>
 		Lavrenti slightly smiles at you while barely looking up from his phone. "Not much. I was just texting some girl I met recently."
 		<p>You're not surprised by his answer. He was always a good looking guy and now he has that bad boy vibe going for him as well. "Oh, you like her?"</p>
@@ -692,7 +692,7 @@
 			<p>He looks back down at his phone and keeps texting. "Then fuck off!"</p>
 			You try talking to him, but he just ignores you. As soon as the bell rings, he walks away without a word.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A155','rel') >= 50>>
 			<p>You approach Lavrenti as he leans against the wall near the stairs. "So, what's up with you Lavrenti?"</p>
 			Lavrenti smiles at you while barely looking up from his phone. "Not much. I was just texting some girl I met recently."
@@ -722,7 +722,7 @@
 			He snorts, then tells you about what some of the gopniks get up to, which seems to mostly involve partying, fighting, fucking, getting drunk or high and vandalizing stuff for fun.
 			func('npc_reactions', 'general', 'A155')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A155','rel') >= 50>>
 			<p>You approach Lavrenti as he leans against the wall near the stairs. "So, what's up with you Lavrenti?"</p>
 			Lavrenti smiles at you. "Not a lot. I was just texting some girl I met."
@@ -745,7 +745,7 @@
 			He snorts, then tells you about what some of the gopniks get up to, which seems to mostly involve partying, fighting, fucking, getting drunk or high and vandalizing stuff for fun.
 			func('npc_reactions', 'general', 'A155')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A155','rel') >= 50>>
 			<p>You approach Lavrenti as he leans against the wall near the stairs. "So, what's up with you Lavrenti?"</p>
 			Lavrenti grins at you and throws his arm around your shoulder in a friendly way. "Not much. I was just texting some girl I met recently."
@@ -821,12 +821,12 @@
 	
 	<<gs 'npc_relationship' 'modify' 'A145' 'like'>>
 	<<image "characters/shared/headshots_main/big145.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>As you approach her, you see her nursing some bruised knuckles. "Get in a fight?"</p>
 		She gives you a look of disgust. "Not really. Some of the girls and I got together last night for fight night. Something you wouldn''t understand."
 		You ask her a few questions about it and she answers you in as few words as possible before getting up and walking away from you. She obviously isn''t a fan of how you became a gopnik.
 	<<elseif $npcs.get('A145','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>As you approach her, you see her nursing some bruised knuckles. "Get in a fight?"</p>
 			She shakes her head. "Not really. Some of the girls and I got together last night for fight night."
 			She goes on to tell you about how some of the gopnik girls get together and fight each other to practice or just to kick the shit out of each other for fun. "You should come by sometime and go a few rounds."
@@ -838,7 +838,7 @@
 			func('npc_reactions', 'general', 'A145')
 		<</if>>
 	<<elseif $npcs.get('A145','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>As you approach her, you see her nursing some bruised knuckles. "Get in a fight?"</p>
 			<p>She glares at you. "What fucking business is it of yours?"</p>
 			You raise your hands to show you didn''t mean anything by it. "I was just asking is all."
@@ -865,14 +865,14 @@
 	
 	<<gs 'npc_relationship' 'modify' 'A21' 'like'>>
 	<<image "characters/shared/headshots_main/big21.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<p>As usual, you find Lera and Lena smoking on the stairs. "So, hopped on any cocks today bunny?" Lera inquires.</p>
 		<p>You sigh. "No, have you licked any pussy?"</p>
 		<p>"No, but you just might if you don't watch your mouth!" Lera replies as she spreads her legs.</p>
 		You both engage in a bit of back and forth banter for the rest of the break.
 		func('npc_reactions', 'general', 'A21')
 	<<elseif $npcs.get('A21','rel') >= 50>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>As usual, you find Lera and Lena smoking on the stairs. "What's up $pc.name_nick?" Lera inquires.</p>
 			<p>You shrug your shoulders. "Nothing much. You?"</p>
 			"Nah." Lera says as she shakes her head.
@@ -885,7 +885,7 @@
 			The two of you continue talking for a while until Lena shows up and calls Lera over, ending your conversation.
 		<</if>>
 	<<elseif $npcs.get('A21','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>As usual, you find Lera and Lena smoking on the stairs. "Hi Lera! What are you up to?"</p>
 			She looks back at you and frowns. "None of your fucking business."
 			You continue talking to her, but it's mostly one sided as she alternates between ignoring you and making snide remarks.
@@ -934,7 +934,7 @@
 			func('npc_reactions', 'general', 'A143')
 			Before the break is over, she takes back the earbud and stands up. "Okay, I've got some things to do. See you next time." With that, she leaves.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A143','rel') >= 50>>
 			<p>"Hi $pc.name_nick, what's up?" Alyona greets you as you make your way up the stairs.</p>
 			<p>"Hey Alyona. How's my favourite troublemaker?" you ask, giggling as you lean against the wall. "I know very well you have a story to tell. If you can't find any trouble, you're always happy to kick up a riot by yourself!" you add jokingly.</p>
@@ -959,7 +959,7 @@
 			<p>For the next few minutes, you tell her what you wanted her opinion on. However, she gets tired of listening and stands up. "Okay $pc.name_nick, you could have asked someone else, actually. I'm going back to the others now..." With that, she leaves.</p>
 			You still have a little time left, but not enough to do anything, so you decide to head for the classroom and wait for the lesson to start.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A143','rel') >= 50>>
 			<p>"Hi $pc.name_nick," Alyona greets you as soon as she sees you approaching.</p>
 			<p>"Hey. Move over, I have lots to tell you!" you say excitedly as you sit on the stairs next to her so quickly that you don't even wait for her to move.</p>
@@ -983,7 +983,7 @@
 			func('npc_reactions', 'general', 'A143')
 			After spending a few minutes daydreaming about wild parties, she puts the bottle back in her bag before putting her finger to her mouth. "Sshh... Not a word to anyone about the booze. The teachers would freak out and the others would come asking for it." She laughs, then starts walking towards the toilet, probably to smoke.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A143','rel') >= 50>>
 			<p>As you go to the stairway, you see that Alyona is a little further away from the other gopniks, so you decide to go to her. "Hey Alyona, how are you?"</p>
 			<p>You know me $pc.name_nick, just trying to get through the day," she replies. She's clearly not having the best of days. She looks tired as she leans against the wall and can barely keep her eyes open.</p>
@@ -1005,7 +1005,7 @@
 			While she listens to music and sometimes sings a line out loud, you take out your notes and read them to prepare for the next lesson.
 			After spending some time revising, you decide to head to the classroom and wait for the teacher to arrive.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A143','rel') >= 50>>
 			<p>As you reach the stairway, your eyes meet Alyona's and she beckons you. "Hey $pc.name_nick, what's new?" she asks as you sit next to her on the stairs.</p>
 			"Don't even ask, I'm just looking forward to the end of the day. I can't even tell you how bored I am."
@@ -1173,7 +1173,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<elseif $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<<if $npcs.get('A144','rel') >= 50>>
 			<p>As you walk up the steps, you notice Anushka sitting on the top step cross legged, which gives you a nice up the skirt shot of her panties. She's using her knees to support a notebook computer that she's typing on. Taking a seat next to her, you glance over at the screen as she's closing it, missing whatever she was looking at. "New song?"</p>
 			She glances at you with a smile.
@@ -1247,7 +1247,7 @@
 			"No, it's something Rad wrote and I'm well... fixing it." You notice Radomir glancing over and giving her a slightly annoyed look, but he doesn''t say anything.
 			She's a little reluctant to talk at first, but the two of you are soon talking about her music, which leads to a variety of other subjects. The two of you talk and laugh until the bell rings.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A144','rel') >= 50>>
 			<p>As you walk up the steps, you notice Anushka sitting on the top step cross legged, which gives you a nice up the skirt shot of her panties. She's using her knees to support a notebook computer that she's typing on. Taking a seat next to her, you glance over and see her typing lyrics to a song. "New song?"</p>
 			She glances at you with a friendly smile.
@@ -1290,7 +1290,7 @@
 			You shake your head. "Sometimes, but we're a lot deeper than that. Why don't you tell me about your song."
 			The two of you start talking about her music, which leads to a variety of other subjects. The two of you talk and laugh until the bell rings.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A144','rel') >= 50>>
 			<p>As you walk up the steps, you notice Anushka sitting on the top step cross legged, which gives you a nice up the skirt shot of her panties. She's using her knees to support a notebook computer that she's typing on. Taking a seat next to her, you glance over and see her typing lyrics to a song. "New song?"</p>
 			She glances to you with a friendly smile.
@@ -1328,7 +1328,7 @@
 			<p>She smirks. "Oh... So what flavor protein drink is best? I don't like that powdered crap. I tried it once and it was nasty as Petia's breath. I prefer liquid protein right from the tap if you know what I mean..." she says with a wink.</p>
 			You shake your head, knowing exactly what she means and the two of you are soon talking about a variety of subjects. You talk and laugh until the bell rings.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A144','rel') >= 50>>
 			<p>As you walk up the steps, you notice Anushka sitting on the top step cross legged, which gives you a nice up the skirt shot of her panties. You blush when you see her panties on full display like that. She's using her knees to support a notebook computer that she's typing on. Taking a seat next to her, you glance over at the screen as she's closing it, missing whatever she was looking at. "New song?"</p>
 			She glances to you with a smirk.
@@ -1363,7 +1363,7 @@
 			<</if>>
 			<p>"Hey neeeerrrd! No, I was looking at porn." This makes you blush even more, which only makes her grin in amusement. You decide to change the subject and ask her about her music. She's reluctant to talk, but eventually opens up and you have a pleasant conversation with her. She even seems to know a fair bit about some of your favorite nerdy topics, though she can't seem to help herself from sometimes making snide and even occasionally hurtful comments about them. The two of you talk and laugh until the bell rings.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A144','rel') >= 50>>
 			<p>As you walk up the steps, you notice Anushka sitting on the top step with her knees pulled up almost to her chin, which gives you a nice up the skirt shot of her panties. She's using her knees to support a notebook computer that she's typing on. Taking a seat next to her, you glance over and see her typing lyrics to a song. "New song?"</p>
 			She glances to you with a friendly smile.
@@ -1523,7 +1523,7 @@
 <<case 'lena' 'A20'>>
 	
 	<<image "characters/shared/headshots_main/big20.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<<run $npcs.inc('A20','rel',1)>>
 		<p>As usual, you find Lena smoking on the stairs. "Shouldn't you be in the bathroom getting gangbanged?" Lena inquires with a note of disgust.</p>
 		You sigh slightly. "No, I just wanted to see what you were up to."
@@ -1532,7 +1532,7 @@
 		func('npc_reactions', 'general', 'A20')
 	<<elseif $npcs.get('A20','rel') >= 50 and $pc.fame('pav_slut') < 300>>
 		<<run $npcs.inc('A20','rel',1)>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>Seeing Lena sitting on the steps, you approach her. "Hi Lena! What are you up to?"</p>
 			<p>She looks back at you and shrugs her shoulders. "Hey $pc.name_nick, nothing much. Just waiting for this day to end."</p>
 			The two of you talk for a while about how much school sucks and all the better things you could be doing with your time.
@@ -1545,7 +1545,7 @@
 		func('npc_reactions', 'general', 'A20')
 	<<elseif $npcs.get('A20','rel') <= 20 and $pc.fame('pav_slut') < 300>>
 		<<run $npcs.inc('A20','rel',1)>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<p>Seeing Lena sitting on the steps, you approach her. "Hi Lena! What are you up to?"</p>
 			<p>She looks back at you with a frown. "What do you want $pc.name_nick?"</p>
 			"I just wanted to say hi and see what you were up to."
@@ -1573,7 +1573,7 @@
 	
 	<<gs 'npc_relationship' 'modify' 'A24' 'like'>>
 	<<image "characters/shared/headshots_main/big24.jpg">>
-	<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+	<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 		<<gs 'npc_relationship' 'modify' 'A24' 'dislike'>>
 		<p>As usual you find Pauline on the stairs. "What do you want?" Pauline asks in a non too friendly tone as you approach.</p>
 		You sigh slightly. "I just wanted to talk is all," you reply.
@@ -1583,7 +1583,7 @@
 	<<elseif $pc.fame('pav_slut') > 250>>
 		<<gs 'npc_relationship' 'modify' 'A24' 'dislike'>>
 		She glares at you as you approach. "Don't even think about trying to talk to me, slut."
-	<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A24','rel') >= 60>>
 			<p>Seeing Pauline sitting on the steps you approach her, "Hi Pauline! What are you up to?"</p>
 			<p>She looks back at you. "What do you want $pc.name_nick?"</p>
@@ -1601,7 +1601,7 @@
 			The two of you continue talking for a while, mostly about how, if you want to hang with the gopniks, you should just change everything about yourself and join them.
 		<</if>>
 		func('npc_reactions', 'general', 'A24')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<gs 'npc_relationship' 'modify' 'A24' `rand(0,-1)`>>
 		<<if $npcs.get('A24','rel') >= 80>>
 			<p>Seeing Pauline sitting on the steps you approach her, "Hi Pauline! What are you up to?"</p>
@@ -1620,7 +1620,7 @@
 			The two of you continue talking for a while, mostly about how, about how crap all the stuff you like is and that you have no business hanging with the gopniks.
 		<</if>>
 		func('npc_reactions', 'general', 'A24')
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A24','rel') >= 50>>
 			<p>Seeing Pauline sitting on the steps, you approach her. "Hi Pauline! What are you up to?"</p>
 			<p>She looks back at you and smiles. "Hey $pc.name_nick, nothing much." She looks over at Anushka when she laughs while talking to Valentin. "Why the fuck we let that slut hang out with us is beyond me."</p>

+ 38 - 38
sugarcube/src/activities/school/gschool_jock_chats.tw

@@ -28,7 +28,7 @@
 			You sigh. "I just wanted to talk to you."
 			<p>"Come on, everyone knows that you're the school's biggest slut! Your mouth is good for only one thing. Sucking dick!" he says with a laugh and several of the other jocks and cool kids join in. "If you're not going to get on your knees and suck me off, then get lost." You walk away with the laughter echoing behind you.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Hey, $pc.name_nick. So I've been noticing you eyeballing me." Lazar winks.</p>
 			<p>You laugh. "Nice line Lazar... Is that how you get the ladies interested in you?"</p>
@@ -44,7 +44,7 @@
 			"Didn''t take you for one of my fan girls, that's all." he winks. You roll your eyes and shake your head. You know he's full of himself, even if he is the most gifted athlete in school and cute to boot. You talk about a variety of things, which he twists into you just liking him.
 			func('npc_reactions', 'general', 'A149')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Did you see that move I made at the last game $pc.name_nick?" Lazar boasts.</p>
 			"I heard about it..." you inform him.
@@ -60,7 +60,7 @@
 			Lazar bursts out in laughter. "No no, I'm not worried. That only makes me want to improve even more..."
 		<</if>>
 		func('npc_reactions', 'general', 'A149')
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Hey, $pc.name_nick. So I've been noticing you've been eying me." Lazar winks.</p>
 			You blush. "No... no I haven''t."
@@ -75,7 +75,7 @@
 			"Okay..." you reply, not sure how to respond. He starts talking to some of the others and seems friendly enough, even if he and the others don't pay much attention to you. At least no one is picking on you.
 			func('npc_reactions', 'general', 'A149')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Hey, $pc.name_nick. So I've been noticing you've been eying me." Lazar winks.</p>
 			<p>You laugh. "You wish... Are any of the girls dumb enough to fall for that?"</p>
@@ -120,7 +120,7 @@
 			Most of the other jocks and cool kids laugh at his comments. "No..." you sourly reply.
 			<p>"Well, unless you get down on your knees and start sucking me off, get the fuck out of here! Only time anyone wants anything to do with you is when they want to fuck one of your holes." Several others start adding comments and you know it's about to turn ugly, so you quickly leave before someone drags you off to the bathroom or worse.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			<p>"Well, isn't this a surprise? Are you here to wish me good luck in the next race?" Svyatoslav curiously asks.</p>
 			Seeing him excited and not wanting to hurt his feelings, you just nod. "Yeah... that's exactly what I wanted to say..."
@@ -132,7 +132,7 @@
 			You walk up to him and start chatting. You talk about working out and staying fit before he starts flirting with you. You get the feeling he has a thing for you, or that he just wants to get in any girl''s panties so he has something to brag about to the other jocks.
 			func('npc_reactions', 'general', 'A8')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			You walk up to him and start chatting. You talk about working out and staying fit before he starts flirting with you. You get the feeling he has a thing for you, or that he just wants to get in any girl''s panties so he has something to brag about to the other jocks.
 			func('npc_reactions', 'general', 'A8')
@@ -142,7 +142,7 @@
 			You walk up to him and start chatting. You talk about working out and staying fit before he starts flirting with you. You get the feeling he has a thing for you, or that he just wants to get in any girl''s panties so he has something to brag about to the other jocks.
 			func('npc_reactions', 'general', 'A8')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			<p>"You get lost, nerd?" he asks as you approach.</p>
 			You shake your head. "No, I just wanted to say hi."
@@ -158,7 +158,7 @@
 			He laughs. "Why don't you just go back to your fellow losers and pretend to be an elf or whatever it is you losers do." He continues mocking you when he isn''t talking to someone else.
 			func('npc_reactions', 'general', 'A8')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			<p>"You come to see what real men are like?" he asks as you approach.</p>
 			You shake your head and roll your eyes at his comment. "No, I just wanted to say hi."
@@ -192,7 +192,7 @@
 	<<gs 'npc_relationship' 'modify' 'A165' 'like'>>
 	<<image "characters/shared/headshots_main/big165.jpg">>
 	<<if $npcs.get('A165','rel') >= 50 and $pc.fame('pav_slut') < 225>>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			<p>"Say $pc.name_nick, did you hear about the prank I pulled on the football coach?" Vanya is having a hard time stopping himself from laughing.</p>
 			<p>"No. What did you do this time?" you curiously ask.</p>
 			<p>"Well, during one of the training sessions, I unscrewed the top from a water bottle thinking one of the boys would drink it but here comes the coach, who grabs it. Just as he's about to drink, the top falls off and water splashes all over him!" Vanya bursts out in laughter.</p>
@@ -204,7 +204,7 @@
 		<</if>>
 		func('npc_reactions', 'general', 'A165')
 	<<elseif $npcs.get('A165','rel') <= 20 and $pc.fame('pav_slut') < 225>>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			<p>"What the hell, Vanya?!" you yell while angrily stomping towards him.</p>
 			<p>"What now?" he replies with an innocent look. "I'm getting tired of you accusing me of things I haven't done!"</p>
 			<p>"It must've been you! Who else replaces talc powder with itching powder?!"</p>
@@ -266,7 +266,7 @@
 			<p>"What? No. I mean... never mind, see you later." He turns around and goes on his own business without finishing his sentence. You don't know if you should feel offended or rejected.</p>
 			You don't have too much time to think about it since the break is almost over, so you grab your things and go on your way.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A150','rel') >= 50>>
 			<p>"Here's the resident big guy of our school!" you say jokingly when you approach Erast, who is watching something on his phone.</p>
 			<p>You can see him blushing when he looks up and notices you. "Hello $pc.name_nick, how are you doing today?"</p>
@@ -294,7 +294,7 @@
 			func('npc_reactions', 'general', 'A150')
 			<p>"Good talk. Thanks Erast!" you say when you hear the bell ringing and head to the classroom for the next lesson.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A150','rel') >= 50>>
 			<p>"Hi $pc.name_nick..." Erast greets you with a smile when you approach him.</p>
 			<p>"Hey Erast! I've been looking for you all day. Could you give me some more tips on strength and conditioning? I think I might be doing something wrong since I'm not gaining as much as I think I should."</p>
@@ -322,7 +322,7 @@
 			<p>"Look, $pc.name_nick, I still have to do some things before the next lesson. Talk to you later," he says and gives you a little wave while he's leaving.</p>
 			"Sure, later then." When he leaves, you look at the clock and see that you don't have much time to left before the next lesson starts, so you head to your classroom.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A150','rel') >= 50>>
 			<p>"Hello $pc.name_nick," Erast politely greets when he notices you. "How've you been doing?"</p>
 			"Fine, thanks for asking. Lately, I've been reading a lot. Luckily there are more and more new books out and I can borrow some old ones too, some of which I haven''t even heard of."
@@ -347,7 +347,7 @@
 			<p>Before the break is over, he grabs his things. "Alright $pc.name_nick, I have a few things I need to do before the lesson. Thanks for the chat."</p>
 			"Of course. See you later." You quickly check your notes from the previous lesson and revise them before going to the classroom.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A150','rel') >= 50>>
 			<p>"Hello $pc.name_nick." Erast politely greets when he notices you. "How've you been doing?"</p>
 			"You know me Erast. Same old, same old. Another day, the same shit." you reply while you sit on the floor next to him.
@@ -483,7 +483,7 @@
 			<p>"Shut up <<npc 'A18'>><</npc>>! I'm tired of your bullshit," you tiredly reply.</p>
 			<p>"Poor little thing. It must've been what, five minutes since you last spread your legs for someone?" She begins to laugh as she walks away.</p>
 		<<else>>
-			<<if getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','jocks')>>
 				"Look at the biggest joke among us. You shouldn''t even be allowed to call yourself a jock. What a joke..." <<npc 'A18'>><</npc>> shakes her head.
 				<p>"Oh yeah? I could beat you at whatever you want! Just name the time and place!" you fiercely reply.</p>
 				<p>"Hmmrph!!" <<npc 'A18'>><</npc>> looks angrily at you. "You know what? I don't have time for this right now!" She crosses her arms and refuses to say another word to you.</p>
@@ -655,12 +655,12 @@
 				You are about to speak up, but she shakes her head and walks away. You can't tell if she was feeling disgusted or disappointed at you. She might even have been both.
 			<</if>>
 		<<elseif getvar("$AlbinaQW['Friends']") == 2>>
-			<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 				Albina gives you a tight hug when you approach and you both a lively conversation. It's as if a weight has been lifted from her shoulders and she smiles a lot more than before.
 				func('npc_reactions', 'general', 'A23')
-			<<elseif getvar("$grupTipe") == 3>>
+			<<elseif $q.school.func('isGroupMember','nerds')>>
 				You approach Albina and she smiles. She ignores the stares you're getting from her friends and has a friendly conversation with you.
-			<<elseif getvar("$grupTipe") == 4>>
+			<<elseif $q.school.func('isGroupMember','gopniks')>>
 				<p>Albina shakes her head as you approach. "What's up?" you ask and she scoffs.</p>
 				<p>"What's up? You used to be cool $pc.name_nick, but then you started hanging out with <i>them</i>."</p>
 				It's clear she has no interest in speaking to you despite your attempts, so you just her leave her alone.
@@ -668,7 +668,7 @@
 				Albina looks up from her as you approach and pulls you in close.
 				"Not here. We'll talk later when we're alone..." she whispers in your ear before pushing you back and returning to her phone, feigning disinterest in you. The cool kids and some of the jocks are now staring at you, so you quickly leave before anyone says anything.
 			<</if>>
-		<<elseif getvar("$grupTipe") == 1>>
+		<<elseif $q.school.func('isGroupMember','cool')>>
 			<<if $npcs.get('A23','rel') >= 70>>
 				Albina has a friendly, yet awkward conversation with you. You both talk about your shared interests, but when you bring up family life she fiercely avoids the subject, eventually refusing to speak with you anymore and storming off. You don't know what her problem is, but she's always been sensitive when it comes to discussing her home life.
 				func('npc_reactions', 'general', 'A23')
@@ -678,7 +678,7 @@
 				Albina sighs and begrudgingly starts chatting with you. She spends a lot of the conversation with her arms crossed and makes no effort to hide her boredom. She doesn''t dislike you, but it's obvious that she's just tolerating your presence and humouring you with conversation.
 				func('npc_reactions', 'general', 'A23')
 			<</if>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<if $npcs.get('A23','rel') >= 70>>
 				Albina has a friendly, yet awkward conversation with you. You both talk about the sports you enjoy and which of the jocks have caught your attention lately, but when you bring up family life she fiercely avoids the subject, eventually refusing to speak with you anymore and storming off. You don't know what her problem is, but she's always been sensitive when it comes to discussing her home life.
 				func('npc_reactions', 'general', 'A23')
@@ -688,7 +688,7 @@
 				Albina sighs and begrudgingly starts chatting with you. She spends a lot of the conversation with her arms crossed and makes no effort to hide her boredom. She doesn''t dislike you, but it's obvious that she's just tolerating your presence and humouring you with conversation.
 				func('npc_reactions', 'general', 'A23')
 			<</if>>
-		<<elseif getvar("$grupTipe") == 3>>
+		<<elseif $q.school.func('isGroupMember','nerds')>>
 			<<if $npcs.get('A23','rel') >= 70>>
 				<p>"You know you remind me of a character from LOL?" you tell her and she looks at you in confusion.</p>
 				<p>"League of Legends? The online strategy game?" you continue and she looks even more confused.</p>
@@ -701,7 +701,7 @@
 				Albina sighs and begrudgingly starts chatting with you. She spends a lot of the conversation with her arms crossed and makes no effort to hide her boredom. She doesn''t dislike you, but it's obvious that she's just tolerating your presence and humouring you with conversation.
 				func('npc_reactions', 'general', 'A23')
 			<</if>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<p>Albina glares at you with a look of utter contempt on her face. "What the hell do you want? Go find the other knuckle brained morons. The zoo is over there." She motions towards the stairway that the gopniks usually hang out in before returning to her phone and ignoring you.</p>
 			"Fucking stuck up rich bitch..." you mutter as you walk away, but she doesn''t hear you.
 		<<else>>
@@ -782,7 +782,7 @@
 			<p>"Hey $pc.name_nick..." she greets you indifferently. "As a matter of fact, I'm busy now so if you'll excuse me..." With that, she takes her backpack and walks over to the other jocks. She doesn't take part in the conversation, but it seems it's still a better option than being seen with you.</p>
 			As you still have a lot of time before the next lesson starts, you retouch your makeup and refresh yourself.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A141','rel') >= 50>>
 			<p>You see Veronika among her fellow jocks and decide to talk to her. "Hey Veronika!" you say as you sit next to her. "What's up?"</p>
 			She looks up and greets you with a small smile. The two of you start talking about things that have happened to you lately, addressing various topics. She seems indifferent to some of them, but she's always happy to talk about sports, especially skating.
@@ -802,7 +802,7 @@
 			func('npc_reactions', 'general', 'A141')
 			Talking to her for 10 minutes can feel like an hour as time goes slowly when she doesn''t put much effort into the conversation. When you realize the break is almost over, you bid her farewell and head to your classroom.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A141','rel') >= 50>>
 			<p>"Hello $pc.name_nick, I was hoping we would talk today." Veronika says when she sees you.</p>
 			"Hey Veronika. As a matter of fact, so was I." you reply.
@@ -833,7 +833,7 @@
 			func('npc_reactions', 'general', 'A141')
 			You look at the clock in the hallway and see you don't have too much time left. You grab your things and go to your next lesson.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A141','rel') >= 50>>
 			<p>"Hello $pc.name_nick." Veronika greets you with a slight wave when she sees you approaching.</p>
 			"Hey Veronika, I just wanted to chat," you reply.
@@ -859,7 +859,7 @@
 			<p>"You see? It wasn't that complicated and it's not that hard to understand," you say as you finish.</p>
 			"I see." She keeps her reply short. She thanks you for the help before you both hurry to the classroom as your break is already over.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A141','rel') >= 50>>
 			As you're wondering the hallway, you see Veronika leaning against the wall and decide to chat with her.
 			<p>"Hello $pc.name_nick, I see you have nothing better to do so you came to talk to me?" she asks with a little smile.</p>
@@ -998,7 +998,7 @@
 			You think on it for a moment. Shrugging, you say "Every day is ... just ... fun."
 			func('npc_reactions', 'general', 'A19')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A19','rel') >= 60>>
 			<p>"Hey $pc.name_nick," she greets you.</p>
 			<p>"Hi Lina," you reply. "What's new with you?"</p>
@@ -1016,7 +1016,7 @@
 			func('npc_reactions', 'general', 'A19')
 			"See you around, Lina."
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A19','rel') >= 60>>
 			<p>Lina sees you and proudly says "I've finally been improving my lap times!"</p>
 			<p>"Great news! I'm glad you're improving!" you encouragingly tell her.</p>
@@ -1033,7 +1033,7 @@
 			"I wanted to ask you if you had the notes from the class. I need to copy them," you tell her.
 			"We'll do it later. I have to find <<npc 'A18'>><</npc>> right away or else she'll get mad..." She quickly excuses herself.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A19','rel') >= 60>>
 			<p>Looking up from her schoolbook and seeing you coming, she shows you her book and asks "What's the answer to this problem?"</p>
 			<p>"42," you reply. Come on, that's an easy one!"</p>
@@ -1053,7 +1053,7 @@
 			"Hi," she replies. "Now leave before somebody runs you out."
 			You sigh. "Alright, fine. I can take the hint." You walk away before anybody starts messing with you.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A19','rel') >= 60>>
 			<<if getvar("$tattCount") == 0>>
 				<p>"Why don't you have any tattoos, $pc.name_nick?"</p>
@@ -1256,7 +1256,7 @@
 				<p>You respond by giving her your best sultry look. "I take care of girls too. Wanna try?"</p>
 				<p>She gives you a shocked look as her face turns bright red. "Go away, $pc.name_nick!"</p>
 			<</if>>
-		<<elseif getvar("$grupTipe") == 1>>
+		<<elseif $q.school.func('isGroupMember','cool')>>
 			<<if $npcs.get('A13','rel') >= 50>>
 				<p>"Hey $pc.name_nick, have you seen <<npc 'A18'>><</npc>> around?" Lariska asks.</p>
 				<p>"No, why?" You can sense the desperation in her demeanor.</p>
@@ -1276,7 +1276,7 @@
 				"Well... I need to impress <<npc 'A18'>><</npc>> and need your help with coming up with something fitting..." she starts on a long tirade about what might impress <<npc 'A18'>><</npc>>.
 				<p>Feeling your braincells slowly dying, you interrupt her instead. "Well, I've got to head to class. Got this thing to do. Bye!"</p>
 			<</if>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<if $npcs.get('A13','rel') >= 50>>
 				<p>"Hey $pc.name_nick, have you seen <<npc 'A18'>><</npc>> around?" Lariska asks.</p>
 				<p>"No, why?" You can sense the desperation in her demeanor.</p>
@@ -1296,7 +1296,7 @@
 				"Well... I need to impress <<npc 'A18'>><</npc>> and need your help with coming up with something fitting..." she starts on a long tirade about what might impress <<npc 'A18'>><</npc>>.
 				<p>Feeling your braincells slowly dying, you interrupt her instead. "Well, I've got to head to class. Got this thing to do. Bye!"</p>
 			<</if>>
-		<<elseif getvar("$grupTipe") == 3>>
+		<<elseif $q.school.func('isGroupMember','nerds')>>
 			<<if $npcs.get('A13','rel') >= 50>>
 				<p>"Hey $pc.name_nick. When are you going to stop staring at books and come play some sports with us?"</p>
 				"No thank you, Lariska. I want to go to university, so I have to keep studying."
@@ -1315,7 +1315,7 @@
 				<p>"They make up everything!"</p>
 				"Right... I gotta go. <<npc 'A18'>><</npc>> needs me." Standing up, she walks away before you can tell her any more jokes.
 			<</if>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<<if $npcs.get('A13','rel') >= 50>>
 				Lariska sees you in the hallway walking towards her and stands up, looking nervous.
 				"Hey, Lariska."
@@ -1510,7 +1510,7 @@
 			"Come on, don't be like that... I thought we could have some fun..." You give him a wink.
 			Ivan looks apathetically at you without any response, making the whole situation awkward. After what feels like an eternity, he just walks away.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A3','rel') >= 50>>
 			As you come out into the corridor, you see Ivan, a little further away from the others. You decide to approach him and talk.
 			<p>"Hi Ivan. I see you're spending your break alone. Wouldn't it be much nicer in the company of a pretty girl?" you wink at him, not noticing that you also blush a little.</p>
@@ -1545,7 +1545,7 @@
 			func('npc_reactions', 'general', 'A3')
 			The bell then rings and Ivan gets up and starts walking towards the classroom. Halfway there, he turns around. "If you really don't know what to do, you can always come and watch my next match."
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A3','rel') >= 50>>
 			<p>"Hello $pc.name_nick, I hope you're looking for me?" Ivan asks when he sees you approaching.</p>
 			<p>You lean against the wall and start talking. "How are things going?" you ask curiously, hoping that he has something interesting to share.</p>
@@ -1579,7 +1579,7 @@
 			It seems that, although he's glad you listen to him and are supportive, he's not so keen to hear about your affairs. With not much time left of the break, you head for the classroom and wait for the lesson to start.
 			func('npc_reactions', 'general', 'A3')
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A3','rel') >= 50>>
 			<p>"Hey $pc.name_nick." Ivan greets you as he sees you approaching.</p>
 			<p>"Hey Ivan, what's up? How was your last training match?" you ask curiously.</p>
@@ -1603,7 +1603,7 @@
 			func('npc_reactions', 'general', 'A3')
 			After a while, you stand up. "I'll be going now. I want to revise my homework one more time before class." you say before heading off to the classroom.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A3','rel') >= 50>>
 			<p>"Hi $pc.name_nick," Ivan greets you as you walk towards him.</p>
 			<p>"What's up, Prince of Boxers? Do you still have time to chat despite all the training and the crowds of cheerleaders?" you ask jokingly as you do shadowboxing next to him.</p>

+ 2 - 2
sugarcube/src/activities/school/gschool_lessons.tw

@@ -41,7 +41,7 @@
 			<</actCLA>>
 		<<elseif $time.weekday < 4 and getvar("$class['first_grade_check']") == 0>>
 			<<gt 'gschool_lessons' 'grade_check'>>
-		<<elseif getvar("$grupTipe") == 3 and $nerd_game['invite_day'] < $time.daystart - $time.weekday>>
+		<<elseif $q.school.func('isGroupMember','nerds') and $nerd_game['invite_day'] < $time.daystart - $time.weekday>>
 			<<gt 'nerd_game_night' 'invite' 'morning'>>
 		<<else>>
 			<<gs 'gschool_gossip' 'morning'>>
@@ -278,7 +278,7 @@
 			<<actCLA 'Continue down the hall'>>
 				<<gt 'gschool_lessons' 'short_break'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 3 and $nerd_game['invite_day'] < $time.daystart - $time.weekday>>
+		<<elseif $q.school.func('isGroupMember','nerds') and $nerd_game['invite_day'] < $time.daystart - $time.weekday>>
 			<<gt 'nerd_game_night' 'invite' 'short_break'>>
 		<</if>>
 	<<elseif getvar("$Kuznetsov_punishment") == 1>>

+ 58 - 58
sugarcube/src/activities/school/gschool_lessonsev1.tw

@@ -53,7 +53,7 @@
 				<</actCLA>>
 			<</actCLA>>
 
-		<<if getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks')>>
 			<<actCLA 'Beat his ass' undefined `{willpower:['misc','self','hard']}`>>
 
 
@@ -383,10 +383,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Irina. She looks at you in disgust and turns away to talk to someone else.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A17','rel',1)>>
 						You sit next to Irina and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Irina, but she dismisses all of your attempts to speak with her and spends the lesson ignoring you and talking to other people.
 					<<else>>
 						<<run $npcs.inc('A17','rel',1)>>
@@ -403,10 +403,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Julia. She avoids making eye contact with you and instead focuses on her coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A12','rel',1)>>
 						You sit next to Julia and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Julia, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A12','rel',1)>>
@@ -423,10 +423,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lavrenti. He gives you a perverted smile and keeps asking if you want to suck his dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A155','rel',1)>>
 						You sit next to Lavrenti and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Lavrenti and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A155','rel',1)>>
@@ -443,10 +443,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Artem. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A2','rel',1)>>
 						You sit next to Artem and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Artem, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A2','rel',1)>>
@@ -463,10 +463,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Natasha. She avoids making eye contact with you and instead focuses on her coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A16','rel',1)>>
 						You sit next to Natasha and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Natasha, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A16','rel',1)>>
@@ -483,10 +483,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lazar, who mocks you for the duration of the lesson about how many dicks you've sucked and how your breath probably smells of cum.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A149','rel',1)>>
 						You sit next to Lazar and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Lazar. He ignores you, only talking to you if it involves mocking you.
 					<<else>>
 						<<run $npcs.inc('A149','rel',1)>>
@@ -502,7 +502,7 @@
 				<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lesco. He avoids making eye contact with you and awkwardly puts his head down. Your classmates notice this and you feel embarrassed at the fact that you're so unpopular that even Lesco won''t talk to you.
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 					<<run $npcs.inc('A7','rel',1)>>
 					You sit next to Lesco and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
 				<<else>>
@@ -626,10 +626,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Irina. She looks at you in disgust and turns away to talk to someone else.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A17','rel',1)>>
 						You sit next to Irina and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Irina, but she dismisses all of your attempts to speak with her and spends the lesson ignoring you and talking to other people.
 					<<else>>
 						<<run $npcs.inc('A17','rel',1)>>
@@ -646,11 +646,11 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Andrey and Stasya. Stasya glares at you and warns you not to even try and suck Andrey''s dick, but he laughs in response, saying how he would never let your filthy mouth near him.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A139','rel',1)>>
 						<<run $npcs.inc('A147','rel',1)>>
 						You sit next to Andrey and Stasya and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you all to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Andrey and Stasya, but they dismiss all of your attempts to speak with them and instead spend the lesson talking to each other.
 					<<else>>
 						<<run $npcs.inc('A139','rel',1)>>
@@ -668,10 +668,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Mefodiy, who expresses his disgust at your slutiness with sarcastic jokes and then ignores you for the rest of the lesson.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A148','rel',1)>>
 						You sit next to Mefodiy and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Mefodiy, but he ignores you for the duration of the lesson.
 					<<else>>
 						<<run $npcs.inc('A148','rel',1)>>
@@ -688,10 +688,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Gerasim. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A153','rel',1)>>
 						You sit next to Gerasim and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Gerasim, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A153','rel',1)>>
@@ -721,10 +721,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vanya, who immediately stands up and walks over to sit with Katja and Vicky, all of them giving disgusted looks.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A165','rel',1)>>
 						You sit next to Vanya and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Vanya. He ignores you, instead choosing to lean back and talk with Katja and Vicky.
 					<<else>>
 						<<run $npcs.inc('A165','rel',1)>>
@@ -741,10 +741,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Arkadi. He gives you a perverted smile and keeps asking if you want to suck his dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A156','rel',1)>>
 						You sit next to Arkadi and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Arkadi and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A156','rel',1)>>
@@ -1034,8 +1034,8 @@
 				<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vasily. He gives you a perverted smile and keeps asking if you want to suck his dick.
-				<<elseif getvar("$grupTipe") == 4 or getvar("$grupTipe") == 5>>
-					<<if getvar("$grupTipe") == 4>>
+				<<elseif $q.school.func('isGroupMember','gopniks') or $q.school.func('isGroupMember','outcasts')>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A11','rel',1)>>
 						You sit next to Vasily and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
 					<<else>>
@@ -1055,10 +1055,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Albina, who immediately looks you over before shaking her head in disgust and walking away to sit with Vicky.
 				<<else>>
-					<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$AlbinaQW['Friends']") == 2>>
+					<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or getvar("$AlbinaQW['Friends']") == 2>>
 						<<run $npcs.inc('A23','rel',1)>>
 						You sit next to Albina and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Albina, who gives you a pitiful look before turning away and ignoring you for the rest of the lesson.
 					<<else>>
 						You sit next to Albina and she rolls her eyes. She begrudingly engages you in a very brief and awkward conversation, her piercing glare dissauding you from making any further attempts.
@@ -1074,10 +1074,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lizaveta, who immediately laughs at you and starts mocking you with gossip about whose dick you've sucked recently.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A140','rel',1)>>
 						You sit next to Lizaveta and you spend most of the class talking quietly with each other, Lizaveta filling you in on the latest gossip and trying to pry what she can from you. You often get stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Lizaveta, who proceeds to fill you in on all the gossip about what a friendless loser you are.
 					<<else>>
 						You sit next to Lizaveta, who is a little surprised that you chose to do so at first, but proceeds to fill you in on the latest gossip before Mr. Ivanov tells her to be quiet.
@@ -1093,10 +1093,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Alyona, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A143','rel',1)>>
 						You sit next to Alyona and you spend most of the class talking quietly with each other. You often get stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Alyona and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A143','rel',1)>>
@@ -1113,10 +1113,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Artem. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A2','rel',1)>>
 						You sit next to Artem and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Artem, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A2','rel',1)>>
@@ -1133,10 +1133,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Gerasim. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A153','rel',1)>>
 						You sit next to Gerasim and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Ivanov when you get a bit too loud. He clears her throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Gerasim, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A153','rel',1)>>
@@ -1153,10 +1153,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Zinaida. She avoids making eye contact with you and instead focuses on playing a game on her phone before class starts.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<gs 'npc_relationship' 'modify' 'A142' 'like'>>
 						You sit next to Zinaida and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Zinaida, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<gs 'npc_relationship' 'modify' 'A142' 'like'>>
@@ -1173,10 +1173,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Katja. She stares at you in disbelief and starts blushing bright red before she gets up and hurries to sit next to her sister.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A14','rel',1)>>
 						You sit next to Katja and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Ivanov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Katja, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A14','rel',1)>>
@@ -1475,10 +1475,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Marcus, who awkwardly shuffles in his seat and avoids looking at you. As you look around, you see many of your classmates pointing and giggling, and not just at you. "Go on $pc.name_nick! You know you want that big black cock stuffed into your whore mouth and down your slutty throat!" you hear someone shout out.</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A146','rel',1)>>
 						You sit next to Marcus and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Marcus, who tries to politely avoid conversation, but people start laughing at him for letting you talk to him. They then turn their attention to you and mock you for trying to speak with a popular kid.
 					<<else>>
 						<<run $npcs.inc('A146','rel',1)>>
@@ -1495,10 +1495,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Stasya, who shoots daggers at you. "What the fuck do you want whore? Do I look like I talk to dick hungry sluts like you? Keep your filthy mouth away from Andrey or you'll regret it bitch."</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A139','rel',1)>>
 						You sit next to Stasya and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Stasya, but she scoffs at your attempts to speak with her and turns her attention to speaking with Irina.
 					<<else>>
 						<<run $npcs.inc('A139','rel',1)>>
@@ -1515,10 +1515,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Alyona, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A143','rel',1)>>
 						You sit next to Alyona and you spend most of the class talking quietly with each other. You often get stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Alyona and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A143','rel',1)>>
@@ -1535,10 +1535,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Alyona, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A145','rel',1)>>
 						You sit next to Ekaterina and you spend most of the class talking quietly with each other. You often get stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Ekaterina and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						You sit next to Ekaterina and she immediately gives you a deathly stare that lets you know you shouldn''t even bother trying to talk to her.
@@ -1554,10 +1554,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Svyatoslav, who ignores you at first before getting your attention and pointing at the bulge in his pants while winking. "You know you want it, so come and get it slut." he whispers with a smile.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A8','rel',1)>>
 						You sit next to Svyatoslav and you spend most of the class talking quietly with each other. You often get stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Svyatoslav, who completely ignores you and talks to Vanya instead.
 					<<else>>
 						<<run $npcs.inc('A8','rel',1)>>
@@ -1574,10 +1574,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Pauline, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A24','rel',1)>>
 						You sit next to Pauline and you spend most of the class talking quietly with each other. You often get stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Pauline and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A24','rel',1)>>
@@ -1594,10 +1594,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vicky, who gives you a disgusted glare and walks away to sit with Vanya.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A15','rel',1)>>
 						You sit next to Vicky and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Vicky, but she ignores you and instead talks to Vanya and her sister.
 					<<else>>
 						<<run $npcs.inc('A15','rel',1)>>
@@ -1614,10 +1614,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Irina. She looks at you in disgust and turns away to talk to someone else.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A17','rel',1)>>
 						You sit next to Irina and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Yenotin when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Irina, but she dismisses all of your attempts to speak with her and spends the lesson ignoring you and talking to other people.
 					<<else>>
 						<<run $npcs.inc('A17','rel',1)>>

+ 45 - 45
sugarcube/src/activities/school/gschool_lessonsev2.tw

@@ -83,10 +83,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Mefodiy, who expresses his disgust at your slutiness with sarcastic jokes and then ignores you for the rest of the lesson.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A148','rel',1)>>
 						You sit next to Mefodiy and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Mefodiy, but he ignores you for the duration of the lesson.
 					<<else>>
 						<<run $npcs.inc('A148','rel',1)>>
@@ -103,11 +103,11 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Andrey and Stasya. Stasya glares at you and warns you not to even try and suck Andrey''s dick, but he laughs in response, saying how he would never let your filthy mouth near him.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A139','rel',1)>>
 						<<run $npcs.inc('A147','rel',1)>>
 						You sit next to Andrey and Stasya and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you all to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Andrey and Stasya, but they dismiss all of your attempts to speak with them and instead spend the lesson talking to each other.
 					<<else>>
 						<<run $npcs.inc('A139','rel',1)>>
@@ -125,10 +125,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Valentin. He gives you a perverted smile and keeps asking if you want "go for a ride" with him. "And I don't mean on my bike, slut." he adds with a wink.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A158','rel',1)>>
 						You sit next to Valentin and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Valentin and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A158','rel',1)>>
@@ -157,10 +157,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Artem. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A2','rel',1)>>
 						You sit next to Artem and you spend most of the class talking quietly with each other. You often get Miss Orlov''s best attempts to give you a stern look when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Artem, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A2','rel',1)>>
@@ -177,10 +177,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vanya, who immediately stands up and walks over to sit with Katja and Vicky, all of them giving disgusted looks.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A165','rel',1)>>
 						You sit next to Vanya and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Vanya. He ignores you, instead choosing to lean back and talk with Katja and Vicky.
 					<<else>>
 						<<run $npcs.inc('A165','rel',1)>>
@@ -197,10 +197,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lazar, who mocks you for the duration of the lesson about how many dicks you've sucked and how your breath probably smells of cum.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A149','rel',1)>>
 						You sit next to Lazar and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Lazar. He ignores you, only talking to you if it involves mocking you.
 					<<else>>
 						<<run $npcs.inc('A149','rel',1)>>
@@ -217,10 +217,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vitek. He gives you a perverted smile and leans back in his chair to show you the bulge in his pants. "It's all yours, whore. All you have to do is ask." he says with a wink.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A9','rel',1)>>
 						You sit next to Vitek and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Vitek and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A156','rel',1)>>
@@ -886,10 +886,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Marcus, who awkwardly shuffles in his seat and avoids looking at you. As you look around, you see many of your classmates pointing and giggling, and not just at you. "Go on $pc.name_nick! You know you want that big black cock stuffed into your whore mouth and down your slutty throat!" you hear someone shout out.</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A146','rel',1)>>
 						You sit next to Marcus and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Marcus, who tries to politely avoid conversation, but people start laughing at him for letting you talk to him. They then turn their attention to you and mock you for trying to speak with a popular kid.
 					<<else>>
 						<<run $npcs.inc('A146','rel',1)>>
@@ -906,10 +906,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lena, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A20','rel',1)>>
 						You sit next to Lena and you spend most of the class talking quietly with each other. You often get stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Lena and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A20','rel',1)>>
@@ -926,10 +926,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Roman, a decision you regret when he scares you with his deathly stares and comments about you being a dirty, disgusting whore who nobody would miss.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A157','rel',1)>>
 						You sit next to Roman and you spend most of the class talking quietly with each other. You often get stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Roman and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A157','rel',1)>>
@@ -946,10 +946,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Petka. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A6','rel',1)>>
 						You sit next to Petka and you spend most of the class talking quietly with each other, often getting stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Petka, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A6','rel',1)>>
@@ -966,10 +966,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lera, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A21','rel',1)>>
 						You sit next to Lera and you spend most of the class talking quietly with each other. You often get stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Lera and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A21','rel',1)>>
@@ -986,10 +986,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Lina, who loudly scoffs. "Don't you have to go and suck a dick somewhere you massive whore?"</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A19','rel',1)>>
 						You sit next to Lina and you spend most of the class talking quietly with each other. You often get stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Lina, who scoffs loudly when you try talking to her. "Go and talk to Lesco. He's the only friend a loser like you will ever get. If you're lucky."
 					<<else>>
 						<<run $npcs.inc('A19','rel',1)>>
@@ -1006,10 +1006,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Igor, who just stares at you before looking around for somewhere else to sit. "God, I have to sit next to the bike?" he moans when he can't find anywhere to go.</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A4','rel',1)>>
 						You sit next to Igor and you spend most of the class talking quietly with each other. You often get stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Igor, who makes great efforts to not avoid talking to you.
 					<<else>>
 						<<run $npcs.inc('A4','rel',1)>>
@@ -1026,10 +1026,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Niko, who makes crude remarks about how you should under his desk and on your knees sucking his dick like a good little slut.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A189','rel',1)>>
 						You sit next to Niko and you spend most of the class talking quietly with each other. You often get stern looks from Mrs. Sokoloff when you get a bit too loud. She clears her throat and hushes you a few times before she finally tells you to be quiet or she'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Niko and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A189','rel',1)>>
@@ -1322,10 +1322,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Dimka, who laughs at your slutiness with sarcastic jokes and then ignores you for the rest of the lesson.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A1','rel',1)>>
 						You sit next to Dimka and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Kuznetsov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Dimka, but he ignores you for the duration of the lesson.
 					<<else>>
 						<<run $npcs.inc('A1','rel',1)>>
@@ -1342,10 +1342,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vicky, who gives you a disgusted glare and walks away to sit with Vanya.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A15','rel',1)>>
 						You sit next to Vicky and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Kuznetsov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Vicky, but she ignores you and instead talks to Vanya and her sister.
 					<<else>>
 						<<run $npcs.inc('A15','rel',1)>>
@@ -1362,10 +1362,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Dan. He gives you a perverted smile and keeps asking if you want to suck his dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A10','rel',1)>>
 						You sit next to Dan and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Kuznetsov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Dan and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A10','rel',1)>>
@@ -1382,10 +1382,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vitek. He gives you a perverted smile and leans back in his chair to show you the bulge in his pants. "It's all yours, whore. All you have to do is ask." he says with a wink.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A9','rel',1)>>
 						You sit next to Vitek and you spend most of the class talking quietly with each other, often getting stern looks from Mr Kuznetsov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Vitek and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A156','rel',1)>>
@@ -1402,10 +1402,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vasily. He gives you a perverted smile and keeps asking if you want to suck his dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A11','rel',1)>>
 						You sit next to Vasily and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Kuznetsov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Vasily and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A11','rel',1)>>
@@ -1422,10 +1422,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Pauline, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A24','rel',1)>>
 						You sit next to Pauline and you spend most of the class talking quietly with each other. You often get stern looks from Mr. Kuznetsov when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Pauline and she immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A24','rel',1)>>
@@ -1454,10 +1454,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Marcus, who awkwardly shuffles in his seat and avoids looking at you. As you look around, you see many of your classmates pointing and giggling, and not just at you. "Go on $pc.name_nick! You know you want that big black cock stuffed into your whore mouth and down your slutty throat!" you hear someone shout out.</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A146','rel',1)>>
 						You sit next to Marcus and you spend most of the class talking quietly with each other, often getting stern looks from Mr. KuznetsovVal when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Marcus, who tries to politely avoid conversation, but people start laughing at him for letting you talk to him. They then turn their attention to you and mock you for trying to speak with a popular kid.
 					<<else>>
 						<<run $npcs.inc('A146','rel',1)>>
@@ -1547,7 +1547,7 @@
 	<<set $time.minutes += 15>>
 	<<image "characters/pavlovsk/school/teacher/ruslan/sex/pshop1.jpg">>
 	<<set $Kuznetsov_punishment_count += 1>>
-	<<if getvar("$grupTipe") == 3 or getvar("$Kuznetsov_punishment_count") < 5>>
+	<<if $q.school.func('isGroupMember','nerds') or getvar("$Kuznetsov_punishment_count") < 5>>
 		After your final class, you go to the school offices and knock on Mr. Kuznetsov''s door. After a few moments, you hear him tell you to enter. He is sitting behind his desk reading a book. You walk up to his desk and wait. He continues to read the book for almost ten minutes, until he finally looks up at you and puts the book down.
 		"I don't know what has gotten into you of late, but whatever it is needs to stop." He pauses a moment, but before you can even consider saying anything in your defense, he starts speaking again. "If it doesn''t then I will have to assume you are going to become a problem student and treat you accordingly. If this starts to become a regular thing with you, the punishment will become a lot more severe. More than just a few demerits on your record. Now get out of my office." Knowing better than to say anything, you turn and leave.
 		<<set $q.school.period = 0>>

+ 35 - 35
sugarcube/src/activities/school/gschool_lessonsev3.tw

@@ -1015,10 +1015,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Katja. She stares at you in disbelief and starts blushing bright red before she gets up and hurries to sit next to her sister.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A14','rel',1)>>
 						You sit next to Katja and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Katja, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A14','rel',1)>>
@@ -1033,7 +1033,7 @@
 				<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 				<<run $npcs.inc('A154','rel',1)>>
 				<<image "locations/pavlovsk/school/classroom/talk.jpg">>
-				<<if $pc.fame('pav_slut') >= 150 or getvar("$grupTipe") == 5>>
+				<<if $pc.fame('pav_slut') >= 150 or $q.school.func('isGroupMember','outcasts')>>
 					You sit next to Radomir, but he ignores your attempts to speak by saying that he only talks to girls who he wants to fuck, making it clear that you aren''t one of those girls.
 				<<else>>
 					You sit next to Radomir, but you don't get a chance to speak as he dominates the conversation about how amazing he and the band are and how he pulls all the hot chicks. He finishes by asking if you want to suck his dick.
@@ -1048,10 +1048,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Lavrenti. He gives you a perverted smile and keeps asking if you want to suck his dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A155','rel',1)>>
 						You sit next to Lavrenti and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Lavrenti and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A155','rel',1)>>
@@ -1068,10 +1068,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Valentin. He gives you a perverted smile and keeps asking if you want "go for a ride" with him. "And I don't mean on my bike, slut." he adds with a wink.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A158','rel',1)>>
 						You sit next to Valentin and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You are forced to sit next to Valentin and he immediately starts bullying you, eventually getting some of the other gopniks to join in.
 					<<else>>
 						<<run $npcs.inc('A158','rel',1)>>
@@ -1088,10 +1088,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Lariska, who gleefully laughs at you. "Don't you have a big cock waiting for you in the bathroom, slut?"</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A13','rel',1)>>
 						You sit next to Lariska and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Lariska, who giggles when you try talking to her. "Go and talk to Lesco. He's the only friend a loser like you will ever get. If you're lucky."
 					<<else>>
 						<<run $npcs.inc('A13','rel',1)>>
@@ -1108,10 +1108,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					<p>You sit next to Lina, who loudly scoffs. "Don't you have to go and suck a dick somewhere you massive whore?"</p>
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A19','rel',1)>>
 						You sit next to Lina and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Lina, who scoffs loudly when you try talking to her. "Go and talk to Lesco. He's the only friend a loser like you will ever get. If you're lucky."
 					<<else>>
 						<<run $npcs.inc('A19','rel',1)>>
@@ -1128,10 +1128,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Bella, who makes no effort to hide her disgust. "You're such a washed up and desperate slut who''ll do anything for a cock. How anyone here even tolerates you is beyond me."
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A22','rel',1)>>
 						You sit next to Bella and she begrudingly engages you in a brief conversation that she quickly shuts down, deeming it to be too childish for her.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						<p>Bella gives a disapproving look and makes no effort to hide her dislike of you. "How can you get to your age and not have at least one friend? You need to grow up."</p>
 					<<else>>
 						<p>You sit next to Bella and she rolls her eyes. "What do you want $pc.name_first? I don't have time to sit here and talk to kids."</p>
@@ -1147,10 +1147,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Petka. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A6','rel',1)>>
 						You sit next to Petka and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Petka, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A6','rel',1)>>
@@ -1342,10 +1342,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Erast, who awkwardly shuffles in his seat and avoids looking at you. You can tell your reputation as the school bike is making him feel uncomfortable, but he's too polite to say anything.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A150','rel',1)>>
 						You sit next to Erast and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Erast and he politely enages you in conversation before someone calls you out for trying to socialise with someone above your social standing and Erast grows quiet.
 					<<else>>
 						<<run $npcs.inc('A146','rel',1)>>
@@ -1362,10 +1362,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Julia. She avoids making eye contact with you and instead focuses on her coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A12','rel',1)>>
 						You sit next to Julia and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Julia, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A12','rel',1)>>
@@ -1382,10 +1382,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Katja. She stares at you in disbelief and starts blushing bright red before she gets up and hurries to sit next to her sister.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A14','rel',1)>>
 						You sit next to Katja and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Katja, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A14','rel',1)>>
@@ -1402,10 +1402,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Albina, who immediately looks you over before shaking her head in disgust and walking away to sit with Vicky.
 				<<else>>
-					<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$AlbinaQW['Friends']") == 2>>
+					<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or getvar("$AlbinaQW['Friends']") == 2>>
 						<<run $npcs.inc('A23','rel',1)>>
 						You sit next to Albina and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Albina, who gives you a pitiful look before turning away and ignoring you for the rest of the lesson.
 					<<else>>
 						You sit next to Albina and she rolls her eyes. She begrudingly engages you in a very brief and awkward conversation, her piercing glare dissauding you from making any further attempts.
@@ -1421,10 +1421,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Anushka, who ignores you at first before mouthing "slut" at you and doing a motion with her hands where she pretends to be forcing your head down on her imaginary dick.
 				<<else>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<<run $npcs.inc('A144','rel',1)>>
 						You sit next to Anushka and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Anushka and she starts having fun with you, gleefully mocking you so much that the other gopniks join in.
 					<<else>>
 						<<run $npcs.inc('A144','rel',1)>>
@@ -1441,10 +1441,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Natasha. She avoids making eye contact with you and instead focuses on her coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A16','rel',1)>>
 						You sit next to Natasha and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Natasha, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<run $npcs.inc('A16','rel',1)>>
@@ -1461,10 +1461,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Feofan. He looks at you in disgust and instead focuses on his coursework.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<run $npcs.inc('A152','rel',1)>>
 						You sit next to Feofan and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Feofan, but he ignores you and chooses to talk to other people or do his coursework.
 					<<else>>
 						<<run $npcs.inc('A152','rel',1)>>
@@ -1481,10 +1481,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Svyatoslav, who ignores you at first before getting your attention and pointing at the bulge in his pants while winking. "You know you want it, so come and get it slut." he whispers with a smile.
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<<run $npcs.inc('A8','rel',1)>>
 						You sit next to Svyatoslav and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Svyatoslav, who completely ignores you and talks to Vanya instead.
 					<<else>>
 						<<run $npcs.inc('A8','rel',1)>>
@@ -1501,10 +1501,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Vicky, who gives you a disgusted glare and walks away to sit with Vanya.
 				<<else>>
-					<<if getvar("$grupTipe") == 1>>
+					<<if $q.school.func('isGroupMember','cool')>>
 						<<run $npcs.inc('A15','rel',1)>>
 						You sit next to Vicky and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Vicky, but she ignores you and instead talks to Vanya and her sister.
 					<<else>>
 						<<run $npcs.inc('A15','rel',1)>>
@@ -1521,10 +1521,10 @@
 				<<if $pc.fame('pav_slut') >= 150>>
 					You sit next to Zinaida. She avoids making eye contact with you and instead focuses on playing a game on her phone before class starts.
 				<<else>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<<gs 'npc_relationship' 'modify' 'A142' 'like'>>
 						You sit next to Zinaida and you spend most of the class talking quietly with each other, often getting stern looks from Mr. Vasilyev when you get a bit too loud. He clears his throat and hushes you a few times before he finally tells you to be quiet or he'll send you to the principal''s office.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						You sit next to Zinaida, but she awkwardly ignores you and chooses to talk to other people or do her coursework.
 					<<else>>
 						<<gs 'npc_relationship' 'modify' 'A142' 'like'>>

+ 2 - 2
sugarcube/src/activities/school/gschool_lunch.tw

@@ -30,7 +30,7 @@
 		<<gt 'gschool_lunch' 'marcus_event'>>
 
 	<</if>>
-	<<if $q.cheerleading?.get('bella_stasya_gossip') == 0 and $q.cheerleading?.get('quest_stage') == 0 and $q.cheerleading?.get('gossip') >= 3 and (getvar("$grupTipe") == 1 or $pc.fame('pav_slut') >= 200)>>
+	<<if getvar("$cheerleadingQW['bella_stasya_gossip']") == 0 and getvar("$cheerleadingQW['quest_stage']") == 0 and getvar("$cheerleadingQW['gossip']") >= 3 and ($q.school.func('isGroupMember','cool') or $pc.fame('pav_slut') >= 200)>>
 		<<gt 'gschool_coolkid_chats' 'cherleading_notice'>>
 
 	<</if>>
@@ -123,7 +123,7 @@
 			<<gt 'gschool_events' 'leave_break_events2'>>
 		<</actCLA>>
 		$exit
-	<<elseif getvar("$grupTipe") == 3 and $nerd_game['invite_day'] < $time.daystart - $time.weekday>>
+	<<elseif $q.school.func('isGroupMember','nerds') and $nerd_game['invite_day'] < $time.daystart - $time.weekday>>
 		<<gt 'nerd_game_night' 'invite' 'lunch'>>
 	<</if>>
 	<<if getvar("$katjaQW['QWstage']") == 0 and $npcs.get('A14','rel') >= 60 and $pc.fame('pav_slut') < 50 and getvar("$class['school_grade_average']") >= 65 and $pc.skillLevel("makeup") >= 40 and $pc.hotcat >= 6>>

+ 10 - 10
sugarcube/src/activities/school/gschool_outcast_chats.tw

@@ -17,7 +17,7 @@
 		<<else>>
 			<p>He panics when he sees you walking over. "Get away from me! I have enough problems without being seen with the likes of you!" he exclaims as he quickly moves away from you.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -29,7 +29,7 @@
 		<<else>>
 			<p>Lesco looks at you with fear in his eyes. "Hey, I'm not here to pick on you. I just want to talk," you say softly trying to reassure him, but he's not buying it. "That's what they always say. Just leave me alone!" Despite your best efforts, you barely get a word out of him as he nervously waits for you to leave him alone.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -77,7 +77,7 @@
 
 			<</if>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -95,7 +95,7 @@
 			"You should be more polite. This is the only time any girl will ever willingly speak to a loser like you," you reply while trying not to inhale his foul aroma. He gives you a creepy smile that shows his filthy teeth, which look like they haven''t seen a toothbrush in years, if ever. "You want to date me. That's why you're talking to me."
 			<p>You snort. "What? No! Eeeww!" You quickly back away and leave him to his delusional fantasy, feeling his creepy gaze on the back of your head as you walk away.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -113,7 +113,7 @@
 			"You should be more polite. This is the only time any girl will ever willingly speak to a loser like you," you reply while trying not to inhale his foul aroma. He gives you a creepy smile that shows his filthy teeth, which look like they haven''t seen a toothbrush in years, if ever. "You want to date me. That's why you're talking to me."
 			<p>You snort. "What? No! Eeeww!" You quickly back away and leave him to his delusional fantasy, but sense him staring at your ass as you walk away.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -182,7 +182,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -277,7 +277,7 @@
 			<p>You see Sonia sitting by herself as usual and approach her with a friendly smile. She looks up and gives you a smile in return. "What's up $pc.name_nick?"</p>
 			You sit next to her. "I just wanted to talk." She is reluctant at first, but quickly relaxes and gets into the conversation. The two of you talk about fashion, makeup and eventually sex. You discuss the different people you have had sex with and who is better.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -293,7 +293,7 @@
 			<p>You see Sonia sitting by herself as usual. As you approach her with a friendly smile, she looks up and stiffens slightly. "Do you need something $pc.name_nick?"</p>
 			You sit next to her and engage her in conversation. The two of you talk about fashion, makeup and many other things. She seems well versed in these subjects and discusses them with great enthusiasm.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -308,7 +308,7 @@
 			<p>You see Sonia sitting by herself as usual. As you approach her with a friendly smile, she looks up and stiffens slightly. "Do you need something $pc.name_nick?"</p>
 			You sit next to her and engage her in conversation. The two of you talk about fashion, makeup and many other things. She seems well versed in these subjects and discusses them with great enthusiasm.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>
@@ -323,7 +323,7 @@
 			<p>You see Sonia sitting by herself as usual. As you approach her with a friendly smile, she looks up and stiffens slightly. "Do you need something $pc.name_nick?"</p>
 			You sit next to her and engage her in conversation. The two of you talk about fashion, makeup and many other things. She seems well versed in these subjects and discusses them with great enthusiasm. You can't help but notice your fellow nerds occasionally glancing your way with looks ranging from disapproval to outright disgust.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<run $q.school.func('groupRelInc','cool',-1)>>
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 		<<run $q.school.func('groupRelInc','nerds',-1)>>

+ 14 - 14
sugarcube/src/activities/school/gschool_post_shower.tw

@@ -189,7 +189,7 @@
 						<<set $sveta_dyke_rumor += 1>>
 						<p>She catches you looking at her and angrily glares at you. "No, bitch! I won't fuck you."</p>
 						The girls around you look up to figure out what''s happening and start laughing at you. You decide it's time to get dressed and leave.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						<<set $sveta_dyke_rumor += 1>>
 						She catches you looking at her body, sneers and says "Get lost, loser."
 						Girls around you look up, not sure what they missed. You decide it's time to get dressed and leave, embarrassed that you were caught checking her out.
@@ -371,7 +371,7 @@
 					<<if getvar("$LariskaQW['story']") >= 8>>
 						Feeling you watching her, she looks in your direction. Seeing you, she gives you a sweet smile and a wink before turning a little red. You wink back with your own smile.
 						You think it's probably time to get dressed before somebody else notices the two of you silently flirting with each other.
-					<<elseif $pc.fame('pav_slut') >= 250 or getvar("$grupTipe") == 5>>
+					<<elseif $pc.fame('pav_slut') >= 250 or $q.school.func('isGroupMember','outcasts')>>
 						Feeling somebody watching her, she looks around until she sees you. Turning red, she gives you a strange look before going back to getting dressed.
 						You should get dressed before somebody else notices you staring at her.
 					<<elseif $npcs.get('A13','rel') >= 50>>
@@ -495,7 +495,7 @@
 					<<elseif $pc.fame('pav_slut') >= 250>>
 						Feeling your eyes on her, she looks in your direction. Seeing you staring, she covers her breasts with her arm and makes a rude gesture at you.
 						Taking the hint, you get back to getting dressed before she starts a scene.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						Feeling your eyes on her, she looks in your direction. Seeing you staring, she gives you a disgusted look, but otherwise ignores you.
 						You should get back to getting dressed before others notice you staring.
 					<<elseif $npcs.get('A19','rel') >= 50>>
@@ -544,7 +544,7 @@
 						<p>Noticing you checking her out, she covers her breasts. "Oh my god, slut! Quit staring at me!"</p>
 						The other girls look up to see what''s happening. When they see who she's talking to, they start covering themselves and bitching at you or giving you dirty looks.
 						Now would be a good time to get dressed and get out of here, before this gets even more awkward.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						<p>Noticing you checking her out, she covers her breasts. "Oh my god, freak! Quit staring at me!"</p>
 						The other girls look up to see what''s happening. When they see who she's talking to, they start covering themselves and bitching at you or giving you dirty looks.
 						Now would be a good time to get dressed and get out of here, before this gets even more awkward.
@@ -595,7 +595,7 @@
 				<<if rand(1,4) == 1>>
 					<<if $pc.fame('pav_slut') >= 175>>
 						After finishing her shower and returning to the changing room, she opens her locker and starts getting dressed when she seems to realize someone is looking at her and suddenly turns and looks in your direction. Seeing you looking at her, she gives you an icy glare and turns away while covering herself up as best she can. You're embarrassed that you got caught but are glad that she didn''t say anything. You turn away and finish dressing yourself before leaving.
-					<<elseif getvar("$grupTipe") == 5>>
+					<<elseif $q.school.func('isGroupMember','outcasts')>>
 						After finishing her shower and returning to the changing room, she opens her locker and starts getting dressed when she seems to realize someone is looking at her and suddenly turns and looks in your direction. Seeing you looking at her, she glares at you, clearly unhappy that you were staring at her as she turns away covering herself up as best she can. You're embarrassed at your actions, but are thankful that she didn''t say anything. You turn away and finish dressing yourself before leaving.
 					<<elseif $npcs.get('A240','rel') >= 60>>
 						After finishing her shower and returning to the changing room, she opens her locker and starts getting dressed when she seems to realize someone is looking at her and suddenly turns and looks in your direction. Seeing you looking at her, she gives you a fleeting shy smile and blushes, but quickly winks at you before turning away, probably embarrassed at her own reaction as well. You smile inwardly and are glad that she didn''t say anything as you finish getting dressed before leaving.
@@ -640,7 +640,7 @@
 					<<elseif $npcs.get('A16','rel') >= 50>>
 						She is standing in front of her locker with the door open, apparently deciding on something. Seeing you staring, she covers herself as best she can and turns away, her face red.
 						You should probably get dressed and leave before this gets more awkward.
-					<<elseif $npcs.get('A16','rel') <= 20 or getvar("$grupTipe") == 5 or $pc.fame('pav_slut') >= 175>>
+					<<elseif $npcs.get('A16','rel') <= 20 or $q.school.func('isGroupMember','outcasts') or $pc.fame('pav_slut') >= 175>>
 						She is standing in front of her locker with the door open, apparently deciding on something. Seeing you staring, she covers herself as best she can and turns away, her face red with anger.
 						You should probably get dressed and leave before this gets more awkward.
 					<<else>>
@@ -837,7 +837,7 @@
 			<</actCLA>>
 			<<actCLA 'Keep checking her out'>>
 				<<if rand(1,4) == 1>>
-					<<if $npcs.get('A15','rel') <= 20 or getvar("$grupTipe") == 5>>
+					<<if $npcs.get('A15','rel') <= 20 or $q.school.func('isGroupMember','outcasts')>>
 						Letting your gaze linger, you are surprised when she suddenly looks in your direction. Seeing you staring, she gives you a dirty look and turns around, hiding her body.
 						You should get dressed and leave before it gets more awkward.
 					<<else>>
@@ -1071,7 +1071,7 @@
 					<<set $sveta_dyke_rumor += 1>>
 					<p>She catches you looking at her and angrily glares at you. "No, bitch! I won't fuck you!"</p>
 					The girls around you look up, figure out what''s happening, and start laughing at you. You think now might be a good time to end your shower.
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 					<<set $sveta_dyke_rumor += 1>>
 					She catches you looking at her body, sneers, and says "Get lost, loser."
 					The girls around you look up, not sure what they missed. You think now might be a good time to end your shower, embarrassed that you were caught checking her out.
@@ -1256,7 +1256,7 @@
 				<<if getvar("$LariskaQW['story']") >= 8>>
 					Almost as if she knew you were looking, she turns her naked body towards you. Her eyes are closed, but a flush starts creeping up her neck. She starts to cup her perky little breasts but stops, seemingly remembering she is in a public place.
 					Smiling to yourself, you think you should probably finish your shower before somebody notices you oggling her naked body.
-				<<elseif $pc.fame('pav_slut') >= 250 or getvar("$grupTipe") == 5>>
+				<<elseif $pc.fame('pav_slut') >= 250 or $q.school.func('isGroupMember','outcasts')>>
 					Feeling somebody watching her, she looks around until she sees you. Turning red, she gives you a strange look before going back to showering.
 					You should finish your shower before somebody else notices you staring at her.
 				<<elseif $npcs.get('A13','rel') >= 50>>
@@ -1380,7 +1380,7 @@
 				<<elseif $pc.fame('pav_slut') >= 250>>
 					She seems to be enjoying her shower when she suddenly stops and looks at you. Seeing you staring, she sneers and mutters "lesbo slut" loud enough for you to hear. She then goes back to her shower and ignores you.
 					You should get back to your own shower before others notice you staring.
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 					She seems into her shower, when she suddenly stops and looks at you. Seeing you staring, she gives you a disgusted look before going back to her shower and ignoring you.
 					You should get back to your own shower before others notice you staring.
 				<<elseif $npcs.get('A19','rel') >= 50>>
@@ -1428,7 +1428,7 @@
 					<p>She seems to be enjoying her shower when she looks in your direction and notices you staring at her. "What do you want, slut? Can't get enough cock to satisfy you?"</p>
 					Startled, you look away, but the damage is already done. You can hear her telling the others that you were staring at her while she showered.
 					It would be best for you to finish your shower and leave before things get worse.
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 					<p>She seems to be enjoying her shower when she looks in your direction and notices you staring at her. "Oh my god, freak! Quit staring at me!"</p>
 					Startled, you look away, but the damage is already done. You can hear her telling the others that you were staring at her while she showered.
 					It would be best for you to finish your shower and leave before things get worse.
@@ -1476,7 +1476,7 @@
 			<<if rand(1,4) == 1>>
 				<<if $pc.fame('pav_slut') >= 175>>
 					She seems to be enjoying her shower when she suddenly stops and looks in your direction. Seeing you looking at her, she glares at you as she turns away while covering herself up as best she can. You're a little embarrassed that you got caught, but are glad that she didn''t say anything. You turn away and finish your shower before leaving.
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 					She seems to be enjoying her shower when she suddenly stops and looks in your direction. Seeing you looking at her, she immediately turns away while covering herself up as best she can. You're embarrassed that she caught you but glad she didn''t say anything. You turn away and finish your shower before leaving.
 				<<elseif $npcs.get('A240','rel') >= 60>>
 					She seems to be enjoying her shower when she suddenly stops and looks in your direction. Seeing you looking at her, she smiles shyly and blushes before winking at you and turning away, clearly somewhat embarrassed. You smile inwardly but are glad that she didn''t say anything as you finish your shower and leave.
@@ -1521,7 +1521,7 @@
 				<<elseif $npcs.get('A16','rel') >= 50>>
 					She seems to be enjoying her shower when she suddenly stops and looks in your direction. Seeing you staring, she covers herself as best she can and turns away, her face red.
 					You should finish your shower and leave before this gets more awkward.
-				<<elseif $npcs.get('A16','rel') <= 20 or getvar("$grupTipe") == 5 or $pc.fame('pav_slut') >= 175>>
+				<<elseif $npcs.get('A16','rel') <= 20 or $q.school.func('isGroupMember','outcasts') or $pc.fame('pav_slut') >= 175>>
 					She seems to be enjoying her shower when she suddenly stops and looks in your direction. Seeing you staring, she covers herself as best she can and turns away, her face red with anger.
 					You should finish your shower and leave before this gets more awkward.
 				<<else>>
@@ -1723,7 +1723,7 @@
 		<</actCLA>>
 		<<actCLA 'Keep checking her out'>>
 			<<if rand(1,4) == 1>>
-				<<if $npcs.get('A15','rel') <= 20 or getvar("$grupTipe") == 5>>
+				<<if $npcs.get('A15','rel') <= 20 or $q.school.func('isGroupMember','outcasts')>>
 					Letting your gaze linger, you are surprised when she suddenly looks in your direction. Seeing you staring, she gives you a dirty look and turns around, hiding her body.
 					You should finish showering and leave before this gets more awkward.
 				<<else>>

+ 2 - 2
sugarcube/src/activities/school/gschool_sex.tw

@@ -809,7 +809,7 @@
 	<<image "characters/pavlovsk/school/boy/lazar/sex/school/shower/lazar8.jpg">>
 	You climb off him, get on your knees and start sucking his cock again, tasting your own juices and stroking it with your hand. When you feel his dick start to twitch, you stop sucking and barely pull your mouth off his dick when his cum spurts out, hitting the side of your face. You stroke him several more times, milking every last drop of cum out of him.
 	<p>"Fuck I needed that! That was amazing," he says as he stands up and pulls his pants back up.</p>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<p>"Hey, you going to the game on Saturday?" he asks as he starts getting cleaned up.</p>
 		<p>You smile at him. "Maybe. Depends on what's going on. Why?" you ask.</p>
 		<p>He grins. "I thought we might hook up after the game? I am sure I could use another release by then. So what do you think?" he asks.</p>
@@ -835,7 +835,7 @@
 	<</actCLA>>
 <</if>>
 <<if $location_var[$here][0] == 'vd_lockerroom'>>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<<run $pc.fameInc('pav','sex',3)>>
 	<<else>>
 		<<run $pc.fameInc('pav','sex',10)>>

+ 41 - 41
sugarcube/src/activities/school/gschool_socialchg.tw

@@ -22,45 +22,45 @@
 	<<elseif $q.school.groups['gopniks'].rel < 400 and $q.school.groups['gopniks'].rel > 350 and $grupwarning[1] > 1>>
 		<<setinit $grupwarning[4] = 1>>
 	<</if>>
-	<<if $pc.fame('pav_slut') > 225 and getvar("$grupTipe") == 1>>
+	<<if getvar("$fame['pav_slut']") > 225 and $q.school.func('isGroupMember','cool')>>
 		<<gt 'gschool_socialchg' 'Pavlovsk slut'>>
-	<<elseif $pc.fame('pav_slut') > 250 and getvar("$grupTipe") == 2>>
+	<<elseif getvar("$fame['pav_slut']") > 250 and $q.school.func('isGroupMember','jocks')>>
 		<<gt 'gschool_socialchg' 'Pavlovsk slut'>>
-	<<elseif $pc.fame('pav_slut') > 175 and getvar("$grupTipe") == 3>>
+	<<elseif getvar("$fame['pav_slut']") > 175 and $q.school.func('isGroupMember','nerds')>>
 		<<gt 'gschool_socialchg' 'Pavlovsk slut'>>
-	<<elseif $pc.fame('pav_slut') > 300 and getvar("$grupTipe") == 4>>
+	<<elseif getvar("$fame['pav_slut']") > 300 and $q.school.func('isGroupMember','gopniks')>>
 		<<gt 'gschool_socialchg' 'Pavlovsk slut'>>
-	<<elseif $q.school.groups['cool'].rel < 200 and getvar("$grupTipe") == 1>>
+	<<elseif $grupvalue[1] < 200 and $q.school.func('isGroupMember','cool')>>
 		<<gt 'gschool_socialchg' 'coolkid outcast'>>
-	<<elseif $q.school.groups['cool'].rel < 400 and getvar("$grupTipe") == 1 and $grupwarning[1] == 0>>
+	<<elseif $grupvalue[1] < 400 and $q.school.func('isGroupMember','cool') and $grupwarning[1] == 0>>
 		<<gt 'gschool_socialchg' 'coolkid warn 1'>>
-	<<elseif $q.school.groups['cool'].rel < 300 and getvar("$grupTipe") == 1 and $grupwarning[1] >= 0>>
+	<<elseif $grupvalue[1] < 300 and $q.school.func('isGroupMember','cool') and $grupwarning[1] >= 0>>
 		<<gt 'gschool_socialchg' 'coolkid warn 2'>>
-	<<elseif $pc.fame('pav_slut') > 175 and getvar("$grupTipe") == 1 and $grupslutwarning[1] == 0>>
+	<<elseif getvar("$fame['pav_slut']") > 175 and $q.school.func('isGroupMember','cool') and $grupslutwarning[1] == 0>>
 		<<gt 'gschool_socialchg' 'coolkid slut warn'>>
-	<<elseif $q.school.groups['jocks'].rel < 200 and getvar("$grupTipe") == 2>>
+	<<elseif $grupvalue[2] < 200 and $q.school.func('isGroupMember','jocks')>>
 		<<gt 'gschool_socialchg' 'jock outcast'>>
-	<<elseif $q.school.groups['jocks'].rel < 400 and getvar("$grupTipe") == 2 and $grupwarning[2] == 0>>
+	<<elseif $grupvalue[2] < 400 and $q.school.func('isGroupMember','jocks') and $grupwarning[2] == 0>>
 		<<gt 'gschool_socialchg' 'jock warn 1'>>
-	<<elseif $q.school.groups['jocks'].rel < 300 and getvar("$grupTipe") == 2 and $grupwarning[2] >= 0>>
+	<<elseif $grupvalue[2] < 300 and $q.school.func('isGroupMember','jocks') and $grupwarning[2] >= 0>>
 		<<gt 'gschool_socialchg' 'jock warn 2'>>
-	<<elseif $pc.fame('pav_slut') > 200 and getvar("$grupTipe") == 2 and $grupslutwarning[2] == 0>>
+	<<elseif getvar("$fame['pav_slut']") > 200 and $q.school.func('isGroupMember','jocks') and $grupslutwarning[2] == 0>>
 		<<gt 'gschool_socialchg' 'jock slut warn'>>
-	<<elseif $q.school.groups['nerds'].rel < 200 and getvar("$grupTipe") == 3>>
+	<<elseif $grupvalue[3] < 200 and $q.school.func('isGroupMember','nerds')>>
 		<<gt 'gschool_socialchg' 'nerd outcast'>>
-	<<elseif $q.school.groups['nerds'].rel < 400 and getvar("$grupTipe") == 3 and $grupwarning[3] == 0>>
+	<<elseif $grupvalue[3] < 400 and $q.school.func('isGroupMember','nerds') and $grupwarning[3] == 0>>
 		<<gt 'gschool_socialchg' 'nerd warn 1'>>
-	<<elseif $q.school.groups['nerds'].rel < 300 and getvar("$grupTipe") == 3 and $grupwarning[3] >= 0>>
+	<<elseif $grupvalue[3] < 300 and $q.school.func('isGroupMember','nerds') and $grupwarning[3] >= 0>>
 		<<gt 'gschool_socialchg' 'nerd warn 2'>>
-	<<elseif $pc.fame('pav_slut') > 125 and getvar("$grupTipe") == 3 and $grupslutwarning[3] == 0>>
+	<<elseif getvar("$fame['pav_slut']") > 125 and $q.school.func('isGroupMember','nerds') and $grupslutwarning[3] == 0>>
 		<<gt 'gschool_socialchg' 'nerd slut warn'>>
-	<<elseif $q.school.groups['gopniks'].rel < 200 and getvar("$grupTipe") == 4>>
+	<<elseif $grupvalue[4] < 200 and $q.school.func('isGroupMember','gopniks')>>
 		<<gt 'gschool_socialchg' 'gopnik outcast'>>
-	<<elseif $q.school.groups['gopniks'].rel < 400 and getvar("$grupTipe") == 4 and $grupwarning[4] == 0>>
+	<<elseif $grupvalue[4] < 400 and $q.school.func('isGroupMember','gopniks') and $grupwarning[4] == 0>>
 		<<gt 'gschool_socialchg' 'gopnik warn 1'>>
-	<<elseif $q.school.groups['gopniks'].rel < 300 and getvar("$grupTipe") == 4 and $grupwarning[4] >= 0>>
+	<<elseif $grupvalue[4] < 300 and $q.school.func('isGroupMember','gopniks') and $grupwarning[4] >= 0>>
 		<<gt 'gschool_socialchg' 'gopnik warn 2'>>
-	<<elseif $pc.fame('pav_slut') > 250 and getvar("$grupTipe") == 4 and $grupslutwarning[4] == 0>>
+	<<elseif getvar("$fame['pav_slut']") > 250 and $q.school.func('isGroupMember','gopniks') and $grupslutwarning[4] == 0>>
 		<<gt 'gschool_socialchg' 'gopnik slut warn'>>
 	<<elseif $pc.fame('pav_slut') < 175 and $q.school.groups['cool'].rel > 800 and getvar("$grupTipe") != 1>>
 		<<gt 'gschool_socialchg' 'coolkid'>>
@@ -97,7 +97,7 @@
 	<<run $q.school.func('groupMembersRelInc','jocks',-25)>>
 	<<run $q.school.func('groupMembersRelInc','gopniks',-20)>>
 	<<run $q.school.func('groupMembersRelInc','nerds',-35)>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<image "locations/pavlovsk/school/events/coolslut.jpg">>
 		<<if $npcs.get('A25','slutStatus',0) == 0>>
 			<p>Irina and Dimka walk up to you. Dimka is smirking at you while Irina looks you over from head to toe in complete disgust. Just as you're about to ask what's going on, Irina cuts you off. "Shut your cum hole, slut! I don't want to smell your cum breath. We've all heard about what you've been up to, and your ass is out. You're no longer welcome around us. Find some dick to suck, and maybe they will pretend to care about you." With that, Irina turns and walks away as Dimka gives you a final look and shakes his head.</p>
@@ -105,7 +105,7 @@
 			<p>Irina and Dimka walk up to you. Dimka is smirking at you while Irina looks you over from head to toe in complete disgust. Then, just as you're about to ask what's going on, Irina cuts you off. "Shut your cum hole, slut! I don't want to smell your cum breath. We've all heard about what you've been up to, and your ass is out. You're no longer welcome around us. Go and find Sonia. I'm sure you two have a lot in common now." With that, Irina turns and walks away as Dimka gives you a final look and shakes his head.</p>
 		<</if>>
 		"What a waste, you fucking slut." He then spits at your feet before leaving as well. You hear many of the students around you laughing as you look around. Having been publicly shamed and disavowed by your clique, the other students are ready to prey on your weakness and either start mocking you or actively look away. You grab your stuff and hurry to your next class.
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<image "locations/pavlovsk/school/events/jockslut.jpg">>
 		<<if $q.christina?.get('fight') < 1 or $q.christina?.get('blackmail') < 2>>
 			<p><<npc 'A18'>><</npc>>, Lariska, and Lina walk up to you. Lariska and Lina are looking at you in disgust while <<npc 'A18'>><</npc>> is smirking. She shoves you hard up against your locker. "What are you doing here slut? Shouldn't you be in the boys' bathroom sucking a bunch of cocks? We all heard that's all you do now. At least sluts know to get paid, but you just give it away for free, " she laughs mockingly. Lariska, Lina and several other students nearby join in, openly mocking you.</p>
@@ -117,17 +117,17 @@
 		<<else>>
 			"Go hang out with the other losers because none of us gives a shit about you anymore. I'm sure you and Sonia have a lot in common now." Lazar says mockingly before walking away. Albina looks at you with what you think is disappointment before she shakes her head and follows Lazar. Having been publicly shamed and disavowed by your clique, the other students are ready to prey on your weakness and either start mocking you or actively look away. You grab your stuff and hurry to your next class.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<image "locations/pavlovsk/school/events/nerdslut.jpg">>
 		<p>A group of students stand in front of you, wanting a better look at what's written on your locker. They start laughing when you look at them and quickly hurry away from you as if you have the plague. You turn and try to find some of your friends, but most seem to be hiding or hurrying off when you approach. You finally manage to catch up to Gerasim, but he turns to you just as you're about to say something. "Please go away! I don't know what you've gotten yourself into, but the things they say you've done..." He looks disgusted. "I'm sorry, but I can't be seen hanging out with you anymore. I've got enough problems without you making them worse."</p>
 		<p>He pauses for a second to stare at the dejected look on your face, realizing that you are now an outcast. He then lets out a short sigh. "I'm sorry, I really am, but this is your fault. What were you thinking doing all that.. sex stuff? Just leave me alone." The last part he says loudly enough for others to hear, which causes some of the other students to laugh at you as he wheels himself away from you decidedly. You take a second to look around as most other students either start mocking you or actively look away. Finally, you grab your stuff and hurry to your next class.</p>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<image "locations/pavlovsk/school/events/gopnikslut.jpg">>
 		<p>You turn and see Pauline, Lera and Lena standing next to you. Lera is snickering. Pauline looks like she's preparing to beat you up, and Lera looks at you with disgust. Pauline shakes her head at you and finally speaks up. "I don't know what your problem is, but apparently, hanging out, partying and having a good time wasn't enough for you. Noooo, you had to go around and be the town bicycle! Don't act all surprised. We've all heard about how you let any guy fuck you in whatever hole they desire. Spineless sluts have no place with us, so stay away from us, or I will beat the living shit out of you." With that, Pauline shoves you against your locker and walks away.</p>
 		<p>Lena gives you a final look of disgust and shoves you again while Lera gives you a few parting words before walking away. "If you ever try to approach us, we'll take you to nasty guys who will fuck you so hard that your holes will be loose enough to stick a watermelon inside them!" Having been publicly shamed and disavowed by your clique, the other students are ready to prey on your weakness and either start mocking you or actively look away. You grab your stuff and hurry to your next class.</p>
 	<</if>>
 	<font color = red>You have been kicked out of your social group and become an outcast.</font>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<actCLA 'Go to class'>>
 		<<set $q.school.period = 0>> <<gt 'gschool_lessons' 'schedule'>>
 	<</actCLA>>
@@ -155,15 +155,15 @@
 		<<run $q.school.func('groupRelSet','jocks',Math.min(rand(675,725),grupvalue[2]))>>
 		<<run $q.school.func('groupRelSet','nerds',Math.min(rand(625,675),grupvalue[3]))>>
 		<<run $q.school.func('groupRelSet','gopniks',Math.min(rand(600,650),grupvalue[4]))>>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			<<run $q.school.func('groupRelSet','jocks',rand(500,600))>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 3>>
+		<<if $q.school.func('isGroupMember','nerds')>>
 			<<run $q.school.func('groupRelSet','nerds',rand(500,600))>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<<run $q.school.func('groupRelSet','gopniks',rand(500,600))>>
 
 		<</if>>
@@ -171,7 +171,7 @@
 		<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 		<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 		<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-		<<set $grupTipe = 1>>
+		<<run $q.school.func('setGroupMembership','cool')>>
 		<<setinit $grupTipe['joined_cool'] = 1>>
 		<<run $q.school.func('groupMembersRelInc','cool',5)>>
 		<<actCLA 'Go to class'>>
@@ -235,15 +235,15 @@
 		<<run $q.school.func('groupRelSet','cool',Math.min(rand(675,725),grupvalue[1]))>>
 		<<run $q.school.func('groupRelSet','nerds',Math.min(rand(600,650),grupvalue[3]))>>
 		<<run $q.school.func('groupRelSet','gopniks',Math.min(rand(650,700),grupvalue[4]))>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<run $q.school.func('groupRelSet','cool',rand(500,600))>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 3>>
+		<<if $q.school.func('isGroupMember','nerds')>>
 			<<run $q.school.func('groupRelSet','nerds',rand(500,600))>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<<run $q.school.func('groupRelSet','gopniks',rand(500,600))>>
 
 		<</if>>
@@ -251,7 +251,7 @@
 		<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 		<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 		<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-		<<set $grupTipe = 2>>
+		<<run $q.school.func('setGroupMembership','jocks')>>
 		<<setinit $grupTipe['joined_jock'] = 1>>
 		<<run $q.school.func('groupMembersRelInc','jocks',5)>>
 		<<actCLA 'Go to class'>>
@@ -318,15 +318,15 @@
 		<<run $q.school.func('groupRelSet','cool',Math.min(rand(600,650),grupvalue[1]))>>
 		<<run $q.school.func('groupRelSet','jocks',Math.min(rand(625,625),grupvalue[2]))>>
 		<<run $q.school.func('groupRelSet','gopniks',Math.min(rand(600,650),grupvalue[4]))>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<run $q.school.func('groupRelSet','cool',rand(500,600))>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			<<run $q.school.func('groupRelSet','jocks',rand(500,600))>>
 
 		<</if>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			<<run $q.school.func('groupRelSet','gopniks',rand(500,600))>>
 
 		<</if>>
@@ -334,7 +334,7 @@
 		<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 		<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 		<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-		<<set $grupTipe = 3>>
+		<<run $q.school.func('setGroupMembership','nerds')>>
 		<<setinit $grupTipe['joined_nerd'] = 1>>
 		<<setinit $nerd_game['invite_day'] = $time.daystart>>
 		<<setinit $nerd_game['game_day'] = $time.daystart>>
@@ -453,7 +453,7 @@
 	<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 	<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 	<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<setinit $grupTipe['before_outcast'] = 1>>
 	<<run $q.school.func('groupMembersRelInc','cool',-20)>>
 	<<actCLA 'Go to class'>>
@@ -477,7 +477,7 @@
 	<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 	<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 	<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<setinit $grupTipe['before_outcast'] = 2>>
 	<<run $q.school.func('groupMembersRelInc','jocks',-20)>>
 	<<actCLA 'Go to class'>>
@@ -497,7 +497,7 @@
 	<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 	<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 	<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<setinit $grupTipe['before_outcast'] = 3>>
 	<<run $q.school.func('groupMembersRelInc','nerds',-20)>>
 	<<actCLA 'Go to class'>>
@@ -517,7 +517,7 @@
 	<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 	<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 	<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<setinit $grupTipe['before_outcast'] = 4>>
 	<<run $q.school.func('groupMembersRelInc','gopniks',-20)>>
 	<<actCLA 'Go to class'>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/NikoEv.tw

@@ -5,7 +5,7 @@
 <!-- !! Nikolai Niko Volkov Romance  numnpc = 189-->
 <<if $location_var[$here][0] == 'Intro'>>
 	<<image "characters/pavlovsk/school/boy/niko/nikoev/avatars/1.jpg">>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<<set $NikoIntro = -1>>
 		<p>As you're walking out of school, you bump into one of your fellow gopniks, Nikolai Volkov, who immediately gives you a warm smile. "Hello there $pc.name_first, how was your summer?"</p>
 		<p>You smile back at him. "Good. How was yours?"</p>

+ 10 - 10
sugarcube/src/autogenerated/unsorted/NikoWhore.tw

@@ -462,24 +462,24 @@
 	<<run $q.school.func('groupRelSet','jocks',0)>>
 	<<run $q.school.func('groupRelSet','nerds',0)>>
 	<<run $q.school.func('groupRelSet','gopniks',0)>>
-	<<if getvar("$grupTipe") == 1>>
-		<<set $VKGroup = 1>> <<set $grupTipe = 5>>
+	<<if $q.school.func('isGroupMember','cool')>>
+		<<set $VKGroup = 1>> <<run $q.school.func('setGroupMembership','outcasts')>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 2>>
-		<<set $VKGroup = 2>> <<set $grupTipe = 5>>
+	<<if $q.school.func('isGroupMember','jocks')>>
+		<<set $VKGroup = 2>> <<run $q.school.func('setGroupMembership','outcasts')>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 3>>
-		<<set $VKGroup = 3>> <<set $grupTipe = 5>>
+	<<if $q.school.func('isGroupMember','nerds')>>
+		<<set $VKGroup = 3>> <<run $q.school.func('setGroupMembership','outcasts')>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 4>>
-		<<set $VKGroup = 4>> <<set $grupTipe = 5>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
+		<<set $VKGroup = 4>> <<run $q.school.func('setGroupMembership','outcasts')>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 6>>
-		<<set $VKGroup = 6>> <<set $grupTipe = 5>>
+	<<if $q.school.func('isGroupMember','teachers')>>
+		<<set $VKGroup = 6>> <<run $q.school.func('setGroupMembership','outcasts')>>
 
 	<</if>>
 	<!-- !! doing all 5000 is too much for fame system to work as intended so its meant to be like this-->

+ 4 - 4
sugarcube/src/autogenerated/unsorted/dimaRevenge.tw

@@ -52,7 +52,7 @@
 		<<actCLA 'Listen in'>>
 			<h2>Girls bathroom</h2>
 			<<image "locations/pavlovsk/school/bathroom/girlsbathroom.jpg">>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				<p>"$pc.name_first thinks she's so great. What I wouldn't give to watch her fall."</p>
 				"You won''t need to give anything. Word is she cheated on Dimka and now he's out to destroy her. You have to be a real idiot to cross him."
 				<p>"I didn't even know they were dating. Where did you hear this?"</p>
@@ -87,7 +87,7 @@
 						<<gt 'gschool_lessons' 'short_break'>>
 					<</actCLA>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 2>>
+			<<elseif $q.school.func('isGroupMember','jocks')>>
 				<p>"I heard $pc.name_first is on steroids."</p>
 				"I heard she sucked off the coach for a spot on the team."
 				At this point you can't help yourself and barge out of the stall to the surprise of the two girls.
@@ -127,7 +127,7 @@
 						<<gt 'gschool_lessons' 'short_break'>>
 					<</actCLA>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 3>>
+			<<elseif $q.school.func('isGroupMember','nerds')>>
 				<p>"So, did you hear about that nerd girl, $pc.name_first? They say she is secretly a slut who gives it up to all the nerds."</p>
 				"I heard she's actually an idiot and the nerds do her homework for her in exchange for blowjobs whenever they want."
 				'You cover your ears and try to ignore their comments. After they leave you go to the sink and splash water on your face and try to steel yourself.
@@ -221,7 +221,7 @@
 						<<gt 'gschool_lessons' 'short_break'>>
 					<</actCLA>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 4>>
+			<<elseif $q.school.func('isGroupMember','gopniks')>>
 				<p>"You know that $pc.name_first girl who is always hanging out with the gopniks. Well, I heard she has to suck them off everyday to be allowed to hang out with them."</p>
 				"I believe it. She acts all tough, but if it weren''t for her friends she would just be a scared little girl."
 				'No fucking way are you standing for this! You quickly exit the stall head towards them. The first girl sees you and bolts out of the restroom.

+ 2 - 2
sugarcube/src/autogenerated/unsorted/gdksport.tw

@@ -246,7 +246,7 @@
 						<<actCLA 'Train with Starlets'>>
 	<<gt 'albina_starlets' 'Starletsreact'>>
 					<</actCLA>>
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 						<<actCLA 'Train with Starlets'>>
 	<<gt 'albina_starlets' 'StarletsEnd'>>
 					<</actCLA>>
@@ -364,7 +364,7 @@
 			<<if getvar("$AlbinaQW['StarletsJoined']") == 0 and getvar("$AlbinaQW['StarletsShutDown']") == 0 and mid($start_type,1,2) == 'sg' and ($time.month < 10 or ($time.month == 10 and $time.day < 18))>>
 				<<if getvar("$alterstrtimg") == 13>>
 					<<gt 'albina_starlets' 'albina3'>>
-				<<elseif (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2) and $npcs.get('A23','rel') >= 60>>
+				<<elseif ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 60>>
 					<<gt 'albina_starlets' 'albina2'>>
 				<<else>>
 					<<gt 'albina_starlets' 'albina1'>>

+ 8 - 8
sugarcube/src/autogenerated/unsorted/gopnik_initiation.tw

@@ -175,15 +175,15 @@
 	<<run $q.school.func('groupRelSet','cool',Math.min(rand(600,650),grupvalue[1]))>>
 	<<run $q.school.func('groupRelSet','jocks',Math.min(rand(625,675),grupvalue[2]))>>
 	<<run $q.school.func('groupRelSet','nerds',Math.min(rand(600,650),grupvalue[3]))>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<run $q.school.func('groupRelSet','cool',rand(500,600))>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<<run $q.school.func('groupRelSet','jocks',rand(500,600))>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<<run $q.school.func('groupRelSet','nerds',rand(500,600))>>
 
 	<</if>>
@@ -191,7 +191,7 @@
 	<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 	<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 	<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-	<<set $grupTipe = 4>>
+	<<run $q.school.func('setGroupMembership','gopniks')>>
 	<<setinit $grupTipe['joined_gopnik'] = 1>>
 	<<gs 'gopnik_initiation' 'group_rel_change' 'gopniks' 10>>
 	<<image "locations/pavlovsk/school/oldschool/hall.jpg">>
@@ -945,15 +945,15 @@
 	<<run $q.school.func('groupRelSet','cool',Math.min(rand(600,650),grupvalue[1]))>>
 	<<run $q.school.func('groupRelSet','jocks',Math.min(rand(625,675),grupvalue[2]))>>
 	<<run $q.school.func('groupRelSet','nerds',Math.min(rand(600,650),grupvalue[3]))>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<run $q.school.func('groupRelSet','cool',rand(500,600))>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<<run $q.school.func('groupRelSet','jocks',rand(500,600))>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<<run $q.school.func('groupRelSet','nerds',rand(500,600))>>
 
 	<</if>>
@@ -961,7 +961,7 @@
 	<<setinit $old_grupvalue[2] = $q.school.groups['jocks'].rel>>
 	<<setinit $old_grupvalue[3] = $q.school.groups['nerds'].rel>>
 	<<setinit $old_grupvalue[4] = $q.school.groups['gopniks'].rel>>
-	<<set $grupTipe = 4>>
+	<<run $q.school.func('setGroupMembership','gopniks')>>
 	<<gs 'gopnik_initiation' 'group_rel_change' 'gopniks' 5>>
 	<<image "locations/pavlovsk/school/oldschool/hall.jpg">>
 	You follow Lena and Lera, who don't really talk to you. You get the feeling you might have made a mistake, but you agreed to be the party slut and you're not sure they would even let you back out now. Once you're at the old school, they slip through the busted front door and head down the main hallway that leads to the old offices and teacher''s lounge.

+ 5 - 5
sugarcube/src/autogenerated/unsorted/journal.tw

@@ -261,11 +261,11 @@
 		<</if>>
 		<<if getvar("$grupTipe") == 0>>
 			'You are not a member of any particular school social group.' + $journal_school_standing
-		<<elseif getvar("$grupTipe") == 1>>
+		<<elseif $q.school.func('isGroupMember','cool')>>
 			'Your school social group consists of the popular, cool and beautiful.' + $journal_school_standing
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			'Your school social group consists of jocks and natural athletes.' + $journal_school_standing
-		<<elseif getvar("$grupTipe") == 3>>
+		<<elseif $q.school.func('isGroupMember','nerds')>>
 			'Your school social group consists of nerds, geeks and good students.' + $journal_school_standing
 			<<if $nerd_game['game_day'] > $time.daystart>>
 				<p>You have been invited to a games night on $time.weekday_name[(week + (nerd_game['game_day']  - daystart))] at 20:00 in the community center library.</p>
@@ -275,9 +275,9 @@
 				You have been invited to a games night tonight at 20:00 in the community center library.
 
 			<</if>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			'Your school social group consists of gopniks, rebels, punks or troublemakers.' + $journal_school_standing
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			Your school social group consists of losers, teacher''s pets, sluts and the ugly.
 		<</if>>
 		Cool Kids

+ 53 - 53
sugarcube/src/autogenerated/unsorted/journal_school.tw

@@ -108,7 +108,7 @@
 	All the popular kids listed by popularity within their own clique, which is mostly based on style, natural charm, good looks and how wealthy their family is.
 	<<image "characters/shared/headshots_main/1.jpg">>
 	<center>Dimka Nosov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Dimka Nosov is a cute guy and all the girls adore him. Considered the coolest kid in school, he comes from a fairly wealthy family and is always dressed in expensive stylish clothes. He throws some epic parties that everyone that is anyone tries to get invited to, with even kids from Pushkin sometimes attending. He is the king of the school and everyone wants to either be his friend or hang out with him.
 	<<else>>
 		Dimka Nosov is a cute guy and all the girls adore him. Considered the coolest kid in school, the guys tend to either befriend him or loath him. He comes from a fairly wealthy family and is always dressed in expensive stylish clothes. Since Lavrenti started hanging out with the gopniks, Dimka is now even king of the parties. Despite his pleasant smile and friendly demeanor, there are rumors saying he is a sadist bastard that always gets what he wants. He seems to love verbally tormenting the nerds and outcasts when given the chance.
@@ -124,7 +124,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/22.jpg">>
 	<center>Elžbieta "Bella" Artamonov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Bella Artamonov is the most beautiful girl in school and knows it, which makes her come off as arrogant. You don't know her very well since she doesn''t want to deal with "kids". She seems to consider herself an adult already and the rest of her classmates as being beneath her, too young and childish for her to be around. You've heard some rumors about her only hanging around with people much older than herself.
 	<<else>>
 		Bella Artamonov is the most beautiful girl in school and knows it, which makes her come off like a self centered bitch. You don't know her at all since she doesn''t want to deal with "kids", especially those with no sense of style. She seems to consider herself an adult already and the rest of her classmates as being beneath her, too young and childish for her to be around. You've heard some rumors about her only hanging around with people much older than herself.
@@ -140,7 +140,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/17.jpg">>
 	<center>Irina Devyatova</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Irina Devyatova is a tall and pretty girl. She knows it and takes full advantage of it, using her looks to sweet talk boys and teachers alike to get her way. She has a very arrogant and haughty personality hidden behind her sweet smile. She is the queen of what is in fashion and often berates those she deems to have no sense of style, more than once driving other girls to tears. She is often the center of attention when the popular kids hang out. When needed, she often sweet talks the jocks and gopniks into doing her dirty work, making them think they have a chance with her and then laughing at them behind their back.
 	<<else>>
 		Irina Devyatova is a tall and pretty girl. She knows it and takes full advantage of it, using her looks to sweet talk boys and teachers alike to get her way. She has a very arrogant and haughty personality hidden behind her sweet smile. She is the queen of what is in fashion and often berates those she deems to have no sense of style, more than once driving other girls to tears. When needed, she often sweet talks the jocks and gopniks into doing her dirty work.
@@ -156,7 +156,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/15.jpg">>
 	<center>Viktoriya "Vicky" Meynold</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Vicky Meynold is the opposite of her sister. On one side a smart ass and on the other a cheerful girl. She is very sociable, being friends with many of the students in school and is considered to be one of the most popular girls in school. With a passionate love for dancing, Vicky can often be found at the disco with her sister and boyfriend Vanya. A good humored girl, she loves bright and crazy colored clothing. As a child, she took gymnastic lessons and as a result has excellent flexibility and tries out for many of the sports, especially cheerleading. A bit flighty and unpredictable, you never know what thoughts she will come up with next. Logic and reason were never her strong suit as she lives by her emotions and feelings, making decisions from her heart rather than her head. Despite her unpredictable nature, her liveliness and spontaneity make her fun to hang out with.
 	<<else>>
 		Vicky Meynold is the opposite of her sister. On one side a smart ass and on the other a cheerful girl. She is very sociable, being friends with many of the students in school and is considered to be one of the most popular girls in school. With a passionate love for dancing, Vicky can often be found at the disco with her sister and good friend Vanya. A good humored girl, she loves bright and crazy colored clothing. She is a member of the cheerleaders and sometimes tries out for other sports. A bit flighty and unpredictable, you never know what thoughts she will come up with next. Logic and reason were never her strong suit as she lives by her emotions and feelings, making decisions from her heart rather than her head. Despite her unpredictable nature, her liveliness and spontaneity make her fun to hang out with.
@@ -172,7 +172,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/139.jpg">>
 	<center>Stanislava "Stasya" Pavlov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Stasya Pavlov is a complete bitch to those she considers beneath her, which is the nerds, outcasts, gopniks and even some of the cool kids and jocks. Now that her boyfriend Andrey hangs around with Marcus more than her, she has become jealous of all the time Andrey and Marcus spend together without her, but never says anything about it around them. Instead, she seems to take out her anger on everyone around her, especially the nerds and the outcasts, or complains to her friends Irina and Lizaveta.
 	<<else>>
 		Stasya Pavlov is a complete bitch, and always has been one, but now that her boyfriend Andrey hangs around with Marcus more than her, she has become a lot worse. She doesn''t care for Marcus at all, but never says anything around him or Andrey. Instead, she seems to take out her anger on everyone around her, especially the nerds and the outcasts.
@@ -188,7 +188,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/146.jpg">>
 	<center>Marcus Larson</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Marcus Larson is an African American exchange student who arrived at the school last year and opted to stay for a second year. He does well in school, is a good athlete and seems to really enjoy Russia. He has an eye for Russian girls, always going on about how they are much more beautiful than the girls back home and is a decent looking guy himself which, combined with his exotic looks, accent, athletic ability and different views, has made him popular with the cool kids and jocks. He is friendly and outgoing and if he wasn''t such close friends with Andrey, he would have likely been a jock instead, as he seems to get along with them even more than most of the cool kids.
 	<<else>>
 		Marcus Larson is an African American exchange student who arrived at the school last year and opted to stay for a second year. He does well in school, is a good athlete and seems to really enjoy Russia. He has an eye for Russian girls, always going on about how they are much more beautiful than the girls back home and is a decent looking guy himself which, combined with his exotic looks, accent, athletic ability and different views, has made him popular with the cool kids and jocks. Those same traits and especially his skin color has made him just as unpopular with most of the gopniks, who go out of their way to mess with him or make racist comments. He is friendly and outgoing, and stays with Andrey''s family, whom he has become close friends with.
@@ -204,7 +204,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/140.jpg">>
 	<center>Yelizaveta "Lizaveta" Petrov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Lizaveta Petrov wants to know everyone''s secrets, but is completely incapable of keeping them. Extremely nosy, she is the first to arrive at the scene of any commotion, eager to pry into the details. She is pretty and willing to use her looks to sweet talk boys into sharing any juicy gossip. If you want to know anything about anyone, she is the one to ask. Luckily, she seems more interested in collecting and sharing gossip than using it for her own gain. Though pretty much everyone has respect for what she knows, the few times she has really gone after someone, she has destroyed their status and reputation among their peers. She is often found with Irina and Stasya.
 	<<else>>
 		Lizaveta Petrov wants to know everyone''s secrets, but is completely incapable of keeping them. Extremely nosy, she is the first to arrive at the scene of any commotion, eager to pry into the details. She is pretty and most boys seem torn. They are attracted to her, but are afraid she will tell everyone everything about them and their whole life becomes public knowledge.
@@ -220,7 +220,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/147.jpg">>
 	<center>Andrey Aleksandrov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Andrey Aleksandrov was a late bloomer among the boys. He was small for his age and a bit goofy looking and shy, but his status was boosted when he started dating Staysa. When he did finally grow into his body, he got a lot better looking and more confident. His family recently took part in the exchange student program and were less than happy when the student they sent was an African American, but Andrey didn''t mind and welcomed Marcus right away. He and Marcus quickly became friends and he tends to use Marcus'' rising popularity to boost his own and in the process, spends a lot less time with Stasya. The school nurse is his aunt.
 	<<else>>
 		Andrey Aleksandrov was a late bloomer among the boys. He was small for his age and a bit goofy looking and shy, but despite that he and Staysa started dating. When he did finally grow into his body, he got a lot better looking and now more than a few girls are jealous that Staysa snagged him up. His family recently took part in the exchange student program and rumor is they were less than happy when the student they sent was an African American, but Andrey doesn''t seem to mind. He and Marcus quickly became friends and he tends to use Marcus'' rising popularity to boost his own and in the process, spends a lot less time with Stasya. The school nurse is his aunt.
@@ -236,7 +236,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/14.jpg">>
 	<center>Ekaterina "Katja" Meynold</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Katja Meynold is an attractive and petite girl, a redhead with a keen interest in fashion and cosmetics. She and her twin sister, Vicky, are like two sides of the same coin. As a quiet and sensible girl, Katja is shy and intelligent, but can also be impulsive at times. She is an avid reader and can sometimes be found discussing books with the nerds, but is more often than not found at the disco with her sister.
 	<<else>>
 		Katja Meynold is an attractive and petite girl, a redhead with a keen interest in fashion and cosmetics. She and her twin sister, Vicky, are like two sides of the same coin. As a quiet and sensible girl, Katja is shy and intelligent, but is an avid reader and can sometimes be found discussing books with the nerds. She can often be found at the disco with her sister.
@@ -253,7 +253,7 @@
 	<<if $npcs.get('A25','grupTipe') == 1>>
 		<<image "characters/shared/headshots_main/25.jpg">>
 		<center>Sonia Ivanko</center>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			Sonia Ivanko is an ordinary girl and doesn''t stand out much, other than her sense of fashion. Despite her lack of money or variety of clothing, she has an amazing sense of style, able to pull off many great looks and earning the envy of many other girls at school. Pretty, smart, cheerful and sociable, Sonia loves to party and is rarely in a bad mood. She even has grades nearly as good as most of the nerds.
 			She lives with her mother in a small apartment after her father left some time ago. Her mother is a nervous, hysterical and scandalous woman who, when not at work in the garment factory, is often out drinking and flirting with men. She often dreams of having a better life away from her mother, one filled with luxury and sophistication.
 		<<else>>
@@ -272,7 +272,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/148.jpg">>
 	<center>Mefodiy Utkin</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<p>Mefodiy Utkin is reasonably intelligent, with middle-of-the-road grades. He is fairly average looking, but possesses a good sense of humor and comedic timing. He isn't too popular, just popular enough to hang among the cool kids, who like his humor. He seems to enjoy mocking or making jokes at the gopniks expense, often in ways they don't always understand.</p>
 	<<else>>
 		<p>Mefodiy Utkin is reasonably intelligent, with middle-of-the-road grades. He is fairly average looking, but possesses a good sense of humor and timing. He isn't too popular, just popular enough to hang among the cool kids, who like his humor.</p>
@@ -288,7 +288,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/4.jpg">>
 	<center>Igor Kruglov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<p>Igor Kruglov is Dimka's best friend and whenever you see one of them, the other is usually not too far away. With a small stature, high pitched voice and pretty face, many consider him to be very feminine. Normally a boy like him would be mocked but his friendship with Dimka, the most popular boy in school, shields him from such abuse. Many wonder about their friendship as they seem to have always been friends; some would even say that Igor is overly attached to Dimka. Other than Dimka, Igor doesn't seem to have any other close friends.</p>
 	<<else>>
 		<p>Igor Kruglov is Dimka's best friend and whenever you see one of them, the other is usually not too far away. With a small stature, high pitched voice and pretty face, many consider him to be very feminine. Many wonder why the cool kids keep him around, but Dimka's pull with the other cool kids seems to be enough. Many wonder about their friendship as they seem to have always been friends; some would even say that Igor is overly attached to Dimka. Other than Dimka, Igor doesn't seem to have any other close friends.</p>
@@ -316,7 +316,7 @@
 	All the jocks listed by popularity within their own clique, which mostly is how gifted they are with sports and their attitude.
 	<<image "characters/shared/headshots_main/149.jpg">>
 	<center>Lazar Pajari</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Lazar Pajari is the school football star and the best athlete in school. He is a central midfielder and the football team captain. He excels in several sports, but his passion is football, at least when he's not chasing after girls or, more often than not, being chased by them, whom he happily lets catch him. His status and good looks make him desirable among the girls and he is often seen with several different ones. He has even been seen hanging out with Albina, who mostly ignores the boys in school. Ivan is his biggest competition in sports. While Lazar is the over all better athlete, Ivan is far more focused on boxing than other sports.
 	<<else>>
 		Lazar Pajari is the school football star and the best athlete in school. He is a central midfielder and the football team captain. He excels in several sports, but his passion is football, at least when he's not chasing after girls or, more often than not, being chased by them, whom he happily lets catch him. His status and good looks make him desirable among the girls and he is often seen with several different ones. Ivan is his biggest competition in sports. While Lazar is the over all better athlete, Ivan is far more focused on boxing than other sports.
@@ -332,9 +332,9 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/23.jpg">>
 	<center>Albina Barlovskaya</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Albina Barlovskaya comes from a wealthy background and is considered to be one of the most attractive girls in school. A gifted dancer and leader of the cheerleaders at school, she is trying to conduct herself properly as her father is trying to become the town mayor, but she is well known for her short temper and is intimidating if angered, despite her rather petite size. She leads a dance troupe that only the prettiest and best dancers are allowed to join, which comes before all other sports or even hanging out with her fellow jocks. There are several rumors about her going around school, but nobody dares mention them in front of her out of fear of incurring her wrath.
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		Albina Barlovskaya comes from a wealthy background and is considered to be one of the most attractive girls in school. She is a gifted dancer and cheerleader who is trying to conduct herself properly as her father is trying to become the town mayor, but she is well known for her short temper and is intimidating if angered, despite her rather petite size. She leads a dance troupe that only the prettiest and best dancers are allowed to join. There are several rumors about her going around school, but nobody dares mention them in front of her out of fear of incurring her wrath. She seems to have a particular hatred towards you and your fellow gopniks.
 	<<else>>
 		Albina Barlovskaya comes from a wealthy background and is considered to be one of the most attractive girls in school. She is a gifted dancer and cheerleader who is trying to conduct herself properly as her father is trying to become the town mayor, but she is well known for her short temper and is intimidating if angered, despite her rather petite size. She leads a dance troupe that only the prettiest and best dancers are allowed to join. There are several rumors about her going around school, but nobody dares mention them in front of her out of fear of incurring her wrath.
@@ -350,7 +350,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/3.jpg">>
 	<center>Ivan Prokhorov</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Ivan Prokhorov is a talented athlete who is able to succeed in any sport he takes part in. He is mostly into boxing and running and spends a lot of training and is regularly away competing. Despite being considered very good looking by the girls in school, he isn''t very sociable and, other than when he is training, tends to be at home taking care of his siblings while his mother works two jobs. He occasionally hangs out with Fedor and on rare occasions shows up at the disco or some of the jock parties. He is calm and collected by nature, some might even say apathetic.
 	<<else>>
 		Ivan Prokhorov is a talented athlete who is able to succeed in any sport he takes part in. He is mostly into boxing and running and spends a lot of training and is regularly away competing. Despite being considered very good looking by the girls in school, he isn''t very sociable and, other than when he is training, tends to keep to himself, although he occasionally hangs out with Fedor. He is calm and collected by nature, some might even say apathetic.
@@ -366,14 +366,14 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/18.jpg">>
 	<center><<npc 'A18'>><</npc>> Zvereva</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<p><<npc 'A18'>><</npc>> is one of the school's best athletes and is the most athletic girl you know. She is very muscular and is a surprisingly skilled fighter, not afraid to start a fight with any of the other girls in school and even some of the boys. She has leadership abilities that, together with her tenacity and intelligence, make her a dominant presence wherever she goes. She is, however, a bully to most of the non-jock girls in school, and enjoys verbally, emotionally and physically tormenting them. She seems to utterly hate you in particular and goes out of her way to torment you when she can.</p>
 	<<else>>
 		<p><<npc 'A18'>><</npc>> is one of the school's best athletes and is the most athletic girl you know. She is very muscular and rumored to be a good fighter, not afraid to start a fight with any of the other girls in school or even some of the boys. She has leadership abilities that, together with her tenacity and intelligence, make her a dominant presence wherever she goes. She is, however, a bully to most of the non-jock girls in school, and enjoys verbally, emotionally and physically bullying them. She seems to utterly hate you in particular and goes out of her way to torment you when she can.</p>
 	<</if>>
 	<<image "characters/shared/headshots_main/8.jpg">>
 	<center>Svyatoslav Voinov</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Svyatoslav Voinov is an athletic guy with a very competitive spirit, perhaps the most competitive of the boys. Unfortunately for him, he is not as good of an athlete as Lazar or Ivan and almost always comes in third. He is on every one of the school''s sports teams and runs track, often competing with Ivan to be the fastest. His other focus is football, where he competes with Lazar to be the best player on the team. He's always trying to one up Ivan or Lazar, but rarely manages to beat either of them at anything.
 	<<else>>
 		Svyatoslav Voinov is an athletic guy with a very competitive spirit, always engaged in sports one way or another. He's always trying to one up Ivan or Lazar, but rarely manages to beat either of them at anything.
@@ -390,7 +390,7 @@
 	<<if $npcs.get('A5','grupTipe') == 2>>
 		<<image "characters/shared/headshots_main/5.jpg">>
 		<center>Fyodor "Fedor" Kozlov</center>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			Fedor Kozlov is a decent athlete. He often trains with his good friend Ivan, but lacks Ivan''s level of natural talent. He is on all the school''s sports teams and goes to the community center to train in boxing with Ivan. He is decent looking and often is seen chasing Ivan''s leftovers.
 		<<else>>
 			Fedor Kozlov is a decent athlete. He often trains with his good friend Ivan, but lacks Ivan''s level of talent. He is a member of all the school''s sports teams. He is decent looking and often is seen chasing Ivan''s leftovers.
@@ -407,7 +407,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/165.jpg">>
 	<center>Vanya Yanka</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Vanya Yanka is a goofy little jock who often plays jokes on his teammates and annoys the coaches. He never goes too far with his jokes and is a good morale booster, so everyone likes him. Despite his easy going attitude, he is a better athlete than most would suspect. When he's not training or competing, he spends most of his free time hanging out with Vicky and Katja. He is popular with the girls at school, but only seems to have eyes for Vicky, whom he is dating.
 	<<else>>
 		Vanya Yanka is a goofy little jock who often plays jokes at school, even during class. He never goes too far with his jokes, so everyone except the nerds, who tend to be the butt of his jokes, like him. When he's not training or competing, he spends most of his free time hanging out with Vicky and Katja. He is popular with the girls at school, but only seems to have eyes for Vicky, whom he is dating.
@@ -423,7 +423,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/13.jpg">>
 	<center>Lariska Gruzdeva</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<<if $q.christina?.get('blackmail') == 2 or $q.christina?.get('fight') == 1>>
 			Lariska is an athletic girl who is highly insecure, being very dependent on other people''s opinions of her. <<npc 'A18'>><</npc>> used to control her, but ever since you got the upper hand on <<npc 'A18'>><</npc>>, Lariska has been a lot more energetic. She has a sparkle in her eyes, and is almost always in a good mood.
 		<<else>>
@@ -456,7 +456,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/150.jpg">>
 	<center>Erast Vagin</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<p>Erast Vagin is a huge boy, nearly two meters tall, and is very strong. He is not a looker or even clever, though anyone that has played sports with him knows he's not as dumb as he looks; he just seems to have little interest in learning anything outside of sports. He is always polite and a little shy, especially around girls. He often defends girls from being bullied by the other boys, not afraid to stand up to several gopniks at once. However, when he is playing sports he puts his all into winning and nothing else. He is an average athlete and relies on his size and strength to win the day for him. Other than playing sports, he sometimes boxes with Ivan.</p>
 	<<else>>
 		Erast Vagin is a huge boy, nearly two meters tall, and is very strong. He is not a looker or even clever, but is always polite and a little shy, especially around girls. He often defends girls from being bullied by the other boys, not afraid to stand up to several gopniks at once. Most of the girls are nice to him because of it, though a few of them love to tease him and make him blush. No one that has seem him play sports would mistake him for a big teddy bear, as he can be ferocious when he chooses to be. He is an average athlete and relies on his size and strength to win the day for him. Other than playing sports, he sometimes boxes with Ivan.
@@ -472,7 +472,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/141.jpg">>
 	<center>Veronika "Ronnie" Sokolov</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<p>Veronika Sokolov is sometimes called the "Ice Queen" behind her back for two reasons. One is that she is a very talented ice skater; there is even talk about how she might compete in the next winter Olympics. The other is because she often comes across as cold and indifferent and never lets anyone get close to her. You know that isn't true; she can be nice or even sweet at times, she's just hyper focused on her skating and rarely has any free time between school and training. She comes from one of the wealthier families in Pavlovsk.</p>
 	<<else>>
 		<p>Veronika Sokolov is called the "Ice Queen" by her fellow students behind her back for two reasons. One is that she is a very talented ice skater; there is even talk about how she might compete in the next winter Olympics. The other is because she is cold and indifferent and never lets anyone get close to her. She comes from one of the wealthier families in Pavlovsk.</p>
@@ -488,7 +488,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/19.jpg">>
 	<center>Avelina "Lina" Starov</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Lina Starov is a mediocre athlete. While she looks like <<npc 'A18'>><</npc>>''s friend, the right term would be lapdog. She usually does anything <<npc 'A18'>><</npc>> wants her to do, as if she doesn''t have a mind of her own. She is a very pretty girl and if she would think for herself, she would be a lot more popular as most of the other students find her doormat personality off putting.
 	<<else>>
 		Lina Starov is a mediocre athlete. While she looks like <<npc 'A18'>><</npc>>''s friend, the right term would be lapdog. She usually does anything <<npc 'A18'>><</npc>> wants her to do, often helping her bully others or following her around telling her how great she is. She is a very pretty girl and if she would think for herself, she would be a lot more popular.
@@ -516,7 +516,7 @@
 	All the nerds in your school, by their own internal pecking order. It seems even nerds have a hierarchy.
 	<<image "characters/shared/headshots_main/152.jpg">>
 	<center>Feofan Krupin</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Feofan Krupin is heavily into science fiction, fantasy and the like. He has a serious love for superheroes and loves talking about them, their movies and comic books all the time. He also has a collection of cosplay outfits of all the most famous superheroes. He does well in school, but not as well as most would expect. He is the most outgoing of the nerds and is not afraid to talk to the other students, even flirting with girls that are way out of his league. He is the Game Master for the weekly game night and often invites others over to play games at his house.
 	<<else>>
 		Feofan Krupin is heavily into science fiction, fantasy and the like. He has a serious love for superheroes and loves talking about them, their movies and comic books all the time. He also has a collection of cosplay outfits of all the most famous superheroes. He does well in school, but not as well as most would expect. He is a nerd''s nerd, but isn''t bad looking for one. He is the most outgoing of the nerds and is not afraid to talk to the other students, even flirting with girls that are way out of his league. Rumor is that he runs some silly game night for the other nerds, which has earned him the nickname "King of the Nerds".
@@ -532,7 +532,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/2.jpg">>
 	<center>Artem Chebotarev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Artem Chebotarev lives in the same apartment building as you. He is a typical geek, but one could easily be deceived by his looks as he is actually not that bad looking. He does very well in school and is popular with the other geeks, not to mention that, thanks to his looks and good grades, he has befriended a lot of jocks as he is also their tutor outside of school. He is always at D&D night and tends to assume the role of party leader while playing. He is close friends with Petka, but otherwise tries to keep a low profile at school, especially around the cool kids and gopniks.</p>
 	<<else>>
 		Artem Chebotarev lives in the same apartment building as you. He is a typical geek, but one could easily be deceived by his looks as he is actually not that bad looking. He does very well in school and is popular with the other geeks, not to mention that, thanks to his looks and good grades, he has befriended a lot of jocks as he is also their tutor outside of school. He otherwise tries to keep a low profile at school, especially around the cool kids and gopniks.
@@ -548,7 +548,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/142.jpg">>
 	<center>Zinaida "Zina" Alkaev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Zinaida Alkaev is a mousey girl who is very plain looking. She never wears makeup, dresses in baggy clothes and barely bothers to brush her hair. She mostly keeps to herself, although she is great at video games and knows all about fantasy, sci-fi, superheroes and other important things. She is always at the D&D game night and loves getting into role playing her character more than most. She always seems eager to attend events when Feofan is present and has recently started hanging out with Julia. The boys seem to love that she knows as much as they do and can beat most of them at the games they play.</p>
 	<<else>>
 		Zinaida Alkaev is a mousey girl who is very plain looking. She never wears makeup, dresses in baggy clothes and barely bothers to brush her hair. She mostly keeps to herself playing various games on her phone, although she is fairly popular with the male nerds for reasons unknown to everyone else. She seems to be a complete loner unless she is around her fellow nerds.
@@ -564,7 +564,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/153.jpg">>
 	<center>Gerasim Vasilyev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Gerasim Vasilyev was confined to a wheelchair after an early childhood accident. He is friendly to everyone, even if most don't return the favor. He is well accepted by his fellow nerds and, surprisingly, a few of the jocks and even Anushka, who has been seen defending him from her fellow gopniks. When asked, he tends to be vague about it, saying they just get along. No one seems to know exactly why she likes him, but the rest see him as an easy target to bully and/or force him to do their homework.
 	<<else>>
 		Gerasim Vasilyev was confined to a wheelchair after an early childhood accident. He is friendly to everyone, even if most don't return the favor. He is well accepted by his fellow nerds and, surprisingly, a few of the jocks and even Anushka, who has been seen defending him from her fellow gopniks. No one seems to know exactly why she likes him, but the rest see him as an easy target to bully and/or force him to do their homework.
@@ -580,7 +580,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/12.jpg">>
 	<center>Julia Milov</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Julia is a diligent and silent girl. She's very nerdy and doesn''t really have any friends other than her fellow nerds. She used to be best friends with Natasha, but they had a falling out and she now hangs out with Zinaida, whom she spends a lot of time with. She seems to like keeping to herself, but has sometimes been caught eyeing the other girls while they are changing after gym lessons, likely jealous of them.
 	<<else>>
 		Julia is a diligent and silent girl. She's very nerdy and doesn''t really have any friends other than her fellow nerds. She seems to like keeping to herself, but has sometimes been caught eyeing the other girls while they are changing after gym lessons, likely jealous of them.
@@ -596,7 +596,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/6.jpg">>
 	<center>Petka Klyuyev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Petka Klyuyev is a nerd who usually doesn't interact with other students, preferring to only talk to his fellow nerds and mostly spends his time reading. He's good friends with Artem and you can usually hear them recommending what to read to each other. He is another of the regulars at the D&D game night. He does very well in school and has been known to sometimes tutor others.</p>
 	<<else>>
 		<p>Petka Klyuyev is a nerd who usually doesn't interact with other people, mostly spending his time reading. He's good friends with Artem and you can usually hear them recommending what to read to each other. He does very well in school and has been known to tutor others. However, he is afraid of his own shadow and is thus an easy target for bullying; other students are known to steal his homework.</p>
@@ -612,7 +612,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/16.jpg">>
 	<center>Natasha Belova</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Natasha is an excellent student and one of the smartest people in your school. Even though you both live in the same building, her parents are very poor and it shows as Natasha is always dressed in second-hand clothes and can never afford to do anything fun. As a result, she doesn't have many friends as most of the other girls shun her or mock her poor clothing. She and Julia used to be best friends, but they recently had a falling out. She rarely attends gaming night or other such events. All of you know is that she dreams of being one of the popular girls and has been seen attending the disco trying to befriend them.</p>
 	<<else>>
 		<p>Natasha is an excellent student and one of the smartest people in your school. Even though you both live in the same building, her parents are very poor and it shows as Natasha is always dressed in second-hand clothes and can never afford to do anything fun. As a result, she doesn't have many friends as most of the other girls shun her or mock her poor clothing. She doesn't even seem to get along with her fellow nerds that much.</p>
@@ -628,7 +628,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/151.jpg">>
 	<center>Evgeny Kuznetsov</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Evgeny Kuznetsov is the school chess champion and you can always find him at the chess club at the community center. He is shy and very intelligent, but has not shown any interest in girls, or anyone else for that matter. The other nerds often try and get him interested in their activities but it rarely works, although they do support him when he plays competitive chess. His family has confirmed he does indeed have autism.
 	<<else>>
 		Evgeny Kuznetsov is the school chess champion and you can always find him at the chess club at the community center. He is shy and very intelligent, but has not shown any interest in girls, or anyone else for that matter. No one would be surprised if he has mild autism.
@@ -668,7 +668,7 @@
 	All the gopniks listed by popularity within their own clique, which is mostly how tough they are, their attitude and how scared the rest are of them. The girls don't have the respect of the boys, and most are seen as beneath the guys.
 	<<image "characters/shared/headshots_main/9.jpg">>
 	<center>Vitek Kotov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<p>Vitek Kotov is an aggressive and strong guy who considers himself to be a "gangsta". He is very loud, obnoxious, and not very attractive. Lena is his twin sister, whom he is overly protective of, which has caused more than a fair share of drama. He is the leader of the local gopniks and the rest of the troublemakers tend to respect him. As such, he is the most feared boy in school; even some adults are afraid of him. He is involved with the local organized crime, selling and running drugs for them.</p>
 	<<else>>
 		Vitek Kotov is an aggressive and strong guy who considers himself to be a "gangsta". He is very loud, obnoxious, and not very attractive. Lena is his twin sister, whom he is overly protective of, which has caused more than a fair share of drama. He is the leader of the local gopniks and as such is the most feared boy in school. Even some adults are afraid of him. He is rumored to be involved with the local organized crime selling drugs.
@@ -684,7 +684,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/157.jpg">>
 	<center>Roman Yakovlev</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Roman Yakovlev is an absolute psychopath and everyone but Vitek seems to be afraid of him. Despite his small size, he is muscular. He'll start fights out of boredom and has no problems fighting dirty. He enjoys being especially cruel or sadistic to his victims, once smashing a bottle over a guy''s head and stabbing him in the face with it, simply because he said the guy looked at him funny. He always has a snide remark and is not afraid to speak back to the teachers or other adults. He's not doing great at school because he doesn''t care, but the other gopniks find his attitude amusing and seem to like that he's always getting them into fights.
 	<<else>>
 		Roman Yakovlev is an absolute psychopath and just about everyone is afraid of him. He's one of the smaller students, but he is always causing trouble. He'll start fights out of boredom, knowing that the other gopniks will have his back. He enjoys being especially cruel or sadistic to his victims, once smashing a bottle over a guy''s head and stabbing him in the face with it, simply because he said the guy looked at him funny. He always has a snide remark and is not afraid to speak back to the teachers or other adults. He's not doing great at school because he doesn''t care, but the other gopniks find his attitude amusing and seem to like that he's always getting them into funny situations.
@@ -700,7 +700,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/10.jpg">>
 	<center>Dan Ryzhov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Dan Ryzhov is a tall and skinny guy who has nothing but disdain and contempt for anyone who isn''t not a gopnik, even feeling that way about some of the gopniks. He is well known, even by gopnik standards, to have no respect for girls and is very stubborn, never letting an argument be. He's best friends with Vitek and Vasily, and is considered to be the smartest of the bunch, although most don't consider that to be much of a feat. He is the one that takes Vitek''s ideas and turns them into plans.
 	<<else>>
 		Dan Ryzhov is a tall and skinny guy whose body language screams his disdain and contempt for others. He's a very stubborn guy who will never let an argument be. He's best friends with Vitek and Vasily and is considered to be the smartest of the bunch, although most don't consider that to be much of a feat.
@@ -716,7 +716,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/156.jpg">>
 	<center>Arkadi Fyodorov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Arkadi Fyodorov is the drummer in Radomir''s band. His family recently moved from Saint Petersburg to Pavlovsk. He was held back a year at some point, so is a year older than his fellow students. He is very violent when angry, especially with anyone outside the gopniks. When not hanging out with the band, he is often found hanging out with Roman since they both love getting into fights. He is also not shy about reminding everyone how much harder the city is and how lame Pavlovsk is. He often encourages the rest of the band to practice more.
 	<<else>>
 		Arkadi Fyodorov is the drummer in Radomir''s band. His family recently moved from Saint Petersburg to Pavlovsk. He was held back a year at some point, so is a year older than his fellow students. He is very violent when angry, especially with anyone outside the gopniks. He is also not shy about reminding everyone how much harder the city is and how lame Pavlovsk is.
@@ -732,7 +732,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/158.jpg">>
 	<center>Valentin Bogdanov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Valentin Bogdanov is the bassist in Radomir''s band and the nicest guy in the band. However, this doesn''t stop him from using his small amount of fame to seduce and use girls, he is just rarely a dick about it. He and Radomir were the two that first started the band, and his goal is to make enough cash to buy an old American motorbike and ride it across the country. He can often be found hanging out with Anushka''s dad, working on his motorcycle when he's not hanging out with the band or practicing with his bass guitar.
 	<<else>>
 		Valentin Bogdanov is the bassist in Radomir''s band and the nicest guy in the band. However, this doesn''t stop him from using his small amount of fame to use girls. He is just rarely a dick about it. His goal is to make enough cash from the band to buy an old American motorbike and ride it across the country. He can often be found hanging out with Anushka''s dad, working on his motorcycle when he's not hanging out with the band.
@@ -748,7 +748,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/154.jpg">>
 	<center>Radomir Popov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Radomir Popov is the lead singer, backup guitarist and leader of a local underground rock/punk band named Pizdá Reydery (Pussy Raiders). He has a great deal of raw talent and is convinced the band is going to become mega stars. In fact, he already acts like they're more famous then they are and can thus be arrogant to almost everybody. Some girls adore him because they think he's cool or are just groupies that latch onto his limited fame, but he is more than happy to use his small amount of fame to let him use as many girls as he can, as often as he can. He seems to think girls only exist to provide him with sexual gratification.
 	<<else>>
 		Radomir Popov is the lead singer, backup guitarist and leader of a local underground rock/punk band named Pizdá Reydery (Pussy Raiders). They are considered fairly talented, but he is more or less an asshole who thinks he should already be a star and thus can be arrogant to almost everybody. Some girls adore him because they think he's cool or are just groupies that latch onto his limited fame, but he is more than happy to use his small amount of fame to let him use as many girls as he can, as often as he can. He seems to think girls only exist to provide him with sexual gratification.
@@ -764,7 +764,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/145.jpg">>
 	<center>Katyusha Maksimov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<p>Katyusha Maksimov is the least attractive girl in school. Her face and body are too masculine, she tends to dress like a boy and never shaves her arm pits or legs. She only seems to care about two things; booze and fighting. She gets her booze by either stealing it or hanging out with the boys. When she "plays" with the boys, it only goes as far as she wants it. While the boys are afraid of Lena's brother, she prefers fighting the boys herself, which has left them with a healthy respect for her.</p>
 		Regardless of the weather, she practices Sambo in the park every day before school. She often taunts or makes fun of the boxers by claiming "boxing is for pussies" and that real fighters fight without rules. She doesn''t see herself as a gopnik, but other people consider her one. This doesn''t bother her because she only cares about the opinion of the people whom earn her respect, which is really hard to do. She mostly hangs out with Arkadi, Roman and Pauline since she has no respect at all for the other gopnik girls, often wondering why they are even allowed to hang out with them.
 	<<else>>
@@ -781,7 +781,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/24.jpg">>
 	<center>Pauline Sebagotulina</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Pauline Sebagotulina is a bit of a wild child, which makes her very unpredictable. She is a bit of a tomboy and mostly hangs out with the gopnik boys since she doesn''t seem to have a lot of respect for the other gopnik girls, except Katyusha. No one dares to mess with her because she's been in more fights than anyone else. She and Katyusha can sometimes be found sparring together and starting fights with others.
 	<<else>>
 		Pauline Sebagotulina is a bit of a wild child, which makes her very unpredictable. She often hangs out with the gopniks in your class and is liked by them. No one dares to mess with her because she's been in more fights than anyone else. She and Katyusha can sometimes be found sparring together and starting fights with others.
@@ -797,7 +797,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/11.jpg">>
 	<center>Vasily Shulgin</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Also known as Shulga, Vasily is always hanging out with Dan and Vitek since they are his best friends. He's considered the physically weakest one of the bunch, but is a bit of a prankster and is always making the others laugh, which makes him popular with the gopniks. He was raised by his father after his mother left when he was still an infant. When you were younger, you were good friends with him and as you both drifted towards the gopniks, have stayed good friends.
 	<<else>>
 		Also known as Shulga, Vasily is always hanging out with Dan and Vitek since they are his best friends. He's considered the physically weakest one of the bunch, but is a bit of a prankster and is always making the others laugh, which makes him popular with the gopniks. He was raised by his father after his mother left when he was still an infant. When you were younger, you were good friends with him, but as you grew up you have somewhat drifted apart.
@@ -813,7 +813,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/189.jpg">>
 	<center>Nikolai Volkov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Niko Volkov is clever, confident and well spoken, but is also short tempered. When he's not drinking and partying, he is hanging out with Lavrenti, with many saying that he only spends time with Lavrenti for his money. His family used to be fairly wealthy but fell on hard times, their once grand house falling into disrepair.
 	<<else>>
 		Niko Volkov is clever, but short tempered. When he's not drinking and partying, he is hanging out with Lavrenti, with many saying that he only spends time with Lavrenti for his money. He always seems confident and well spoken, but can sometimes come off as paranoid and unstable.
@@ -829,7 +829,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/20.jpg">>
 	<center>Yalena "Lena" Kotova</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Lena Kotov is Vitek''s twin sister. Just like her brother, she is one of the local gopniks. She has a chip on her shoulder, so she can be aggressive and unpredictable. She's best friends with Lera and they can often be found together smoking in the school''s restrooms or hanging out after school. Due to her brother scaring off boys, she can sometimes be found making out with Lera. Katyusha has said the only reason Lena is a gopnik is because of her brother.
 	<<else>>
 		Lena Kotov is Vitek''s twin sister. Just like her brother, she is one of the local gopniks. She often bullies the nerds and outcasts, even targeting some of the jocks and cool kids at times. She's best friends with Lera and they can often be found together smoking in the school''s restrooms or hanging out after school.
@@ -845,7 +845,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/143.jpg">>
 	<center>Alyona Zima</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Alyona Zima is a hardcore troublemaker. She lives to cause trouble and jumps into any trouble she can find. She can often be found drinking alcohol, and is drunk more often than not. The only person she seems to spend a lot of time around is Anushka, although she occasionally hangs out with the boys from the band or Lena and Lera. It is well known that she carries a knife with her everywhere she goes and isn''t afraid to use it. She comes from a troubled family as her parents are alcoholic drug addicts. Her father is well known as a bad guy and a bully.
 	<<else>>
 		Alyona Zima is a hardcore troublemaker. She lives to cause trouble and jumps into any trouble she can find. She can often be found drinking alcohol, and is drunk more often than not. The only person she seems to spend a lot of time around is Anushka, although she occasionally hangs out with the boys from the band or Lena and Lera. It is well known that she carries a knife with her everywhere she goes, which causes others to give her a wide berth. Rumor is her mother is a drug addict and her father is an alcoholic bully. Most people view her as the apple that didn''t fall far from the tree.
@@ -861,7 +861,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/21.jpg">>
 	<center>Valeria "Lera" Tsarev</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Lera Tsarev comes from a poor family. Her father is one of the teachers at school and her cousin Lesco recently moved in with them and attends the same school. She often picks on him and the other outcasts at school, where she hangs out with the gopniks in your class and is liked by most of them. She's best friends with Lena and they can often be found together, smoking in the school''s restrooms or hanging out after school. She is protective of Lena and always follows her lead. Just about all the gopniks are convinced she is a lesbian since it's well known that she and Lena hook up fairly regularly and she has been seen making eyes at some of the other pretty gopnik girls. Katyusha seems disgusted by Lera and dislikes her, almost as much as she dislikes Anushka.
 	<<else>>
 		Lera Tsarev comes from a poor family. Her father works at the school as a teacher and her cousin Lesco recently moved in with them and attends the same school. She often picks on him and the other outcasts at school, where she hangs out with the gopniks in your class and is liked by them. She's best friends with Lena and they can often be found together, smoking in the school''s restrooms or hanging out after school. She is protective of Lena and always takes her lead. It is rumored that she is a lesbian and is in love with Lena.
@@ -877,7 +877,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/144.jpg">>
 	<center>Anushka "Nush" Konstantinov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Anushka Konstantinov is the lead guitarist and backup vocalist in Radomir''s band. She and the band often use her good looks to their advantage. She is very adventurous and is very open about her bisexuality. She often teases the boys and even some of the girls at school and is a bit of an exhibitionist. Her main goal in life seems to just be having fun, but she does surprisingly well in school. She doesn''t seem to be hung up on social standing and seems willing to hang out with or pick on everyone equally, with the exception of Gerasim, whom she has been seen protecting from being bullied, even from the other gopniks. While she has a bit of a reputation as a slut, the reality is that while most of the guys try to get in her panties, few succeed, though she loves making them all think they have a chance.
 	<<else>>
 		Anushka Konstantinov is the lead guitarist and backup vocalist in Radomir''s band. She and the band often use her good looks to their advantage. She is very adventurous and is not shy about her bisexuality. She often teases the boys and even some of the girls at school and is a bit of an exhibitionist. Her main goal in life seems to just be having fun and she likes getting into and causing trouble. She doesn''t seem to be hung up on social standing and seems willing to hang out with or pick on everyone equally, with the exception of Gerasim, whom she has been seen protecting from being bullied, even from the other gopniks. She has a reputation for being a slut and most wonder why she isn''t an outcast. A popular rumor is that she is the gopniks'' personal slut and lets all the guys fuck her.
@@ -893,7 +893,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/155.jpg">>
 	<center>Lavrenti Romanov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<p>Lavrenti Romanov comes from a wealthy family, an only child with parents that are rarely around. He used to be one of the cool kids, but his attitude abruptly changed when Dimka fucked his girlfriend at the time and they had it out in school where Lavrenti beat Dimka badly, which earned him the respect of the gopniks. Since the fight, he has been hanging with the gopniks and starting to become mean and violent. However, he is more of a follower; the other gopniks tolerate him while he uses his money to supply them with alcohol and drugs, sometimes throwing parties at his house when his parents are away.</p>
 	<<else>>
 		<p>Lavrenti Romanov comes from a wealthy family, an only child with parents that are rarely around. He used to be one of the cool kids, but his attitude abruptly changed last year. He became mean and violent, which resulted in him and Dimika having a major falling out. Since the fight, he has been hanging with the gopniks. However, he is more of a follower; the gopniks seem to tolerate him while using him for his money.</p>
@@ -992,14 +992,14 @@
 	Anatoly Tsarev is the school''s math teacher. He's a stern teacher who always demands the best out of his students. His daughter, Lera, is a gopnik who is also in your class. He's married to Vera, who works at the train station as a ticket saleswoman and as a cleaner in the garment factory. There are rumors that since Lesco, his nephew, has come to live with them, his marriage has been on the rocks.
 	<<image "characters/shared/headshots_main/135.jpg">>
 	<center>Yeva Sokoloff</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Yeva Sokoloff is the school''s geography and history teacher. She is the oldest teacher at school and likes to think she is tough, often giving those in her class a hard look. It's funny coming from someone that looks like the little old lady in the market. She is quick to send you to the Headmistress if you misbehave too much.
 	<<else>>
 		<p>Yeva Sokoloff is the school's geography and history teacher. She is the oldest teacher at school and has a very firm no-nonsense teaching style, but can also be very kind and motherly to students that work hard and behave.</p>
 	<</if>>
 	<<image "characters/shared/headshots_main/129.jpg">>
 	<center>Serafim Ivanov</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Serafim Ivanov is the school's science and computer science teacher. He's a former student of the school that returned to the town after college. He is a no-nonsense teacher that is known to pile on the homework, have many pop quizzes, and is brutal when it comes to his grading. This is to push his students to their greatest potential. He always has time to answer questions or help out if a student has trouble as long as they put in the effort. Many of the other students complain about how he picks on them, but the truth is he only accepts the best from his students and has no sympathy for those that refuse to put in the work.</p>
 	<<else>>
 		<p>Serafim Ivanov is the school's science and computer science teacher. He's a former student of the school that returned to the town after college. He is a no-nonsense, bitter teacher that is known to pile on the homework, have many pop quizzes, and is brutal when it comes to his grading. He is also known to be unfair, giving the nerds a free pass with homework and quizzes, which he never does with the other cliques. He seems to take delight in catching the cool kids, jocks and gopniks out by ridiculing them on how little they know.</p>
@@ -1015,16 +1015,16 @@
 	Ilya Yenotin is the school''s literature, language and your homeroom teacher. He does his best at keeping everyone happy, but is disliked by most of the students simply because he comes off as fake. You can often see him running down the halls chasing gopniks, trying to get them to attend class.
 	<<image "characters/shared/headshots_main/131.jpg">>
 	<center>Viktor Pavlovich</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Viktor Pavlovich is the school''s P.E. teacher and the coach for the basketball and track teams. He looks like a former weight lifter, having a muscular build with massive upper body strength. He keeps a black painted paddle he calls the "Black Widow" hanging from a wall in his office. He is tough on anyone that isn''t athletically gifted and often yells at those lacking any athletic ability to the point of bringing them to tears. He is one of the meanest, if not the meanest, teacher in school.
 	<<else>>
 		Viktor Pavlovich is the school''s P.E. teacher and the coach for the basketball and track teams. He looks like a former weight lifter, having a muscular build with massive upper body strength. He keeps a black painted paddle he calls the "Black Widow" hanging from a wall his office. He likes to use it on students, especially female students. He is single and rumored to be a player. You've often seen him with different women around town.
 	<</if>>
 	<<image "characters/shared/headshots_main/69.jpg">>
 	<center>Mikhail Nikolaevich</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Mikhail Nikolaevich is the school''s assistant P.E. teacher and the coach of both the Pavlovsk girls volleyball team and the football team. He is almost as bad as Mr. Pavlovich with how he treats the students, except he almost worships the best of the jocks by always talking and laughing with them.
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		Mikhail Nikolaevich is the school''s assistant P.E. teacher and the coach of both the Pavlovsk girls volleyball team and the football team. He was heading towards the big leagues as a footballer and almost became a pro himself, but an injury shattered those dreams. He knows how to push you to get the most of yourself, because he's enormously competitive. He always wants to win no matter what. If you want to be a part of the squad, you'll have to put in work one way or another.
 	<<else>>
 		Mikhail Nikolaevich is the school''s assistant P.E. teacher and the coach of both the Pavlovsk girls volleyball team and the football team. Some say he almost went pro in some sport, but hurt himself or something and now he tries to live through the glory of his students.
@@ -1037,7 +1037,7 @@
 	<p>Olga Aleksandrov is the school's nurse, having transferred to your school at the start of the year. All the boys have fallen head over heels over this true beauty, describing her as slim and stacked; the ideal woman.</p>
 	<<image "characters/shared/headshots_main/133.jpg">>
 	<center>Rolan Matveev</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Rolan Matveev is the school''s janitor and handyman. He is quiet and rarely interacts with the students. There is a rumor going around that he got caught rummaging through the girls lockers stealing their panties, while other people say he stalks the girls and photographs them. Regardless if the rumors are true or not, you and the other girls have caught him staring at you when he doesn''t think you're watching and will quickly look away.
 	<<else>>
 		Rolan Matveev is the school''s janitor and handyman. He is quiet and rarely interacts with the students. There is a rumor going around that he got caught rummaging through the girls lockers stealing their panties, while other people say he stalks the girls and photographs them. Regardless if the rumors are true or not, everyone agrees he looks and acts creepy.

+ 25 - 25
sugarcube/src/autogenerated/unsorted/journal_uni.tw

@@ -25,7 +25,7 @@
 	Your fellow students that came from Pavlovsk to attend university.
 	<<image "characters/shared/headshots_main/149.jpg">>
 	<center>Lazar Pajari</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Lazar Pajari was the school''s football star and best athlete. The former team captain, he is now a midfielder on the university team. He excels in several sports, but his passion is football, at least when he is not chasing after girls or, more often than not, being chased by them, whom he happily lets catch him. His status and good looks make him desirable among the girls and he is often seen with several different ones. He has even been seen hanging out with Albina, who mostly ignored the boys at school.
 	<<else>>
 		Lazar Pajari was the school''s football star and best athlete. The former team captain, he is now a midfielder on the university team. He excels in several sports, but his passion is football, at least when he is not chasing after girls or, more often than not, being chased by them, whom he happily lets catch him. His status and good looks make him desirable among the girls and he is often seen with several different ones.
@@ -41,7 +41,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/1.jpg">>
 	<center>Dimka Nosov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Dimka Nosov is a cute guy and all the girls adore him. He comes from a fairly wealthy family and is always dressed in expensive stylish clothes. He even threw some epic parties back in Pavlovsk that everyone tried to attend. He was the king of the school and everyone wanted to either be his friend or hang out with him, but now he is just a freshman in a totally new environment, though he seems to be doing almost as well as he used to back in school.
 	<<else>>
 		Dimka Nosov is a cute guy and all the girls adore him. He was considered the coolest kid in school and the guys tended to either befriend him or loath him. He comes from a fairly wealthy family and is always dressed in expensive stylish clothes. After Lavrenti started hanging out with the gopniks, Dimka became the king of the parties. Despite his pleasant smile and friendly demeanor, there were rumors saying he is a sadist bastard that always gets what he wants. He seems to love verbally tormenting those he considers lesser than him when given the chance.
@@ -58,7 +58,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/22.jpg">>
 	<center>Elžbieta "Bella" Artamonov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Bella Artamonov was the most beautiful girl in school and knew it, which made her come off as arrogant. You don't know her very well since she didn''t want to deal with "kids". She seemed to consider herself an adult already and the rest of her classmates as being beneath her, too young and childish for her to be around. There were even rumors about her only hanging around with people much older than herself. Now that she's at the university, she seems much happier, like she finally feels like she's around others like herself.
 	<<else>>
 		Bella Artamonov was the most beautiful girl in school and knew it, which made her come off as a self centered bitch. You don't know her at all since she didn''t want to deal with "kids", especially those with no sense of style. She seemed to consider herself an adult already and the rest of her classmates as being beneath her, too young and childish for her to be around. There were even rumors about her only hanging around with people much older than herself.
@@ -87,7 +87,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/17.jpg">>
 	<center>Irina Devyatova</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Irina Devyatova is a tall and pretty girl who knows it and takes full advantage of it, using her looks to get her way. She has a very arrogant and haughty personality hidden behind her sweet smile and considers herself to be the queen of what is in fashion, often berating those she deems to have no sense of style, often driving other girls to tears. When needed, she often sweet talks boys into doing her dirty work, making them think they have a chance with her and then laughing at them behind their back.
 	<<else>>
 		Irina Devyatova is a tall and pretty girl who knows it and takes full advantage of it, using her looks to sweet talk boys and professors alike to get her way. She has a very arrogant and haughty personality hidden behind her sweet smile and considers herself to the queen of what is in fashion, often berating those she deems to have no sense of style, often driving other girls to tears. When needed, she often sweet talks boys into doing her dirty work.
@@ -103,7 +103,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/144.jpg">>
 	<center>Anushka "Nush" Konstantinov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Anushka Konstantinov is the lead guitarist and part time vocalist in Radomir''s band. She and the band often use her good looks to their advantage. She is very adventurous and is very open about her bisexuality, often teasing boys and girls alike. She is also a bit of an exhibitionist and her main goal in life seems to just be having fun. She did surprisingly well at school, enough to get a scholarship into the university, despite the fact she seemed to like getting into and causing trouble more than studying.
 		She doesn''t seem to be hung up on social standing and seems willing to hang out with or pick on everyone equally. While she had a bit of a reputation as a slut, the reality is most of the guys tried to get in her panties, but few succeeded. She and Radomir used to date, but broke up a little over a year ago. Rumor is that they both cheated on each other.
 	<<else>>
@@ -121,7 +121,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/155.jpg">>
 	<center>Lavrenti Romanov</center>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<p>Lavrenti Romanov comes from a wealthy family. He is an only child with parents that are rarely around. He used to be one of the cool kids, but his attitude abruptly changed when Dimka fucked his girlfriend at the time and they had it out in school where Lavrenti beat Dimka badly, which earned him the respect of the gopniks. After the fight, he started hanging out with the gopniks and became mean and violent. However, he was more of a follower; the other gopniks tolerated him while he used his money to supply them with alcohol and drugs, sometimes throwing parties at his house when his parents were away. He kept his grades up enough to get into the university, which many found surprising.</p>
 	<<else>>
 		<p>Lavrenti Romanov comes from a wealthy family. He is an only child with parents that are rarely around. He used to be one of the cool kids, but his attitude abruptly changed a few years ago. He became mean and violent, which resulted in him and Dimika having a major falling out, where he ended up beating Dimka up at school. Since the fight, he started hanging out with the gopniks. However, he is more of a follower; the gopniks seemed to tolerate him while using him for his money. He kept his grades up enough to get into the university, which many found surprising.</p>
@@ -137,7 +137,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/15.jpg">>
 	<center>Viktoriya "Vicky" Meynold</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Vicky Meynold is the opposite of her sister. On one side a smart ass and on the other a cheerful girl. She is very sociable, being friends with many of the students at school and was considered to be one of the most popular girls. With a passionate love for dancing, Vicky was often found at the disco with her sister and boyfriend Vanya. A good humored girl, she loves bright and crazy colored clothing. As a child, she took gymnastic lessons and as a result has excellent flexibility and tried out for many of the sports, especially cheerleading. A bit flighty and unpredictable, you never know what thoughts she will come up with next. Logic and reason were never her strong suit as she lives by her emotions and feelings, making decisions from her heart rather than her head. Despite her flighty and unpredictable nature, her liveliness and spontaneity make her fun to hang out with.
 	<<else>>
 		Vicky Meynold is the opposite of her sister. On one side a smart ass and on the other a cheerful girl. She is very sociable, being friends with many of the students at school and was considered to be one of the most popular girls. With a passionate love for dancing, Vicky could often be found at the disco with her sister and good friend Vanya. A good humored girl, she loves bright and crazy colored clothing. She was one of the cheerleaders and even sometimes tries out for sports. A bit flighty and unpredictable, you never know what thoughts she will come up with next. Logic and reason were never her strong suit as she lives by her emotions and feelings, making decisions from her heart rather than her head. Despite her flighty and unpredictable nature, her liveliness and spontaneity make her fun to hang out with.
@@ -154,7 +154,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/147.jpg">>
 	<center>Andrey Aleksandrov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Andrey Aleksandrov was a late bloomer among the boys. Small for his age and a bit goofy looking and shy, his status was boosted when he started dating Staysa.  When he did finally grow into his body, he got a lot better looking and more confident. His family took part in the exchange student program and were less than happy when the student they sent was an African American, but Andrey didn''t mind and welcomed Marcus right away. He and Marcus quickly became friends and he tended to use Marcus'' rising popularity to boost his own and in the process, spent a lot less time with Stasya.
 	<<else>>
 		Andrey Aleksandrov was a late bloomer among the boys. Small for his age and a bit goofy looking and shy, his status was boosted when he started dating Staysa.  When he did finally grow into his body, he got a lot better looking and more confident. His family took part in the exchange student program and were less than happy when the student they sent was an African American, but Andrey didn''t mind and welcomed Marcus right away. He and Marcus quickly became friends and he tended to use Marcus'' rising popularity to boost his own and in the process, spent a lot less time with Stasya.
@@ -170,7 +170,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/139.jpg">>
 	<center>Stanislava "Stasya" Pavlov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Stasya Pavlov is a complete bitch to those she considers beneath her, which was pretty much everyone, even some of the cool kids and jocks. When her boyfriend Andrey started hanging around with Marcus more than her, she became jealous of all the time Andrey and Marcus spend together without her, but never said anything around Marcus or Andrey. Instead, she took out her anger on everyone around her, especially the nerds and the outcasts, or complained to her friends Irina and Lizaveta.
 	<<else>>
 		Stasya Pavlov is a complete bitch, and always has been one, but ever since her boyfriend Andrey started hanging around with Marcus more than her, she became a lot worse. She doesn''t care for Marcus at all, but never said anything around Marcus or Andrey. Instead, she seemed to take out her anger on everyone around her, especially the nerds and the outcasts.
@@ -186,7 +186,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/146.jpg">>
 	<center>Marcus Larson</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Marcus Larson is an African American exchange student who opted to stay for a second year. He did well in school, is a good athlete and seems to really enjoy Russia. He has an eye for Russian girls, always going on about how they are much more beautiful than the girls back home and is a decent looking guy himself which, combined with his exotic looks, accent, athletic ability and different views, made him popular with the cool kids and jocks. He is friendly and outgoing and if he wasn''t such close friends with Andrey, he would have likely been a jock instead, as he seemed to get along with them even more than most of the cool kids.
 	<<else>>
 		Marcus Larson is an African American exchange student who arrived at the Pavlovsk school last year and opted to stay for a second year. He does well in Pavlovsk school, is a good athlete and seems to really enjoy Russia. He has an eye for Russian girls, always going on about how they are much more beautiful than the girls back home and is a decent looking guy himself which, combined with his exotic looks, accent, athletic ability and different views, has made him popular with the cool kids and jocks. Those same traits and especially his skin color made him just as unpopular with most of the gopniks, who went out of their way to mess with him or make racist comments. He is friendly and outgoing, and stays with Andrey''s family, whom he has become close friends with.
@@ -202,7 +202,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/16.jpg">>
 	<center>Natasha Belova</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Natasha was an excellent student and one of the smartest people in school. Even though you both lived in the same building, her parents are very poor and it showed as Natasha was always dressed in second-hand clothes and could never afford to do anything fun. As a result, she didn't have many friends as most of the other girls shunned her or mocked her poor clothing. She rarely attended gaming night or other such events, attending the disco to try and befriend the popular girls instead.</p>
 	<<else>>
 		<p>Natasha was an excellent student and one of the smartest people in school. Even though you both lived in the same building, her parents are very poor and it showed as Natasha was always dressed in second-hand clothes and could never afford to do anything fun. As a result, she didn't have many friends as most of the other girls shunned her or mocked her poor clothing. She didn't even seem to get along with her fellow nerds that much.</p>
@@ -219,7 +219,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/152.jpg">>
 	<center>Feofan Krupin</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Feofan Krupin is heavily into science fiction, fantasy and the like. He has a serious love for superheroes and loves talking about them, their movies and comic books all the time. He also has a collection of cosplay outfits of all the most famous superheroes. He did well in school, but not as well as most would have expected. He was the most outgoing of the nerds and wasn''t afraid to talk to the other students, even flirting with girls that were way out of his league. He is the Game Master for the weekly game night and often invites others over to play games at his house.
 	<<else>>
 		Feofan Krupin is heavily into science fiction, fantasy and the like. He has a serious love for superheroes and loves talking about them, their movies and comic books all the time. He also has a collection of cosplay outfits of all the most famous superheroes. He did well in school, but not as well as most would have expected. He is a nerd''s nerd, but isn''t bad looking for one. He was the most outgoing of the nerds and wasn''t afraid to talk to the other students, even flirting with girls that were way out of his league. Rumor is that he runs some silly game night for the other nerds, which has earned him the nickname "King of the Nerds."
@@ -236,7 +236,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/140.jpg">>
 	<center>Yelizaveta "Lizaveta" Petrov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Lizaveta Petrov wants to know everyone''s secrets, but is completely incapable of keeping them. Extremely nosy, she is the first to arrive at the scene of any commotion, eager to pry into the details. She is pretty and willing to use her looks to sweet talk boys into sharing any juicy gossip. If you want to know anything about anyone, she is the one to ask. Luckily, she seems more interested in collecting and sharing gossip than using it for her own gain.
 	<<else>>
 		Lizaveta Petrov wants to know everyone''s secrets, but is completely incapable of keeping them. Extremely nosy, she is the first to arrive at the scene of any commotion, eager to pry into the details. She is pretty and most boys seem torn. They are attracted to her, but are afraid she will tell everyone everything about them and their whole life becomes public knowledge.
@@ -253,7 +253,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/2.jpg">>
 	<center>Artem Chebotarev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Artem Chebotarev lived in the same apartment building as you. He is a typical geek, but one could easily be deceived by his looks as he is actually not that bad looking. He did very well in school and was popular with the other geeks, not to mention that, thanks to his looks and good grades, he befriended a lot of jocks as he was their tutor outside of school. He is always at D&D night and tends to assume the role of party leader while playing. He is close friends with Petka, but otherwise tried to keep a low profile at school, especially around the cool kids and gopniks.</p>
 	<<else>>
 		Artem Chebotarev lived in the same apartment building as you. He is a typical geek, but one could easily be deceived by his looks as he is actually not that bad looking. He did very well in school and was popular with the other geeks, not to mention that, thanks to his looks and good grades, he befriended a lot of jocks as he was their tutor outside of school. He otherwise tried to keep a low profile at school, especially around the cool kids and gopniks.
@@ -270,7 +270,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/18.jpg">>
 	<center><<npc 'A18'>><</npc>> Zvereva</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<p><<npc 'A18'>><</npc>> was one of the school's best athletes and is the most athletic girl you know. She is very muscular and a surprisingly skilled fighter, not afraid to start a fight with any of the other girls at school or even some of the boys. She has leadership abilities that, together with her tenacity and intelligence, make her a dominant presence wherever she goes. She was, however, a bully to most of the non-jock girls in school, verbally, emotionally, and physically tormenting them while tending to dominate most of the other girl jocks. She also seemed to utterly hate you in particular and went out of her way to torment you when she could, a hatred that has carried over into university.</p>
 	<<else>>
 		<p><<npc 'A18'>><</npc>> was one of the school's best athletes and is the most athletic girl you know. She is very muscular and rumored to be a good fighter, not afraid to start a fight with any of the other girls at school or even some of the boys. She has leadership abilities that, together with her tenacity and intelligence, make her a dominant presence wherever she goes. She was, however, a bully to most of the non-jock girls in school, verbally, emotionally, and physically tormenting the other girls. She also seemed to utterly hate you in particular and went out of her way to torment you when she could, a hatred that has carried over to university.</p>
@@ -278,7 +278,7 @@
 	She is getting a teaching degree at the university.
 	<<image "characters/shared/headshots_main/14.jpg">>
 	<center>Ekaterina "Katja" Meynold</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Katja Meynold is an attractive and petite girl, a redhead with a keen interest in fashion and cosmetics. She and her twin sister, Vicky, are like two sides of the same coin. As a quiet and sensible girl, Katja is shy and intelligent, but can also be impulsive at times. She is an avid reader and could sometimes be found discussing books with the nerds, but more often than not could be found at the disco with her sister.
 	<<else>>
 		Katja Meynold is an attractive and petite girl, a redhead with a keen interest in fashion and cosmetics. She and her twin sister, Vicky, are like two sides of the same coin. As a quiet and sensible girl, Katja is shy and intelligent, she is an avid reader and could sometimes be found discussing books with the nerds, but more often than not could be found at the disco with her sister.
@@ -295,7 +295,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/165.jpg">>
 	<center>Vanya Yanka</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Vanya Yanka was a little goofy jock, playing jokes on his teammates and annoying the coaches. He never went too far with his jokes and was a good morale booster, so everyone liked him. Despite his easy going attitude, he was a better athlete than most would suspect. When he wasn''t training or competing, he spent most of his free time hanging out with Vicky and Katja. He was popular with the girls at school, but only seemed to have eyes for Vicky, whom he is dating.
 	<<else>>
 		Vanya Yanka was a little goofy jock who often played jokes at school, even during class. He never went too far with his jokes, so everyone except the nerds, who tended to be the butt of his jokes, liked him. When he wasn''t training or competing, he spent most of his free time hanging out with Vicky and Katja. He was popular with the girls at school, but only seemed to have eyes for Vicky, whom he is dating.
@@ -312,7 +312,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/153.jpg">>
 	<center>Gerasim Vasilyev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Gerasim Vasilyev was confined to a wheelchair after an early childhood accident. He was friendly to everyone, even if most didn''t return the favor. He was well accepted by his fellow nerds and, surprisingly, a few of the jocks and even Anushka, who was often seen defending him from her fellow gopniks. No one seems to know exactly why she liked him, but the rest seen him as an easy target to bully and/or force him to do their homework.
 	<<else>>
 		Gerasim Vasilyev was confined to a wheelchair after an early childhood accident. He was friendly to everyone, even if most didn''t return the favor. He was well accepted by his fellow nerds and, surprisingly, a few of the jocks and even Anushka, who was often seen defending him from her fellow gopniks. No one seems to know exactly why she liked him, but the rest seen him as an easy target to bully and/or force him to do their homework.
@@ -328,7 +328,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/12.jpg">>
 	<center>Julia Milov</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		Julia is a diligent and silent girl. She's very nerdy and didn''t really have any friends other than her fellow nerds. She seemed to like keeping to herself, but was sometimes caught eyeing the other girls while they were changing after gym lessons, likely jealous of them.
 	<<else>>
 		Julia is a diligent and silent girl. She's very nerdy and didn''t really have any friends other than her fellow nerds. She seems to like keeping to herself, but was sometimes caught eyeing the other girls while they were changing after gym lessons, likely jealous of them.
@@ -345,7 +345,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/6.jpg">>
 	<center>Petka Klyuyev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Petka Klyuyev was a nerd who usually didn't interact with other students, preferring to only talk to his fellow nerds and mostly spent his time reading. He's good friends with Artem and you could usually hear them recommending what to read to each other. He is another of the regulars at the D&D game night. He did very well in school and was known to tutor others.</p>
 	<<else>>
 		<p>Petka Klyuyev was a nerd who usually didn't interact with other people, mostly spending his time reading. He's good friends with Artem and you could usually hear them recommending what to read to each other. He did very well in school and was known to tutor others sometimes. However, he is afraid of his own shadow and was thus an easy target for bullying; other students were known to steal his homework.</p>
@@ -361,7 +361,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/13.jpg">>
 	<center>Lariska Gruzdeva</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		<<if $q.christina?.get('blackmail') == 2 or $q.christina?.get('fight') == 1>>
 			Lariska is an athletic girl who is highly insecure, being very dependent on other people''s opinions of her. <<npc 'A18'>><</npc>> used to control her, but ever since you got the upper hand on <<npc 'A18'>><</npc>>, Lariska has been a lot more energetic. She has a sparkle in her eyes, and is almost always in a good mood.
 		<<else>>
@@ -386,7 +386,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/19.jpg">>
 	<center>Avelina "Lina" Starov</center>
-	<<if getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','jocks')>>
 		Lina Starov is a mediocre athlete. While she looked like <<npc 'A18'>><</npc>>''s friend, the right term would be <<npc 'A18'>><</npc>>''s lapdog. She usually did anything <<npc 'A18'>><</npc>> wanted her to do, as if she didn''t have a mind of her own. She is a very pretty girl and if she would have thought for herself, she would have been a lot more popular since most of the jocks found her doormat personality off putting.
 	<<else>>
 		Lina Starov is a mediocre athlete. While she looked like <<npc 'A18'>><</npc>>''s friend, the right term would be <<npc 'A18'>><</npc>>''s lapdog. She usually did anything <<npc 'A18'>><</npc>> wanted her to do, often helping her bully others or following her around telling her how great she is. She is a very pretty girl and if she would have thought for herself, she would have been a lot more popular.
@@ -403,7 +403,7 @@
 	<<if $npcs.get('A25','grupTipe') == 1>>
 		<<image "characters/shared/headshots_main/25.jpg">>
 		<center>Sonia Ivanko</center>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			Sonia Ivanko is an ordinary girl and doesn''t stand out much, other than her sense of fashion. Despite her lack of money or variety of clothing, she has an amazing sense of style, able to pull off many great looks and earning the envy of many other girls at school. Pretty, smart, cheerful and sociable, Sonia loves to have fun and is rarely in a bad mood. She even had grades nearly as good as most of the nerds.
 			After a series of slutty incidents that crescendoed at the dance where she got way too drunk, gave Vitek and his buddies a simultaneous blowjob and returned with her face covered in their cum, Sonia''s reputation is in shambles. Even at university, most of the girls give her the silent treatment while the guys still treat her like a cheap whore and regularly ask (or sometimes even demand) sex from her.
 		<<else>>
@@ -423,7 +423,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/4.jpg">>
 	<center>Igor Kruglov</center>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		Igor Kruglov is Dimka''s best friend and whenever you seen one of them, the other is usually not too far away. With a small stature, high pitched voice and pretty face, many considered him to be very feminine. Normally a boy like him would be mocked but his friendship with Dimka, the most popular boy in school, shielded him from such abuse. Many wonder about their friendship as they seem to have always been friends. Some would even say that Igor is overly attached to Dimka. Other than Dimka, Igor didn''t seem to have any other close friends.
 	<<else>>
 		Igor Kruglov is Dimka''s best friend and whenever you seen one of them, the other is usually not too far away. With a small stature, high pitched voice and pretty face, many considered him to be very feminine. Many wondered why the cool kids kept him around, but Dimka''s pull with the other cool kids seemed to be enough. Many wonder about their friendship as they seemed to have always been friends. Some would even say that Igor is overly attached to Dimka. Other than Dimka, Igor didn''t seem to have any other close friends.
@@ -440,7 +440,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/142.jpg">>
 	<center>Zinaida "Zina" Alkaev</center>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<p>Zinaida Alkaev is a mousey girl who is very plain looking. She never wears makeup, dresses in baggy clothes and barely bothers to brush her hair. She mostly kept to herself playing various games on her phone, although she is great at video games and knows all about fantasy, sci-fi, superheroes and other important things. She is always at the D&D game night and loves getting into role playing her character more than most. The boys seemed to love that she knows as much as they do about that stuff and can beat most of them at the games they play.</p>
 	<<else>>
 		Zinaida Alkaev is a mousey girl who is very plain looking. She never wears makeup, dresses in baggy clothes and barely bothers to brush her hair. She mostly kept to herself playing various games on her phone, although she was fairly popular with the male nerds for reasons unknown to everyone else. She seemed to be a complete loner unless she was around her fellow nerds.

+ 5 - 5
sugarcube/src/autogenerated/unsorted/natalia_pavlova.tw

@@ -4,7 +4,7 @@
 <!-- !!2023/01/31-->
 <<if $location_var[$here][0] == 'first_chat'>>
 	<<setinit $nataliaQW['introduction'] = 1>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		You see Natalia sitting with the nerds, reading a book. When she notices you, she glances up and smiles.
 		<p>You smile back at her. "Hey Natalia. I thought I'd come and say hello. I'm $pc.name_nick."</p>
 		<p>She just stares at you. "Umm... Hi? Sorry, I thought you were one of the 'cool kids', so I'm just surprised that you're here."</p>
@@ -12,7 +12,7 @@
 		<p>"Oh. Thank you, $pc.name_nick."</p>
 		<p>You smile. "Don't worry, I get it. A new school is daunting. Maybe we'll chat again at some point?"</p>
 		<p>"Yes, I'd like that," she answers. "See you later, $pc.name_nick."</p>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		You see Natalia sitting with the nerds, reading a book. When she notices you, she glances up and smiles.
 		<p>You smile back at her. "Hey Natalia. I'm $pc.name_nick."</p>
 		<p>She just stares at you. "Umm... Hi? Sorry, I thought you were one of the sporty kids, so I'm just surprised you're here."</p>
@@ -20,7 +20,7 @@
 		<p>"Oh. Thank you, $pc.name_nick."</p>
 		<p>You smile. "Don't worry, I get it. A new school is daunting. Maybe we'll chat again at some point?"</p>
 		<p>"Yes, I'd like that," she answers. "See you later, $pc.name_nick."</p>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		You see Natalia sitting with the other nerds, reading a book. When she notices you, she glances up and smiles.
 		<p>You smile back at her. "Hey Natalia. I'm $pc.name_nick."</p>
 		<p>"Hi, $pc.name_nick. It's nice to meet you," she replies in a quiet voice.</p>
@@ -33,7 +33,7 @@
 		"Oh, okay. I''d like to chat about what you like to read at some point."
 		"Yes, I''d like that," she answers while smiling at you.
 		"Okay, see you later. I think it's time for class."
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		You see Natalia sitting with the nerds, reading a book. When she notices you, she glances up with a worried expression.
 		<p>You smile at her. "Hey Natalia. I'm $pc.name_nick."</p>
 		<p>She just stares at you. "Umm... Hi? Sorry, I thought you were one of the gopniks, so I'm not sure why you'd want to speak to me?"</p>
@@ -41,7 +41,7 @@
 		"I didn''t mean to offend you, I was just a little surprised is all."
 		<p>You smile. "I get that. Anyway, hello and welcome to our school. Maybe we'll chat again at some point?"</p>
 		<p>"Yes, I'd like that," she answers. "See you later, $pc.name_nick."</p>
-	<<elseif getvar("$grupTipe") == 5 and $pc.fame('slut') < 175>>
+	<<elseif $q.school.func('isGroupMember','outcasts') and getvar("$fame['slut']") < 175>>
 		You see Natalia sitting with the nerds, reading a book. When she notices you, she glances up at you.
 		<p>You smile. "Hi, I'm $pc.name_nick."</p>
 		<p>Natalia turns to you. "Umm... Hi? What brings you here?"</p>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/natbel_friend.tw

@@ -338,14 +338,14 @@
 	You continue, "One thing though..."
 	Natasha looks at you quizzically.
 	<!-- !! If Sveta is a Gopnik-->
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		<p>I know you have reasons to be scared of the Gopnik, but I hope I've proven that I'm not going to bully you... Unless you break the rules!" you say with a slight giggle.</p>
 		Natasha looks apprehensive as she has understood the implications of what you are saying.
 		You continue. "Okay, well enough of this nonsense with you disappearing into the crowd when I approach you. If you do that to me again, I won''t be happy and will need to rethink seriously about our relationship."
 		<p>A very sad and worried Natasha looks at you and replies, "Yes, I know, $pc.name_nick. That wasn't one of my finest actions. I'm so sorry, and yes, I'll dance with you. In fact, it'll be my pleasure to do so." She pauses for a second.</p>
 		"I'm so happy you weren''t offended by my rudeness."
 		<p>You smile reassuringly at her. "Look, I understand, and at least you weren't as rude as some others. Don't let it worry you; I'm looking forward to dancing with you in your new outfit."</p>
-	<<elseif getvar("$grupTipe") == 5>>
+	<<elseif $q.school.func('isGroupMember','outcasts')>>
 		I know I'm not everyone''s favourite person, but I hope I've proven that I'm a good friend," you tell her.
 		Natasha looks apprehensive as she has understood the implications of what you are saying.
 		"Okay, well enough of this nonsense with you disappearing into the crowd when I approach you. If you do that to me again, I won''t be happy and will need to seriously rethink our relationship."

+ 10 - 10
sugarcube/src/autogenerated/unsorted/nerd_game_night.tw

@@ -1138,7 +1138,7 @@
 	<<set $menu_off = 1>>
 	<<set $time.minutes += 10>>
 	<<image "locations/pavlovsk/community/library/events/nerd_game/gamenight.jpg">>
-	<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		<<if $nerd_game['game_day'] == $time.daystart and $time.hour * 60 + $time.minutes < 22 * 60 + 30>>
 			Upon entering the room, everyone freezes and looks your way. You can feel the anxious looks from the group sitting around a table that has all sorts of geeky stuff spread across it.
 			<p>As you're about to ask what they're doing, Feofan speaks up. "Can we help you?"</p>
@@ -1163,7 +1163,7 @@
 				<<gt 'nerd_game_night' 'nerd_chat'>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $nerd_game['game_day'] == $time.daystart and $time.hour * 60 + $time.minutes < 22 * 60 + 30>>
 			Upon entering the room, everyone freezes and looks your way. When they see you, they relax and go back to playing their game.
 			<p>As you're about to ask what they're doing, Feofan speaks up. "Hey $pc.name_nick! We're almost done, but it's not too late to join."</p>
@@ -1188,7 +1188,7 @@
 				<<gt 'nerd_game_night' 'nerd_chat'>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $nerd_game['game_day'] == $time.daystart and $time.hour * 60 + $time.minutes < 22 * 60 + 30>>
 			Upon entering the room, everyone freezes and looks your way. You can feel their fear as they sit around a table covered in all of their geeky stuff.
 			<p>As you're about to ask what they're doing, Feofan speaks up. "Look, we're just playing a game. We just want to be left alone!"</p>
@@ -1270,7 +1270,7 @@
 		<<else>>
 			<p>You try talking to Artem, but it's a very one-sided conversation 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. "Anyway, I need to get home." He gathers his stuff up and leaves.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A153','rel') >= 50>>
 			<p>You greet Artem with a smile and make a point to ask him how the game was. With a shy smile, he tells you in great detail how the game went; he seems to have really enjoyed himself.</p>
 		<<elseif $npcs.get('A153','rel') <= 20>>
@@ -1311,7 +1311,7 @@
 		<<else>>
 			<p>You try talking to Petka, but it's a very one-sided conversation 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. "Anyway, I need to get home." He gathers his stuff up and leaves.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A153','rel') >= 50>>
 			<p>You greet Petka with a smile and make a point to ask him how the game was. With a shy smile, he tells you in great detail how the game went; he seems to have really enjoyed himself.</p>
 		<<elseif $npcs.get('A153','rel') <= 20>>
@@ -1352,7 +1352,7 @@
 		<<else>>
 			<p>You try talking to Julia, but it's a very one-sided conversation with you doing all of the talking until she 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," she says quietly. "Anyway, I need to get home." She gathers her stuff up and leaves.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A153','rel') >= 50>>
 			<p>You greet Julia with a smile and make a point to ask her how the game was. With a shy smile, she tells you in great detail how the game went; she seems to have really enjoyed herself.</p>
 		<<elseif $npcs.get('A153','rel') <= 20>>
@@ -1393,7 +1393,7 @@
 		<<else>>
 			<p>You try talking to Feofan, but it's a very one-sided conversation 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. "Anyway, I need to get home." He gathers his stuff up and leaves.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A153','rel') >= 50>>
 			<p>You greet Feofan with a smile and make a point to ask him how the game was. With a shy smile, he tells you in great detail how the game went; he seems to have really enjoyed himself.</p>
 		<<elseif $npcs.get('A153','rel') <= 20>>
@@ -1434,7 +1434,7 @@
 		<<else>>
 			<p>You try talking to Gerasim, but it's a very one-sided conversation 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. "Anyway, I need to get home." He gathers his stuff up and leaves.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A153','rel') >= 50>>
 			<p>You greet Gerasim with a smile and make a point to ask him how the game was. With a shy smile, he tells you in great detail how the game went; he seems to have really enjoyed himself.</p>
 		<<elseif $npcs.get('A153','rel') <= 20>>
@@ -1475,7 +1475,7 @@
 		<<else>>
 			<p>You try talking to Zinaida, but it's a very one-sided conversation with you doing all of the talking until she 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," she says quietly. "Anyway, I need to get home." She gathers her stuff up and leaves.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A153','rel') >= 50>>
 			<p>You greet Zinaida with a smile and make a point to ask her how the game was. With a shy smile, she tells you in great detail how the game went; she seems to have really enjoyed herself.</p>
 		<<elseif $npcs.get('A153','rel') <= 20>>
@@ -1685,7 +1685,7 @@
 	<<set $menu_off = 1>>
 	<<set $time.minutes += 10>>
 	<<image "locations/pavlovsk/community/library/events/nerd_game/gamenight.jpg">>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<<if $nerd_game['game_day'] == $time.daystart and $time.hour * 60 + $time.minutes < 22 * 60 + 30>>
 			As you walk over to their table, everyone freezes and looks your way. When they see you, they relax and go back to playing their game.
 			<p>As you're about to ask what they're doing, Feofan speaks up. "Hey $pc.name_nick! We're almost done, but it's not too late to join."</p>

+ 5 - 5
sugarcube/src/autogenerated/unsorted/nyp_school.tw

@@ -79,7 +79,7 @@
 						<</actCLA>>
 					<</if>>
 				<</actCLA>>
-			<<elseif $pc.fame('pav_slut') > 250 and getvar("$grupTipe") == 4>>
+			<<elseif getvar("$fame['pav_slut']") > 250 and $q.school.func('isGroupMember','gopniks')>>
 				<p>Suddenly one of the boys call out to you "$pc.name_nick, come over here. I've got something for you."</p>
 				<<actCLA 'Approach'>>
 					<<image "locations/pavlovsk/school/events/newyear/gopniks.jpg">>
@@ -116,7 +116,7 @@
 					<<actCLA 'Drink some more'>>
 						<<set $pc.pcs_hydra += 10>> <<gt 'nyp_school' 'drink more'>>
 					<</actCLA>>
-					<<if getvar("$grupTipe") == 5>>
+					<<if $q.school.func('isGroupMember','outcasts')>>
 						<<actCLA 'Go stand against the wall alone'>>
 							<<gt 'nyp_school' 'outcast'>>
 						<</actCLA>>
@@ -300,7 +300,7 @@
 		<<set $music_loop = 0>>
 		<<link "Play music">><<set $music_on = 1>> <<gt 'nyp_school' 'nerd'>><</link>>
 	<</if>>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		<!-- !!if nerd and goes to game night-->
 		<<set $time.minutes += 10>>
 		<<image "locations/pavlovsk/school/events/newyear/nerds.jpg">>
@@ -340,7 +340,7 @@
 				<<gt 'nyp_school' 'end'>>
 			<</actCLA>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<image "locations/pavlovsk/school/events/newyear/nerds.jpg">>
 		As you past the nerds table you hear a heated debate going on amongst them. They seem to be discussing something strange, but you're able to figure out that it's some kind of fantasy game they're discussing.
 		The main focus seems to be on Natasha. It seems that she's hit a nerve with several of them as they're constantly attacking her.
@@ -938,7 +938,7 @@
 	You refill your cup with some of the spiked juice. Again, it isn''t too bad and tastes slightly better with each swig. You are starting to feel the effects of the vodka though.
 	<<set $time.minutes += 5>>
 	<<set $pc.alko += 5>>
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		<!-- !!If Sveta is an outcast this should be the only option and the above options should not show up if Sveta is an outcast. If Sveta is not an outcast, then the go stand against the wall alone should not show up.-->
 		<<actCLA 'Go stand against the wall alone'>>
 			<<gt 'nyp_school' 'outcast'>>

+ 15 - 15
sugarcube/src/autogenerated/unsorted/pav_aptcourtev.tw

@@ -374,7 +374,7 @@
 				<<actCLA 'Move away'>>
 					<<gt 'pav_complex' 'start'>>
 				<</actCLA>>
-			<<elseif ($pc.fame('pav_slut') >= 100 and getvar("$grupTipe") != 4) or ($pc.fame('pav_slut') >= 150 and getvar("$grupTipe") == 4)>>
+			<<elseif (getvar("$fame['pav_slut']") >= 100 and getvar("$grupTipe") != 4) or (getvar("$fame['pav_slut']") >= 150 and $q.school.func('isGroupMember','gopniks'))>>
 				They look you over and one of them seems to recognize you. "Oh it's you." You're a little surprised, and his friend seems just as confused before the first one whispers something and he smiles.
 				"Sure. You can have a cigarette... if you suck our dicks first."
 				<p>"What? Why the fuck would I do that?" you reply.</p>
@@ -528,12 +528,12 @@
 				<<image "locations/pavlovsk/resident/apartment/events/3stooges.jpg">>
 			<</if>>
 			You walk over and greet them.
-			<<if getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','outcasts')>>
 				<p>They give you a look of disgust. "Get lost, loser!"</p>
 				<<actCLA 'Move away'>>
 					<<gt 'pav_complex' 'start'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 4>>
+			<<elseif $q.school.func('isGroupMember','gopniks')>>
 				Vasily smiles at you and scoots over, giving you a spot to sit between him and Dan. As you sit down, he offers you a beer.
 				<<actCLA 'Drink beer'>>
 					<<gt 'pav_aptcourtev' 'male_gopnik_beer'>>
@@ -554,7 +554,7 @@
 					<</actCLA>>
 
 			<<else>>
-				<<if getvar("$grupTipe") == 3>>
+				<<if $q.school.func('isGroupMember','nerds')>>
 					<p>Vasily smiles at you and scoots over, giving you a spot to sit between him and Dan. "What you up to, nerd?" he asks in a teasing tone as you sit down.</p>
 					<p>Dan glances over at you with a sneer. "You sure you should be here? This group isn't really for people like you." You glance around and notice a few other hard looks being tossed your way.</p>
 					<<actCLA 'Move away'>>
@@ -604,12 +604,12 @@
 		<<actCLA 'Join them'>>
 			<<image "locations/pavlovsk/resident/apartment/events/gopgirls.jpg">>
 			<p>You walk over to them. "Hey guys, mind if I join you?"</p>
-			<<if getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','outcasts')>>
 				Lena and Lera both give you a look of disgust while Alyona just ignores you.
 				<<actCLA 'Move away'>>
 					<<gt 'pav_complex' 'start'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 4>>
+			<<elseif $q.school.func('isGroupMember','gopniks')>>
 				<p>They make some room on the bench. "Join us $pc.name_nick," Anushka says.</p>
 				<<actCLA 'Drink beer'>>
 					<<gt 'pav_aptcourtev' 'female_gopnik_beer_1'>>
@@ -626,7 +626,7 @@
 					<</actCLA>>
 
 			<<else>>
-				<<if getvar("$grupTipe") == 3>>
+				<<if $q.school.func('isGroupMember','nerds')>>
 					<p>You are not met with smiles or inviting looks. Lena speaks up first. "What do you want, freak?"</p>
 				<<else>>
 					<p>You are not met with smiles or inviting looks. Lena speaks up first. "What? Looking to slum it for a bit?"</p>
@@ -670,13 +670,13 @@
 		<<actCLA 'Join them'>>
 			<<image "locations/pavlovsk/resident/apartment/events/lelepa.jpg">>
 			<p>You walk over to them. "Hey guys, mind if I join you?"</p>
-			<<if getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','outcasts')>>
 				They all give you a look of disgust.
 				<p>"Get lost loser!" Pauline shouts in a tone that makes you think she's ready to kick your ass.</p>
 				<<actCLA 'Move away'>>
 					<<gt 'pav_complex' 'start'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 4>>
+			<<elseif $q.school.func('isGroupMember','gopniks')>>
 				<p>They make some room on the bench. "Join us $pc.name_nick," Pauline says.</p>
 				<<actCLA 'Drink beer'>>
 					<<gt 'pav_aptcourtev' 'female_gopnik_beer_2'>>
@@ -693,7 +693,7 @@
 					<</actCLA>>
 
 			<<else>>
-				<<if getvar("$grupTipe") == 3>>
+				<<if $q.school.func('isGroupMember','nerds')>>
 					<p>You are not met with smiles or inviting looks. Lena speaks up first. "What do you want, freak?"</p>
 					<p>You smile at them. "I just wanted to hang out if that's okay?"</p>
 					<p>"Get lost loser!" Pauline replies, but they don't actively chase you off.</p>
@@ -742,7 +742,7 @@
 				<<actCLA 'Move away'>>
 					<<gt 'pav_complex' 'start'>>
 				<</actCLA>>
-			<<elseif ($pc.fame('pav_slut') >= 100 and getvar("$grupTipe") != 4) or ($pc.fame('pav_slut') >= 150 and getvar("$grupTipe") == 4)>>
+			<<elseif (getvar("$fame['pav_slut']") >= 100 and getvar("$grupTipe") != 4) or (getvar("$fame['pav_slut']") >= 150 and $q.school.func('isGroupMember','gopniks'))>>
 				They look you over and one of them seems to recognize you. "Oh it's you." You're a little surprised, and his friend seems just as confused before the first one whispers something and he smiles.
 				"Sure. You can have a cigarette... if you suck our dicks first."
 				<p>"What? Why the fuck would I do that?" you reply.</p>
@@ -888,7 +888,7 @@
 								<<gt 'pav_aptcourtev' 'suck3stooges'>>
 							<</actCLA>>
 							<<gs 'willpower' 'drink' 'force' 'hard'>>
-							<<if getvar("$grupTipe") == 4 and $will_cost <= $pc.pcs_willpwr>>
+							<<if $q.school.func('isGroupMember','gopniks') and $will_cost <= $pc.pcs_willpwr>>
 								<<actCLA 'Threaten Dan (will_cost Willpower)'>>
 									<<run $npcs.dec('A10','rel',2)>>
 									<<run $q.school.func('groupRelInc','gopniks',1)>>
@@ -903,7 +903,7 @@
 										<<gt 'pav_complex' 'start'>>
 									<</actCLA>>
 								<</actCLA>>
-							<<elseif getvar("$grupTipe") == 4 and $will_cost > $pc.pcs_willpwr>>
+							<<elseif $q.school.func('isGroupMember','gopniks') and $will_cost > $pc.pcs_willpwr>>
 								<<actCLA `'Threaten Dan ('+$will_cost+')'`>><font color=red><br/>You don`t have enough willpower to use this action.</font><</actCLA>>
 							<</if>>
 						<</actCLA>>
@@ -1016,7 +1016,7 @@
 							<<gt 'pav_aptcourtev' 'eatlera'>>
 						<</actCLA>>
 						<<gs 'willpower' 'drink' 'force' 'hard'>>
-						<<if getvar("$grupTipe") == 4 and $will_cost <= $pc.pcs_willpwr>>
+						<<if $q.school.func('isGroupMember','gopniks') and $will_cost <= $pc.pcs_willpwr>>
 							<<actCLA 'Threaten Lera (will_cost Willpower)'>>
 								<<run $npcs.dec('A21','rel',2)>>
 								<<run $q.school.func('groupRelInc','gopniks',1)>>
@@ -1032,7 +1032,7 @@
 									<<gt 'pav_complex' 'start'>>
 								<</actCLA>>
 							<</actCLA>>
-						<<elseif getvar("$grupTipe") == 4 and $will_cost > $pc.pcs_willpwr>>
+						<<elseif $q.school.func('isGroupMember','gopniks') and $will_cost > $pc.pcs_willpwr>>
 							<<actCLA `'Threaten Lera ('+$will_cost+')'`>><font color=red><br/>You don`t have enough willpower to use this action.</font><</actCLA>>
 						<</if>>
 					<</actCLA>>

+ 47 - 47
sugarcube/src/autogenerated/unsorted/pav_beach_chat.tw

@@ -124,7 +124,7 @@
 			You sigh. "I just wanted to talk to you."
 			<p>"Come on, everyone knows that you're the school's biggest slut! Your mouth is good for only one thing. Sucking dick!" he says with a laugh and several of the other jocks and cool kids join in. "If you're not going to get on your knees and suck me off, then get lost." You walk away with the laughter echoing behind you.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Hey, $pc.name_nick. So I've been noticing you eyeballing me." Lazar winks.</p>
 			<p>You laugh. "Nice line Lazar... Is that how you get the ladies interested in you?"</p>
@@ -138,7 +138,7 @@
 			<p>"What?" you ask surprised.</p>
 			"Didn''t take you for one of my fan girls, that's all." he winks. You roll your eyes and shake your head. You know he's full of himself, even if he is the most gifted athlete in school and cute to boot. You talk about a variety of things, which he twists into you just liking him.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Did you see that move I made at the last game $pc.name_nick?" Lazar boasts.</p>
 			"I heard about it..." you inform him.
@@ -153,7 +153,7 @@
 			<p>"I heard many boys are out to get at your level <i>Mister Superstar</i>. Watch out, you might lose that cheer squad of yours!" you jokingly reply.</p>
 			Lazar bursts out in laughter. "No no, I'm not worried. That only makes me want to improve even more..."
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Hey, $pc.name_nick. So I've been noticing you've been eying me." Lazar winks.</p>
 			You blush. "No... no I haven''t."
@@ -166,7 +166,7 @@
 			He smirks. "Of course you do." Just the way he says it makes it sound like a forgone conclusion you would want to talk to him.
 			"Okay..." you reply, not sure how to respond. He starts talking to some of the others and seems friendly enough, even if he and the others don't pay much attention to you. At least no one is picking on you.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A149','rel') >= 50>>
 			<p>"Hey, $pc.name_nick. So I've been noticing you've been eying me." Lazar winks.</p>
 			<p>You laugh. "You wish... Are any of the girls dumb enough to fall for that?"</p>
@@ -200,7 +200,7 @@
 	<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 	<<gs 'npc_relationship' 'modify' 'A8' 'like'>>
 	<<image "characters/pavlovsk/school/boy/svyatoslav/beach_chat.jpg">>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			<p>"Well isn't this a surprise. Are you here to wish me good luck in the next race?" Svyatoslav curiously asks.</p>
 			Seeing him excited and not wanting to hurt his feelings, you just nod. "Yeah... that's exactly what I wanted to say..."
@@ -210,7 +210,7 @@
 		<<else>>
 			You walk up to him and start chatting. You talk about working out and staying fit before he starts flirting with you. You get the feeling he has a thing for you, or that he just wants to get in any girl''s panties so he has something to brag about to the other jocks.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			You walk up to him and start chatting. You talk about working out and staying fit before he starts flirting with you. You get the feeling he has a thing for you, or that he just wants to get in any girl''s panties so he has something to brag about to the other jocks.
 		<<elseif $npcs.get('A8','rel') <= 20>>
@@ -218,7 +218,7 @@
 		<<else>>
 			You walk up to him and start chatting. You talk about working out and staying fit before he starts flirting with you. You get the feeling he has a thing for you, or that he just wants to get in any girl''s panties so he has something to brag about to the other jocks.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			<p>"You get lost, nerd?" he asks as you approach.</p>
 			You shake your head. "No, I just wanted to say hi."
@@ -232,7 +232,7 @@
 			You shake your head. "No, I just wanted to say hi."
 			He laughs. "Why don't you just go back to your fellow losers and pretend to be an elf or whatever it is you losers do." He continues mocking you when he isn''t talking to someone else.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A8','rel') >= 50>>
 			<p>"You come to see what real men are like?" he asks as you approach.</p>
 			You shake your head and roll your eyes at his comment. "No, I just wanted to say hi."
@@ -264,7 +264,7 @@
 	<<gs 'npc_relationship' 'modify' 'A165' 'like'>>
 	<<image "characters/pavlovsk/school/boy/vanya/beach_chat.jpg">>
 	<<if $npcs.get('A165','rel') >= 50>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"Say $pc.name_nick did you hear about the prank I pulled on the football coach?" Vanya is having a hard time keeping himself from laughter.</p>
 			<p>"No, what did you do this time?" you curiously ask.</p>
 			<p>"Well, during one of the training sessions, I unscrewed the top from a water bottle thinking one of the boys would drink it but here comes the coach, who grabs it. Just as he's about to drink, the top falls off and water splashes all over him!" Vanya bursts out in laughter.</p>
@@ -328,7 +328,7 @@
 	<<elseif getvar("$AlbinaQW['Friends']") == 2>>
 		Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light, but smiles when she sees you.
 		You sit on the sand next to her and have a pleasant conversation where you both talk about almost anything, but you're careful not to bring up her father, the Starlets or anything else that might upset her. The conversation ends with Albina embracing you in a tight and extended hug.
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A23','rel') >= 70>>
 			Albina has a friendly, yet awkward conversation with you. You both talk about your shared interests, but when you bring up family life she fiercely avoids the subject, eventually refusing to speak with you anymore and storming off to swim in the lake. You don't know what her problem is, but she's always been sensitive when it comes to discussing her home life.
 		<<elseif $npcs.get('A23','rel') <= 20>>
@@ -338,7 +338,7 @@
 			Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light.
 			She sighs and begrudgingly starts chatting with you, but makes no effort to hide her boredom. She doesn''t dislike you, but it's obvious that she's just tolerating your presence and humouring you with conversation.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A23','rel') >= 70>>
 			Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light before smiling.
 			She engages you in a friendly, yet awkward conversation where you both talk about the sports you enjoy and which of the jock have caught your eye, but when you bring up family life she fiercely avoids the subject, eventually refusing to speak with you anymore and storming off to swim in the lake. You don't know what her problem is, but she's always been sensitive when it comes to discussing her home life.
@@ -349,7 +349,7 @@
 			Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light.
 			She sighs and begrudgingly starts chatting with you, but makes no effort to hide her boredom. She doesn''t dislike you, but it's obvious that she's just tolerating your presence and humouring you with conversation.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A23','rel') >= 70>>
 			Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light before laughing.
 			<p>"I didn't think I'd see you here. Getting some sunlight in before you go back to hiding indoors?" she asks.</p>
@@ -362,7 +362,7 @@
 			Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light.
 			She sighs and begrudgingly starts chatting with you, but makes no effort to hide her boredom. She doesn''t dislike you, but it's obvious that she's just tolerating your presence and humouring you with conversation.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<p>Albina is relaxing in the sun and working on her tan as you approach. She glares up at you when you block her light. "Oh god, it's you. What the fuck do you want?"</p>
 		<p>"What's your problem, bitch? I just want to talk," you scornfully reply.</p>
 		<p>Albina looks at you unimpressed. "My problem is that some knuckle brained moron is blocking my sunlight! Can you fuck off now?"</p>
@@ -383,7 +383,7 @@
 	<<gs 'npc_relationship' 'modify' 'A19' 'like'>>
 	<<image "characters/pavlovsk/school/girl/lina/beach_chat.jpg">>
 	<<if $npcs.get('A19','rel') >= 50>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"I've finally been improving my lap times!" Lina proudly tells you.</p>
 			<p>"Great news! I'm glad you're improving!" you encourage her.</p>
 			Lina nods. "Yeah, the new workout plan that <<npc 'A18'>><</npc>> made for me is really great. She's really helped me out a lot."
@@ -394,7 +394,7 @@
 			"I should stop, you're probably not interested in this anyway..." she replies with a nervous laugh. Before you're able to answer, you can hear <<npc 'A18'>><</npc>> calling her over and Lina quickly runs over to her, leaving you alone.
 		<</if>>
 	<<elseif $npcs.get('A19','rel') <= 20>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"I always hear that I'm bad at sports, but you're even worse than me!" Lina spares no time to insult you.</p>
 			<p>"Where did this come from?" you ask.</p>
 			"It's just something me and the other girls were discussing and I just wanted you to know that," she mockingly replies.
@@ -488,7 +488,7 @@
 	<<set $time.minutes += 20>>
 	<<gs 'npc_relationship' 'modify' 'A1' 'like'>>
 	<<image "characters/pavlovsk/school/boy/dimka/beach_chat.jpg">>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A1','rel') >= 50>>
 			<p>"Just the person I was hoping to see!" he smiles. "Take a look at this." He pulls out his phone and shows you some photos from his latest trip to Moscow. "You would've loved it out there. It really made me realize we're wasting away out here in a place like this." You then chat about the other places he has visited.</p>
 		<<elseif $npcs.get('A1','rel') <= 20>>
@@ -497,7 +497,7 @@
 		<<else>>
 			<p>Dimka is willing to entertain you for a few minutes, occasionally taking part in the conversation but letting you do most of the talking. "Hey, Bella!" he calls as he spots her walking by. "Sorry, I hope you don't mind." He follows after her before you can even reply. At least he let you talk to him.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A1','rel') >= 50>>
 			<p>"Have I shown you my photos from my last trip?" he smiles. "Take a look at this." He pulls out his phone and shows you some photos from his latest trip to Moscow. "You would've loved it out there. It really made me realize we're wasting away out here in a place like this." You then chat about the other places he's visited.</p>
 		<<elseif $npcs.get('A1','rel') <= 20>>
@@ -507,7 +507,7 @@
 		<<else>>
 			<p>Dimka is willing to entertain you for a bit, occasionally taking part in the conversation but letting you do most of the talking. "Hey, Bella!" he calls as he spots her walking by. "Sorry, I hope you don't mind." He follows after her before you can even reply. At least he let you talk to him.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A1','rel') >= 60>>
 			Dimka greets you with a friendly smile, making room for you in the group made up of Bella, Igor and a few others. Some of them give you an odd look, obviously not sure why you're here, but Dimka makes you feel welcome. "Relax, she doesn''t have the plague," he playfully chides everyone and you're soon engaged in a conversation with Dimka.
 		<<elseif $npcs.get('A1','rel') <= 20>>
@@ -567,7 +567,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A4','rel') >= 50>>
 			You know he doesn''t have many friends, so he's more than happy that you want to hang out with him. Unlike most boys, Igor is really attentive and listens to everything you say, even taking an interest in the more "girly" topics.
 			"Oh, it's not that weird," he says while blushing. "I have a sister, so I hear about these things all the time..."
@@ -576,7 +576,7 @@
 		<<else>>
 			As usual, Igor is hanging around Dimka, but he pays closer attention to you. With a smile, he asks you how your day has been so far and before long you're talking about all kinds of things. He even takes an interest in the more "girly" topics.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A4','rel') >= 60>>
 			<p>"Hey Igor, what are you doing?" you ask as you see him looking around for someone.</p>
 			He shrugs dismissively. "Just waiting for Dimka."
@@ -624,7 +624,7 @@
 			<</actCLA>>
 		<</actCLA>>
 	<</if>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A14','rel') >= 50>>
 			<<if getvar("$katjaQW['know_katja_uni']") == 0 and getvar("$SchoolAtestat") == 1 and ($time.month > 6 or ($time.month == 6 and $time.day > 15))>>
 				<!-- !!Katja tells you that she has enrolled in the university.-->
@@ -643,7 +643,7 @@
 		<<else>>
 			With Katja being a quiet girl, she doesn''t do much talking, but she seems to enjoy some lighthearted banter with you, so long as you're doing most of the talking. You get the feeling that if you were closer, she''d open up more, but for now you'll have to settle with this.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A14','rel') >= 50>>
 			<<if getvar("$katjaQW['know_katja_uni']") == 0 and getvar("$SchoolAtestat") == 1 and ($time.month > 6 or ($time.month == 6 and $time.day > 15))>>
 				<!-- !!Katja tells you that she has enrolled in the university.-->
@@ -661,7 +661,7 @@
 		<<else>>
 			With Katja being a quiet girl, she doesn''t do much talking, but she seems to enjoy some lighthearted banter with you, so long as you're doing most of the talking. You get the feeling that if you were closer, she''d open up more, but for now you'll have to settle with this.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A14','rel') >= 50>>
 			<<if getvar("$katjaQW['know_katja_uni']") == 0 and getvar("$SchoolAtestat") == 1 and ($time.month > 6 or ($time.month == 6 and $time.day > 15))>>
 				<!-- !!Katja tells you that she has enrolled in the university.-->
@@ -711,7 +711,7 @@
 	<<gs 'npc_relationship' 'modify' 'A22' 'like'>>
 	<<image "characters/pavlovsk/school/girl/bella/beach_chat.jpg">>
 	<<if $npcs.get('A22','rel') >= 50>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			"You know, you should come and hang out with me and my friends." Bella says smiling.
 			<p>"You really mean that?" you ask as your eyes widen. "You think I'll fit in with them?"</p>
 			<p>Bella nods. "No doubt! You'll have no issues fitting in. I'll be seeing you around and we can plan something, no?" The two of you talk for a bit more.</p>
@@ -721,7 +721,7 @@
 			<p>Bella nods. "Of course, I don't joke around. I'll be seeing you around and we can plan something, no?" The two of you walk for a bit more</p>
 		<</if>>
 	<<elseif $npcs.get('A22','rel') <= 20>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"What do you want now $pc.name_nick? What can you possibly want from me?" Bella moans as she rolls her eyes.</p>
 			"I was thinking about asking yo..." you start.
 			<p>Bella begins to mockingly laugh. "Don't be silly! Like I would give advice to someone like you..."</p>
@@ -748,7 +748,7 @@
 	<<actCLA 'Talk to someone else'>>
 		<<gt 'pav_beach_chat' 'beach_hangout'>>
 	<</actCLA>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A140','rel') >= 50>>
 			The perks of being a close friend of Liza go beyond just running in the same social circle. She tells you some gossip that no one else should know about.
 			<p>"I heard from a little red bird that one time while Vicky was out partying at the community center, she couldn't hold it in, so she went to do her business behind a bush, buuuut..." Liza drags it out to build a little suspense. "She was so drunk that she ended up falling into her own piss! Luckily Kat-- her friend, I mean, was there to take her home before anyone saw!" The two of you chat for some time about some of the recent stuff she has heard.</p>
@@ -759,7 +759,7 @@
 		<<else>>
 			You spend some time talking with Lizaveta, and for a while you manage to avoid talking about anything gossipy, but considering she's the queen of it, it eventually devolves into some "He said, she said."
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A140','rel') >= 50>>
 			You would think that being close friends with Lizaveta would mean getting some exclusive gossip from her, but she keeps her lips sealed. "I know everyone likes to say I can't keep my mouth shut, but even I need to have some secrets of my own." she winks.
 			<p>"Oh come on!" you plead. "You gotta give me a little bit of something..."</p>
@@ -769,7 +769,7 @@
 		<<else>>
 			You spend some time talking with Lizaveta, and for a while you manage to avoid talking about anything gossipy, but considering she's the queen of it, it eventually devolves into some "He said, she said."
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A140','rel') >= 50>>
 			When you sit on the sand next to Lizaveta, she smiles at you and the two of you are soon talking about a variety of subjects. However, she can't help herself and soon starts asking you all sorts of questions about your fellow nerds. You can barely even get a word in edge wise as she pumps you for gossip. You can't help yourself and start letting some stuff slip as the two of you talk.
 		<<elseif $npcs.get('A140','rel') <= 20>>
@@ -802,7 +802,7 @@
 <</actCLA>>
 
 	<</if>>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A146','rel') >= 50>>
 			<p>Talking with Marcus is always fun. He always knows how to make you laugh with the stories he tells. "You should have seen his face!" He lets out a deep laugh. "We walk by the bathroom on the way to his room and BAM! There's his mom, butt naked, and we see it all! You ever seen someone change colors? Poor guy was as pink as... as his mom's nipples now that I think about it!"</p>
 			You spend the rest of break laughing along with him as he tells you some more stories.
@@ -811,7 +811,7 @@
 		<<else>>
 			You walk up to Marcus and he gives you a small smile as you start talking to him. He responds and talks back, sharing a few stories of his time in America or when he first arrived here in Russia, but he spends just as much time talking to Andrey as he does you.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A146','rel') >= 50>>
 			You walk up to Marcus and he gives you a big smile as you start talking to him. The conversation quickly turns to sports, mostly sports in America. It seems he was a jock back home and loves watching and playing sports. He seems to really miss American football, his favorite sport to play, but is happy there is basketball here, his second favorite sport. He talks about his games back home, but also asks about how you are doing in sports yourself.
 		<<elseif $npcs.get('A146','rel') <= 20>>
@@ -819,7 +819,7 @@
 		<<else>>
 			You walk up to Marcus and he gives you a smile as you start talking to him. The conversation quickly turns to sports, mostly sports in America. It seems he was a jock back home and loves watching and playing sports. He seems to really miss American football, his favorite sport to play, but is happy there is basketball here, his second favorite sport. He talks about the games he played back home.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A146','rel') >= 50>>
 			You walk up to Marcus and he gives you a smile as you start talking to him. You enjoy hearing the stories Marcus tells about his life in America, though he often talks about the differences between nerds here and there. He explains how nerds back home are less about grades and more about what school club you belonged to.
 			You spend the rest of break asking more questions about his home life and he's happy to tell you all about it.
@@ -857,7 +857,7 @@
 	<<run $pc.skillExperienceGain('charisma',rand(1,2))>>
 	<<gs 'npc_relationship' 'modify' 'A147' 'like'>>
 	<<image "characters/pavlovsk/school/boy/andrey/beach_chat.jpg">>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Do you think Stasya will ever get over this whole... jealousy thing she has for Marcus?" Andrey confides in you with a look of exhaustion.</p>
 			Stasya must really be putting him through it lately. "She'll get over herself, don't worry. Just be glad you're not one of the nerds." you tease.
@@ -869,7 +869,7 @@
 			<p>"Oh yeah?" You can't help but smile when you see the good mood he's in. "Did something happen recently?"</p>
 			<p>"No, it's just that hanging around him has made me more popular than ever! I mean, I was already pretty popular but this... Being his friend sure has its perks!"</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Hey, Andrey! How's it been?" you ask with a small smile.</p>
 			Andrey just shrugs. "Oh you know, Stasya and my parents still complain about Marcus, so the usual," he teases halfheartedly.
@@ -881,7 +881,7 @@
 			<p>"Oh yeah?" You can't help but smile when you see the good mood he's in. "Did something happen recently?"</p>
 			<p>"No, it's just that hanging around him, he is way more into sports than I am. But he got me into working out and jogging and you know what? I feel great." He goes on talking about the positive changes in his life since Marcus moved in.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A147','rel') >= 50>>
 			<p>"Hey, Andrey! How's it been?" you ask with a small smile.</p>
 			<p>He gives you a slightly confused stare as to why you're talking to him. "Are you lost or something, nerd?"</p>
@@ -921,7 +921,7 @@
 	<<gs 'npc_relationship' 'modify' 'A148' 'like'>>
 	<<image "characters/pavlovsk/school/boy/mefodiy/beach_chat.jpg">>
 	<<if $npcs.get('A148','rel') >= 50>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			"I still don't get why you guys keep me around. There really isn''t much about me that screams ''popular.''" Mefodiy explains with a shy smile.
 			<p>"Hey, you're selling yourself short." you comfort him. "Every kingdom needs their village idiot, right?" you add with a smirk.</p>
 			<p>He winces and groans as he clutches at his heart. "Damn, that was a cold one $pc.name_nick! You're lucky I like you!"</p>
@@ -931,7 +931,7 @@
 			<p>He takes a second to think. "Hmm... ah, you're right! What I should have said was <i>incredibly handsome and hilarious</i>. Thanks for correcting me $pc.name_nick!" he says with a wink.</p>
 		<</if>>
 	<<elseif $npcs.get('A148','rel') <= 20>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"It doesn't take much to get on people's good sides. Just look at me. If I can manage it, why can't you?" Mefodiy seems disappointed that you're not getting along better, but at least he seems willing to give you a chance.</p>
 		<<else>>
 			"I just can't." Mefodiy groans after talking to you for a few minutes. "You just kill my whole mood..." He sighs heavily before walking away, dragging his feet the entire time.
@@ -950,7 +950,7 @@
 	<<gs 'npc_relationship' 'modify' 'A15' 'like'>>
 	<<image "characters/pavlovsk/school/girl/vicky/beach_chat.jpg">>
 	<<if $npcs.get('A15','rel') >= 50>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>As soon as Vicky sees you, she pulls you into a tight hug. "$pc.name_nick, my third favorite person!"</p>
 			<p>"Wait, third? I get Katja being second, but who's first?!" You pretend to be outraged and she plays along.</p>
 			<p>"Oh honey. You... you didn't know? I don't know how to tell you this but... Vanya is my number one!"</p>
@@ -962,7 +962,7 @@
 			"Bald. You will definitely be bald after a week of dying your hair..." You and Vicky then spend the rest of break joking back and forth.
 		<</if>>
 	<<elseif $npcs.get('A15','rel') <= 20>>
-		<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 			<p>"I know we're both 'popular' which means we should be friends, but I would honestly rather have people think I let Lera's creepy brother finger me than spend another minute talking to you!" Vicky throws her hands up and shrugs.</p>
 		<<else>>
 			<p>"Do you hear that $pc.name_nick?" Vicky interrupts you mid sentence. You go quiet and listen carefully, but don't hear anything unusual.</p>
@@ -982,7 +982,7 @@
 	<<set $time.minutes += 20>>
 	<<gs 'npc_relationship' 'modify' 'A139' 'like'>>
 	<<image "characters/pavlovsk/school/girl/stasya/beach_chat.jpg">>
-	<<if getvar("$grupTipe") == 1>>
+	<<if $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			When Stasya sees you, she smiles and waves. "Glad you showed up, was just discussing which boy is cutest other than Andrey of course." she tells you, it seems her and Bella can't agree on which of the boys are the cutest, you join in with their ranking of the boys. The conversation is rather fun.
 		<<elseif $npcs.get('A139','rel') <= 20>>
@@ -990,7 +990,7 @@
 		<<else>>
 			<p>You spend some time conversing with Stasya until she holds out her hand to stop you from talking. "I don't mean to cut you off, but I need to see Andrey." She gives you a half-assed apologetic smile before walking off in search of her elusive boyfriend.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			When Stasya sees you, she smiles and waves. "Glad you showed up, was just discussing which boy is cutest other than Andrey of course." she tells you, it seems her and Bella can't agree on which of the boys are the cutest, you join in with their ranking of the boys. The conversation is rather fun.
 		<<elseif $npcs.get('A139','rel') <= 20>>
@@ -998,7 +998,7 @@
 		<<else>>
 			<p>You spend some time conversing with Stasya until she holds out her hand to stop you from talking. "I don't mean to cut you off, but I need to see Andrey." She gives you a half-assed apologetic smile before walking off in search of her elusive boyfriend.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			<p>She stares at you approaching. "Are you lost or something?" Bella and Irina giggle at her remark and she turns and ignores you, talking with Bella and Irina instead, who also ignore you. They sometimes respond to your comments or questions, mostly acting like how adults act when small children try to take part in adult conversations.</p>
 		<<elseif $npcs.get('A139','rel') <= 20>>
@@ -1036,7 +1036,7 @@
 		<<else>>
 			<p>"I would rather have Petia stare at my tits until he creams himself than to talk to you, slut!" Irina hisses with disgust.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 1>>
+	<<elseif $q.school.func('isGroupMember','cool')>>
 		<<if $npcs.get('A17','rel') >= 60>>
 			<p>"God, have you ever seen that Natasha girl? She's so pathetic, right? She's so obsessed with us!" Irina says before rolling her eyes and the two of you chat for a while about a variety of topics.</p>
 		<<elseif $npcs.get('A17','rel') <= 20>>
@@ -1050,7 +1050,7 @@
 			<p>"What did she say?" you ask.</p>
 			"Oh I wouldn''t dare repeat the things she said. It would just leave a bad taste in my mouth." Irina shakes her head in disappointment, but you notice the hint of a smirk on her lips. "Jealousy is such an ugly look..." The two of you continue gossiping for a while.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A17','rel') >= 70>>
 			"Back when we were kids, Bella tried to ride a cow," Irina giggles.
 			<p>"What, like a real life cow? How'd that go?" you ask curiously.</p>
@@ -1064,7 +1064,7 @@
 			You try to make small talk with Irina, and to your surprise, she doesn''t instantly turn you away. Seeing as though she hasn''t said anything yet, you keep talking to her, even though she hasn''t said much of anything yet. Falling quiet, you hear the faint sound of music and realize she's being wearing earpods the whole time.
 			<p>With comical timing, Irina pulls them out when she finally notices you standing next to her. "What do you want?" she sneers.</p>
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A17','rel') >= 80>>
 			<p>"I need to get my nails done, but I won't have time with all this stupid homework!" Irina whines with a pout.</p>
 			"I'm sure Feofan or Petka would be more than happy to help you out," you gently remind her.
@@ -1078,7 +1078,7 @@
 			<p>"He was young and cute in the originals! You know, A New Hope, Empire Strikes Back?" you explain.</p>
 			"I don't watch old movies. They're... old," she shrugs.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<<if $npcs.get('A17','rel') >= 80>>
 			<p>"You know that, I think it was in 9th grade, we girls had Lavrenti over because we wanted to borrow his camera for new shots for our social media and when he arrived, Bella suggested we kill the lights and see which one of us would dare get naked in front of him as a thank you. Of course, we were joking, so when the light were switched back on none of us were naked, but he had the biggest boner I'd ever seen!" she giggles.</p>
 			"Wow, you girls really surprise me sometimes..." you reply with a hint of disappointment, hoping for something more juicy.
@@ -1115,7 +1115,7 @@
 	<<set $time.minutes += 20>>
 	<<gs 'npc_relationship' 'modify' 'A25' 'like'>>
 	<<image "characters/pavlovsk/school/girl/sonia/beach_chat.jpg">>
-	<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			You walk over and take a seat on the sand next to her and soon the two of you start talking about some of your recent nights out and it seems like Sonia really wants to just cut loose.
 		<<elseif $npcs.get('A139','rel') <= 20>>
@@ -1125,7 +1125,7 @@
 			"Just trying to get a tan so I am not so white." Sonia sighs as she looks over at you.
 			You can't help but laugh and tease her a little. In the end, the two of you end up talking about how to get the best tan and how much guys like tanned girls.
 		<</if>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<<if $npcs.get('A139','rel') >= 50>>
 			<p>"Hey Sonia!" you greet her with a smile and she gives you a friendly little wave.</p>
 			<p>"What's up neeeeerd?" she asks with a giggle and you tell her you just wanted to hang out. With Sonia being so friendly, you slip into an easygoing banter with her for a while.</p>

+ 11 - 11
sugarcube/src/autogenerated/unsorted/pav_library_nerdstudy.tw

@@ -6,9 +6,9 @@
 	<<setinit $nerdstudynight['start_time'] = $totminut>>
 	<<setinit $nerdstudynight['day'] = $time.daystart>>
 	<<image "locations/pavlovsk/community/library/nerdsstudy/nerds_study#.jpg" 1 5>>
-	<<if getvar("$grupTipe") == 3>>
+	<<if $q.school.func('isGroupMember','nerds')>>
 		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 getvar("$grupTipe") == 5>>
+	<<elseif $q.school.func('isGroupMember','outcasts')>>
 		<p>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?"</p>
 		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.
@@ -88,7 +88,7 @@
 			<<setinit $nerdstudynight['Feofan'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A152' 'like'>>
 			<<image "characters/shared/headshots_main/big152.jpg">>
-			<<if $npcs.get('A152','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A152','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				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 $npcs.get('A152','rel') <= 20 or $pc.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.
@@ -111,7 +111,7 @@
 			<<image "characters/shared/headshots_main/big2.jpg">>
 			<<if getvar("$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 $npcs.get('A2','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<elseif $npcs.get('A2','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				<p>"There you are $pc.name_nick. 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.</p>
 			<<elseif $npcs.get('A2','rel') <= 20 or $pc.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.
@@ -132,7 +132,7 @@
 			<<setinit $nerdstudynight['Zinaida'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A142' 'like'>>
 			<<image "characters/shared/headshots_main/big142.jpg">>
-			<<if $npcs.get('A142','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A142','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				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 $npcs.get('A142','rel') <= 20 or $pc.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.
@@ -153,7 +153,7 @@
 			<<setinit $nerdstudynight['Gerasim'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A153' 'like'>>
 			<<image "characters/shared/headshots_main/big153.jpg">>
-			<<if $npcs.get('A153','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A153','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				<p>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 $pc.name_nick." You engage in some idle banter for a while.</p>
 			<<elseif $npcs.get('A153','rel') <= 20 or $pc.fame('pav_slut') >= 250>>
 				<p>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.</p>
@@ -174,7 +174,7 @@
 			<<setinit $nerdstudynight['Julia'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A12' 'like'>>
 			<<image "characters/shared/headshots_main/big12.jpg">>
-			<<if $npcs.get('A12','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A12','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				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 $npcs.get('A12','rel') <= 20 or $pc.fame('pav_slut') >= 250>>
 				<p>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.</p>
@@ -195,7 +195,7 @@
 			<<setinit $nerdstudynight['Petka'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A6' 'like'>>
 			<<image "characters/shared/headshots_main/big6.jpg">>
-			<<if $npcs.get('A6','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A6','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				<p>"You really have to read this book $pc.name_nick! 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.</p>
 			<<elseif $npcs.get('A6','rel') <= 20 or $pc.fame('pav_slut') >= 250>>
 				<p>"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.</p>
@@ -216,7 +216,7 @@
 			<<setinit $nerdstudynight['Natasha'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A16' 'like'>>
 			<<image "characters/shared/headshots_main/big16.jpg">>
-			<<if $npcs.get('A16','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A16','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				<p>"Hey $pc.name_nick! 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.</p>
 			<<elseif $npcs.get('A16','rel') <= 20 or $pc.fame('pav_slut') >= 250>>
 				<p>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.</p>
@@ -237,7 +237,7 @@
 			<<setinit $nerdstudynight['Evgeny'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A151' 'like'>>
 			<<image "characters/shared/headshots_main/big151.jpg">>
-			<<if $npcs.get('A151','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A151','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				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 $npcs.get('A151','rel') <= 20 or $pc.fame('pav_slut') >= 250>>
 				<p>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.</p>
@@ -258,7 +258,7 @@
 			<<setinit $nerdstudynight['Natalia'] = 1>>
 			<<gs 'npc_relationship' 'modify' 'A240' 'like'>>
 			<<image "characters/shared/headshots_main/big240.jpg">>
-			<<if $npcs.get('A240','rel') >= 60 and getvar("$grupTipe") == 3>>
+			<<if $npcs.get('A240','rel') >= 60 and $q.school.func('isGroupMember','nerds')>>
 				<p>As you approach Natalia, she closes her notebook and waves at you. "Hey $pc.name_nick, come and have a seat." You sit next to Natalia and discuss current events while occasionally gossiping about your classmates.</p>
 			<<elseif $npcs.get('A240','rel') <= 20 or $pc.fame('pav_slut') >= 250>>
 				<p>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.</p>

+ 8 - 8
sugarcube/src/autogenerated/unsorted/pav_park_sex.tw

@@ -285,9 +285,9 @@
 		<<run $pc.skillExperienceGain('inhibition',1)>>
 		<<image "locations/pavlovsk/park/event/gopnik/fall_strip2.jpg">>
 		You grin, get up in front of everyone and expose your bra for everyone to see. The boys hoot and holler while Pauline records the whole thing on her phone. You stand there with your bra for several minutes for them, and you can't help but smile at how happy it makes them all. Arkadi then speaks up.
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<set $grp_msg = '"You know, being one of the stuck-up bitches, you`re much cooler than I expected."'>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<set $grp_msg = '"You know, being one of the brain-dead jocks, you`re much cooler than I expected."'>>
 		<<else>>
 			<<set $grp_msg = '"You know, being such a nerd, you`re much less shy than I expected."'>>
@@ -343,9 +343,9 @@
 		<<run $pc.skillExperienceGain('inhibition',1)>>
 		<<image "locations/pavlovsk/park/event/gopnik/fall_strip3.jpg">>
 		You grin and get up in front of everyone and expose your panties for all to see, turning around to give them a complete view. The boys hoot and holler while Pauline records the whole thing on her phone. You stand there with your panties exposed for several minutes for them, and you can't help but smile at how happy it makes them all. Arkadi then speaks up.
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<set $grp_msg = '"You know, being one of the stuck-up bitches, you`re much cooler than I expected."'>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<set $grp_msg = '"You know, being one of the brain-dead jocks, you`re much cooler than I expected."'>>
 		<<else>>
 			<<set $grp_msg = '"You know, being such a nerd, you`re much less shy than I expected."'>>
@@ -401,9 +401,9 @@
 		<<run $pc.skillExperienceGain('inhibition',2)>>
 		<<image "locations/pavlovsk/park/event/gopnik/fall_strip4.jpg">>
 		You grin, get up in front of everyone and expose your breasts for all to see. The boys hoot and holler while Pauline records the whole thing on her phone. You kneel there with your breasts out for several minutes for them, and you can't help but smile at how happy it makes them all. Arkadi then speaks up.
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<set $grp_msg = '"You have nice tits for one of the stuck-up princesses."'>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<set $grp_msg = '"You have nice tits for one of the juiced-up jocks. You`re a lot cooler than I was expecting."'>>
 		<<else>>
 			<<set $grp_msg = '"You have nice tits for one of the nerds. You should wear tighter clothes and show them off more."'>>
@@ -459,9 +459,9 @@
 		<<run $pc.skillExperienceGain('inhibition',3)>>
 		<<image "locations/pavlovsk/park/event/gopnik/fall_strip5.jpg">>
 		You grin and get up before everyone, stripping down and exposing your pussy for all to see. The boys hoot and holler while Pauline records the whole thing on her phone. You stand there with your pussy exposed for several minutes for them, and you can't help but smile at how happy it makes them all. Arkadi then speaks up.
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<<set $grp_msg = '"You`re a lot cooler than I expected for one of the stuck-up queens."'>>
-		<<elseif getvar("$grupTipe") == 2>>
+		<<elseif $q.school.func('isGroupMember','jocks')>>
 			<<set $grp_msg = '"You`re much cooler than I was expecting for one of the jocks."'>>
 		<<else>>
 			<<set $grp_msg = '"For one of the nerds, you`re a lot cooler than I was expecting."'>>

+ 17 - 17
sugarcube/src/autogenerated/unsorted/pav_parkev.tw

@@ -706,12 +706,12 @@
 	<</actCLA>>
 	<<actCLA 'Join them'>>
 		<p>You walk over to them. "Hey guys, mind if I join you?"</p>
-		<<if getvar("$grupTipe") == 5>>
+		<<if $q.school.func('isGroupMember','outcasts')>>
 			<p>Lena and Lera give you a look of disgust. "Get lost, loser!" Alyona ignores you, and Anushka sighs, but you can't tell if the sigh is directed at you or the other girls.</p>
 			<<actCLA 'Move away'>>
 				<<gt 'pav_park' 'deeper_park'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<p>They make some room on the bench. "Sure. Come join us, $pc.name_nick," Anushka says. As soon as you sit down, Lera hands you a beer.</p>
 			<<actCLA 'Drink beer'>>
 				<<gt 'pav_parkev' 'female_gopnik_beer_1'>>
@@ -728,7 +728,7 @@
 				<</actCLA>>
 			
 		<<else>>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				<p>Anushka smiles at you and scoots over, giving you a spot to sit between her and Lera. "What's up, nerd?" she asks in a teasing tone as you take a seat.</p>
 				<p>Lena glances over at you with a sneer. "Shouldn't you be off pretending to be an elf or something?" You glance around and notice that neither Lera nor Alyona are inviting you. It seems they don't relish hanging out with a nerd.</p>
 			<<else>>
@@ -773,12 +773,12 @@
 	<</actCLA>>
 	<<actCLA 'Join them'>>
 		You walk over to them. "Hey guys."
-		<<if getvar("$grupTipe") == 5>>
+		<<if $q.school.func('isGroupMember','outcasts')>>
 			<p>They give you a look of disgust. "Get lost, loser!"</p>
 			<<actCLA 'Move away'>>
 				<<gt 'pav_park' 'deeper_park'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			Vasily smiles at you and scoots over, giving you a spot to sit between him and Dan. As you sit down, he offers you a beer.
 			<<actCLA 'Drink beer'>>
 				<<gt 'pav_parkev' 'male_gopnik_beer'>>
@@ -795,7 +795,7 @@
 				<</actCLA>>
 			
 		<<else>>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				<p>Vasily smiles at you and scoots over, giving you a spot to sit between him and Dan. "What you up to, nerd?" he asks in a teasing tone.</p>
 				<p>Dan glances over at you with a sneer. "You sure you should be here? This part of the park isn't really for people like you." You glance around and notice a few other rugged looks tossed your way.</p>
 				<<actCLA 'Move away'>>
@@ -845,12 +845,12 @@
 	<</actCLA>>
 	<<actCLA 'Join them'>>
 		You walk over to them. "Hey guys."
-		<<if getvar("$grupTipe") == 5>>
+		<<if $q.school.func('isGroupMember','outcasts')>>
 			<p>They give you a look of disgust. "Get lost, loser!"</p>
 			<<actCLA 'Move away'>>
 				<<gt 'pav_park' 'deeper_park'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			Vasily smiles at you and scoots over, giving you a spot to sit between him and Dan. As you sit down, he offers you a beer, and you notice Anushka''s guitar propped up against the side of the table. It's one of the few times you've seen her take her dad''s old guitar out of her room.
 			<<actCLA 'Drink beer'>>
 				<<gt 'pav_parkev' 'gopnik_beer'>>
@@ -867,7 +867,7 @@
 				<</actCLA>>
 			
 		<<else>>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				<p>Vasily smiles at you and scoots over, giving you a spot to sit between him and Dan. "What you up to, nerd?" he asks in a teasing tone as you take a seat.</p>
 				<p>Dan glances over at you with a sneer. "You sure you should be here? This part of the park isn't really for people like you." You glance around and notice a few other rugged looks tossed your way.</p>
 				<<actCLA 'Move away'>>
@@ -1138,7 +1138,7 @@
 									
 								<</actCLA>>
 							
-							<<if getvar("$grupTipe") == 4>>
+							<<if $q.school.func('isGroupMember','gopniks')>>
 								<<gs 'willpower' 'drink' 'force' 'hard'>>
 								<<if $will_cost <= $pc.pcs_willpwr>>
 									<<actCLA 'Threaten Lera (will_cost Willpower)'>>
@@ -1361,12 +1361,12 @@
 					<<set $time.minutes += 5>>
 					<<gs 'drugs' 'alcohol' 'beer'>>
 					<<image "locations/pavlovsk/resident/apartment/events/beer#.jpg" 1 2>>
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						With that, everyone drinks the last of the beers, and you notice the area around you is littered with empty beer bottles. Once the final beer is gone, the talking starts to wind down, and people drift off either alone or in small groups. You get up and head out as well.
 						<<actCLA 'Leave'>>
 							<<gt 'pav_park' 'deeper_park'>>
 						<</actCLA>>
-					<<elseif getvar("$grupTipe") == 4 and $pc.fame('pav_slut') >= 200 and $pc.hotcat >= 5>>
+					<<elseif $q.school.func('isGroupMember','gopniks') and getvar("$fame['pav_slut']") >= 200 and $pc.hotcat >= 5>>
 						With that, everyone drinks the last of the beers, and you notice the area around you is littered with empty beer bottles. Once the final beer is gone, the talking starts to wind down, and people drift off either alone or in small groups. You get up and head out as well.
 						<p>"You're pretty drunk, $pc.name_nick. Let me take you home." you hear Dan say as he takes you by the arm.</p>
 						<<gs 'willpower' 'misc' 'resist' 'medium'>>
@@ -1424,9 +1424,9 @@
 							<</actCLA>>
 						<</actCLA>>
 					<<elseif $pc.hotcat >= 5>>
-						<<if getvar("$grupTipe") == 1>>
+						<<if $q.school.func('isGroupMember','cool')>>
 							<p>With the beers almost gone, you look around and notice the rest don't seem to be as drunk as you feel. Vasily then slaps you on the back. "You know, being one of the stuck-up bitches, you're not so bad." Several of the others laugh, and you see a few of them exchange smiles with a look you just can't place in your drunken state.</p>
-						<<elseif getvar("$grupTipe") == 2>>
+						<<elseif $q.school.func('isGroupMember','jocks')>>
 							<p>With the beers almost gone, you look around and notice the rest don't seem to be as drunk as you feel. Vasily then slaps you on the back. "You know, for being a brain-dead jock, you're not so bad." Several of the others laugh, and you see a few of them exchange smiles with a look you just can't place in your drunken state.</p>
 						<<else>>
 							With the beers almost gone, you look around and notice the rest don't seem to be as drunk as you feel. Vasily then slaps you on the back. "You know, for being a loser nerd, you're not so bad." Several of the others laugh, and you see a few of them exchange smiles with a look you just can't place in your drunken state.
@@ -1450,9 +1450,9 @@
 							<<gs 'pav_park_sex' 'pressured_for_gangbang'>>
 						<</if>>
 					<<else>>
-						<<if getvar("$grupTipe") == 1>>
+						<<if $q.school.func('isGroupMember','cool')>>
 							<p>With that, everyone drinks the last of the beers, and you notice the area around you is littered with empty beer bottles. Once the final beer is gone, the talking starts to wind down. Vasily then slaps you on the back. "You know, being one of the stuck-up bitches, you're not so bad." Several of the others laugh, a few agree and some of the rest give disapproving looks. After that, people start to drift off alone or in small groups. You get up and head out.</p>
-						<<elseif getvar("$grupTipe") == 2>>
+						<<elseif $q.school.func('isGroupMember','jocks')>>
 							<p>With that, everyone drinks the last of the beers, and you notice the area around you is littered with empty beer bottles. Once the final beer is gone, the talking starts to wind down. Vasily then slaps you on the back. "You know, for being a brain-dead jock, you're not so bad." Several of the others laugh, a few agree, and some of the rest give disapproving looks. After that, people start to drift off alone or in small groups. You get up and head out.</p>
 						<<else>>
 							With that, everyone drinks the last of the beers, and you notice the area around you is littered with empty beer bottles. Once the final beer is gone, the talking starts to wind down. Vasily then slaps you on the back. "You know, for being a loser nerd, you're not so bad." Several of the others laugh, a few agree, and some of the rest give disapproving looks. After that, people start to drift off alone or in small group. You get up and head out.
@@ -1495,7 +1495,7 @@
 		<<set $time.minutes += 5>>
 		<<gs 'drugs' 'alcohol' 'beer'>>
 		<<image "locations/pavlovsk/resident/apartment/events/beer#.jpg" 1 2>>
-		<<if getvar("$grupTipe") == 4>>
+		<<if $q.school.func('isGroupMember','gopniks')>>
 			You grab another beer from the collection. As you keep drinking while listening to your fellow gopniks'' wild stories, you only believe about half of them.
 		<<else>>
 			You grab another beer from the collection the gopniks have. They don't seem to mind, so you keep drinking as you continue listening to them.

+ 4 - 4
sugarcube/src/autogenerated/unsorted/petkaEv.tw

@@ -14,7 +14,7 @@
 			<<gs 'gschool_events' 'leave_break_events'>>
 		<</actCLA>>
 		<<gs 'willpower' 'misc' 'force' 'medium'>>
-		<<if $will_cost <= $pc.pcs_willpwr and getvar("$grupTipe") == 1>>
+		<<if $will_cost <= $pc.pcs_willpwr and $q.school.func('isGroupMember','cool')>>
 			<<actCLA 'Threaten his reputation (will_cost Willpower)'>>
 				<<gs 'willpower' 'misc' 'force' 'medium'>>
 				<<gs 'willpower' 'pay' 'force'>>
@@ -33,11 +33,11 @@
 					<<gt 'gschool_events' 'leave_break_events2'>>
 				<</actCLA>>
 			<</actCLA>>
-		<<elseif $will_cost > $pc.pcs_willpwr and getvar("$grupTipe") == 1>>
+		<<elseif $will_cost > $pc.pcs_willpwr and $q.school.func('isGroupMember','cool')>>
 			<<actCLA `'Threaten his reputation ('+$will_cost+')'`>><font color=red><br/>You don`t have enough willpower to use this action.</font><</actCLA>>
 		<</if>>
 		<<gs 'willpower' 'misc' 'force' 'medium'>>
-		<<if $will_cost <= $pc.pcs_willpwr and (getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4)>>
+		<<if $will_cost <= $pc.pcs_willpwr and ($q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks'))>>
 			<<actCLA 'Give him a swirly (will_cost Willpower)'>>
 				<<gs 'willpower' 'misc' 'force' 'medium'>>
 				<<gs 'willpower' 'pay' 'force'>>
@@ -64,7 +64,7 @@
 					<</actCLA>>
 				<</actCLA>>
 			<</actCLA>>
-		<<elseif $will_cost > $pc.pcs_willpwr and (getvar("$grupTipe") == 2 or getvar("$grupTipe") == 4)>>
+		<<elseif $will_cost > $pc.pcs_willpwr and ($q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','gopniks'))>>
 			<<actCLA `'Give him a swirly ('+$will_cost+')'`>><font color=red><br/>You don`t have enough willpower to use this action.</font><</actCLA>>
 		<</if>>
 		<<actCLA 'Bribe him with sex' undefined `{willpower:['sex','self']}`>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/police_station.tw

@@ -73,7 +73,7 @@
 			<<actCLA 'Continue further in'>>
 				<<gt 'police_station' 'booking'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 4>>
+		<<elseif $q.school.func('isGroupMember','gopniks')>>
 			<!-- !else if gopnik-->
 			<<set $time.minutes += 2>>
 			<<gs 'pain' 2 'armR' 'pinch'>>

+ 3 - 3
sugarcube/src/autogenerated/unsorted/soniadisco.tw

@@ -193,7 +193,7 @@
 				<<gt 'soniadisco' 'dance1'>>
 			<</if>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','gopniks')>>
 		<p>Vitek notices you watching them and grins, waving you over. "Hey, $pc.name_nick. We're going out for a drink and to have some fun... come join us." Just the way he says it, tells you they are up to something.</p>
 		<<actCLA 'Decline' undefined `{willpower:['drink','resist']}`>>
 				
@@ -213,7 +213,7 @@
 		<<actCLA 'Go with them'>>
 			<<gt 'soniadisco' 'join_them'>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		<p>Vitek notices you watching them and frowns. "What the fuck are you looking at, nerd? Get lost!" Then they all head out. Vasily glances back at you and shakes his head, letting you know not to follow them.</p>
 		<<actCLA 'Watch them leave'>>
 			<<if getvar("$soniafall") <= 6>>
@@ -222,7 +222,7 @@
 				<<gt 'soniadisco' 'dance1'>>
 			<</if>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 5>>
+	<<elseif $q.school.func('isGroupMember','outcasts')>>
 		<p>Vitek notices you watching them and frowns. "What the fuck are you looking at, loser? Get lost!" Then they all head out. Vasily glances back at you and shakes his head, letting you know not to follow them.</p>
 		<<actCLA 'Watch them leave'>>
 			<<if getvar("$soniafall") <= 6>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/soniahome.tw

@@ -762,7 +762,7 @@
 	<</if>>
 	<<if getvar("$artemQW['bf']") == 1>>
 		<<actCLA 'Artem'>>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				"Artem," you tell her.
 				She grins. "Well, you guys make a cute couple," she says with a giggle.
 				You sigh in a way only those in love can. "He's sweet and really nice to me."

+ 1 - 1
sugarcube/src/autogenerated/unsorted/stat.tw

@@ -1059,7 +1059,7 @@
 	<</if>>
 	<!-- !! I do not think that this should be here, but I put it here temporaly - rachels-->
 	<!-- !! generate SMS for nerd games-->
-	<<if rand(0,2) == 0 and $time.hour > 10 and $time.hour < 16 and $time.weekday == 1 and getvar("$time.yearstart") == 1 and getvar("$grupTipe") == 3 and $nerd_game['invite_day'] < $time.daystart>>
+	<<if rand(0,2) == 0 and $time.hour > 10 and $time.hour < 16 and $time.weekday == 1 and getvar("$time.yearstart") == 1 and $q.school.func('isGroupMember','nerds') and $nerd_game['invite_day'] < $time.daystart>>
 		<<gs 'nerd_game_night' 'summer_invite_sms' 'Add SMS'>>
 
 	<</if>>

+ 2 - 2
sugarcube/src/locations/city/city_coffee_hole.tw

@@ -394,7 +394,7 @@
 		<p>You notice Dimka sitting at a table. As you approach, he says "Get away from me, you disgusting slut! I don't want any of the diseases you have." He starts ignoring you, so you turn and walk away.</p>
 	<<else>>
 		<<if $npcs.get('A1','rel') >= 60>>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				You notice Dimka sitting at a table. He smiles as you approach. "Well well, look who it is. It seems spending some time around me did you good. I always thought you had it in you to make it out of Pavlovsk before you got knocked up and married to some loser. Seems my judgment was as correct as always." You sit and talk to him for a few minutes and he's relatively nice to you, even asking about what you've been up to until he finishes his drink. "I know you love thinking this is like the old days when we could hang out all the time, but now things are different. Maybe I'll see you around, and if you're good, I'll introduce you to the cool crowd at the uni," he says in a haughty tone, as if he's already the King of the university. He then stands and walks away.
 			<<else>>
 				<p>You notice Dimka sitting at a table. He smiles as you approach. "Well well, look who it is. I always thought you had it in you to make it out of Pavlovsk before you got knocked up and married to some loser. Seems my judgment was as correct as usual." You sit and talk to him for a few minutes, but all he does is give you back-handed compliments until he finishes his drink. "I know you love being seen with me, but I have better things to do. Maybe I'll see you around?" he says before getting up and walking away.</p>
@@ -402,7 +402,7 @@
 		<<elseif $npcs.get('A1','rel') <= 20>>
 			<p>You notice Dimka sitting at a table. He scowls as you approach. "What the fuck do you want, loser? Never mind, I don't want to know. Just go away." He starts ignoring you, so you turn and walk away.</p>
 		<<else>>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				You notice Dimka sitting at a table. He smiles as you approach. "Well well, look who it is. It seems spending some time around on me did you good. You managed to make it out of Pavlovsk before you got knocked up  by some loser." You sit down and talk to him for a few minutes, but all he does is make snide remarks until he finishes his drink. "I know you love being seen with me, but we're not in Pavlovsk anymore and no longer run in the same social circles." He gets up and walks away, leaving you alone in the cafe.
 			<<else>>
 				You notice Dimka sitting at a table. He smiles as you approach. "Well well, look who it is. I honestly never thought you would make it out of Pavlovsk. I figured you would be knocked up and married to some loser by now." You sit and talk to him for a few minutes, but all he does is berate you until he finishes his drink. "I know you love being seen with me, but I have better things to do," he says before getting up and walking away.

+ 6 - 6
sugarcube/src/locations/pavlov/disco/pav_disco.tw

@@ -236,7 +236,7 @@
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
 					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3))) and rand(1,10) == 1>>
+					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<</if>>
 				<<elseif $pc.alko < 10>>
@@ -271,7 +271,7 @@
 							<<gt 'pav_disco' 'sonia_too_drunk'>>
 						<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'anushka_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3))) and rand(1,7) == 1>>
+						<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'albina_too_drunk'>>
 						<</if>>
 					<<else>>
@@ -301,7 +301,7 @@
 							<<gt 'pav_disco' 'sonia_too_drunk'>>
 						<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'anushka_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3))) and rand(1,7) == 1>>
+						<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'albina_too_drunk'>>
 						<</if>>
 					<</if>>
@@ -317,7 +317,7 @@
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
 					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,5) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3))) and rand(1,5) == 1>>
+					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,5) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<</if>>
 				<</if>>
@@ -371,7 +371,7 @@
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
 					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3))) and rand(1,10) == 1>>
+					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand (1,10) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<<else>>
 						You're pretty drunk and stand against the wall for support as you watch the others dance.
@@ -383,7 +383,7 @@
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
 					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2 or getvar("$grupTipe") == 3))) and rand(1,7) == 1>>
+					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand (1,7) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<<else>>
 						You're too drunk to dance and lean against the wall for support to stop yourself from falling.

+ 38 - 38
sugarcube/src/locations/pavlov/disco/pav_disco_coolkids.tw

@@ -14,13 +14,13 @@
 		<</actCLA>>
 		<<actCLA 'Go out on the dance floor'>>
 			<<image "locations/pavlovsk/community/disco/school_kids/dimka_dance.jpg">>
-			<<if getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','outcasts')>>
 				He ignores you and turns his back on you as you approach, shunning you.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<elseif $npcs.get('A1','rel') >= 50 and $pc.fame('pav_slut') < 250>>
-				<<if getvar("$grupTipe") == 1>>
+				<<if $q.school.func('isGroupMember','cool')>>
 					<p>When Dimka sees you, he smiles warmly, making room for you in the group made up of some of the cool kids and a few others you don't recognize. "Just the person I was hoping to see!" he says as you walk up and starts dancing with everyone around him, including you.</p>
 				<<else>>
 					When Dimka sees you, he smiles warmly, making room for you in the group made up of some of the cool kids and a few others you don't recognize. Some of them give you an odd look, obviously not sure why you're here since you're not part of their clique, but Dimka makes you feel welcome. "Relax, she doesn''t have the plague." he playfully chides and you are soon dancing with the group.
@@ -79,13 +79,13 @@
 					<<gt 'pav_discoev1' 'dimka_sex'>>
 				<</actCLA>>
 			<</if>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			<p>When you get near him, he glances at some of the other cool kids and then back to you. "You get lost loser?" He looks you over and shakes his head. "Where did you get those clothes? Do you even know how to dress yourself?" Several of the others laugh at his comment. "Go away, you're killing the mood, loser."</p>
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A1','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				<p>"Just the person I was hoping to see!" Dimka smiles. "Take a look at this." He pulls out his phone and shows you some photos from his latest trip to Moscow. "You would have loved it out there. It really made me realize we're wasting away out here in a place like this." You then mostly talk about the other places he has visited.</p>
 			<<else>>
 				Dimka greets you with a friendly smile, making room for you in the group made up of some of the cool kids and a few others you don't recognize. Some of them give you an odd look, obviously not sure why you're here since you're not part of their clique, but Dimka makes you feel welcome. "Relax, she doesn''t have the plague." he playfully chides everyone and you are soon engaged in a conversation with Dimka.
@@ -109,7 +109,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<<elseif $npcs.get('A1','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				<p>"You seem to have the wrong idea about me $pc.name_nick." Dimka holds out his hand to keep you from getting any closer. "Just because we run in the same social circle doesn't mean we're friends."</p>
 				<p>You can't help but scoff and roll your eyes. "Who said I want to be friends? You just looked lonely standing over here by yourself. I was just trying to be nice." You trade a few more barbs back and forth.</p>
 			<<else>>
@@ -406,7 +406,7 @@
 					<</actCLA>>
 				<</if>>
 			<<elseif $npcs.get('A146','rel') <= 20 and $pc.fame('pav_slut') < 250>>
-				<<if getvar("$grupTipe") == 1>>
+				<<if $q.school.func('isGroupMember','cool')>>
 					<p>"Do I know you?" Marcus asks when you try to strike up a conversation.</p>
 					<p>"Uhh... I would think so? We run in the same social circle..." you reply, but he just shrugs.</p>
 				<<else>>
@@ -580,7 +580,7 @@
 						<</actCLA>>
 					<</if>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				When you get near them, they turn away from you and start dancing even closer together, obviously wanting nothing to do with you.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -649,7 +649,7 @@
 						<<gt 'pav_disco_classmates' 'classmates'>>
 					<</actCLA>>
 				<</if>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				When you get near them, Stasya turns to Andrey. "Eww make it go away." He gives you an annoyed look in response. "Get lost freak."
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -687,15 +687,15 @@
 		<</actCLA>>
 		<<actCLA 'Go out on the dance floor'>>
 			<<image "locations/pavlovsk/community/disco/club.jpg">>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				<p>You approach Mefodiy and he greets you with a warm smile. "Fancy a dance $pc.name_first?"</p>
-			<<elseif getvar("$grupTipe") == 2>>
+			<<elseif $q.school.func('isGroupMember','jocks')>>
 				<p>You approach Mefodiy and he smiles warmly. "A dance m'lady?" he says putting on an accent.</p>
-			<<elseif getvar("$grupTipe") == 3>>
+			<<elseif $q.school.func('isGroupMember','nerds')>>
 				You approach Mefodiy and he looks a little surprised to see a nerd at the dance, but he soon regathers his composure and greets you.
-			<<elseif getvar("$grupTipe") == 4>>
+			<<elseif $q.school.func('isGroupMember','gopniks')>>
 				You approach Mefodiy and he stares at you while shaking his head. It seems he's not even going to talk to you, never mind dance.
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				You approach Melfodiy expecting him to say something negative, but he's a perfect gentleman and greets you like he would one of his friends.
 			<</if>>
 			<<actCLA 'Do something else'>>
@@ -721,15 +721,15 @@
 			<</actCLA>>
 			<<actCLA 'Ask him to dance'>>
 				<<image "characters/shared/headshots_main/big148.jpg">>
-				<<if getvar("$grupTipe") == 1>>
+				<<if $q.school.func('isGroupMember','cool')>>
 					<p>You ask Mefodiy if he'll join you for a dance and he greets you with a warm smile. "Of course $pc.name_first."</p>
-				<<elseif getvar("$grupTipe") == 2>>
+				<<elseif $q.school.func('isGroupMember','jocks')>>
 					You ask Mefodiy if he'll join you for a dance and he smiles warmly. "It would be my pleasure." he says formally.
-				<<elseif getvar("$grupTipe") == 3>>
+				<<elseif $q.school.func('isGroupMember','nerds')>>
 					You ask Mefodiy if he'll join you for a dance. He's clearly surprised that a nerd is asking him to dance, but he soon regathers his composure and with a shrug says "Sure..."
-				<<elseif getvar("$grupTipe") == 4>>
+				<<elseif $q.school.func('isGroupMember','gopniks')>>
 					You go to ask Mefodiy for a dance and he stares at you while shaking his head. It seems he's not even going to talk to you, never mind dance.
-				<<elseif getvar("$grupTipe") == 5>>
+				<<elseif $q.school.func('isGroupMember','outcasts')>>
 					You ask Mefodiy if he'll join you for a dance. The people around him are clearly snickering at you, but he dismisses them with a wave of his hand. "Ignore them, they're just jealous."
 				<</if>>
 				<<actCLA 'Do something else'>>
@@ -833,7 +833,7 @@
 				<<actCLA 'Dance with him'>>
 					<<gt 'pav_disco_coolkids' 'igor_dance'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				When he sees you coming he walks away, only to stop a short distance away and start dancing again.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -887,7 +887,7 @@
 			<<actCLA 'Hang out with him'>>
 				<<gt 'pav_disco_coolkids' 'igor_hang_out'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			When you get near him, he glances at some of the other cool kids and then back to you. "Go bother someone else."
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
@@ -902,7 +902,7 @@
 				<<gt 'pav_disco_coolkids' 'igor_hang_out'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A4','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-			<<if getvar("$grupTipe") == 1>>
+			<<if $q.school.func('isGroupMember','cool')>>
 				The conversation feels forced as Igor makes almost no effort to talk to you. You get the feeling he's just doing this as a courtesy since you're in the same clique.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -1031,13 +1031,13 @@
 	<<gs 'npc_relationship' 'modify' 'A22' 'like' 1 'pav_disco'>>
 	<<image "characters/shared/headshots_main/big22.jpg">>
 	You see Bella hanging out with the other cool kids.
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		When you get near her, she glances at some of the other cool kids and then back to you. "Go bother someone else."
 		<<actCLA 'Do something else'>>
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A22','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			"You know, you should come and hang out with me and my friends." Bella says smiling.
 			<p>"You really mean that?" you ask as your eyes widen. "You think I'll fit in with them?"</p>
 			<p>Bella nods. "No doubt! You'll have no issues fitting in. I'll be seeing you around and we can plan something, no?"</p>
@@ -1050,7 +1050,7 @@
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A22','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<p>"What do you want now $pc.name_nick? What can you possibly want from me?" Bella moans as she rolls her eyes.</p>
 			"I was thinking about asking yo..." you start.
 			<p>Bella begins to mockingly laugh. "Don't be silly! Like I would give advice to someone younger..."</p>
@@ -1083,13 +1083,13 @@
 	<<gs 'npc_relationship' 'modify' 'A15' 'like' 1 'pav_disco'>>
 	<<image "characters/shared/headshots_main/big15.jpg">>
 	You see Vicky hanging out with the other cool kids.
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		When you get near her, she glances at some of the other cool kids and then back to you. "Go bother someone else."
 		<<actCLA 'Do something else'>>
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A15','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<p>As soon as Vicky sees you, she pulls you into a tight hug. "$pc.name_nick, my third favorite person!"</p>
 			<p>"Wait, third? I get Kat being second, but who's first?!" You pretend to be outraged and she plays along.</p>
 			<p>"Oh hunny. You... you didn't know? I don't know how to tell you this but... Vanya is my number one!"</p>
@@ -1104,7 +1104,7 @@
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A15','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<p>"I know we're both 'popular' which means we should be friends, but I would honestly rather have people think I let Lera's creepy brother finger me than spend another minute talking to you!" Vicky throws her hands up and shrugs.</p>
 		<<else>>
 			<p>"Do you hear that $pc.name_nick?" Vicky interrupts you mid sentence. You go quiet and listen carefully but don't hear anything unusual.</p>
@@ -1132,13 +1132,13 @@
 	<<gs 'npc_relationship' 'modify' 'A17' 'like' 1 'pav_disco'>>
 	<<image "characters/shared/headshots_main/big17.jpg">>
 	You see Irina hanging out with the other cool kids.
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		When you get near her, she glances at some of the other cool kids and then back to you. "Go bother someone else."
 		<<actCLA 'Do something else'>>
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A17','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			<p>"Liza told me that some girl overheard this group of girls talking at lunch that they heard Stasya talking shit about me!" Irina exclaims and the both of you let out a little gasp, even though it really isn't much of a surprise.</p>
 			<p>"What did she say?"</p>
 			"Oh I wouldn''t dare repeat the things she said. It would just leave a bad taste in my mouth." Irina shakes her head in disappointment, but you notice the hint of a smirk on her lips. "Jealousy is such an ugly look..."
@@ -1151,7 +1151,7 @@
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A17','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			Irina listens to you talk with a tired and bored expression. "Oh god, I think I''d rather talk to Lesco..." she yawns before brushing you off. "I've heard enough. Go bother Stasya."
 		<<else>>
 			You try to make small talk with Irina, and to your surprise, she doesn''t instantly turn you away. Seeing as though she hasn''t said anything yet, you keep talking to her, even if she hasn''t said much... of anything yet. Falling quiet, you hear the faint sound of music and realize she's being wearing earpods this whole time.
@@ -1599,13 +1599,13 @@
 	<<gs 'npc_relationship' 'modify' 'A140' 'like' 1 'pav_disco'>>
 	<<image "characters/shared/headshots_main/big140.jpg">>
 	You see Lizaveta hanging out with the other cool kids.
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		When you get near her, she glances at some of the other cool kids and then back to you. "Go bother someone else."
 		<<actCLA 'Do something else'>>
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A140','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			The perks of being a close friend of Lizaveta go beyond just running in the same social circle, as she tells you some gossip that no one else should know about.
 			<p>"I heard from a little red bird that one time while Vicky was out partying at the community center, she couldn't hold it in, so she went to go do her business behind a bush, buuuut..." Lizaveta drags it out to build a little suspense. "She was so drunk that she ended up falling into her own piss! Luckily Kat-- her friend, I mean, was there to take her home before anyone saw!"</p>
 		<<else>>
@@ -1617,7 +1617,7 @@
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A140','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 1>>
+		<<if $q.school.func('isGroupMember','cool')>>
 			"You know, you really shouldn''t shit where you sleep." Lizaveta says while shaking her head disapprovingly.
 			<p>"What? What is that suppose to mean?" you ask, but she just sighs.</p>
 			"You're dumber than I thought..." she mutters. You try to get an answer out of her, but she dances around your questions while the two of you make smalltalk.
@@ -1987,7 +1987,7 @@
 					<<gt 'pav_disco_coolkids' 'natasha_dance'>>
 				<</actCLA>>
 			<<else>>
-				<<if getvar("$grupTipe") == 5>>
+				<<if $q.school.func('isGroupMember','outcasts')>>
 					When you get near her, she gets a panicked look on her face and walks away.
 					<<actCLA 'Do something else'>>
 						<<gt 'pav_disco_classmates' 'classmates'>>
@@ -2001,7 +2001,7 @@
 						<<gt 'pav_disco_coolkids' 'natasha_dance'>>
 					<</actCLA>>
 				<<elseif $npcs.get('A16','rel') <= 20 or $pc.fame('pav_slut') >= 200>>
-					<<if getvar("$grupTipe") == 3>>
+					<<if $q.school.func('isGroupMember','nerds')>>
 						<p>Natasha isn't really interested in dancing with you, but you persist in trying. "Hey, I've gotta go... do this thing. I guess I'll see you later?" she says halfheartedly before walking away.</p>
 					<<else>>
 						<p>"Why are you even trying to dance with me? It's not like we're in the same social circle or something." Natasha says with a suspicious look. "So, if you could just..." She drags the last part out, expecting you to catch her drift and leave.</p>
@@ -2023,13 +2023,13 @@
 	<<else>>
 		<<image "characters/shared/headshots_main/big16.jpg">>
 		You see Natasha sitting at a table near the cool kids. She's wearing a fairly nice dress, but it pales in comparison to what the other girls are wearing.
-		<<if getvar("$grupTipe") == 5>>
+		<<if $q.school.func('isGroupMember','outcasts')>>
 			When you get near her, she gets a panicked look on her face before she suddenly gets up and walks away.
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A16','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				<p>"Hey $pc.name_nick! 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.</p>
 			<<else>>
 				Natasha greets you with a smile as you sit down beside her. The conversation is lighthearted as you talk about your day and what goes on in the apartment complex where you both live.
@@ -2047,7 +2047,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<<elseif $npcs.get('A16','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-			<<if getvar("$grupTipe") == 3>>
+			<<if $q.school.func('isGroupMember','nerds')>>
 				<p>Natasha isn't really interested in talking to you, but you persist in trying to keep up a conversation. "Hey, I've gotta go... do this thing. I guess I'll see you later?" she says halfheartedly before walking away.</p>
 			<<else>>
 				<p>"Why are you even talking to me? It's not like we're in the same social circle or something." Natasha says with a suspicious look. "So, if you could just..." She drags the last part out, expecting you to catch her drift and leave.</p>

+ 37 - 37
sugarcube/src/locations/pavlov/disco/pav_disco_gopniks.tw

@@ -31,12 +31,12 @@
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			As you walk up to Vitek, he turns to you with a scowl. "Stay the fuck away from us loser." You get the picture from the looks you're getting and quickly move away.
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+		<<elseif $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 			<p>Vitek turns to face you as you approach. "What's up, slut?" You grimance slightly, but ignore his remark.</p>
 			"I just wanted to say hi and talk is all." you reply.
 			<p>"Now that is rare! You don't have a cock in your mouth and can actually talk!" Dan chimes in.</p>
@@ -47,7 +47,7 @@
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A9','rel') >= 50 and $npcs.get('A10','rel') >= 50 and $npcs.get('A11','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				As you start to approach them, you hear Vitek, Dan and Vasily telling stories. After a few questions, they start telling you about some of their more exciting adventures and soon you are all laughing and swapping stories.
 			<<else>>
 				<p>As you start to approach them, you hear Vitek, Dan and Vasily telling stories. "What do you want $pc.name_nick?" Vitek asks when he sees you.</p>
@@ -115,7 +115,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<<elseif $npcs.get('A9','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				<p>You go over and sit on the stairs near Vitek and listen to him, Dan and Vasily tell stories. "What do you want, you stupid cow?" Vitek snarls when they see you.</p>
 				"I just wanted to say hi and talk is all." you reply and he just shrugs. "Whatever."
 				He goes back to telling stories and you ask him a few questions about some of his more exciting adventures. He answers a few, but otherwise ignores you.
@@ -360,7 +360,7 @@
 		<</actCLA>>
 		<<actCLA 'Go out on the dance floor'>>
 			<<image "locations/pavlovsk/community/disco/school_kids/radomir_dance2.jpg">>
-			<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+			<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 				<<if $pc.hotcat >= 6>>
 					As you walk up, Radomir steps away from the girl and places his hand on your arm. "Well well well, if it isn''t my favorite groupie slut."
 					<p>He doesn't give you a chance to speak as he starts to painfully squeeze your arm and whisper in your ear. "This bitch is playing hard to get and I could really use a blowjob right about now, so how about we go somewhere private and you can suck my dick slut?"</p>
@@ -388,7 +388,7 @@
 						<<gt 'pav_disco_classmates' 'classmates'>>
 					<</actCLA>>
 				<</if>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				When he sees you, he gives you a dirty look and shift of his head, motioning for you to get lost as he starts grinding hard on the girl, who pushes back against him. They both proceed to ignore you.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -447,7 +447,7 @@
 		<<actCLA 'Hang out with him'>>
 			<<set $time.minutes += 15>>
 			<<image "characters/shared/headshots_main/big154.jpg">>
-			<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+			<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 				<<if $pc.hotcat >= 6>>
 					<p>You walk over and greet him. "Hey Rad, what's up?"</p>
 					<p>He looks over at you and smiles as his eyes roam up and down your body. "Nothing much beautiful. How about you?"</p>
@@ -480,7 +480,7 @@
 						<<gt 'pav_disco_classmates' 'classmates'>>
 					<</actCLA>>
 				<</if>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				<p>He gives you a dirty look when he sees you. "What the fuck do you want? You know what, I don't want to know. Just fuck off you fucking loser." He then turns around and ignores you.</p>
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -555,7 +555,7 @@
 					<<actCLA 'Ask him to dance'>>
 						<<set $time.minutes += 15>>
 						<<image "characters/shared/headshots_main/big154.jpg">>
-						<<if getvar("$grupTipe") == 4>>
+						<<if $q.school.func('isGroupMember','gopniks')>>
 							<p>"Hey Rad, would you like to dance?" you ask with a smile.</p>
 							<p>You gives you a mocking stare. "Aaaww isn't that adorable? You think you're in my league." He then shakes his head. "No. I've got a reputation to protect. I don't blame you for wanting to dance with me though, I mean honestly what girl wouldn't?"</p>
 							<p>He gives you a once over. "Maybe if you do something with your hair? Would a little conditioner hurt you? And don't even get me started on your skin, you need to take better care of yourself, or just settle for the likes of Vasily. Maybe you should go ask him." He then turns and starts talking to the other gopniks, commenting about how beneath him you are. The other gopniks laugh with him and start commenting on your appearance as well.</p>
@@ -625,20 +625,20 @@
 	<<actCLA 'Hang out with him'>>
 		<<set $time.minutes += 15>>
 		<<image "characters/shared/headshots_main/big157.jpg">>
-		<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+		<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 			<p>"Well well well, if it isn't our little fuck bunny. You looking for a cock to hop on?" Roman taunts as you approach.</p>
 			"I just wanted to say hi and talk is all." you reply.
 			"Tell me how much you love cock then." You banter with him and he rips into you a lot, but at least he talks to you.
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			"Don't even think about it unless you want me to kick your fucking teeth in." You get the message and quickly leave.
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A158','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				"So listen to this, I was arguing with this old hag yesterday. She wouldn''t let go that I was swearing." Roman is again telling one of his crazy stories to the group.
 				You join in, listening and asking him a few questions, and soon the two of you are chatting about a variety of topics.
 			<<else>>
@@ -673,7 +673,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<<elseif $npcs.get('A158','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				<p>You take a seat near Roman. "What's up Roman?"</p>
 				<p>"Fuck off bitch!" he snarls at you.</p>
 				"Calm down, I just want to talk." He mostly ignores you and when he does respond, he insults you, but at least he doesn''t run you off.
@@ -720,7 +720,7 @@
 	<<actCLA 'Hang out with him'>>
 		<<set $time.minutes += 15>>
 		<<image "characters/shared/headshots_main/big158.jpg">>
-		<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+		<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 			<p>He smiles as you walk up. "What's up $pc.name_nick?"</p>
 			You smile back. "Nothing much, just wanted to hang out and talk."
 			The two of you start chatting and he gets a little hands on with you at times, but you're used to it. As you start to leave, he stops you. "Stop by the garage some time, I can always use a break and a quick fuck."
@@ -732,7 +732,7 @@
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			He gives you an annoyed look when he sees you. "Go bother someone else."
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
@@ -787,7 +787,7 @@
 				<</if>>
 			<</actCLA>>
 		<<elseif $npcs.get('A158','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				<p>"Hey, Valentin!" you greet him as you walk up.</p>
 				<p>He sighs. "What do you want?"</p>
 				"I just wanted to talk is all." you reply.
@@ -838,14 +838,14 @@
 	<<actCLA 'Hang out with him'>>
 		<<set $time.minutes += 15>>
 		<<image "characters/shared/headshots_main/big156.jpg">>
-		<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+		<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 			<p>As you walk up, he cups his crotch and bounces it a bit. "Yeah you want this, don't you? Well I don't have time to give it to you right now."</p>
 			"I just wanted to talk is all." you reply.
 			He snorts, but doesn''t refute what you say as you talk to him.
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			"Don't even try it." he bluntly states when he sees you.
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
@@ -877,7 +877,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<<elseif $npcs.get('A156','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				"Hey Arkadi, I thought I''d just come by and hang out with you for a bit."
 				<p>He snorts and grabs his crotch. "Why don't you suck my dick instead?"</p>
 				You ignore his comment and ask him about the city and after a while, he finally starts to respond back, telling you about his time in the city.
@@ -943,7 +943,7 @@
 				<<actCLA 'Dance with him'>>
 					<<gt 'pav_disco_gopniks' 'lavrenti_dance'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				You're sure he seen you, but is ignoring you as he moves between a few girls who are dancing near him. He's a very good dancer and they don't seem to mind at all as they all start dancing together.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -969,7 +969,7 @@
 		<<actCLA 'Hang out with him'>>
 			<<set $time.minutes += 15>>
 			<<image "characters/shared/headshots_main/big155.jpg">>
-			<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+			<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 				<p>You approach Lavrenti. "What's up with you Lavrenti?"</p>
 				Lavrenti smiles at you. "Not much. Just hanging out and admiring the view."
 				You look in the direction he is looking and see some cute girls in short skirts. "Nice view indeed." you comment with a bemused smile.
@@ -977,13 +977,13 @@
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				You're sure he seen you, but is ignoring you. After a few minutes of trying to get his attention, you get the message and move along.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<elseif $npcs.get('A155','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<p>You approach Lavrenti. "What's up with you Lavrenti?"</p>
 					<p>Lavrenti smiles at you. "Not much $pc.name_nick, just hanging out and admiring the view."</p>
 					You look in the direction he is looking and see some cute girls in short skirts. "Nice view indeed." you comment with a bemused smile.
@@ -1105,18 +1105,18 @@
 	<<actCLA 'Hang out with her'>>
 		<<set $time.minutes += 15>>
 		<<image "characters/shared/headshots_main/big24.jpg">>
-		<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+		<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 			<p>"What do you want?" Pauline asks in a none too friendly tone as you approach.</p>
 			You sigh. "I just wanted to talk is all."
 			"Go talk to someone that cares then." she growls.
 			You talk to her for a few minutes, and while she doesn''t ignore you, she makes it clear that she doesn''t approve too much of how you got into the gopniks.
-		<<elseif getvar("$grupTipe") == 5>>
+		<<elseif $q.school.func('isGroupMember','outcasts')>>
 			She shakes her head as soon as you start to get close. "Get the fuck away from me."
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A158','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				<p>"Hey Pauline! What are you up to?"</p>
 				<p>She looks back at you and shrugs her shoulders. "Hey $pc.name_nick, nothing much. Just drinking and watching the idiots dance."</p>
 				<p>The two of you continue talking for a while about how most people suck and how lame the disco is before she offers you a bottle of beer. "Want a drink?"</p>
@@ -1155,7 +1155,7 @@
 				<</actCLA>>
 			<</if>>
 		<<elseif $npcs.get('A158','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				<p>"Hey Pauline! What are you up to?"</p>
 				She glances at you and then looks around before replying "I should just kick your ass, right now."
 				You shake your head. "Don't be like that. I just came over to see how you were doing."
@@ -1175,7 +1175,7 @@
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<else>>
-			<<if getvar("$grupTipe") == 4>>
+			<<if $q.school.func('isGroupMember','gopniks')>>
 				<p>"Hey Pauline! What are you up to?"</p>
 				<p>She looks back at you and shrugs her shoulders. "Hey $pc.name_nick, nothing much. Just drinking and watching the idiots dance."</p>
 				The two of you talk for a while about how most people suck and how lame the disco is.
@@ -1217,7 +1217,7 @@
 		<</actCLA>>
 		<<actCLA 'Go out on the dance floor'>>
 			<<image "locations/pavlovsk/community/disco/school_kids/lena_lera_dance1.jpg">>
-			<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1 or getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1 or $q.school.func('isGroupMember','outcasts')>>
 				As you approach them, they give you dirty looks before turning away from you and dancing closer together, making it clear you're not welcome.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -1263,7 +1263,7 @@
 		<<actCLA 'Hang out with them'>>
 			<<set $time.minutes += 15>>
 			<<image "locations/pavlovsk/community/disco/school_kids/lena_lera.jpg">>
-			<<if getvar("$grupTipe") == 4 and getvar("$gopnik_slut") == 1>>
+			<<if $q.school.func('isGroupMember','gopniks') and getvar("$gopnik_slut") == 1>>
 				<p>"Shouldn't you be in the bathroom getting gangbanged?" Lena inquires with a note of disgust as you approach.</p>
 				<p>Lera laughs. "So, hopped on any cocks today bunny?"</p>
 				You sigh. "No, I just wanted to see what you guys were up to."
@@ -1273,13 +1273,13 @@
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				As you get near them, the intense dirty looks you get is enough for you to just keep moving.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<elseif $npcs.get('A20','rel') >= 50 and $npcs.get('A21','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<p>"Hey guys! What are you up to?"</p>
 					<p>Lena looks at you and shrugs her shoulders. "Hey $pc.name_nick, nothing much. Just hanging out and taking a break from dancing."</p>
 					The three of you talk for a while. Lena mostly talks about how cute many of the boys are and Lera keeps trying to talk about girls don't need boys to have fun.
@@ -1332,7 +1332,7 @@
 					<</if>>
 				<</actCLA>>
 			<<elseif $npcs.get('A20','rel') <= 20 and $npcs.get('A21','rel') <= 20 and $pc.fame('pav_slut') < 300>>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<p>"Hey Lena! What are you up to?"</p>
 					<p>She looks back at you with a frown. "What do you want $pc.name_nick?"</p>
 					"I just wanted to say hi and see what you were up to." you reply.
@@ -1509,7 +1509,7 @@
 					<</actCLA>>
 				<</if>>
 			<<elseif $npcs.get('A144','rel') <= 20 and $pc.fame('pav_slut') < 500>>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<p>Anushka is leaning against the wall, snickering about something she's looking at on her phone. Walking up, you stand next to her and try and peek. Before you can see anything, she puts her phone away and frowns at you. "What do you want?"</p>
 					<p>You sigh, not getting to see whatever it is she found so amusing. "I thought we could just hang out?"</p>
 					She rolls her eyes. "Whatever." You try to talk to her, but she just ignores you.
@@ -1746,7 +1746,7 @@
 				<<actCLA 'Dance with her'>>
 					<<gt 'pav_disco_gopniks' 'alyona_dance'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				When she sees you coming, she flips you off before turning her attention to the guy and dancing with him. You get the message and move away.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -1776,7 +1776,7 @@
 			<<set $time.minutes += 15>>
 			<<image "characters/shared/headshots_main/big143.jpg">>
 			<<if $npcs.get('A143','rel') >= 50 and $pc.fame('pav_slut') < 300>>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<p>"Hey Alyona! What are you up to?"</p>
 					<p>"Hey $pc.name_nick, nothing much. Just drinking and having fun." she says with a grin and takes another swig from the bottle. She already looks pretty drunk.</p>
 					<p>The two of you talk, mostly about the music she's listened to recently before she offers you the bottle. "Want a drink?"</p>
@@ -1815,7 +1815,7 @@
 						<<gt 'pav_discoev1' 'alyona'>>
 					<</actCLA>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				When she sees you coming, she flips you off and gives you a hard stare. You get the message and move away.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>

+ 29 - 29
sugarcube/src/locations/pavlov/disco/pav_disco_jocks.tw

@@ -24,7 +24,7 @@
 						<<gt 'pav_disco_jocks' 'lazar_dance'>>
 					<</actCLA>>
 				<</if>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				He laughs as you get close. "Get lost loser." he scoffs before turning his back on you.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -79,14 +79,14 @@
 						<</actCLA>>
 					<</if>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				<p>Lazar gives you a dirty look as you approach. "Why don't you stick to your own kind? No one wants you here."</p>
 				You notice several of the other jocks giving you unkind looks, so you decide to just leave.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<elseif $npcs.get('A149','rel') <= 20 and $pc.fame('pav_slut') < 250>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>"Well well, if it isn't $pc.name_nick..." Lazar quips as he stands with his arms crossed.</p>
 					<p>You sigh. "What now Lazar? I don't have time for your games today..."</p>
 					<p>He huffs. "Somebody has been talking shit behind my back to some girls, but I haven't figured out who it is yet. I wanted you to know that I'm keeping my eyes on you $pc.name_nick, you see like the type to make up shit and lie."</p>
@@ -107,7 +107,7 @@
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<else>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>Lazar smiles as you approach. "Hey Lazar, what's up?"</p>
 					<p>He spreads his arms wide. "Just taking it all in and basking in the good times that come with hard work. You?"</p>
 					You shrug a little. "You know, just out to have a little fun." The two of you start talking and the conversation soon turns towards sports.
@@ -170,7 +170,7 @@
 	<<actCLA 'Hang out with him'>>
 		<<set $time.minutes += 15>>
 		<<image "characters/shared/headshots_main/big3.jpg">>
-		<<if $pc.fame('pav_slut') >= 250 or getvar("$grupTipe") == 5>>
+		<<if getvar("$fame['pav_slut']") >= 250 or $q.school.func('isGroupMember','outcasts')>>
 			<p>"Hold up Ivan! I need to talk to you." you call out as you approach him.</p>
 			<p>Ivan stops and gives you a confused look. "Why are you talking to me? I don't really have anything to say to you."</p>
 			"Come on, don't be like that. I thought we could just talk." you say with a smile.
@@ -196,7 +196,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<<elseif $npcs.get('A3','rel') <= 20 and $pc.fame('pav_slut') < 250>>
-			<<if getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','jocks')>>
 				<p>"Are you looking towards your next fight, Ivan?" you ask as you approach.</p>
 				He casually shrugs his shoulders before replying. "I guess. I don't really know who they'll have me fight..." He isn''t very talkative, but you manage to get him to talk a little about his past fights.
 			<<else>>
@@ -253,7 +253,7 @@
 				<<actCLA 'Dance with him'>>
 					<<gt 'pav_disco_jocks' 'svyatoslav_dance'>>
 				<</actCLA>>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				He gives you a disgusted look as you approach. "Find somewhere else to dance." Not wanting to cause a scene, you back off.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -285,7 +285,7 @@
 		<<actCLA 'Hang out with him'>>
 			<<set $time.minutes += 15>>
 			<<image "characters/shared/headshots_main/big8.jpg">>
-			<<if getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','outcasts')>>
 				He gives you a pissed off look as you approach. "I want nothing to do with you, so get lost." Not wanting to cause a scene, you back off.
 				<<actCLA 'Do something else'>>
 					<<gt 'pav_disco_classmates' 'classmates'>>
@@ -297,7 +297,7 @@
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<elseif $npcs.get('A8','rel') <= 20 and $pc.fame('pav_slut') < 250>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>"Hey, what's up Svyatoslav?" you ask as you approach.</p>
 					He smiles at you. "Oh you know, same old same old." You start talking about a variety of things, though mostly about how close he comes to beating Ivan or Lazar in different sports or some of the pretty girls in school.
 				<<else>>
@@ -317,7 +317,7 @@
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 			<<else>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>"Hey, what's up Svyatoslav?" you ask as you approach.</p>
 					He smiles at you. "Oh you know, same old same old." You start talking about a variety of things, though mostly about how close he comes to beating Ivan or Lazar in different sports or some of the pretty girls in school.
 				<<else>>
@@ -373,14 +373,14 @@
 	<<gs 'npc_relationship' 'modify' 'A165' 'like' 1 'pav_disco'>>
 	<<image "characters/shared/headshots_main/big165.jpg">>
 	You see Vanya hanging out with the cool kids and jocks.
-	<<if getvar("$grupTipe") == 5>>
+	<<if $q.school.func('isGroupMember','outcasts')>>
 		<p>Vanya gives you a dirty look as you approach. "Why don't you stick to your own kind? No one wants you here."</p>
 		You notice several of the other giving you unkind looks, so you decide to just leave.
 		<<actCLA 'Do something else'>>
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A165','rel') >= 50 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			<p>"Say $pc.name_nick did you hear about the prank I pulled on the football coach?" Vanya is having a hard time keeping himself from laughter.</p>
 			<p>"No, what did you do this time?" you curiously ask.</p>
 			<p>"Well, during one of the training sessions, I unscrewed the top from a water bottle thinking one of the boys would drink it but here comes the coach, who grabs it. Just as he's about to drink, the top falls off and water splashes all over him!" Vanya bursts out in laughter.</p>
@@ -394,7 +394,7 @@
 			<<gt 'pav_disco_classmates' 'classmates'>>
 		<</actCLA>>
 	<<elseif $npcs.get('A165','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-		<<if getvar("$grupTipe") == 2>>
+		<<if $q.school.func('isGroupMember','jocks')>>
 			<p>"What the hell Vanya!" you yell while angrily stomping towards him.</p>
 			<p>"What now?" he replies with an innocent look. "I'm getting tired of you accusing me of things I haven't done!"</p>
 			<p>"It must've been you! Who else replaces talc powder with itching powder?!"</p>
@@ -438,7 +438,7 @@
 		<<set $time.minutes += 15>>
 		<<image "characters/shared/headshots_main/big150.jpg">>
 		<<if $npcs.get('A150','rel') >= 50 and $pc.fame('pav_slut') < 250>>
-			<<if getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','jocks')>>
 				<p>Erast smiles as you approach. "Oh hey $pc.name_nick..." he gently says. "What can I help you with?"</p>
 				<p>"Hi Erast! So I saw you working out and needed some pointers..." you ask him.</p>
 				<p>"No worries $pc.name_nick. I'll gladly share my secrets with you." he winks and continues on, talking about different workout techniques,that he swears will make you stronger and more fit.</p>
@@ -451,7 +451,7 @@
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
 		<<elseif $npcs.get('A150','rel') <= 20 and $pc.fame('pav_slut') < 250>>
-			<<if getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','jocks')>>
 				<p>"Oh hey $pc.name_nick..." Erast gently says as you approach. "What can I help you with?"</p>
 				"Just a quick thing, Erast. I promise..." you plead with him.
 				<p>"Sorry, I don't have any time right now. Later, okay?" he politely replies, then walks off.</p>
@@ -502,7 +502,7 @@
 		<</actCLA>>
 		<<actCLA 'Go out on the dance floor'>>
 			<<image "locations/pavlovsk/community/disco/club.jpg">>
-			<<if (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2) and $npcs.get('A23','rel') >= 70>>
+			<<if ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 70>>
 				<p>You walk over to Albina and she gives you a smile. "$pc.name_nick, I didn't know you were here! Come and dance with me!"</p>
 			<<elseif getvar("$AlbinaQW['Friends']") == 2>>
 				<p>You walk over to Albina and she couldn't be any happier to see you. She embraces you in a tight hug and you catch a scent of what you assume is some rather expensive perfume. "Come and dance with me, $pc.name_nick. Let's show these amateurs what real dancing actually looks like!"</p>
@@ -512,7 +512,7 @@
 			<<actCLA 'Do something else'>>
 				<<gt 'pav_disco_classmates' 'classmates'>>
 			<</actCLA>>
-			<<if (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
+			<<if ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
 				<<actCLA 'Dance with her'>>
 					<<gt 'pav_disco_jocks' 'albina_dance'>>
 				<</actCLA>>
@@ -526,14 +526,14 @@
 		<<actCLA 'Hang out with her'>>
 			<<set $time.minutes += 15>>
 			<<image "characters/shared/headshots_main/big23.jpg">>
-			<<if getvar("$grupTipe") == 5>>
+			<<if $q.school.func('isGroupMember','outcasts')>>
 				<p>Albina just laughs loudly as you approach her. "Why are <i>you</i> here? Go hang out with the other losers somewhere else." she taunts before getting up and going to dance with her friends.</p>
-			<<elseif (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
+			<<elseif ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
 				<p>"What's up Albina?" you ask as you approach and take a seat next to her.</p>
 				<p>She smiles at you. "Oh you know, just letting my hair down and having some fun. What about you?"</p>
 				"Same. Just enjoying the night." you reply and she smiles at you again.
 			<<elseif $npcs.get('A23','rel') <= 20 and $pc.fame('pav_slut') < 250>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>"What's up Albina?" you ask as you approach.</p>
 					<p>She scoffs in response. "Like you actually care. I don't like you, I barely tolerate you being in the same social group as me, so why would I want to talk to you? Just piss off already." Not wanting to cause a scene, you back off.</p>
 				<<else>>
@@ -552,7 +552,7 @@
 			<</actCLA>>
 			<<actCLA 'Ask her to dance'>>
 				<<image "characters/shared/headshots_main/big23.jpg">>
-				<<if (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
+				<<if ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
 					Albina smiles and accepts your offer to dance. She gets up and grabs your hand before leading you out to the dance floor.
 					<<actCLA 'Go dancing'>>
 						<<gt 'pav_disco_jocks' 'albina_dance'>>
@@ -564,7 +564,7 @@
 					<</actCLA>>
 				<</if>>
 			<</actCLA>>
-			<<if (getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
+			<<if ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 70 or getvar("$AlbinaQW['Friends']") == 2>>
 				<<actCLA 'Chat'>>
 					<<set $time.minutes += 15>>
 					<<image "characters/shared/headshots_main/big23.jpg">>
@@ -664,7 +664,7 @@
 		<<actCLA 'Go home'>>
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 3>>
+	<<elseif $q.school.func('isGroupMember','nerds')>>
 		Albina grabs you firmly by the arm and drags you outside.
 		<p>"Why...Why are you helping me?" you drunkenly ask.</p>
 		<p>Albina looks at you with what you think is pity. "We might not run in the same social circle $pc.name_nick, but I'm not going to let you humiliate yourself or be taken advantage of trying to impress a group of people who honestly couldn't give a shit about you. You should really learn your limits when it comes to alcohol."</p>
@@ -703,7 +703,7 @@
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 				<<if $pc.fame('pav_slut') < 200>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<p>"What the fuck do you want, bitch?"</p>
 						"I want to dance, <<npc 'A18'>><</npc>>."
 						"Just because you're one of us doesn''t mean I have to like you. Get the fuck out of here."
@@ -713,7 +713,7 @@
 						"No. Get the fuck out of here."
 					<</if>>
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<p>"Oh look. The little skank must be doing her slut rounds. I don't care if you're one of us, I'm still not going to fuck you. Get lost, whore!"</p>
 					<<else>>
 						<p>"Oh look. The little skank must be doing her slut rounds. Well, I'm certainly not going to fuck you. Get lost, whore!"</p>
@@ -749,7 +749,7 @@
 					<<gt 'pav_disco_classmates' 'classmates'>>
 				<</actCLA>>
 				<<if $pc.fame('pav_slut') < 200>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<p>"What the fuck do you want, bitch?"</p>
 						"I just wanted to talk, <<npc 'A18'>><</npc>>."
 						"Just because you're one of us doesn''t mean I have to like you. Get the fuck out of here."
@@ -759,7 +759,7 @@
 						"No. Get the fuck out of here."
 					<</if>>
 				<<else>>
-					<<if getvar("$grupTipe") == 2>>
+					<<if $q.school.func('isGroupMember','jocks')>>
 						<p>"Oh look. The little skank must be doing her slut rounds. I don't care if you're one of us, I'm still not going to fuck you. Get lost, whore!"</p>
 					<<else>>
 						<p>"Oh look. The little skank must be doing her slut rounds. Well, I'm certainly not going to fuck you. Get lost, whore!"</p>
@@ -1044,7 +1044,7 @@
 					<</actCLA>>
 				<</actCLA>>
 			<<elseif $npcs.get('A19','rel') <= 20 and $pc.fame('pav_slut') < 200>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>"What do <i>you</i> want?"</p>
 					"I just was going to say hi."
 					"No. You may be one of us, <i>for now</i>, but that doesn''t mean I want to be seen with you."
@@ -1054,7 +1054,7 @@
 					<p>"Get lost, $pc.name_nick."</p>
 				<</if>>
 			<<elseif $pc.fame('pav_slut') >= 200>>
-				<<if getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','jocks')>>
 					<p>"Eww. What do <i>you</i> want?"</p>
 					"I just was going to say hi."
 					"No. You may be one of us, <i>for now</i>, but that doesn''t mean I have to like you."

+ 3 - 3
sugarcube/src/locations/pavlov/lake/pav_lake.tw

@@ -625,7 +625,7 @@
 		<<actCLA 'Leave'>>
 			<<gt 'pav_lake'>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<elseif $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		You start approaching them and are greeted with friendly smiles as several wave at you to come over and join them.
 		<<actCLA 'Leave'>>
 			<<gt 'pav_lake'>>
@@ -633,7 +633,7 @@
 		<<actCLA 'Join them'>>
 			<<gt 'pav_lake' 'beach_hangout'>>
 		<</actCLA>>
-	<<elseif getvar("$grupTipe") == 3 or getvar("$grupTipe") == 4>>
+	<<elseif $q.school.func('isGroupMember','nerds') or $q.school.func('isGroupMember','gopniks')>>
 		You start approaching them, but the group largely ignore you until you get close and several of them give you annoyed looks, making it clear you're not welcome here, but make no effort to stop you from joining them at least.
 		<<actCLA 'Leave'>>
 			<<gt 'pav_lake'>>
@@ -672,7 +672,7 @@
 		<<run $q.school.func('groupRelInc','jocks',-1)>>
 	<</if>>
 	<<image "locations/pavlovsk/lake/beach_hangout/hangout.jpg">>
-	<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+	<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 		You smile at your friends and take a seat with them before joining in on the variety of conversations going on. Some are tanning, others sit around talking, and some horse around. You can use this opportunity to get to know one of them better if you want.
 	<<else>>
 		You smile and take a seat with them, but get mixed responses. The ones you know better seem somewhat friendly, but the others range from indifference to annoyance. Many choose just to ignore you.

+ 1 - 1
sugarcube/src/locations/pavlov/residential/pav_complex.tw

@@ -401,7 +401,7 @@
 									<<elseif getvar("$edchat") == 4>>
 										<p>"May I ask you a question, $pc.name_nick?" Eduard wipes his hands as he takes a break from working on the bike.</p>
 										You nod, a bit afraid of what he'll ask...
-										<<if getvar("$grupTipe") == 4>>
+										<<if $q.school.func('isGroupMember','gopniks')>>
 											<p>"So I've heard some rumors that you two were doing some shit around town? Do I need to have a talk with you and my lovely daughter?" He crosses his arms, awaiting an answer.</p>
 											<p>You shake your head. "No! No, we're staying out of trouble. We'd never do anything to upset you. I promise."</p>
 											<p>"Good! Keep it that way... Sometimes you kids drive me crazy..." he shortly replies.</p>

+ 2 - 2
sugarcube/src/npcs/katja/katjaEv.tw

@@ -1021,7 +1021,7 @@
 			<<run $npcs.inc('A14','rel',5)>>
 			<<run $npcs.dec('A8','rel',5)>>
 			<<image "characters/pavlovsk/school/girl/katja/KWT17.jpg">>
-			<<if getvar("$grupTipe") == 2>>
+			<<if $q.school.func('isGroupMember','jocks')>>
 				Putting on a smile, you unhook your arm from the redhead and happily stride towards the approaching Svyatoslav.
 				<p>"Hey Slavik! Finally, I found you! Ok, Katja! Thanks! You can go now to help your sister!"</p>
 				As Svyatoslav tries to pass by your side towards her, you grab his arm. He is strong, but as a sporty girl, you are a match to his strength and that stops the jock''s advance. Katja senses an opportunity and quickly escapes.
@@ -1029,7 +1029,7 @@
 				The jock tries to pry his arm away from your embrace, but before he can exert any strength, you pull him in the opposite direction of Katja, showering him with a bombardment of words worthy of Lizaveta''s admiration.
 				<p>"Oh come on Slavik! You can talk with Katja later! We need to discuss the team schedule! I'm not fond of the one <<npc 'A18'>><</npc>> is "suggesting"! If you ask me she is sex deprived! You must do something for the girls! Oh! I saw your last match! It's was cool! Hey we can..."</p>
 				<p>Slavik is taken back by your performance, and not knowing how to get rid of the hold in his arm, reluctantly follows you/is dragged around Pavlovsk for a maddening half hour until you are sure that Katja has got away. After that and giving you an evil-eyed goodbye, he leaves you alone.</p>
-			<<elseif getvar("$grupTipe") == 5>>
+			<<elseif $q.school.func('isGroupMember','outcasts')>>
 				Smiling nervously, you unhook your arm from the redhead, and feeling insecure, stride towards the approaching Svyatoslav.
 				<p>"Hey Slavik! I..."</p>
 				As Svyatoslav tries to pass by your side towards Katja, he gives you an exasperated gaze. It is evident that a little outcast girl like you isn''t going to stop the big jock boy from reaching the redheaded beauty... or at least that's what would happen if you were in school.

+ 2 - 2
sugarcube/src/npcs/katja/katja_uni.tw

@@ -207,7 +207,7 @@
 					Katja''s face turns very red, and she just says "bye" before turning around to find a seat furthest away from you. You can't help but get the feeling that she might be more interested in the things you do than she lets on.
 				<</if>>
 			<<else>>
-				<<if getvar("$grupTipe") == 1 or getvar("$grupTipe") == 2>>
+				<<if $q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')>>
 					<<if $npcs.get('A14','rel') >= 50>>
 						<<set '"Hi, $pc.name_nick. ' + iif(katjaQW['know_going_to_teaching_degree'] = 0, 'I didn''t know you had decided to study to become a teacher,', 'I see that you've made your way to our first class,') + '" you hear somebody say from behind. When you turn around, you see your former classmate Katja standing there with a smile on her face.'>>
 						<<set '"' + iif(katjaQW['know_katja_uni'] = 0, 'I didn''t know you were going to take these classes,', 'Yes, it's important to be here for the first class,') + '" you reply.'>>
@@ -220,7 +220,7 @@
 						<<set '"' + iif(katjaQW['know_katja_uni'] = 0, 'I didn''t know you were going to take these classes,', 'Yes, it's important to be here for the first class,') + '" you reply.'>>
 						"I think it's going to be so fun and exciting. It's nice to have somebody you already know in the class. Maybe we can talk about classes later," she says before saying goodbye and finding a place to sit.
 					<</if>>
-				<<elseif getvar("$grupTipe") == 3 or getvar("$grupTipe") == 4>>
+				<<elseif $q.school.func('isGroupMember','nerds') or $q.school.func('isGroupMember','gopniks')>>
 					<<if $npcs.get('A14','rel') >= 50>>
 						<<set '"Hi $pc.name_nick, ' + iif(katjaQW['know_going_to_teaching_degree'] = 0, 'I didn''t know you had decided to study to become a teacher,', 'I see that you have made your way to our first class,') + '" you hear someone say behind you. When you turn around, you see your former classmate Katja standing there with a smile on her face.'>>
 						<<set '"' + iif(katjaQW['know_katja_uni'] = 0, 'I didn''t know you were going to take these classes,', 'Yes, it's important to be here for the first class,') + '" you reply.'>>

+ 1 - 1
sugarcube/src/npcs/school/Albina/albina_starlets.tw

@@ -38,7 +38,7 @@
 				The music starts playing and you instantly realise your mistake in trying to compare yourself to Albina. She flawlessly performs a number of dance moves you could never hope to do, all with a smug smile on her face directed at you.
 				She finishes her performance as the music ends and you sheepishly avoid eye contact with her as she walks up to you, breathless.
 				<p>"Not so loud mouthed now are you?" she gleefully remarks with a laugh. "Now why don't you fuck off and take your bow-legged humble ass back to the amateur corner where you belong?"</p>
-				<<if getvar("$grupTipe") == 4>>
+				<<if $q.school.func('isGroupMember','gopniks')>>
 					<p>"A junkie like you will never dance with <i>us</i>!"</p>
 				<<else>>
 					"If I liked you better, then I <i>might</i> have taken an interest in improving your horrible dancing."

+ 1 - 1
sugarcube/src/npcs/school/Artem/artem_date_events.tw

@@ -95,7 +95,7 @@
 <</if>>
 <<if $location_var[$here][0] == 'artemGopSkver'>>
 	<<image "characters/pavlovsk/school/boy/artem/sex/park/walkgop.jpg">>
-	<<if getvar("$grupTipe") == 4>>
+	<<if $q.school.func('isGroupMember','gopniks')>>
 		Just as you're about to make it past them, several of the gopniks get in your way, making a circle around you. You've seen them around before, but don't really know them.
 		<p>Somehow, one of them knows your name. They look at you with disdain and the leader of their group says "$pc.name_nick? What are you doing with this bitch?"</p>
 		<<actCLA 'Tell them to mind their own business'>>

+ 1 - 1
sugarcube/src/npcs/school/Artem/artem_sex.tw

@@ -1026,7 +1026,7 @@
 					<<image "characters/shared/headshots_main/big2.jpg">>
 					You think for a few seconds before nodding. She might like it rough, but you shouldn''t encourage him to hurt a girl during sex. "Okay, I'll try and talk her into it, but I don't want you to be too rough with her. She's my friend, after all, and a human being."
 					He nods in agreement. "Okay... Not too mean, maybe just hurt her a little..." he says with a huge grin while holding up his hand with a small gap between his index finger and thumb. You shake your head and laugh.
-					<<if getvar("$grupTipe") == 4>>
+					<<if $q.school.func('isGroupMember','gopniks')>>
 						<p>He then looks like he's suddenly thought of something. "Hey, you're friends with all the gopnik girls. Do you think you could talk the rest of them into it too?"</p>
 						You give him a slightly shocked look. He's asking you to set him up with other girls so he can get a little revenge on them. "I'll think about it. We can talk about it some other time." He nods in understanding, then gives you a kiss and thanks you for a great time before walking you to the door. As you leave, you think about what just happened. Not only do Anushka''s words seem to not have bothered him anymore, but there''s something about his stance, tone of voice and how he acts. He seems to have gotten a little more confident from today''s events.
 					<<else>>

+ 8 - 8
sugarcube/src/npcs/school/Artem/artemhome.tw

@@ -111,7 +111,7 @@
 				<<setinit $artemQW['metArtemMom'] = 1>>
 				<p>You stand outside the Chebotarev household and knock on the door, which is quickly answered by Artem's mother, who has a friendly smile on her face. "Hello. Can I help you?"</p>
 				<p>You return her smile. "Yes. Is Artem home?"</p>
-				<<if $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+				<<if getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 					<p>Her smile falters. "Oh? Are you one of his school friends?"</p>
 					You nod. "Yes, we go to school together."
 					<p>"I'm Glinina, Artem's mother. Who are you?"</p>
@@ -161,7 +161,7 @@
 					<<actCLA 'Leave'>>
 						<<gt 'pod_ezd' 'etaj_1'>>
 					<</actCLA>>
-				<<elseif $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+				<<elseif getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 					<p>You stand outside the Chebotarev household and knock on the door, which is quickly answered by Artem's mother, who has a friendly smile on her face that falters when she sees you. "Oh. Hello again, $pc.name_first. Can I help you?"</p>
 					You return her smile. "Yes, I'm here to see Artem."
 					She doesn''t seem pleased. "Oh. Well come in then." She turns to face down the hall. "Artem dear, ''that girl'' is here to see you again." You can hear the judgment in her voice before she turns back to you. "Go on back. He's in his room."
@@ -648,7 +648,7 @@
 			<<set $menu_off = 1>>
 			<<set $time.minutes += 10>>
 			<<image "locations/pavlovsk/resident/apartment/artemhome/masharin.jpg">>
-			<<if $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+			<<if getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 				<p>As the two of you walk into the living room, his father turns towards you looking a little appalled. "So $pc.name_first, how did you and my boy become friends?"</p>
 				You stretch out your clothes so they cover you up a little. "I don't really remember. We kind of just connected and started hanging out... It doesn''t hurt that Artem is really hot. That made it much easier." Artem blushes at the comment.
 				Masharin squirms a little by your answer and clears his throat. "My boy is very ambitious and we're very proud of him. We want him to succeed in school. I really hope that he'll be able to continue to pursue that because, you know, he's not used to girls like you..."
@@ -698,7 +698,7 @@
 					<<set $menu_off = 1>>
 					<<set $time.minutes += 10>>
 					<<image "locations/pavlovsk/resident/apartment/artemhome/masharin.jpg">>
-					<<if $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+					<<if getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 						"Didn''t think Artem would still be socializing with you after our talk..." Masharin reacts to seeing you once again.
 						"Yeah, well, you know how it goes," you nonchalantly answer.
 						<p>His posture suddenly changes and he slouches back in his chair. "$pc.name_first, can't you find some other boy to toy with and leave my son alone?"</p>
@@ -776,7 +776,7 @@
 					<<set $menu_off = 1>>
 					<<set $time.minutes += 10>>
 					<<image "locations/pavlovsk/resident/apartment/artemhome/living.jpg">>
-					<<if $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+					<<if getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 						<p>You barge in without paying any respect to them. "What are you watching?" you ask.</p>
 						Startled, they jump to as they turn their attention towards you. "We're watching the news..." Masharin annoyingly replies.
 						"The news is boring as hell and there''s always something depressing on there," you answer back.
@@ -920,7 +920,7 @@
 				<<gt 'artemhome' 'hallway'>>
 			<</actCLA>>
 			<<actCLA 'Talk to her'>>
-				<<if $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+				<<if getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 					<<image "locations/pavlovsk/resident/apartment/artemhome/glinina.jpg">>
 					<<if getvar("$artemQW['metArtemMom']") == 0>>
 						<<setinit $artemQW['metArtemMom'] = 1>>
@@ -1281,7 +1281,7 @@
 			<</actCLA>>
 		<</actCLA>>
 		<!-- !! If Sveta has fallen because of her slut reputation in Pavlovsk-->
-	<<elseif getvar("$artemQW['slutlove']") == 0 and getvar("$artemQW['sveslut']") == 0 and getvar("$artemQW['artemlove']") == 1 and $pc.fame('pav_slut') >= 250 and getvar("$grupTipe") == 5>>
+	<<elseif getvar("$artemQW['slutlove']") == 0 and getvar("$artemQW['sveslut']") == 0 and getvar("$artemQW['artemlove']") == 1 and getvar("$fame['pav_slut']") >= 250 and $q.school.func('isGroupMember','outcasts')>>
 		<<image "characters/pavlovsk/school/boy/artem/talk1.jpg">>
 		You quietly walk past Artem and enter his room, sitting on the couch without saying a word.
 		<p>Artem looks at you questioningly. "$pc.name_nick..."</p>
@@ -1481,7 +1481,7 @@
 		<p>You look at Artem, slightly confused. "What's the meaning of this, Artem?"</p>
 		He smiles at you. "Well, we've spent a lot of time dating, so I figured it would be nice to make it official."
 		<p>You're still not sold on the idea, and question him further. "Make what official? And where did you get that wine from?"</p>
-		<<if $pc.fame('pav_slut') >= 200 or getvar("$grupTipe") == 4>>
+		<<if getvar("$fame['pav_slut']") >= 200 or $q.school.func('isGroupMember','gopniks')>>
 			<p>Artem reassures you. "Relax, $pc.name_nick. My parents are leaving to see a friend and I got the wine from my uncle. So please... Let's just sit down and chat?"</p>
 		<<else>>
 			<p>Artem reassures you. "Relax, $pc.name_nick. My parents are leaving to see a friend to give us some privacy. And my mom gave me that wine, to share with you! My parents are very happy I met you, and my mother picked the wine. So please... Let's just sit down and chat?"</p>

+ 1 - 1
sugarcube/src/npcs/therapist/therapist.tw

@@ -201,7 +201,7 @@
 		<<set $q.therapist.therapy = 'mood'>>
 		<<gt 'therapist_therapie'>>
 	<</act>>
-	<<if getvar("$grupTipe") == 5 and getvar("$SchoolAtestat") == 0 and getvar("$SchoolBlock") == 0>>
+	<<if $q.school.func('isGroupMember','outcasts') and getvar("$SchoolAtestat") == 0 and getvar("$SchoolBlock") == 0>>
 		<<actCLA 'Help with school troubles'>>
 			<<set $q.therapist.therapy = 'school troubles'>>
 			<<gt 'therapist_therapie'>>

+ 5 - 5
sugarcube/src/start/city/intro_city_select.tw

@@ -347,7 +347,7 @@
 
 	<</if>>
 	<<set $fantasybook = 5>>
-	<<set $grupTipe = 3>>
+	<<run $q.school.func('setGroupMembership','nerds')>>
 	<<set $finances.cash += 3000>>
 	<<run $inventory.set('shampoo',20)>>
 	<<if getvar("$player_avatar") == 0>>
@@ -616,7 +616,7 @@
 		<<set $pc.eyelashes = 1>>
 	<</if>>
 	<<run $npcs.inc('A34','rel',10)>>
-	<<set $grupTipe = 2>>
+	<<run $q.school.func('setGroupMembership','jocks')>>
 <</if>>
 <<if $location_var[$here][0] == 'volleyball'>>
 	<h2>Volleyball player</h2>
@@ -827,7 +827,7 @@
 
 	<<set $pc.tan = 5>>
 	<<run $npcs.inc('A33','rel',10)>>
-	<<set $grupTipe = 1>>
+	<<run $q.school.func('setGroupMembership','cool')>>
 <</if>>
 <<if $location_var[$here][0] == 'socialite'>>
 	<h2>Sociable</h2>
@@ -975,7 +975,7 @@
 	<<run $pc.sexStatSet('vaginal','aware',1)>>
 	<<set $Gspassed = 0>>
 	<<run $pc.fameInc('pav','sex',30)>>
-	<<set $grupTipe = 4>>
+	<<run $q.school.func('setGroupMembership','gopniks')>>
 <</if>>
 <<if $location_var[$here][0] == 'gopnikstart'>>
 	<h2>Gopnik</h2>
@@ -1191,7 +1191,7 @@
 	<<set $pc.pcs_skin = 500>>
 	<<set $pc.tan = 0>>
 
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<run $inventory.set('shampoo',20)>>
 <</if>>
 <<if $location_var[$here][0] == 'friendless'>>

+ 6 - 6
sugarcube/src/start/intro_sg_select_custom.tw

@@ -125,7 +125,7 @@
 		<<run $q.school.func('groupRelSet','nerds',800)>>
 		<<run $q.school.func('groupRelSet','gopniks',100)>>
 		<<run $q.school.func('groupRelSet','teachers',600)>>
-		<<set $grupTipe = 3>>
+		<<run $q.school.func('setGroupMembership','nerds')>>
 		<<gt 'intro_sg_select_custom' 'modgrup'>>
 	<</actCLA>>
 	<<actCLA 'Jock'>>
@@ -136,7 +136,7 @@
 		<<run $q.school.func('groupRelSet','nerds',100)>>
 		<<run $q.school.func('groupRelSet','gopniks',200)>>
 		<<run $q.school.func('groupRelSet','teachers',400)>>
-		<<set $grupTipe = 2>>
+		<<run $q.school.func('setGroupMembership','jocks')>>
 		<<gt 'intro_sg_select_custom' 'modgrup'>>
 	<</actCLA>>
 	<<actCLA 'Popular'>>
@@ -147,7 +147,7 @@
 		<<run $q.school.func('groupRelSet','nerds',200)>>
 		<<run $q.school.func('groupRelSet','gopniks',100)>>
 		<<run $q.school.func('groupRelSet','teachers',400)>>
-		<<set $grupTipe = 1>>
+		<<run $q.school.func('setGroupMembership','cool')>>
 		<<gt 'intro_sg_select_custom' 'modgrup'>>
 	<</actCLA>>
 	<<actCLA 'Gopnik'>>
@@ -158,7 +158,7 @@
 		<<run $q.school.func('groupRelSet','nerds',100)>>
 		<<run $q.school.func('groupRelSet','gopniks',800)>>
 		<<run $q.school.func('groupRelSet','teachers',100)>>
-		<<set $grupTipe = 4>>
+		<<run $q.school.func('setGroupMembership','gopniks')>>
 		<<gt 'intro_sg_select_custom' 'modgrup'>>
 	<</actCLA>>
 	<<actCLA 'Outcast'>>
@@ -169,7 +169,7 @@
 		<<run $q.school.func('groupRelSet','gopniks',200)>>
 		<<run $q.school.func('groupRelSet','teachers',200)>>
 		<<set $soc_grup = 'Outcast'>>
-		<<set $grupTipe = 5>>
+		<<run $q.school.func('setGroupMembership','outcasts')>>
 		<<gt 'intro_sg_select_custom' 'modgrup'>>
 	<</actCLA>>
 	<<actCLA 'Return'>>
@@ -267,7 +267,7 @@
 	<<run $pc.sexStatSet('hj','aware',0)>>
 	<<run $pc.sexStatSet('vaginal','aware',0)>>
 	<<set $soc_grup = 'outcast'>>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 <</if>>
 <<if $location_var[$here][0] == 'modrel'>>
 	<<actCLA 'Family'>>

+ 5 - 5
sugarcube/src/start/schoolgirl/intro_sg_select.tw

@@ -42,7 +42,7 @@
 
 	<</if>>
 	<<set $fantasybook = 5>>
-	<<set $grupTipe = 3>>
+	<<run $q.school.func('setGroupMembership','nerds')>>
 	<<set $finances.cash += 3000>>
 	<<run $inventory.set('shampoo',20)>>
 	<<run $inventory.set('sanpad',40)>>
@@ -322,7 +322,7 @@
 		<<set $pc.eyelashes = 1>>
 	<</if>>
 	<<run $npcs.inc('A34','rel',10)>>
-	<<set $grupTipe = 2>>
+	<<run $q.school.func('setGroupMembership','jocks')>>
 :: intro_sg_select_char_volleyball[quest]
 	<h2>Volleyball player</h2>
 	<<image "system/1_openings/2_sg/jock_1.jpg">>
@@ -533,7 +533,7 @@
 
 	<<set $pc.tan = 5>>
 	<<run $npcs.inc('A33','rel',10)>>
-	<<set $grupTipe = 1>>
+	<<run $q.school.func('setGroupMembership','cool')>>
 :: intro_sg_select_char_socialite[quest]
 	<h2>Sociable</h2>
 	<<image "system/1_openings/2_sg/popular_1.jpg">>
@@ -687,7 +687,7 @@
 	<<run $pc.sexStatSet('vaginal','aware',1)>>
 	<<set $Gspassed = 0>>
 	<<run $pc.fameInc('pav','sex',30)>>
-	<<set $grupTipe = 4>>
+	<<run $q.school.func('setGroupMembership','gopniks')>>
 :: intro_sg_select_char_gopnikstart[quest]
 	<h2>Gopnik</h2>
 	<<image "system/1_openings/2_sg/gopnik_1.jpg">>
@@ -977,7 +977,7 @@
 	<<set $pc.pcs_skin = 0>>
 
 	<<set $pc.tan = 0>>
-	<<set $grupTipe = 5>>
+	<<run $q.school.func('setGroupMembership','outcasts')>>
 	<<run $inventory.set('shampoo',20)>>
 	<<run $inventory.set('sanpad',40)>>
 :: intro_sg_select_char_friendless[quest]

+ 2 - 0
variables.py

@@ -271,6 +271,8 @@ get_set_variables = [
     [r'\$pirsN',"$pc.decoGet('piercing','navel')",r"$pc.decoWear('piercing','navel',\1)"],
 
     [r'''\$stat\[(["'\w]+)\]''',r"$pc.sexStat(\1)",r"$pc.sexStatSet(\1,'aware',\2)",r"$pc.sexStatInc(\1,'aware',\2)",r"$pc.sexStatDec(\1,'aware',\2)"],
+
+
 ]
 
 post_get_set_variables_replacements = [