# phone_selfies

if $ARGS[0] = 'selfies':
	menu_off = 0
	gs 'telefon', 'Phone_selfie_totals'
	*clr & cla
	
	!!These variables determine which selfietypes need to be checked
	clovar = 1
	undvar = 1
	nudvar = 1
	swimvar = 0
	bathvar = 0
	showervar = 0
	titflashvar = 1
	assflashvar = 1
	pussyflashvar = 1
	
	'<center><h4><font color="maroon">Photo library</font></h4></center>'
	*nl
	'Selfies'
	'<a href="exec:gt ''phone_selfies'', ''bathroom''">Bathroom selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''bedroom''">Bedroom selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''kitchen''">Kitchen selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''livingroom''">Livingroom selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''changingroom''">Changingroom selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''park''">Park selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''lockerroom''">Lockerroom selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''beach''">Beach selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''gym''">Gym selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''dance''">Dance selfies</a>'
	'<a href="exec:gt ''phone_selfies'', ''misc''">Misc selfies</a>'
	*nl
	'Family and friends'
	'<a href="exec:gt ''phone_selfies'', ''family''">Family</a>'
	'<a href="exec:gt ''phone_selfies'', ''school''">School friends</a>'
	'<a href="exec:gt ''phone_selfies'', ''teacher''">Teachers</a>'
	'<a href="exec:gt ''phone_selfies'', ''pavlovsk''">Pavlovsk friends</a>'
	'<a href="exec:gt ''phone_selfies'', ''city''">City friends</a>'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'listretrieve':
	!!Loop for clothed selfies, dynamics set variables as mixing them in loop instructions is bad
	if clovar = 1:
		'<center><b>Clothed selfies</b></center>'
		*nl
		temp_clocnt = 1
		dynamic 'temp_loop = <<$phone_loc>>_cloloop'
		dynamic 'temp_total = <<$phone_loc>>_clotot'
		:temp_loop
			!!setting value to unmixed variable so it can be checked in the if below
			dynamic '$phone_locval = <<$phone_loc>>_closelfie[<<temp_clocnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/clothed/<<temp_clocnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/clothed/<<temp_clocnt>>.jpg"     height="150" /></a>  '
			temp_clocnt += 1
		if temp_clocnt <= temp_total: jump'temp_loop'
	end
	
	!!Loop for swimwear selfies, dynamics set variables as mixing them in loop instructions is bad
	if swimvar = 1:
		'<center><b>Swimwear selfies</b></center>'
		*nl
		temp_clocnt = 1
		dynamic 'temp_loop1 = <<$phone_loc>>_swimloop'
		dynamic 'temp_total = <<$phone_loc>>_swim'
		:temp_loop1
			!!setting value to unmixed variable so it can be checked in the if below
			dynamic '$phone_locval = <<$phone_loc>>_swim[<<temp_clocnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/bikini/<<temp_clocnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/bikini/<<temp_clocnt>>.jpg"     height="150" /></a>  '
			temp_clocnt += 1
		if temp_clocnt <= temp_total: jump'temp_loop1'
	end
		
	!!loop for underwear selfies
	if undvar = 1:
		'<center><b>Underwear selfies</b></center>'
		*nl
		temp_undcnt = 1
		dynamic 'temp_loop2 = <<$phone_loc>>_undloop'
		dynamic 'temp_total = <<$phone_loc>>_undtot'
		:temp_loop2
			dynamic '$phone_locval = <<$phone_loc>>_undselfie[<<temp_undcnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/underwear/<<temp_undcnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/underwear/<<temp_undcnt>>.jpg"     height="150" /></a>  '
			temp_undcnt += 1
		if temp_undcnt <= temp_total: jump'temp_loop2'
	end

	!!loop for nude selfies
	if nudvar = 1:
		'<center><b>Nude selfies</b></center>'
		*nl
		temp_nudcnt = 1
		dynamic 'temp_loop3 = <<$phone_loc>>_nudloop'
		dynamic 'temp_total = <<$phone_loc>>_nudtot'
		:temp_loop3
			dynamic '$phone_locval = <<$phone_loc>>_nudselfie[<<temp_nudcnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/nude/<<temp_nudcnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/nude/<<temp_nudcnt>>.jpg"     height="150" /></a>  '
			temp_nudcnt += 1
		if temp_nudcnt <= temp_total: jump'temp_loop3'
	end
	
	!!loop for bath selfies
	if bathvar = 1:
		'<center><b>Bath selfies</b></center>'
		*nl
		temp_bathcnt = 1
		dynamic 'temp_loop4 = <<$phone_loc>>_bathloop'
		dynamic 'temp_total = <<$phone_loc>>_bathtot'
		:temp_loop4
			dynamic '$phone_locval = <<$phone_loc>>_bathselfie[<<temp_bathcnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/bath/<<temp_bathcnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/bath/<<temp_bathcnt>>.jpg"     height="150" /></a>  '
			temp_bathcnt += 1
		if temp_bathcnt <= temp_total: jump'temp_loop4'
	end
	
	!!loop for shower selfies
	if showervar = 1:
		'<center><b>Shower selfies</b></center>'
		*nl
		temp_showercnt = 1
		dynamic 'temp_loop5 = <<$phone_loc>>_showerloop'
		dynamic 'temp_total = <<$phone_loc>>_showertot'
		:temp_loop5
			dynamic '$phone_locval = <<$phone_loc>>_showerselfie[<<temp_showercnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/shower/<<temp_showercnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/shower/<<temp_showercnt>>.jpg"     height="150" /></a>  '
			temp_showercnt += 1
		if temp_showercnt <= temp_total: jump'temp_loop5'
	end
	
	!!loop for flashing tits selfies
	if titflashvar = 1:
		'<center><b>Flashing tits selfies</b></center>'
		*nl
		temp_flashtitscnt = 1
		dynamic 'temp_loop6 = <<$phone_loc>>_titflashloop'
		dynamic 'temp_total = <<$phone_loc>>_titflash'
		:temp_loop6
			dynamic '$phone_locval = <<$phone_loc>>_titflash[<<temp_flashtitscnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/titflash/<<temp_flashtitscnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/titflash/<<temp_flashtitscnt>>.jpg"     height="150" /></a>  '
			temp_flashtitscnt += 1
		if temp_flashtitscnt <= temp_total: jump'temp_loop6'
	end
	
	!!loop for flashing ass selfies
	if assflashvar = 1:
		'<center><b>Flashing ass selfies</b></center>'
		*nl
		temp_flashasscnt = 1
		dynamic 'temp_loop7 = <<$phone_loc>>_assflashloop'
		dynamic 'temp_total = <<$phone_loc>>_assflash'
		:temp_loop7
			dynamic '$phone_locval = <<$phone_loc>>_assflash[<<temp_flashasscnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/assflash/<<temp_flashasscnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/assflash/<<temp_flashasscnt>>.jpg"     height="150" /></a>  '
			temp_flashasscnt += 1
		if temp_flashasscnt <= temp_total: jump'temp_loop7'
	end
	
	!!loop for flashing pussy selfies
	if pussyflashvar = 1:
		'<center><b>Flashing pussy selfies</b></center>'
		*nl
		temp_flashpussycnt = 1
		dynamic 'temp_loop8 = <<$phone_loc>>_pussyflashloop'
		dynamic 'temp_total = <<$phone_loc>>_pussyflash'
		:temp_loop8
			dynamic '$phone_locval = <<$phone_loc>>_pussyflash[<<temp_flashpussycnt>>]'
			if $phone_locval = 1: *p '<a href="exec:view''images/pc/selfies/<<$phone_loc>>/pussyflash/<<temp_flashpussycnt>>.jpg''"><img src="images/pc/selfies/<<$phone_loc>>/pussyflash/<<temp_flashpussycnt>>.jpg"     height="150" /></a>  '
			temp_flashpussycnt += 1
		if temp_flashpussycnt <= temp_total: jump'temp_loop8'
	end
end

if $ARGS[0] = 'listretrieve2':
	if numnpc = 1:
		'<center><h4><font color="maroon">Dimka selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/dimka/selfies/'
		$selfienpc = 'dimka'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 2:
		'<center><h4><font color="maroon">Artem selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/artem/selfies/'
		$selfienpc = 'artem'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 3:
		'<center><h4><font color="maroon">Ivan selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/ivan/selfies/'
		$selfienpc = 'ivan'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 4:
		'<center><h4><font color="maroon">Igor selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/igor/selfies/'
		$selfienpc = 'igor'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 5:
		'<center><h4><font color="maroon">Fedor selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/fedor/selfies/'
		$selfienpc = 'fedor'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 6:
		'<center><h4><font color="maroon">Petka selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/petka/selfies/'
		$selfienpc = 'petka'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 7:
		'<center><h4><font color="maroon">Lesco selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lesco/selfies/'
		$selfienpc = 'lesco'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 8:
		'<center><h4><font color="maroon">Svyatoslav selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/svyatoslav/selfies/'
		$selfienpc = 'svyatoslav'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 9:
		'<center><h4><font color="maroon">Vitek selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/vitek/selfies/'
		$selfienpc = 'vitek'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 10:
		'<center><h4><font color="maroon">Dan selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/dan/selfies/'
		$selfienpc = 'dan'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 11:
		'<center><h4><font color="maroon">Vasily selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/vasily/selfies/'
		$selfienpc = 'vasily'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 12:
		'<center><h4><font color="maroon">Julia selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/julia/selfies/'
		$selfienpc = 'julia'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 13:
		'<center><h4><font color="maroon">Lariska selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lariska/selfies/'
		$selfienpc = 'lariska'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 14:
		'<center><h4><font color="maroon">Katja selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/katja/selfies/'
		$selfienpc = 'katja'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 15:
		'<center><h4><font color="maroon">Vicky selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/vicky/selfies/'
		$selfienpc = 'vicky'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 16:
		'<center><h4><font color="maroon">Natasha selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/natasha/selfies/'
		$selfienpc = 'natasha'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 17:
		'<center><h4><font color="maroon">Inna selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/inna/selfies/'
		$selfienpc = 'inna'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 18:
		'<center><h4><font color="maroon">Christina selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/christina/selfies/'
		$selfienpc = 'christina'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 19:
		'<center><h4><font color="maroon">Lina selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lina/selfies/'
		$selfienpc = 'lina'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 20:
		'<center><h4><font color="maroon">Lena selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lena/selfies/'
		$selfienpc = 'lena'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 21:
		'<center><h4><font color="maroon">Lera selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lera/selfies/'
		$selfienpc = 'lera'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 22:
		'<center><h4><font color="maroon">Bella selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/bella/selfies/'
		$selfienpc = 'bella'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 23:
		'<center><h4><font color="maroon">Albina selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/albina/selfies/'
		$selfienpc = 'albina'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 24:
		'<center><h4><font color="maroon">Pauline selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/pauline/selfies/'
		$selfienpc = 'pauline'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 25:
		'<center><h4><font color="maroon">Sonia selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/girl/sonia/selfies/'
		$selfienpc = 'sonia'
		loopmax = 45
		loopmaxsveta = 25
		loopmaxsex = 9
	elseif numnpc = 26:
		'<center><h4><font color="maroon">Anatoly selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/anatoly/selfies/'
		$selfienpc = 'anatoly'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 28:
		'<center><h4><font color="maroon">Stepfather selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/vladimir/selfies/'
		$selfienpc = 'vladimir'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 29:
		'<center><h4><font color="maroon">Mother selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/mom/selfies/'
		$selfienpc = 'mom'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 33:
		'<center><h4><font color="maroon">Anya selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/anya/selfies/'
		$selfienpc = 'anya'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 34:
		'<center><h4><font color="maroon">Kolka selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/kolka/selfies/'
		$selfienpc = 'kolka'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 35:
		'<center><h4><font color="maroon">Father selfies</font></h4></center>'
!! Where are these located?
		$imgloc = 'images/characters/pavlovsk/resident/???/selfies/'
		$selfienpc = 'father'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 54:
		'<center><h4><font color="maroon">Uncle Misha selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/misha/selfies/'
		$selfienpc = 'misha'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 56:
		'<center><h4><font color="maroon">Roma selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/roma/selfies/'
		$selfienpc = 'roma'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 57:
		'<center><h4><font color="maroon">Rex selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/rex/selfies/'
		$selfienpc = 'rex'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 69:
		'<center><h4><font color="maroon">Mikhail selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/mikhail/selfies/'
		$selfienpc = 'coachmikhail'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 54:
		'<center><h4><font color="maroon">Sergey selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/resident/sergey/selfies/'
		$selfienpc = 'sergey'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 128:
		'<center><h4><font color="maroon">Makar selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/makar/selfies/'
		$selfienpc = 'makar'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 129:
		'<center><h4><font color="maroon">Serafim selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/serafim/selfies/'
		$selfienpc = 'serafim'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 130:
		'<center><h4><font color="maroon">Ilya selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/ilya/selfies/'
		$selfienpc = 'ilya'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 131:
		'<center><h4><font color="maroon">Viktor selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/viktor/selfies/'
		$selfienpc = 'viktor'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 132:
		'<center><h4><font color="maroon">Ruslan selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/ruslan/selfies/'
		$selfienpc = 'ruslan'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 133:
		'<center><h4><font color="maroon">Rolan selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/rolan/selfies/'
		$selfienpc = 'rolan'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 134:
		'<center><h4><font color="maroon">Aleksandrina selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/aleksandrina/selfies/'
		$selfienpc = 'aleksandrina'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 135:
		'<center><h4><font color="maroon">Yeva selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/yeva/selfies/'
		$selfienpc = 'yeva'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 136:
		'<center><h4><font color="maroon">Olga selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/olga/selfies/'
		$selfienpc = 'olga'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 137:
		'<center><h4><font color="maroon">Raven selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/raven/selfies/'
		$selfienpc = 'raven'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 138:
		'<center><h4><font color="maroon">Arina selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/teacher/arina/selfies/'
		$selfienpc = 'arina'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 139:
		'<center><h4><font color="maroon">Stasya selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/stasya/selfies/'
		$selfienpc = 'stasya'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 140:
		'<center><h4><font color="maroon">Lizaveta selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lizaveta/selfies/'
		$selfienpc = 'lizaveta'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 141:
		'<center><h4><font color="maroon">Veronika selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/veronika/selfies/'
		$selfienpc = 'veronika'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 142:
		'<center><h4><font color="maroon">Zinaida selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/zinaida/selfies/'
		$selfienpc = 'zinaida'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 143:
		'<center><h4><font color="maroon">Alyona selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/alyona/selfies/'
		$selfienpc = 'alyona'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 144:
		'<center><h4><font color="maroon">Anushka selfies</font></h4></center>'	
		$imgloc = 'images/characters/pavlovsk/school/girl/anushka/selfies/'
		$selfienpc = 'anushka'
		loopmax = 22
		loopmaxsveta = 0
		loopmaxsex = 7
	elseif numnpc = 145:
		'<center><h4><font color="maroon">Ekaterina selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/ekaterina/selfies/'
		$selfienpc = 'ekaterina'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 146:
		'<center><h4><font color="maroon">Marcus selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/marcus/selfies/'
		$selfienpc = 'marcus'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 147:
		'<center><h4><font color="maroon">Andrey selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/andrey/selfies/'
		$selfienpc = 'andrey'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 148:
		'<center><h4><font color="maroon">Mefodiy selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/mefodiy/selfies/'
		$selfienpc = 'mefodiy'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 149:
		'<center><h4><font color="maroon">Lazar selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lazar/selfies/'
		$selfienpc = 'lazar'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 150:
		'<center><h4><font color="maroon">Erast selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/erast/selfies/'
		$selfienpc = 'erast'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 151:
		'<center><h4><font color="maroon">Evgeny selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/evgeny/selfies/'
		$selfienpc = 'evgeny'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 152:
		'<center><h4><font color="maroon">Feofan selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/feofan/selfies/'
		$selfienpc = 'feofan'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 153:
		'<center><h4><font color="maroon">Gerasim selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/gerasim/selfies/'
		$selfienpc = 'gerasim'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 154:
		'<center><h4><font color="maroon">Radomir selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/radomir/selfies/'
		$selfienpc = 'radomir'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 155:
		'<center><h4><font color="maroon">Lavrenti selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/lavrenti/selfies/'
		$selfienpc = 'lavrenti'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 156:
		'<center><h4><font color="maroon">Arkadi selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/arkadi/selfies/'
		$selfienpc = 'arkadi'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 157:
		'<center><h4><font color="maroon">Roman selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/roman/selfies/'
		$selfienpc = 'roman'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 158:
		'<center><h4><font color="maroon">Valentin selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/valentin/selfies/'
		$selfienpc = 'valentin'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 159:
		'<center><h4><font color="maroon">Petia selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/petia/selfies/'
		$selfienpc = 'petia'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 165:
		'<center><h4><font color="maroon">Vanya selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/vanya/selfies/'
		$selfienpc = 'vanya'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	elseif numnpc = 189:
		'<center><h4><font color="maroon">Nikolai selfies</font></h4></center>'
		$imgloc = 'images/characters/pavlovsk/school/boy/nikolai/selfies/'
		$selfienpc = 'nikolai'
		loopmax = 0
		loopmaxsveta = 0
		loopmaxsex = 0
	else
		!! New npcs with selfies should be included above
	end
	
	if loopmax > 0:
		*nl
		'<center><b>Regular selfies</b></center>'
		*nl
		
		i = 1
		:temp_loopselfies
            dynamic '$selfie = <<$selfienpc>>[<<i>>]'
            if $selfie = 1: *p '<a href="exec:view''<<$imgloc>><<i>>.jpg''"><img src="<<$imgloc>><<i>>.jpg"     height="150" /></a>  '
            i += 1
        if i <= loopmax: jump'temp_loopselfies'
	end
	
	if loopmaxsveta > 0:
		*nl
		'<center><b>Selfies with me</b></center>'
		*nl
		
		i = 1
		:temp_loopselfiessveta
			dynamic '$selfie = <<$selfienpc>>sveta[<<i>>]'
			if $selfie = 1: *p '<a href="exec:view''<<$imgloc>>sveta/<<i>>.jpg''"><img src="<<$imgloc>>sveta/<<i>>.jpg"     height="150" /></a>  '
			i += 1
		if i <= loopmaxsveta: jump'temp_loopselfiessveta'
	end
	
	if loopmaxsex > 0:
		*nl
		'<center><b>Sex selfies</b></center>'
		*nl
		
		i = 1
		:temp_loopselfiessex
			dynamic '$selfie = <<$selfienpc>>sex[<<i>>]'
			if $selfie = 1: *p '<a href="exec:view''<<$imgloc>>sex/<<i>>.jpg''"><img src="<<$imgloc>>sex/<<i>>.jpg"     height="150" /></a>  '
			i += 1
		if i <= loopmaxsex: jump'temp_loopselfiessex'
	end
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end


if $ARGS[0] = 'bathroom':
	'<center><h4><font color="maroon">Bathroom selfies</font></h4></center>'
	$phone_loc = 'bathroom'
	gs 'telefon', 'Phone_selfie_totals'
	bathvar = 1
	showervar = 1
	*nl
	gs 'phone_selfies', 'listretrieve'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'bedroom':
	'<center><h4><font color="maroon">Bedroom selfies</font></h4></center>'
	$phone_loc = 'bedroom'
	*nl
	gs 'phone_selfies', 'listretrieve'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'kitchen':
	'<center><h4><font color="maroon">Kitchen selfies</font></h4></center>'
	$phone_loc = 'kitchen'
	*nl
	gs 'phone_selfies', 'listretrieve'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'livingroom':
	'<center><h4><font color="maroon">Livingroom selfies</font></h4></center>'
	$phone_loc = 'livingroom'
	*nl
	gs 'phone_selfies', 'listretrieve'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'changingroom':
	'<center><h4><font color="maroon">Changingroom selfies</font></h4></center>'
	$phone_loc = 'changingroom'
	*nl
	gs 'phone_selfies', 'listretrieve'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'park':
	'<center><h4><font color="maroon">Park selfies</font></h4></center>'
	$phone_loc = 'park'
	*nl
	gs 'phone_selfies', 'listretrieve'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'lockerroom':
	'<center><h4><font color="maroon">Lockerroom selfies</font></h4></center>'
	$phone_loc = 'lockerroom'
	*nl
	gs 'phone_selfies', 'listretrieve'
		
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'beach':
	'<center><h4><font color="maroon">Beach selfies</font></h4></center>'
	$phone_loc = 'beach'
	clovar = 0
	undvar = 0
	swimvar = 1
	*nl
	gs 'phone_selfies', 'listretrieve'
		
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'gym':
	'<center><h4><font color="maroon">Gym selfies</font></h4></center>'
	$phone_loc = 'gym'
	*nl
	gs 'phone_selfies', 'listretrieve'
		
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'dance':
	'<center><h4><font color="maroon">Dance selfies</font></h4></center>'
	$phone_loc = 'dance'
	undvar = 0
	nudvar = 0
	*nl
	gs 'phone_selfies', 'listretrieve'
		
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'misc':
	'<center><h4><font color="maroon">Misc selfies</font></h4></center>'
	$phone_loc = 'dance'
	undvar = 0
	nudvar = 0
	*nl
	gs 'phone_selfies', 'listretrieve'
		
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'family':
	'<center><h4><font color="maroon">Family members</font></h4></center>'
	$textgrup = ''
	count1 = 0
	i = 1
	'<center><table cellspacing="3">'
	:familygruploop	
		if count1 = 6 : $textgrup += '<tr>'

		if npc_grupTipe['A<<i>>'] = 7 and npc_selfieon['A<<i>>'] = 1:
			count1 += 1
			$textgrup += '' + '<td bgcolor=<<$bcolor2>> align="center"><img  height="100" src="images/pc/npc_headshots/<<i>>.jpg"><br>' + $npc_selfie['A<<i>>']
		end
		if count1< 6 and npc_grupTipe['A<<i>>'] = 7:
			$textgrup += '</td>'
		elseif count1 = 6 and npc_grupTipe['A<<i>>'] = 7:
			$textgrup +='</td></tr><tr>' & count1 = 0
		end
		i += 1
	if i <= aarraynumber:jump 'familygruploop'

	'<<$textgrup>>'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'school':
	'<center><h4><font color="maroon">School friends</font></h4></center>'
	$textgrup = ''
	count1 = 0
	i = 1
	'<center><table cellspacing="3">'
	:schoolgruploop	
		if count1 = 6 : $textgrup += '<tr>'

		if (npc_grupTipe['A<<i>>'] = 1 or npc_grupTipe['A<<i>>'] = 2 or npc_grupTipe['A<<i>>'] = 3 or npc_grupTipe['A<<i>>'] = 4 or npc_grupTipe['A<<i>>'] = 5) and npc_selfieon['A<<i>>'] = 1:
			count1 += 1
			$textgrup += '' + '<td bgcolor=<<$bcolor2>> align="center"><img  height="100" src="images/pc/npc_headshots/<<i>>.jpg"><br>' + $npc_selfie['A<<i>>']
		end
		if count1< 6 and (npc_grupTipe['A<<i>>'] = 1 or npc_grupTipe['A<<i>>'] = 2 or npc_grupTipe['A<<i>>'] = 3 or npc_grupTipe['A<<i>>'] = 4 or npc_grupTipe['A<<i>>'] = 5):
			$textgrup += '</td>'
		elseif count1 = 6 and (npc_grupTipe['A<<i>>'] = 1 or npc_grupTipe['A<<i>>'] = 2 or npc_grupTipe['A<<i>>'] = 3 or npc_grupTipe['A<<i>>'] = 4 or npc_grupTipe['A<<i>>'] = 5):
			$textgrup +='</td></tr><tr>' & count1 = 0
		end
		i += 1
	if i <= aarraynumber:jump 'schoolgruploop'

	'<<$textgrup>>'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'teacher':
	'<center><h4><font color="maroon">Teachers</font></h4></center>'
	$textgrup = ''
	count1 = 0
	i = 1
	'<center><table cellspacing="3">'
	:teachergruploop	
		if count1 = 6 : $textgrup += '<tr>'

		if npc_grupTipe['A<<i>>'] = 6 and npc_selfieon['A<<i>>'] = 1:
			count1 += 1
			$textgrup += '' + '<td bgcolor=<<$bcolor2>> align="center"><img  height="100" src="images/pc/npc_headshots/<<i>>.jpg"><br>' + $npc_selfie['A<<i>>']
		end
		if count1< 6 and npc_grupTipe['A<<i>>'] = 6:
			$textgrup += '</td>'
		elseif count1 = 6 and npc_grupTipe['A<<i>>'] = 6:
			$textgrup +='</td></tr><tr>' & count1 = 0
		end
		i += 1
	if i <= aarraynumber:jump 'teachergruploop'

	'<<$textgrup>>'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'pavlovsk':
	'<center><h4><font color="maroon">Pavlovsk friends</font></h4></center>'
	$textgrup = ''
	count1 = 0
	i = 1
	'<center><table cellspacing="3">'
	:pavgruploop	
		if count1 = 6 : $textgrup += '<tr>'

		if npc_grupTipe['A<<i>>'] = 8 and npc_selfieon['A<<i>>'] = 1:
			count1 += 1
			$textgrup += '' + '<td bgcolor=<<$bcolor2>> align="center"><img  height="100" src="images/pc/npc_headshots/<<i>>.jpg"><br>' + $npc_selfie['A<<i>>']
		end
		if count1< 6 and npc_grupTipe['A<<i>>'] = 8:
			$textgrup += '</td>'
		elseif count1 = 6 and npc_grupTipe['A<<i>>'] = 8:
			$textgrup +='</td></tr><tr>' & count1 = 0
		end
		i += 1
	if i <= aarraynumber:jump 'pavgruploop'

	'<<$textgrup>>'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

if $ARGS[0] = 'city':
	'<center><h4><font color="maroon">City friends</font></h4></center>'
	
	act 'Back': gt 'phone_selfies', 'selfies'
	!gt $loc, $metka
	act 'Stop watching selfies': gt '<<$menu_loc>>', '<<$menu_arg>>'
end

--- phone_selfies ---------------------------------