# pav_disco_classmates
!2021/05/02

if $ARGS[0] = 'classmates':
	if hour < 20: gt 'pav_disco'
	*clr & cla
	$loc_arg = ''
	$loc = 'pav_disco'
	$location_type = 'public_indoors'
	$menu_loc = 'pav_disco_coolkids'
	$menu_arg = 'classmates'
	if music_on = 1:
		$track_loop = 'sound/komb.mp3'
		volume = 80
		music_loop = 1
		pl '<a href="exec: music_on = 0 & gt $loc">Turn off the music</a>'
	else
		music_loop = 0
		close all
		pl '<a href="exec: music_on = 1 & gt $loc">Play music</a>'
	end
	menu_off = 1
	gs 'themes', 'food_menu'
	if atdisco['day'] ! daystart or atdisco['hour'] ! hour:
		atdisco['day'] = daystart
		atdisco['hour'] = hour
		gs 'pav_disco_classmates', 'atdisco'
	end

	'<center><b><font color="maroon">Disco</font></b></center>'
	'Most of the cool kids and jocks are gathered around some tables and couches near the dance floor while the others dance. Some of the other students are hanging around near them or are out dancing.'
	$table_disco = '<center><table>'

	i = 1
	i2 = 0
	:discopop_loop
		if (npc_grupTipe['A<<i>>'] = 1 or $npc_nickname['A<<i>>'] = 'Natasha') and discoenable['A<<i>>'] = 1 and discobloc['A<<i>>'] ! daystart:
			if i2 = 0: $table_disco += '<tr>'
			i2 += 1
			if night_mode = 1 or night_mode = 2:
				$table_disco += '<td><table bgcolor=#404040>'
			else
				$table_disco += '<td><table bgcolor=#FFF8DC>'
			end
			$table_disco += '<tr><td align=center><a href="exec: i = <<i>> & gt ''pav_disco_classmates'', ''cool_list''"><img  height="100" src="images/characters/shared/headshots_main/<<i>>.jpg"></a></td></tr><tr><td align=center><<$npc_usedname[''A<<i>>'']>></td></tr></table></td>'
			if i2 mod 6 = 0: i2 = 0 & $table_disco += '</tr>'
		end
		i += 1
	if i <= aarraynumber:jump 'discopop_loop'

	i = 1
	:discojock_loop
		if npc_grupTipe['A<<i>>'] = 2 and discoenable['A<<i>>'] = 1 and discobloc['A<<i>>'] ! daystart:
			if i2 = 0: $table_disco += '<tr>'
			i2 += 1
			if night_mode = 1 or night_mode = 2:
				$table_disco += '<td><table bgcolor=#404040>'
			else
				$table_disco += '<td><table bgcolor=#FFF8DC>'
			end
			$table_disco += '<tr><td align=center><a href="exec: i = <<i>> & gt ''pav_disco_classmates'', ''jocks_list''"><img  height="100" src="images/characters/shared/headshots_main/<<i>>.jpg"></a></td></tr><tr><td align=center><<$npc_usedname[''A<<i>>'']>></td></tr></table></td>'
			if i2 mod 6 = 0: i2 = 0 & $table_disco += '</tr>'
		end
		i += 1
	if i <= aarraynumber:jump 'discojock_loop'
	if i2 mod 6 <> 0:
		:disco_loopi21
		i2 += 1
		$table_disco += '<td></td>'
		if i2 mod 6 = 0:
			i2 = 0
			$table_disco += '</tr>'
		else
			jump 'disco_loopi21'
		end
	end

	$table_disco += '</table></center>'
	$table_disco
	'The gopniks are lounging in the darkest corner of the hall. They''re mostly keeping to themselves, but a few of them are out dancing.'
	$table_disco = '<center><table>'

	i = 1
	:discogop_loop
		if npc_grupTipe['A<<i>>'] = 4 and discoenable['A<<i>>'] = 1 and discobloc['A<<i>>'] ! daystart:
			$loopname = $npc_nickname['A<<i>>']
			$loopname = $lcase($loopname)
			if i2 = 0: $table_disco += '<tr>'
			i2 += 1
			if night_mode = 1 or night_mode = 2:
				$table_disco += '<td><table bgcolor=#404040>'
			else
				$table_disco += '<td><table bgcolor=#FFF8DC>'
			end
			$table_disco += '<tr><td align=center><a href="exec: i = <<i>> & gt ''pav_disco_classmates'', ''gop_list''"><img  height="100" src="images/characters/shared/headshots_main/<<i>>.jpg"></a></td></tr><tr><td align=center><<$npc_usedname[''A<<i>>'']>></td></tr></table></td>'
			if i2 mod 6 = 0: i2 = 0 & $table_disco += '</tr>'
		end
		i += 1
	if i <= aarraynumber:jump 'discogop_loop'
	if i2 mod 6 <> 0:
		:disco_loopi23
		i2 += 1
		$table_disco += '<td></td>'
		if i2 mod 6 = 0:
			i2 = 0
			$table_disco += '</tr>'
		else
			jump 'disco_loopi23'
		end
	end

	if soniaPS > 0 and discoenable['A25'] = 1 and discobloc['A25'] ! daystart:
		if night_mode = 1 or night_mode = 2:
			$table_disco += '<tr><td><table bgcolor=#404040>'
		else
			$table_disco += '<tr><td><table bgcolor=#FFF8DC>'
		end
		$table_disco += '<tr><td align=center><a href="exec:gt ''pav_disco_coolkids'', ''sonia_outcast'' "><img  height="100" src="images/characters/shared/headshots_main/25.jpg"></a></td></tr><tr><td align=center><<$npc_usedname[''A25'']>></td></tr></table></td><td colspan=7></td></tr>'
	end
	$table_disco += '</table></center>'
	$table_disco

	if hour >= 21 and hour < 23 and week=5:
		'Coach Mikhail Nikolayevich stands at the entrance of the hall.'
		$table_disco = '<center><table>'
		if night_mode = 1 or night_mode = 2:
			$table_disco += '<tr><td><table bgcolor=#404040>'
		else
			$table_disco += '<tr><td><table bgcolor=#FFF8DC>'
		end
		$table_disco += '<tr><td align=center><a href="exec: gt ''VolleyTrenerSpeak''"><img  height="100" src="images/characters/shared/headshots_main/69.jpg"></a></td></tr><tr><td align=center>Coach</td></tr></table></td><td colspan=7></td></tr>'
		$table_disco += '</table></center>'
		$table_disco
	end
	*nl

	!!display of their headshots in a table like the above $args has.
!!if you click the head shot it goes to there args for the disco to interact with them.


!!also a more advanced version of the above, can we not only give them a chance to be present, but split the images in two. One them sitting around and one of the ones dancing? SO something like this.
!!	'Most the cool kids and a few of the jocks are mostly gathered around some tables and couches near the dance floor.'
	!!display of their headshots in a table like the above $args has of those sitting around
!!	'While several of the cool kids and jocks are out on the dance floor dancing.'
	!!display of their headshots in a table like the above $args has of those dancing
!!	'Gopniks are lounging in the darkest corner of the room, mostly keeping to themselves.'
	!!display of their headshots in a table like the above $args has of those sitting around
!!	'While a few of the gopniks are out on the dance floor dancing.'
	!!display of their headshots in a table like the above $args has of those dancing
!!	'Occasionally you see some of your other classmates here'
	!!Natasha and Sonia_outcast are the only ones that can show up here

	act 'Move away': gt $loc, $loc_arg
end

if $ARGS[0] = 'jocks_list':
	$listname = $npc_nickname['A<<i>>']
	$listname = $lcase($listname)
	gt 'pav_disco_jocks', $listname
end

if $ARGS[0] = 'cool_list':
	$listname = $npc_nickname['A<<i>>']
	$listname = $lcase($listname)
	gt 'pav_disco_coolkids', $listname
end

if $ARGS[0] = 'gop_list':
	$listname = $npc_nickname['A<<i>>']
	$listname = $lcase($listname)
	gt 'pav_disco_gopniks', $listname
end

if $ARGS[0] = 'atdisco':
!!Dimka
	if igor_DimaNos_day = daystart:
		discoenable['A1'] = 0
	else
		gs 'pav_disco_classmates', 'atdisco10', 1
	end
!!Igor
	if igor_DimaNos_day = daystart:
		discoenable['A4'] = 0
	else
		gs 'pav_disco_classmates', 'atdisco10', 4
	end
!!Mefodiy
	gs 'pav_disco_classmates', 'atdisco4', 148
!!Marcus
	gs 'pav_disco_classmates', 'atdisco10', 146
!!Andrey
	gs 'pav_disco_classmates', 'atdisco10', 147
!!Katja
	gs 'pav_disco_classmates', 'atdisco10', 14
!!Viktoriya
	gs 'pav_disco_classmates', 'atdisco10', 15
!!Irina
	gs 'pav_disco_classmates', 'atdisco10', 17
!!Bella
	gs 'pav_disco_classmates', 'atdisco10', 22
!!Lizaveta
	gs 'pav_disco_classmates', 'atdisco10', 140
!!Stasya
	if discoenable['A147'] = 1: discoenable['A139'] = 1
!!Sonia
	if soniaPS > 0:
		gs 'pav_disco_classmates', 'atdisco4i', 25
	else
		gs 'pav_disco_classmates', 'atdisco10', 25
	end
!!Lazar
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco3i', 149
	else
		gs 'pav_disco_classmates', 'atdisco10', 149
	end
!!Fedor
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco3i', 5
	else
		gs 'pav_disco_classmates', 'atdisco4', 5
	end
!!Svyatoslav
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco3i', 8
	else
		gs 'pav_disco_classmates', 'atdisco10', 8
	end
!!Vanya
	gs 'pav_disco_classmates', 'atdisco4', 165
!!Lariska
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco3i', 13
	else
		gs 'pav_disco_classmates', 'atdisco4', 13
	end
!!Albina
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco5i', 23
	else
		gs 'pav_disco_classmates', 'atdisco4i', 23
	end
!!Christina
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco3i', 18
	else
		gs 'pav_disco_classmates', 'atdisco4', 18
	end
!!Lina
	if week = 5:
		gs 'pav_disco_classmates', 'atdisco3i', 19
	else
		gs 'pav_disco_classmates', 'atdisco4', 19
	end
!!Ivan
	if week = 5:
		discoenable['A3'] = 0
	else
		gs 'pav_disco_classmates', 'atdisco10i', 3
	end
!!Erast
	if week = 5:
		discoenable['A150'] = 0
	else
		gs 'pav_disco_classmates', 'atdisco5i', 150
	end
!!Natasha
	gs 'pav_disco_classmates', 'atdisco3i', 16
!!Vitek
	gs 'pav_disco_classmates', 'atdisco10', 9
!!Dan
	if discoenable['A9'] = 1: discoenable['A10'] = 1
!!Vasily
	if discoenable['A9'] = 1: discoenable['A11'] = 1
!!Roman
	gs 'pav_disco_classmates', 'atdisco4', 157
!!Radomir
	gs 'pav_disco_classmates', 'atdisco4', 154
!!Valentin
	gs 'pav_disco_classmates', 'atdisco4', 158
!!Arkadi
	gs 'pav_disco_classmates', 'atdisco4', 156
!!Nikolai
	gs 'pav_disco_classmates', 'atdisco4', 185
!!Lavrenti
	gs 'pav_disco_classmates', 'atdisco10', 155
!!Lena
	gs 'pav_disco_classmates', 'atdisco4', 20
!!Lera
	if discoenable['A20'] = 1: discoenable['A21'] = 1
!!Pauline
	gs 'pav_disco_classmates', 'atdisco4', 24
!!Anushka
	gs 'pav_disco_classmates', 'atdisco4', 144
!!Alyona
	gs 'pav_disco_classmates', 'atdisco2', 143
!!Ronnie
	discoenable['A141'] = 0
!!Katyusha
	discoenable['A145'] = 0
end

if $ARGS[0] = 'atdisco2':
	i = args[1]
	if rand(1,2) ! 2:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

if $ARGS[0] = 'atdisco3i':
	i = args[1]
	if rand(1,3) = 1:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

if $ARGS[0] = 'atdisco4':
	i = args[1]
	if rand(1,4) ! 4:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

if $ARGS[0] = 'atdisco4i':
	i = args[1]
	if rand(1,4) = 1:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

if $ARGS[0] = 'atdisco5i':
	i = args[1]
	if rand(1,5) = 1:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

if $ARGS[0] = 'atdisco10':
	i = args[1]
	if rand(1,10) ! 10:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

if $ARGS[0] = 'atdisco10i':
	i = args[1]
	if rand(1,10) = 1:
		discoenable['A<<i>>'] = 1
	else
		discoenable['A<<i>>'] = 0
	end
end

--- pav_disco_classmates ---------------------------------
