# preCUST

cls
if night_mode = 1:
	fcolor = rgb(255, 255, 255)
	bcolor = rgb(0, 0, 0)
	lcolor = rgb(106, 90, 205)
else
	fcolor = rgb(0, 0, 0)
	bcolor = rgb(255, 255, 255)
	lcolor = rgb(106, 90, 205)
end

!!Body Customization and Initializations
if $ARGS[0] = 'BeforeCust':
!!	This is a placeholder at the moment
end

!!******************** TG Start Body Customization Menu ******************************
if $ARGS[0] = 'TGStart':
	$start_type = 'tg'
!!	This is to bypass the next part if the avatar system was used
!!	It will be changed to bypass the head options, once more body options are added
	if player_avatar = 1: gt 'preCUST', 'Done', 'TGS'

!!	Just hair and eye color here for now; the dialog will be update as more options are added
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img <<$set_imgh>> src="images/pre/shared/character_creation_pic1.jpg"></center>'
	'As you drift in unconsciousness, an impression of a woman forms in your mind. Many aspects of her appearance are indistinct, but there are some things you can make out.'
	'She is fairly tall.'
	*nl
	'<center>Customize your:</center>'
	'<center><a href="exec:gs ''preCUST'', ''hair''"><img src="images/pre/shared/hair icon.png"></a> <a href="exec:gs ''begin'', ''eyes''"><img src="images/pre/shared/eye icon.png"></a></center>'
	*nl
	'Everything else about her is fuzzy...'

	act 'Done': gt 'preCUST', 'Done', 'TGS'
end

!!******************** SG Start Body Customization Menu ******************************
if $ARGS[0] = 'SGStart':
	$start_type = 'sgs'
!!	This is to bypass the next part if the avatar system was used
!!	It will be changed to bypass the head options, once more body options are added
	if player_avatar = 1: gt 'preCUST', 'Done', 'SGS'

	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img <<$set_imgh>> src="images/pre/shared/character_creation_pic1.jpg"></center>'
	*nl
	'<center>Customize your:</center>'
	'<center><a href="exec:gs ''preCUST'', ''hair''"><img src="images/pre/shared/hair icon.png"></a> <a href="exec:gs ''begin'', ''eyes''"><img src="images/pre/shared/eye icon.png"></a></center>'

	act 'Done': gt 'preCUST', 'Done', 'SGS'
end

!!******************** NT Start Body Customization Menu ******************************
if $ARGS[0] = 'NTStart':
	$start_type = 'nt'
!!	This is to bypass the next part if the avatar system was used
!!	It will be changed to bypass the head options, once more body options are added
!!  It is using the TG done to complete and the magikDostup to split at the end
	NTstart = 1
	if $pcs_firstname = '':
		$pcs_firstname = input("What is your first name? (Leave blank for default)")

		if $pcs_firstname = '':$pcs_firstname = 'Svetlana'

		$pcs_lastname = input("What is your last name? (Leave blank for default)")

		if $pcs_lastname = '':$pcs_lastname = 'Lebedev'

		$pcs_nickname = input("What is your nick name? (Note: If you chose a custom name, you have to enter something here!)")

		if $pcs_nickname = '':$pcs_nickname = 'Sveta'
	end
	if player_avatar = 1:
		act 'Continue': gt 'preCUST', 'Done', 'NT'
	else
		gs 'preCUST', 'NTStart2'
	end
end

if $ARGS[0] = 'NTStart2':
	pcs_hairlng = 100

!!	Just hair and eye color here for now; the dialog will be update as more options are added
	'<center><b><font color = maroon>CHARACTER CUSTOMIZATION</font></b></center>'
	'<center><img <<$set_imgh>> src="images/pre/shared/character_creation_pic1.jpg"></center>'
	'As you look in the mirror, your face comes into focus. Some aspects of your appearance are already set, you can define the others now.'
	'You are fairly tall.'
	*nl
	'<center>Customize your:</center>'
	'<center><a href="exec:gs ''preCUST'', ''hair''"><img src="images/pre/shared/hair icon.png"></a> <a href="exec:gs ''begin'', ''eyes''"><img src="images/pre/shared/eye icon.png"></a></center>'
	
	act 'Done': gt 'preCUST', 'Done', 'NT'
end

!!******************** Start Body Customization options ******************************

if $ARGS[0] = 'hair':
	if pcs_haircol = 0: 'Your hair is <a href="exec:pcs_haircol = 1 & gt ''preCUST'', ''hair''">black</a>.'
	if pcs_haircol = 1: 'Your hair is <a href="exec:pcs_haircol = 2 & gt ''preCUST'', ''hair''">brown</a>.'
	if pcs_haircol = 2: 'Your hair is <a href="exec:pcs_haircol = 3 & gt ''preCUST'', ''hair''">red</a>.'
	if pcs_haircol = 3: 'Your hair is <a href="exec:pcs_haircol = 0 & gt ''preCUST'', ''hair''">blonde</a>.'
	if defcurly = 0:'And it''s naturally <a href="exec:defcurly = 1 & curly = 2147483647 & gt ''preCUST'', ''hair''">straight</a>.'
	if defcurly = 1:'And it''s naturally <a href="exec:defcurly = 0 & curly = 0 & gt ''preCUST'', ''hair''">curly</a>.'

	nathcol = pcs_haircol
	
	if $start_type = 'tg':
		act 'Done': gt 'preCUST', 'TGStart'
	elseif $start_type = 'nt':
		act 'Done': gt 'preCUST', 'NTStart2'
	else
		act 'Done': gt 'preCUST', 'SGStart'
	end
end

!!******************** Final variable setting and initializations ***********************
if $ARGS[0] = 'Done':
!!	Top area for things that need to be done before setting the variables for either start
	year = 2016

	BDSMfilm = 0
	pornstudio = 0
	pfilmSTOP = 0

	thinkpreg = 0
	denypreg = 0
	pertemp = 1
	pillcvrt = 1
	
	pcs_naturallashes = pcs_lashes
	
!!	Initializing elasticity
	vshrink = 1
	vshrinkdays = 6
	ashrink = 1
	ashrinkdays = 3

	fairycurse = -1

	$excer_name[1] = 'Default 1'
	$excer_name[2] = 'Default 2'
	$excer_name[3] = 'Default 3'
	$excer_name[4] = 'Default 4'

	gs 'fight', 'Wrestlergen'

	monthsend[1] = 31
	if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0): 
		Leapyear = 1 & monthsend[2] = 29
	else
		Leapyear = 0 & monthsend[2] = 28
	end
	monthsend[3] = 31
	monthsend[4] = 30
	monthsend[5] = 31
	monthsend[6] = 30
	monthsend[7] = 31
	monthsend[8] = 31
	monthsend[9] = 30
	monthsend[10] = 31
	monthsend[11] = 30
	monthsend[12] = 31

	$monthName[1] = 'January'
	$monthName[2] = 'February'
	$monthName[3] = 'March'
	$monthName[4] = 'April'
	$monthName[5] = 'May'
	$monthName[6] = 'June'
	$monthName[7] = 'July'
	$monthName[8] = 'August'
	$monthName[9] = 'September'
	$monthName[10] = 'October' 
	$monthName[11] = 'November'
	$monthName[12] = 'December'
	$month = $monthName[month]
	
	gs 'telefon', 'setup'

!!	TG Start Specific Variable Setting
	if $ARGS[1] = 'TGS':
		age = 18
		month = 5
		$month = 'May'
		day = 4
		week = 3
		hour = 13
		if player_avatar = 0:
			birthyear = year - age
			birthmonth = 4
			birthday = 1
			school_year = 1998
		end

!!		Body
		pcs_hgt = 170
		salo = 60
		dick = 0
!!		Stats
		pcs_stren = 10
		strenbuf = 10
		pcs_agil = 10
		agilbuf = 10
		pcs_vital = 10
		vitalbuf = 10
		pcs_intel = 10
		pcs_sprt = 10
		pcs_react = 10
		pcs_chrsm = 10
		pcs_prcptn = 10
		pcs_magik = 0
		money = 16500
		pcs_pubes = 30
		pcs_leghair = 12
		pcs_makeup = 1
		home_owned[1] = 1

!!		Maruda Hair Mod
		pcs_hairlng = 17
!!		***********
		cltarelka = 1
		fairy = 10
		eda = 5
		poroshok = 5
		shampoo = 5
		tampon = 2
		pcs_energy = 100
		pcs_hydra = 100
		pcs_sleep = 100

!!		Starting Option Adjustments
!!		The TG Background options would be aplied here

!!		***********

	end

!!	NT Start Specific Variable Setting
	if $ARGS[1] = 'NT':
		age = 18
		month = 5
		$month = 'May'
		day = 4
		week = 3
		hour = 13
		if player_avatar = 0:
			birthyear = year - age
			birthmonth = 4
			birthday = 1
			school_year = 1998
		end

!!		Body
		pcs_hgt = 170
		salo = 60
		dick = 0
!!		Stats
		pcs_stren = 20
		strenbuf = 20
		pcs_agil = 15
		agilbuf = 15
		pcs_vital = 25
		vitalbuf = 25
		pcs_intel = 30
		pcs_sprt = 25
		pcs_react = 25
		pcs_chrsm = 15
		pcs_prcptn = 40
		money = 13000
		pcs_pubes = 30
		pcs_leghair = 12
		pcs_makeup = 5
		cheap_purses[7] = 1
		$currentpursetype = 'cheap'
		currentpursenumber = 7
		bag = 1
		home_owned[1] = 1

		pcs_exhibition = 15
		pcs_heels = 20
		pcs_makupskl = 15
		pcs_artskls = 15
		pcs_compskl = 20
		pcs_comphckng = 10
		pcs_chess = 15
		pcs_danc = 30
		cltarelka = 1
		fairy = 10
		eda = 5
		poroshok = 5
		shampoo = 20
		tampon = 15
		pcs_energy = 100
		pcs_hydra = 100
		pcs_sleep = 100

!!		Starting Option Adjustments
!!		The TG Background options would be aplied here

!!		***********

	end

!!	SG Start Specific Variable Setting
	if $ARGS[1] = 'SGS':
		school[6] = 1
		umbrella = 1
		sisboyday = -2
		home_owned[1] = 0
		cltarelka = 0
		fairy = 0
		eda = 0
		poroshok = 0
		shampoo = 0

		hcolmotherremember = pcs_haircol
		hcolfatherremember = pcs_haircol
		hcolfronce = 1

		!!Setting Kolkas birthday based off the PCs
		koldobtmp_d = rand(1,28)
		koldobtmp_y = birthyear
		koldobtmp_m = birthmonth + 11
		if koldobtmp_m > 12:
			koldobtmp_y += 1
			koldobtmp_m -= 12
		end
		npc_dob['A34'] = koldobtmp_y * 10000
		npc_dob['A34'] += koldobtmp_m * 100
		npc_dob['A34'] += koldobtmp_d
		killvar 'koldobtmp_d' & killvar 'koldobtmp_m' & killvar 'koldobtmp_y'

		$holyday += ', <b><<kanicont>> days left.</b>'
	end
	
!!*************************
!!	Final Initializations

	VersionCheck = 5030

	pcs_dob = birthyear * 10000
	pcs_dob += (birthmonth * 100)
	pcs_dob += birthday

	age = year - ((pcs_dob - (pcs_dob mod 10000)) / 10000)
	if ((month * 100) + day) < pcs_dob mod 10000: age -= 1
		
	if age < 17:
		vidage = age
	else
		vidage = age - 1
	end

	vidageday = 300

	pcs_health = pcs_vital * 10 + pcs_stren * 5
	pcs_willpwr = pcs_intel * 5 + pcs_sprt * 5
	pcs_manna = (pcs_intel * pcs_magik) + pcs_magik * 100 + pcs_vital * 10 + rikudo
	pcs_mood = 100
	pcs_stam = 100

	nathcol = pcs_haircol
	oldsavepcs_haircol = 1

	gs 'body_shape', 'initial'

!! Adding underwear

	cheap_panties[37] = 1
	cheap_bras[11] = 1
	$pantyworntype = 'cheap'
	pantywornnumber = 37
	$braworntype = 'cheap'
	brawornnumber = 11

!!adding default shoes and assigning them

	sgandm[6] = 1
	strainers[21] = 1
	$shoeworntype = 'gandm'
	shoewornnumber = 6

!!	Starting clothing set
	if NTstart = 1:
		cheap[161] = 1
		cheapH[161] = 100
		cheapB[161] = pcs_hips
		exercise[29] = 1
		exerciseH[29] = 100
		cheap[370] = 1
		cheapH[370] = 100
		cheapB[370] = pcs_hips
		swimwear[3] = 1
		swimwearH[3] = 60
		swimwearB[3] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 370
	elseif pcs_exhibition = 0:
		cheap[15] = 1
		cheapH[15] = 100
		cheapB[15] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[36] = 1
		cheapH[36] = 100
		cheapB[36] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 15
	elseif pcs_exhibition = 5:
		cheap[48] = 1
		cheapH[48] = 100
		cheapB[48] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[83] = 1
		cheapH[83] = 100
		cheapB[83] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 48
	elseif pcs_exhibition = 10:
		cheap[49] = 1
		cheapH[49] = 100
		cheapB[49] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[70] = 1
		cheapH[70] = 100
		cheapB[70] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 49
	elseif pcs_exhibition = 15:
		cheap[32] = 1
		cheapH[32] = 100
		cheapB[32] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[62] = 1
		cheapH[62] = 100
		cheapB[62] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 32
	elseif pcs_exhibition = 20:
		cheap[4] = 1
		cheapH[4] = 100
		cheapB[4] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[41] = 1
		cheapH[41] = 100
		cheapB[41] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 41
	elseif pcs_exhibition = 25:
		cheap[50] = 1
		cheapH[50] = 100
		cheapB[50] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[81] = 1
		cheapH[81] = 100
		cheapB[81] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 50
	elseif pcs_exhibition = 30:
		cheap[82] = 1
		cheapH[82] = 100
		cheapB[82] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[43] = 1
		cheapH[43] = 100
		cheapB[43] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 43
	elseif pcs_exhibition = 35:
		cheap[43] = 1
		cheapH[43] = 100
		cheapB[43] = pcs_hips
		exercise[4] = 1
		exerciseH[4] = 100
		cheap[73] = 1
		cheapH[73] = 100
		cheapB[73] = pcs_hips
		gs 'clothing', 'wear', 'cheap', 43
	end
	coat[5] = 1
	coatH[5] = 200
	defaultcoat = 5
	if swim_start = 98:
		swimwear[98] = 1
		swimwearH[98] = 60
		swimwearB[98] = pcs_hips
	elseif swim_start = 69:
		swimwear[69] = 1
		swimwearH[69] = 60
		swimwearB[69] = pcs_hips
	end
	killvar 'swim_start'
		
!!	**********

	gs 'daystart'
	gs 'din_pav'
	gs 'din_npc'
	gs 'dinSex2'
	gs 'dina'
	gs 'din_van'
	gs 'din_bad'
	gs 'dinSex'
	gs 'dinBoroda'
	gs 'BanSexType'

	gs 'outdoors', 'weather'

	menoage = rand(40,50)
	temprand = rand(0,10)
	
	if temprand = 0:
		menoage += rand(0,5)
	
	elseif temprand < 4:
		menoage += rand(3,10)
	
	elseif temprand < 9:
		menoage += rand(5,12)
	
	else
		menoage += rand(7,13)
	
	end

	daylastperiod = daystart
	temprand = rand(1,3)
	if temprand = 1:
		cycle = 1
		EggRH = rand(1,149)
		FocH = EggRH + 4*24
		mesec = 0
		unfertegg = 0
		ferteggage = 0
		Ovulate = 0
		LutH = 0
		daylastperiod -= FocH/24
	elseif temprand = 2:
		cycle = 2
		unfertegg = 1
		ferteggage = rand(0,44)
		Ovulate = (rand(24,44) - ferteggage)
		if Ovulate <= 0: Ovulate = 1
		mesec = 0
		EggRH = 0
		FocH = 0
		LutH = 0
		daylastperiod -= 10+(ferteggage/24)
	elseif temprand = 3:
		cycle = 3
		LutH = rand(0,300)
		ferteggage = 36 + LutH
		mesec = 0
		EggRH = 0
		FocH = 0
		unfertegg = 0
		Ovulate = 0
		daylastperiod -= 10+(ferteggage/24)
	end
	
	if daylastperiod + 4 > daystart:
		lastmens = daylastperiod - 20
	else
		lastmens = daylastperiod+4
	end
	
	pcs_horny = 0
	killvar 'opPRE'
	killvar 'tgs_skipinto'
	gs 'stat'
	showstat 0
	showobjs 0
	if $ARGS[1] = 'NT':
		gt 'preNT'
	elseif $ARGS[1] = 'TGS':
		gt 'preTG', 'sleepPRE'
	else
		gt 'preALT', 'One'
	end
end

--- preCUST ---------------------------------

