# shoes

!!This is the main file for shoes, like clothes but for your feet.

$shoe_list_line = {
	!! a single line in a shoe list (shoe rack, etc)
	!! ARGS 0 - action type (shoe rack, sell, store, forsale)
	!! ARGS 1 - shoe type
	!! ARGS 2 - shoe index

	gs 'themes', 'clothing'

	$RESULT = '<TR bgcolor='+$temp_bcolor+'>'

	if Enable_clothwidth > 0:
		shoe_temp = Enable_clothwidth - 1
	else
		shoe_temp = 75 & !shoe widdefault to 75
	end
	$RESULT +='<TD><a href="exec:gt ''shoes'', ''view_shoe_item'', ''wardrobe'', ''<<$ARGS[1]>>'', <<ARGS[2]>>"><img src="<<FUNC(''$shoe_image'', $ARGS[1], ARGS[2])>>" width="<<shoe_temp>>"></a></TD>'
	killvar 'shoe_temp'
	gs 'shoe_attributes', $ARGS[1], ARGS[2]

	$RESULT += '<TD><<FUNC(''$shoe_description'', $ARGS[1])>> <<ARGS[2]>></TD>'
	$RESULT += '<TD><<FUNC(''$shoe_description2'', $ARGS[1])>></TD>'

	if ShoStyle = 2:
		$RESULT += '<TD>Yes</TD>'
	else
		$RESULT += '<TD>No</TD>'
	end

	if ShoStyle = 1:
		$RESULT += '<TD>Yes</TD>'
	else
		$RESULT += '<TD>No</TD>'
	end
	
	$RESULT += '<TD><a href="exec:gt ''shoes'', ''view_shoe_item'', ''wardrobe'', ''<<$ARGS[1]>>'', <<ARGS[2]>>">View</a></TD>'

	$RESULT += '<TD>'
	if sloc ! 1:$RESULT += ' <a href="exec:gt ''shoes'', ''dest1'', ''<<$ARGS[0]>>'', ''<<$ARGS[1]>>'', <<ARGS[2]>>">Storage</a>'
	if sloc ! 0:$RESULT += ' <a href="exec:gt ''shoes'', ''dest0'', ''<<$ARGS[0]>>'', ''<<$ARGS[1]>>'', <<ARGS[2]>>">Wardrobe</a>'
	if sloc ! 2:$RESULT += ' <a href="exec:gt ''shoes'', ''dest2'', ''<<$ARGS[0]>>'', ''<<$ARGS[1]>>'', <<ARGS[2]>>">Unwanted</a>'
	$RESULT += '</TD>'
}

if $ARGS[0] = 'dest0':
	*clr
	dynamic '<<$ARGS[2]>>_shoe_s[<<ARGS[3]>>] = 0'
	gt 'shoes', 'view_shoe_list', $ARGS[1]
end

if $ARGS[0] = 'dest1':
	*clr
	dynamic '<<$ARGS[2]>>_shoe_s[<<ARGS[3]>>] = 1'
	gt 'shoes', 'view_shoe_list', $ARGS[1]
end

if $ARGS[0] = 'dest2':
	*clr
	dynamic '<<$ARGS[2]>>_shoe_s[<<ARGS[3]>>] = 2'
	gt 'shoes', 'view_shoe_list', $ARGS[1]
end

if $ARGS[0] = 'view_shoe_list':
	!! ARGS 0 - view_shoe_list
	!! ARGS 1 - action type (wardrobe, storage, unwanted, sell)
	!! ARGS 2 - brothel flag (brothel)

	$regularwornshoetype = ''

	act 'Return':gt 'wardrobe', 'main'

	if $ARGS[1] ! 'sell' :'<center><table border=1><TH><a href="exec:gt ''shoes'', ''view_shoe_list'', ''wardrobe''">Wardrobe </a></TH><TH><a href="exec:gt ''shoes'', ''view_shoe_list'', ''store''">Storage</a></TH><TH><a href="exec:gt ''shoes'', ''view_shoe_list'', ''unwanted''">Unwanted</a></TH></table></center>'

	if $ARGS[1] ! 'sell' :
		'<center><b>Select shoes to wear</b> *Bonus to attractiveness only applied in wardrobe and outdoors.</center>'
		if $shoeworntype ! 'none':
			act 'Remove shoes':
				gs 'shoes', 'strip'
				gt 'shoes', 'view_shoe_list', $ARGS[1]
			end
		end
	end
	
	if $ARGS[1] = 'wardrobe':
		sloc = 0
	end
	
	if $ARGS[1] = 'store':
		sloc = 1
	end
	
	if $ARGS[1] = 'unwanted':
		sloc = 2
	end
	gs 'shoes', 'filter_header', 'store'

	'<center><table border=0 cellspacing=0 cellpadding=5><TH></TH><TH>Shoe</TH><TH>Description</TH><TH>Bimbo</TH><TH>Stripper</TH><TH>Actions</TH>'

	!!To filter just this set
	clo_i = 0
	:loopshoequality_filter

	i = 1
	:loopmoncheri_shoe
		if moncheri_shoe_s[i] = sloc and moncheri_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'moncheri', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'moncheri', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('moncheri_shoe'):jump 'loopmoncheri_shoe'

	i = 1
	:loopcats_shoe
		if cats_shoe_s[i] = sloc and cats_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'cats', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'cats', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('cats_shoe'):jump 'loopcats_shoe'

	i = 1
	:loopbomba_shoe
		if bomba_shoe_s[i] = sloc and bomba_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'bomba', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'bomba', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('bomba_shoe'):jump 'loopbomba_shoe'

	i = 1
	:loopdolls_shoe
		if dolls_shoe_s[i] = sloc and dolls_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'dolls', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'dolls', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('dolls_shoe'):jump 'loopdolls_shoe'

	i = 1
	:loopgm_shoe
		if gm_shoe_s[i] = sloc and gm_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'gm', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'gm', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('gm_shoe'):jump 'loopgm_shoe'

	i = 1
	:looperoto_shoe
		if eroto_shoe_s[i] = sloc and eroto_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'eroto', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'eroto', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('eroto_shoe'):jump 'looperoto_shoe'

	i = 1
	:loopscandalicious_shoe
		if scandalicious_shoe_s[i] = sloc and scandalicious_shoe[i] = 1 and Shofilter['sport_only'] = 0:
			gs 'shoe_attributes', 'scandalicious', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'scandalicious', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('scandalicious_shoe'):jump 'loopscandalicious_shoe'

	i = 1
	:loopdanilovich_shoe
		if danilovich_shoe_s[i] = sloc and danilovich_shoe[i] = 1 and Shofilter['sport'] = 0:
			gs 'shoe_attributes', 'danilovich', i
			gs 'shoes', 'shoe_filter'
			!!sort by filter
			if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
				if Shofilter['inc'] = 1 and Shofilter['only'] = 1:
					*P dyneval($shoe_list_line, $ARGS[1], 'danilovich', i)
				end
			end
		end
	i += 1
	if i <= ARRSIZE('danilovich_shoe'):jump 'loopdanilovich_shoe'

	clo_i += 1
	if Shofilter['quality'] = 0 and clo_i <= 7:
		jump 'loopshoequality_filter'
	end

	'</table></center>' 
	killvar '$temp_bcolor'
end

if $ARGS[0] = 'moncheri':
	*P FUNC('$attributes_moncheri_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'cats':
	*P FUNC('$attributes_cats_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'bomba':
	*P FUNC('$attributes_bomba_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'dolls':
	*P FUNC('$attributes_dolls_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'gm':
	*P FUNC('$attributes_gm_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'eroto':
	*P FUNC('$attributes_eroto_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'scandalicious':
	*P FUNC('$attributes_scandalicious_shoes', $ARGS[0], ARGS[1])
elseif $ARGS[0] = 'danilovich':
	*P FUNC('$attributes_danilovich_shoes', $ARGS[0], ARGS[1])
end

if $ARGS[0] = 'gym':
	if $regularwornshoetype = '':
		$regularwornshoetype = $shoeworntype
		regularwornshoenumber = shoewornnumber
	end

	'<center><img src="images/locations/city/citycenter/mall/sports.png"></center>'

	i = 1
	:loopdanilovich_shoe2
		if danilovich_shoe[i] = 1 and danilovich_shoe_s[i] = 0:'<a href="exec:gt ''shoes'', ''view_shoe_item'', ''wardrobe'', ''danilovich'', <<i>>"><img src="images/pc/items/danilovich/shoes/<<i>>.jpg" 	height="250" /></a>'
		i += 1
	if i <= 40:jump 'loopdanilovich_shoe2'

	act 'Return': gt $loc, $loc_arg

	if $shoeworntype ! $regularwornshoetype: gs 'shoes', 'gym2'
end

if $ARGS[0] = 'gym2':
	act 'Put your regular shoes back on':
		$shoeworntype = $regularwornshoetype
		shoewornnumber = regularwornshoenumber
		killvar '$regularwornshoetype'
		killvar 'regularwornshoenumber'
		gt 'shoes', 'gym'
	end
end

if $ARGS[0] = 'view_shoe_item':
	!! ARGS 0 - view_shoe_item
	!! ARGS 1 = action type (wardrobe, shop, sell)
	!! ARGS 2 - shoes type
	!! ARGS 3 - shoes index
	!! ARGS 4 - price for shop

	cla
	'<center><img src="<<FUNC(''$shoe_image'', $ARGS[2], ARGS[3])>>"></center>'
	gs 'shoe_attributes', $ARGS[2], ARGS[3]
	FUNC('$shoe_description', $ARGS[2]) + '<<ARGS[3]>>'
	*nl
	FUNC('$shoe_description2', $ARGS[2])

	*nl
	if ShoStyle = 1:'This shoe is considered stripper style and most suitable for stripping or whoring.'
	if ShoStyle = 2:'This shoe is considered bimbo style and makes your mind drift toward sexual thoughts.'
	if ShoStyle = 3:'This shoe is considered alternative style and makes you feel more assertive and aggressive.'

	if $ARGS[1] = 'shop':
		if dyneval('RESULT = <<$ARGS[2]>>_shoe[<<ARGS[3]>>]') = 1:
			'You already own these shoes.'
			act 'Leave': gt $loc, $loc_arg
		else
			price = ('<<ARGS[4]>>' * ((5 * ShoQuality) + 100) / 100) * 1000 / (1250 - Clothingstock[ARGS[3]]) * 3 / 2
			price = price / 50 * 50
			'Price: <<price>> <b>₽</b>'
			act 'Leave': gt $loc, $loc_arg
			if money >= Price:
				act 'Buy (cash)':
					h = 0
					if ShoStyle = 2:h = 10
					if ShoStyle = 5:h = 20
					h += (3 * ShoQuality)
					money -= price
					dynamic '<<$ARGS[2]>>_shoe[<<ARGS[3]>>] = 1'
					gt $loc, $loc_arg
				end
			else
				'You do not have enough cash to buy these shoes.'
			end
			if karta + bankDebtLimit >= price:
				act 'Buy (card)':
					h = 0
					if ShoStyle = 2:h = 10
					if ShoStyle = 5:h = 20
					h += (3 * ShoQuality)
					karta -= price
					dynamic '<<$ARGS[2]>>_shoe[<<ARGS[3]>>] = 1'
					gt $loc, $loc_arg
				end
			end
			if karta + bankDebtLimit < Price and money < Price:
				'You do not have enough money to buy these shoes.'
			end
		end
	elseif $ARGS[1] = 'wardrobe':
		if $regularwornshoetype = '':
			act 'Leave in closet':gt 'shoes', 'view_shoe_list', $ARGS[1]
		else
			act 'Return': gt 'shoes', 'gym'
		end

		act 'Wear':
			gs 'shoes', 'wear', $ARGS[2], ARGS[3]

			if $regularwornshoetype = '':
				gt 'wardrobe', 'main'
			else
				gt 'shoes', 'gym'
			end
		end
	elseif $ARGS[1] = 'store' or $ARGS[1] = 'unwanted':
		act 'Return':gt 'shoes', 'view_shoe_list', $ARGS[1]
	end
end

if $ARGS[0] = 'strip':
	if $shoeworntype = 'none': exit

	$lastwornshoetype = $shoeworntype
	lastwornshoenumber = shoewornnumber
	$shoeworntype = 'none'
	shoewornnumber = 0
	ShoQuality = 0
	ShoHeels = 0
	ShoCut = 0
	ShoStyle = 0
	PShoQuality = 0
	PShoHeels = 0
	PShoCut = 0
	PShoStyle = 0
end

if $ARGS[0] = 'setup':
end
	
if $ARGS[0] = 'wear':
	!! ARGS 0 - action
	!! ARGS 1 - shoe type name / last worn
	!! ARGS 2 - shoe index

	if $ARGS[1] = 'last_worn':
		$shoeworntype = $lastwornshoetype
		shoewornnumber = lastwornshoenumber
	else
		$shoeworntype = $ARGS[1]
		shoewornnumber = ARGS[2]
	end

	if $shoeworntype = 'none':
		PShoQuality = 0
		PShoCut = 0
		PShoHeels = 0
		PShoStyle = 0
	exit
	end

	gs 'shoe_attributes', $ARGS[1], ARGS[2]

	dynamic '<<$ARGS[1]>>_shoe_s[<<ARGS[2]>>] = 0'

	PShoQuality = ShoQuality
	PShoHeels = ShoHeels
	PShoCut = ShoCut
	PShoStyle = ShoStyle

!Calculations for shoes beauty, multiplied by natural beauty
	if PShoHeels > 0:
		if PShoHeels = 1:
			PXShoHeels = 25
		elseif PShoHeels = 2:
			PXShoHeels = 50
		elseif PShoHeels = 3:
			PXShoHeels = 100
		elseif PShoHeels = 4:
			PXShoHeels = 150
		elseif PShoHeels = 5:
			PXShoHeels = 200
		elseif PShoHeels = 6:
			PXShoHeels = 300
		elseif PShoHeels >= 7:
			PXShoHeels = 400
		end
	end
end

if $ARGS[0] = 'filter_header':
!! exclude filters
	$Headerstring = '<TD>'
	if Shofilter['sport'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''sport''] = 1 & Shofilter[''sport_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/sport.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''sport''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/sport_off.png"></a></TD>'
	end

	$Headerstring += '<TD>'
	if Shofilter['stripper'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''stripper''] = 1 & Shofilter[''stripper_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/stripper.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''stripper''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/stripper_off.png"></a></TD>'
	end

	$Headerstring += '<TD>'
	if Shofilter['bimbo'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''bimbo''] = 1 & Shofilter[''bimbo_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/bimbo.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''bimbo''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/bimbo_off.png"></a></TD>'
	end

	$Headerstring += '<TD>'
	if Shofilter['alternative'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''alternative''] = 1 & Shofilter[''alternative_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/alternative.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''alternative''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/alternative_off.png"></a></TD>'
	end

!! sort by filters
	$Headerstring += '<TD>'
	if Shofilter['number'] = 0:
		Shofilter['quality'] = 1
		$Headerstring += '<img src="images/system/icons/clothing/number.png"></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''number''] = 0 & Shofilter[''quality''] = 1 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/number_off.png"></a></TD>'
	end
	
	$Headerstring += '<TD>'
	if Shofilter['quality'] = 0:
		$Headerstring += '<img src="images/system/icons/clothing/quality.png"></TD>'
	else
		$Headerstring += '<a href="exec:Clo_i = 0 & Shofilter[''quality''] = 0 & Shofilter[''number''] = 1 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/quality_off.png"></a></TD>'
	end

!! Show only filers
	$Headerstring[1] = '<TD>'
	if Shofilter['sport_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''sport_only''] = 1 & Shofilter[''sport''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/sport_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''sport_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/sport.png"></a></TD>'
	end

	$Headerstring[1] += '<TD>'
	if Shofilter['stripper_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''stripper_only''] = 1 & Shofilter[''stripper''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/stripper_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''stripper_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/stripper.png"></a></TD>'
	end

	$Headerstring[1] += '<TD>'
	if Shofilter['bimbo_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''bimbo_only''] = 1 & Shofilter[''bimbo''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/bimbo_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''bimbo_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/bimbo.png"></a></TD>'
	end

	$Headerstring[1] += '<TD>'
	if Shofilter['alternative_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''alternative_only''] = 1 & Shofilter[''alternative''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/alternative_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''alternative_only''] = 0 & gt ''shoes'', ''view_shoe_list''"><img src="images/system/icons/clothing/alternative.png"></a></TD>'
	end


	$Headerstring[2] = '<TH>Include</TH><TH></TH><TH></TH><TH></TH><TH>Sort by</TH><TH></TH>'

	$Headerstring[3] = '<TH>Only show</TH>'

	'<center><table><<$Headerstring[2]>>'
	'<TR><border=1><<$Headerstring>>'

	'<TR><border=0><<$Headerstring[3]>>'
	'<TR><border=1><<$Headerstring[1]>></table></center>'
end

if $ARGS[0] = 'shoe_filter':
!!Exclude filters
	Shofilter['inc'] = 1
	!!filters, if inc set to 0 they will not display
	if Shofilter['stripper'] = 1 and ShoStyle = 1:
		Shofilter['inc'] = 0
	end
	!!filters, if inc set to 0 they will not display
	if Shofilter['bimbo'] = 1 and ShoStyle = 2:
		Shofilter['inc'] = 0
	end
	!!filters, if inc set to 0 they will not display
	if Shofilter['alternative'] = 1 and ShoStyle = 3:
		Shofilter['inc'] = 0
	end

!!only filters
	Shofilter['only'] = 0
	!!filters, if only set to 1 they will only display those set
	if Shofilter['stripper_only'] = 1 and ShoStyle = 1:
		Shofilter['only'] += 1
	end
	if Shofilter['bimbo_only'] = 1 and ShoStyle = 2:
		Shofilter['only'] += 1
	end
	if Shofilter['alternative_only'] = 1 and ShoStyle = 3:
		Shofilter['only'] += 1
	end
	!!Check total count to make sure it fits all groups selected
	if Shofilter['only'] = Shofilter['stripper_only'] + Shofilter['bimbo_only'] + Shofilter['alternative_only']:
		Shofilter['only'] = 1
	else
		Shofilter['only'] = 0
	end
end

if $ARGS[0] = 'shop_filter_header':
!! exclude filters
	$Headerstring = '<TD>'
	if Shofilter['stripper'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''stripper''] = 1 & Shofilter[''stripper_only''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/stripper.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''stripper''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/stripper_off.png"></a></TD>'
	end

	$Headerstring += '<TD>'
	if Shofilter['bimbo'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''bimbo''] = 1 & Shofilter[''bimbo_only''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/bimbo.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''bimbo''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/bimbo_off.png"></a></TD>'
	end

	$Headerstring += '<TD>'
	if Shofilter['alternative'] = 0:
		$Headerstring += '<a href="exec:Shofilter[''alternative''] = 1 & Shofilter[''alternative_only''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/alternative.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''alternative''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/alternative_off.png"></a></TD>'
	end

!! sort by filters
	$Headerstring += '<TD>'
	if Shofilter['number'] = 0:
		Shofilter['quality'] = 1
		$Headerstring += '<img src="images/system/icons/clothing/number.png"></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''number''] = 0 & Shofilter[''quality''] = 1 & Shofilter[''inhibition''] = 1 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/number_off.png"></a></TD>'
	end
	
	$Headerstring += '<TD>'
	if Shofilter['quality'] = 0:
		$Headerstring += '<img src="images/system/icons/clothing/quality.png"></TD>'
	else
		$Headerstring += '<a href="exec:Shofilter[''quality''] = 0 & Shofilter[''number''] = 1 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/quality_off.png"></a></TD>'
	end

!! Show only filers
	$Headerstring[1] = '<TD>'
	if Shofilter['stripper_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''stripper_only''] = 1 & Shofilter[''stripper''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/stripper_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''stripper_only''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/stripper.png"></a></TD>'
	end

	$Headerstring[1] += '<TD>'
	if Shofilter['bimbo_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''bimbo_only''] = 1 & Shofilter[''bimbo''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/bimbo_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''bimbo_only''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/bimbo.png"></a></TD>'
	end

	$Headerstring[1] += '<TD>'
	if Shofilter['alternative_only'] = 0:
		$Headerstring[1] += '<a href="exec:Shofilter[''alternative_only''] = 1 & Shofilter[''alternative''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/alternative_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:Shofilter[''alternative_only''] = 0 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/alternative.png"></a></TD>'
	end


	$Headerstring[2] = '<TH>Include</TH><TH></TH><TH></TH><TH>Sort by</TH><TH></TH>'

	$Headerstring[3] = '<TH>Only show</TH>'

	'<center><table><<$Headerstring[2]>>'
	'<TR><border=1><<$Headerstring>>'

	'<TR><border=0><<$Headerstring[3]>>'
	'<TR><border=1><<$Headerstring[1]>></table></center>'
end

if $ARGS[0] = 'shop_filter':
!!Exclude filters
	Shofilter['inc'] = 1
	!!filters, if inc set to 0 they will not display
	if Shofilter['stripper'] = 1 and ShoStyle = 1:
		Shofilter['inc'] = 0
	end
	!!filters, if inc set to 0 they will not display
	if Shofilter['bimbo'] = 1 and ShoStyle = 2:
		Shofilter['inc'] = 0
	end
	!!filters, if inc set to 0 they will not display
	if Shofilter['alternative'] = 1 and ShoStyle = 3:
		Shofilter['inc'] = 0
	end

!!only filters
	Shofilter['only'] = 0
	!!filters, if only set to 1 they will only display those set
	if Shofilter['stripper_only'] = 1 and ShoStyle = 1:
		Shofilter['only'] += 1
	end
	if Shofilter['bimbo_only'] = 1 and ShoStyle = 2:
		Shofilter['only'] += 1
	end
	if Shofilter['alternative_only'] = 1 and ShoStyle = 3:
		Shofilter['only'] += 1
	end
	!!Check total count to make sure it fits all groups selected
	if Shofilter['only'] = Shofilter['stripper_only'] + Shofilter['bimbo_only'] + Shofilter['alternative_only']:
		Shofilter['only'] = 1
	else
		Shofilter['only'] = 0
	end
end


--- shoes ---------------------------------
