# budgetclothes

$budgetshort = {
	cla

	act 'Remove item.':dynamic $budgetshortdepartment

	if short[i] = 0 and money >= 2000:
		act 'Buy (2,000 rubles)':
			money -= 2000
			short[i] = 1
			shortH[i] = 60
			shortB[i] = bedra
		 	dynamic $budgetshortdepartment
		 end
	else
		dynamic $budgetshortdepartment
	end
}

$budgetskirt = {
	cla

	act 'Remove item.':dynamic $budgetskirtdepartment

	if skirt[i] = 0 and money >= 2000:
		act 'Buy (2,000 rubles)':
			money -= 2000
			skirt[i] = 1
			skirtH[i] = 60
			skirtB[i] = bedra
			dynamic $budgetskirtdepartment
		end
	else
		dynamic $budgetskirtdepartment
	end
}

$budgetdress = {
	cla

	act 'Remove item.':dynamic $budgetdressdepartment

	if dress[i] = 0 and money >= 4500:
		act 'Buy (4,500 rubles)':
			money -= 4500
			dress[i] = 1
			dressH[i] = 60
			dressB[i] = bedra
			dynamic $budgetdressdepartment
		end
	else
		dynamic $budgetdressdepartment
	end
}

$budgetprofi = {
	cla

	act 'Remove item.':dynamic $budgetprofidepartment

	if profi[i] = 0 and money >= 3000:
		act 'Buy (3,000 rubles)':
			money -= 3000
			profi[i] = 1
			profiH[i] = 60
			profiB[i] = bedra
			dynamic $budgetprofidepartment
		end
	else
		dynamic $budgetprofidepartment
	end
}

$budgetpants = {
	cla

	act 'Remove item.':dynamic $budgetpantsdepartment

	if pants[i] = 0 and money >= 1750:
		act 'Buy (1,750 rubles)':
			money -= 1750
			pants[i] = 1
			pantsH[i] = 60
			pantsB[i] = bedra
			dynamic $budgetpantsdepartment
		end
	else
		dynamic $budgetpantsdepartment
	end
}

$budgetjeans = {
	cla

	act 'Remove item.':dynamic $budgetjeansdepartment

	if jeans[i] = 0 and money >= 1500:
		act 'Buy (1,500 rubles)':
			money -= 1500
			jeans[i] = 1
			jeansH[i] = 60
			jeansB[i] = bedra
			dynamic $budgetjeansdepartment
		end
	else
		dynamic $budgetjeansdepartment
	end
}


$metka = $ARGS[0]
$loc = $CURLOC
$metkaM = $ARGS[0]
$locM = $CURLOC
mag = 1
'<center><b><font color="maroon">Welcome to G & M - Trendy Styles for EVERYONE</font></b></center>'
clr
gs 'stat'
fcolor = rgb(0, 0, 0)
bcolor = rgb(255, 255, 255)
lcolor = rgb(106, 90, 205)

act 'Leave the store':
	cla
	minut = minut + 3
	gt 'torgcentr'
end

! WD: Rename 'png' clothing images as scripts are only using 'jpg' ~
! Maruda: In order to increase loading times departments have been created.
if hour >= 9 and hour <= 21:
	*nl
	*nl
	*nl
	'<center><a href="exec: dynamic $budgetjeansdepartment">Outfits with Jeans</a> | <a href="exec: dynamic $budgetpantsdepartment">Outfits with Pants</a> | <a href="exec: dynamic $budgetprofidepartment">Professional Outfits</a> | <a href="exec: dynamic $budgetdressdepartment">Dresses</a> | <a href="exec: dynamic $budgetskirtdepartment">Outfits with Skirts</a> | <a href="exec: dynamic $budgetshortdepartment">Outfits with Shorts</a></center>'
end

$budgetshortdepartment = {
	cla
	cls
	gs 'stat'
	
	'<center><b>Outfits with Shorts - Prices:2000 Rubles</font></b></center>'
	*nl
	*nl
	'<center><a href="exec: dynamic $budgetjeansdepartment">Outfits with Jeans</a> | <a href="exec: dynamic $budgetpantsdepartment">Outfits with Pants</a> | <a href="exec: dynamic $budgetprofidepartment">Professional Outfits</a> | <a href="exec: dynamic $budgetdressdepartment">Dresses</a> | <a href="exec: dynamic $budgetskirtdepartment">Outfits with Skirts</a> | Outfits with Shorts</center>'
		if money >= 2000:
				i = 201
				:loopshortdepartment
				if short[i] = 0:*p '<a href="exec: i = <<i>> & dynamic $budgetshort"><div style="width:100%; max-width:200px; max-height:200px;"><img src="images/clothes/short<<i>>.jpg" 	height="200" /></div></a>'
				i += 1
				if i <= 256:jump 'loopshortdepartment'
				end
		end

	act 'Leave this department':gt $loc

}

$budgetskirtdepartment = {
	cla
	cls
	gs 'stat'
	
	'<center><b>Outfits with Skirts - Prices:2000 Rubles</font></b></center>'
	*nl
	*nl
	'<center><a href="exec: dynamic $budgetjeansdepartment">Outfits with Jeans</a> | <a href="exec: dynamic $budgetpantsdepartment">Outfits with Pants</a> | <a href="exec: dynamic $budgetprofidepartment">Professional Outfits</a> | <a href="exec: dynamic $budgetdressdepartment">Dresses</a> | Outfits with Skirts | <a href="exec: dynamic $budgetshortdepartment">Outfits with Shorts</a></center>'
		if money >= 2000:
				i = 201
				:loopskirtdepartment
				if skirt[i] = 0:*p '<a href="exec: i = <<i>> & dynamic $budgetskirt"><div style="width:100%; max-width:200px; max-height:200px;"><img src="images/clothes/skirt<<i>>.jpg" 	height="200" /></div></a>'
				i += 1
				if i <= 273:jump 'loopskirtdepartment'
				end
		end

	act 'Leave this department':gt $loc

}

$budgetdressdepartment = {
	cla
	cls
	gs 'stat'
	
	'<center><b>Dresses - Prices:4500 Rubles</font></b></center>'
	*nl
	*nl
	'<center><a href="exec: dynamic $budgetjeansdepartment">Outfits with Jeans</a> | <a href="exec: dynamic $budgetpantsdepartment">Outfits with Pants</a> | <a href="exec: dynamic $budgetprofidepartment">Professional Outfits</a> | Dresses | <a href="exec: dynamic $budgetskirtdepartment">Outfits with Skirts</a> | <a href="exec: dynamic $budgetshortdepartment">Outfits with Shorts</a></center>'
		if money >= 4500:
				i = 201
				:loopdressdepartment
				if dress[i] = 0:*p '<a href="exec: i = <<i>> & dynamic $budgetdress"><div style="width:100%; max-width:200px; max-height:200px;"><img src="images/clothes/dress<<i>>.jpg" 	height="200" /></div></a>'
				i += 1
				if i <= 225:jump 'loopdressdepartment'
				end
		end

	act 'Leave this department':gt $loc

}

$budgetprofidepartment = {
	cla
	cls
	gs 'stat'
	
	'<center><b>Professional Department - Prices:3000 Rubles</font></b></center>'
	*nl
	*nl
	'<center><a href="exec: dynamic $budgetjeansdepartment">Outfits with Jeans</a> | <a href="exec: dynamic $budgetpantsdepartment">Outfits with Pants</a> | Professional Outfits | <a href="exec: dynamic $budgetdressdepartment">Dresses</a> | <a href="exec: dynamic $budgetskirtdepartment">Outfits with Skirts</a> | <a href="exec: dynamic $budgetshortdepartment">Outfits with Shorts</a></center>'
		if money >= 3000:
				i = 201
				:loopprofidepartment
				if profi[i] = 0:*p '<a href="exec: i = <<i>> & dynamic $budgetprofi"><div style="width:100%; max-width:200px; max-height:200px;"><img src="images/clothes/profi<<i>>.jpg" 	height="200" /></div></a>'
				i += 1
				if i <= 208:jump 'loopprofidepartment'
				end
		end

	act 'Leave this department':gt $loc

}

$budgetpantsdepartment = {
	cla
	cls
	gs 'stat'
	
	'<center><b>Pants Department - Prices:1750 Rubles</font></b></center>'
	*nl
	*nl
	'<center><a href="exec: dynamic $budgetjeansdepartment">Outfits with Jeans</a> | Outfits with Pants | <a href="exec: dynamic $budgetprofidepartment">Professional Outfits</a> | <a href="exec: dynamic $budgetdressdepartment">Dresses</a> | <a href="exec: dynamic $budgetskirtdepartment">Outfits with Skirts</a> | <a href="exec: dynamic $budgetshortdepartment">Outfits with Shorts</a></center>'
		if money >= 1750:
				i = 201
				:looppantsdepartment
				if pants[i] = 0:*p '<a href="exec: i = <<i>> & dynamic $budgetpants"><div style="width:100%; max-width:200px; max-height:200px;"><img src="images/clothes/pants<<i>>.jpg" 	height="200" /></div></a>'
				i += 1
				if i <= 346:jump 'looppantsdepartment'
				end
		end

	act 'Leave this department':gt $loc

}

$budgetjeansdepartment = {
	cla
	cls
	gs 'stat'
	
	'<center><b>Jeans Department - Prices:1500 Rubles</font></b></center>'
	*nl
	*nl
	'<center>Outfits with Jeans | <a href="exec: dynamic $budgetpantsdepartment">Outfits with Pants</a> | <a href="exec: dynamic $budgetprofidepartment">Professional Outfits</a> | <a href="exec: dynamic $budgetdressdepartment">Dresses</a> | <a href="exec: dynamic $budgetskirtdepartment">Outfits with Skirts</a> | <a href="exec: dynamic $budgetshortdepartment">Outfits with Shorts</a></center>'
		if money >= 1500:
				i = 201
				:loopjeansdepartment
				if jeans[i] = 0:*p '<a href="exec: i = <<i>> & dynamic $budgetjeans"><div style="width:100%; max-width:200px; max-height:200px;"><img src="images/clothes/jeans<<i>>.jpg" 	height="200" /></div></a>'
				i += 1
				if i <= 297:jump 'loopjeansdepartment'
				end
		end

	act 'Leave this department':gt $loc

}

--- budgetclothes ---------------------------------

