# panties

!!gs 'panties', 'dispose'
!!to remove panties and destroy them
!!gs 'panties', 'remove'
!!To remove panties and store them
!!gs 'panties', 'wear'
!!To wear panties

menu_off = 1

if $ARGS[0] = 'dispose':
	dynamic $pantyworntype + '_panties[<<pantywornnumber>>] = 0'
	$lastwornpantytype = 'none'
	lastwornpantynumber = 0
	$pantyworntype = 'none'
	pantywornnumber = 0
end

if $ARGS[0] = 'remove':
	$lastwornpantytype = $pantyworntype
	lastwornpantynumber = pantywornnumber
	$pantyworntype = 'none'
	pantywornnumber = 0
end

if $ARGS[0] = 'wear':
	panty_none = 0
	if $ARGS[1] = '':
		if $lastwornpantytype ! '':
			$pantyworntype = $lastwornpantytype
			pantywornnumber = lastwornpantynumber
		else
			$pantyworntype = 'none'
			pantywornnumber = 0
		end
	else
		$pantyworntype = $ARGS[1]
		pantywornnumber = ARGS[2]
	end
end

if $ARGS[0] = 'view_panty_list':
	!! ARGS 0 - view_panty_list
	!! ARGS 1 - action type (clean, dirty, store, bathroom)
	
	if $pursepantytype ! '' or $pursebratype ! '':
		'<center><b>You put the '+iif($pursepantytype ! '','panties','')+iif($pursepantytype ! '' and $pursebratype ! '',' and ','')+iif($pursebratype ! '','bra','')+' from your purse back in the wardrobe.</b></center><br>'
		killvar '$pursepantytype' & killvar 'pursepantynumber'
		killvar '$pursebratype' & killvar 'pursebranumber'
	end

	if $ARGS[1] ! 'bathroom':
		act 'Return': gt 'wardrobe', 'start'
	else
		act 'Return': gt $loc, $metka
	end

	if $ARGS[1] = 'wardrobe':
		metka_panties = 0
	end

	if $ARGS[1] = 'store':
		metka_panties = 1
	end

	if $ARGS[1] = 'unwanted':
		metka_panties = 2
	end

	'<center><table border=1><TH><a href="exec:gt ''panties'', ''view_panty_list'', ''wardrobe''">Draw</a></TH><TH><a href="exec:gt ''panties'', ''view_panty_list'', ''store''">Storage</a></TH><TH><a href="exec:gt ''panties'', ''view_panty_list'', ''unwanted''">Unwanted</a></TH></center>'

	if $pantyworntype ! 'none':act 'Remove panties':gs 'panties', 'remove' & gt 'panties', 'view_panty_list', $ARGS[1]
	
	if $ARGS[1] = 'store':
		cloc = 1
	end

	i = 1
	:loopcheappanties 
	if cheap_pantiesS[i] = metka_panties and cheap_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''cheap'', <<i>>"><img src="images/pc/panties/basic/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('cheap_panties'):jump 'loopcheappanties'

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

	i = 1
	:loopboutiquepanties 
	if boutique_pantiesS[i] = metka_panties and boutique_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''boutique'', <<i>>"><img src="images/pc/panties/boutique/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('boutique_panties'):jump 'loopboutiquepanties'

	'<center><img src="images/locations/oldtown/exhibitshop/shop_name.png"></center>'

	i = 1
	:loopexhibitionistpanties 
	if exhibitionist_pantiesS[i] = metka_panties and exhibitionist_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''exhibitionist'', <<i>>"><img src="images/pc/panties/exhibitionist/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('exhibitionist_panties'):jump 'loopexhibitionistpanties'

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

	i = 1
	:loopfashionistapanties 
	if fashionista_pantiesS[i] = metka_panties and fashionista_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''fashionista'', <<i>>"><img src="images/pc/panties/fashionista/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('fashionista_panties'):jump 'loopfashionistapanties'

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

	i = 1
	:loopkatspanties 
	if kats_pantiesS[i] = metka_panties and kats_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''kats'', <<i>>"><img src="images/pc/panties/kats/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('kats_panties'):jump 'loopkatspanties'

	'<center><img src="images/locations/city/citycenter/sexshop/shop_name.png"></center>'

	i = 1
	:loopsexshoppanties 
	if sexshop_pantiesS[i] = metka_panties and sexshop_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''sexshop'', <<i>>"><img src="images/pc/panties/sexshop/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('sexshop_panties'):jump 'loopsexshoppanties'

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

	i = 1
	:loopsportpanties 
	if sport_pantiesS[i] = metka_panties and sport_panties[i] = 1:*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''sport'', <<i>>"><img src="images/pc/panties/sport/<<i>>.jpg" 	height="150" /></a>'
	i += 1
	if i <= ARRSIZE('sport_panties'):jump 'loopsportpanties'
end

if $ARGS[0] = 'view_panty_item':
	!! ARGS 0 - view_panty_item
	!! ARGS 1 = action type (draw, shop)
	!! ARGS 2 - panty type
	!! ARGS 3 - panty index
	!! ARGS 4 - price for shop
	cla
	'<center><img src="<<FUNC(''$panty_image'',  $ARGS[2], ARGS[3])>>"></center>'
!!	gs 'panty_attributes', $ARGS[2], ARGS[3]
!!	$RESULT = FUNC('$short_description', $ARGS[2], CloStyle2)
!!	$RESULT += '<<ARGS[3]>>'
!!	'<<$RESULT>>'
	gs 'panties', 'descriptions', $ARGS[2]

	if $ARGS[1] = 'shop':
		if dyneval('RESULT = <<$ARGS[2]>>_panties[<<ARGS[3]>>]') = 1:
			'You already own this item.'
			act 'Leave': gt $loc, $metka
		else
			price = ARGS[4]
			'Price: <<ARGS[4]>> <b>₽</b>'
			act 'Leave': gt $loc, $metka
			if money >= price:
				act 'Buy (cash)':
					money -= price
					dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
					dynamic $ARGS[2] + '_pantiesS[<<ARGS[3]>>] = 0'
					gt $loc, $metka
				end
			else
				'You do not have enough cash to buy these panties.'
			end
			if karta + bankDebtLimit >= price:
				act 'Buy (card)':
					karta -= price
					dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
					dynamic $ARGS[2] + '_pantiesS[<<ARGS[3]>>] = 0'
					gt $loc, $metka
				end
			else
				'You do not have enough money in your bank to buy these panties.'
			end
		end
	else
		if $ARGS[1] ! 'bathroom':
			if metka_panties ! 1:$RESULT += 'Move these panties to <a href="exec:gt ''panties'', ''dest1'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', <<ARGS[3]>>">Storage</a><BR>'
			if metka_panties ! 0:$RESULT += 'Move these panties to  <a href="exec:gt ''panties'', ''dest0'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', <<ARGS[3]>>">Wardrobe</a><BR>'
			if metka_panties ! 2:$RESULT += 'Move these panties to  <a href="exec:gt ''panties'', ''dest2'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', <<ARGS[3]>>">Unwanted</a>'
		end
		
		act 'Return':gt 'panties', 'view_panty_list', $ARGS[1]
		
		if $ARGS[1] = 'store':
			'These panties are in storage.'
		elseif $ARGS[1] = 'unwanted':
			'These panties are unwanted.'
		else
			if $pantyworntype = $ARGS[2] and pantywornnumber = ARGS[3]:
				'You are wearing these panties.'
			else
				if metka_panties = 0:
					act 'Wear':
						if CloPanties = 1:
							msg'Your outfit is already replacing your panties'
						end
						gs 'panties', 'wear', $ARGS[2], ARGS[3]

						if $ARGS[1] = 'wardrobe':
							gt 'wardrobe', 'start'
						else
							gt $loc, $metka
						end
					end
				end
			end
		end
		if $ARGS[1] ! 'store':
			act 'Move to storage': gt 'panties', 'dest1', $ARGS[1], $ARGS[2], ARGS[3]
		end
		if $ARGS[1] ! 'unwanted':
			act 'Move to unwanted': gt 'panties', 'dest2', $ARGS[1], $ARGS[2], ARGS[3]
		end
		if $ARGS[1] ! 'wardrobe':
			act 'Move to wardrobe': gt 'panties', 'dest0', $ARGS[1], $ARGS[2], ARGS[3]
		end
	end
end

if $ARGS[0] = 'dest0':
	*clr
	dynamic '<<$ARGS[2]>>_pantiesS[<<ARGS[3]>>] = 0'
	gt 'panties', 'view_panty_item', $ARGS[1], $ARGS[2], ARGS[3]
end

if $ARGS[0] = 'dest1':
	*clr
	dynamic '<<$ARGS[2]>>_pantiesS[<<ARGS[3]>>] = 1'
	gt 'panties', 'view_panty_item', $ARGS[1], $ARGS[2], ARGS[3]
end

if $ARGS[0] = 'dest2':
	*clr
	dynamic '<<$ARGS[2]>>_pantiesS[<<ARGS[3]>>] = 2'
	gt 'panties', 'view_panty_item', $ARGS[1], $ARGS[2], ARGS[3]
end

if $ARGS[0] = 'descriptions':
	if $ARGS[1] = 'cheap':
		'Cheap panties with no redeeming features.'
	elseif $ARGS[1] = 'boutique':
		'These panties are so beautifully made that your posture and confidence is improved wearing them boosting your appearance even when fully clothed.'
	elseif $ARGS[1] = 'exhibitionist':
		'These panties are so revealing that they are more exciting than not wearing any and you''ll always feel horny wearing them.'
	elseif $ARGS[1] = 'fashionista':
		'These panties are well made improving your posture and confidence and slightly boosting your appearance even when fully clothed.'
	elseif $ARGS[1] = 'kats':
		'These panties feel reassuring and wear them gives your mood a lift.'
	elseif $ARGS[1] = 'sexshop':
		'Tacky and cheap these panties make you look like a hooker, this could be a bonus if working as one.'
	elseif $ARGS[1] = 'sport':
		'These panties are designed for physical exercises to make them less tiring.'
	end
end

--- panties ---------------------------------

