# gaptek
$location_type = 'public_indoors'

if $ARGS[0] = 'start' or gaptek_loc = 1:
	cls
	CLOSE ALL
	if sound = 0:PLAY 'sound/shop.mp3',30
	gs 'stat'

	'<center><B><font color="maroon">Pharmacy</font></B></center>'
	'<center><img src="images/etogame/aptek.jpg"></center>'

	act 'Leave the pharmacy':gt 'pavCommercial'
	
	if Olu_pay > 0:
		minut += RAND(5,10)
		money += Olu_pay * RAND(500,700)
		Olu_pay = 0

		'You go back to the pharmacy, and wait for a slow moment so you can talk to your aunt undisturbed.'
		'Your aunt smiles happily as she gives you a small envelope. "Thank you so much <<$name>>, this is the only way I can get some sleep. I really appreciate it. Here, please accept this money, you''ve earned it."'

		act 'Thank her and leave the pharmacy':gt'pavCommercial'
	end

	if hour < 8 or hour > 20:
		'The pharmacy is currently closed. There''s a sign on the door, that says it''s open between 8:00 and 20:00 every day.'
		exit
	end

	!! for original start we can just use stockitem, for alt start there are other plot elements involved
	if StoryLine = 0:
		gaptek_loc = 1
		*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')
		*pl '<center><table align="center">' + _
		FUNC ('$stock_item', 5, 'condoms', 100, 'prezik', $CURLOC) + _
		FUNC ('$stock_item', 1, 'pregnancy test', 200, 'pregtest', $CURLOC) + _
		FUNC ('$stock_item', 28, 'birth control pills', 500, 'tabletki', $CURLOC) + _
		FUNC ('$single_stock_item', 1, 'enema kit', 500, 'klisma', $CURLOC) + _
		FUNC ('$stock_item', 10, 'antibiotics', 500, 'lekarstvo', $CURLOC) + _
		FUNC ('$stock_item', 20, 'vitamin tablets', 500, 'vitamin', $CURLOC) + _
		FUNC ('$stock_item', 16, 'painkillers', 500, 'painkiller', $CURLOC) + _
		FUNC ('$stock_item', 10, 'soothing ointment for chafed skin', 600, 'mosolmaz', $CURLOC) + _
		FUNC ('$stock_item', 25, 'lip balm', 100, 'lipbalm', $CURLOC) + _
		FUNC ('$stock_item', 1, 'weight loss pill', 2000, 'fatdel', $CURLOC) + _
		FUNC ('$stock_item', 20, 'Tampons', 200, 'tampon', $CURLOC) + _
		FUNC ('$stock_item', 20, 'Sanitary napkins', 200, 'sanpad', $CURLOC) + _
		'</table></center>'
	else
		'Condoms - 100 <b>₽</b>'
		'Pregnancy test - 200 <b>₽</b>'
		'Lubricant - 300 <b>₽</b>'
		'Birth control pills - 500 <b>₽</b>'
		if klisma = 0:'Enema kit - 500 <b>₽</b>'
		'Antibiotics - 500 <b>₽</b>'
		'Vitamin drinks - 500 <b>₽</b>'
		'Painkillers - 500 <b>₽</b>'
		'Soothing ointment for chafed skin - 600 <b>₽</b>'
		'Moisturizing lip balm - 1000 <b>₽</b>'
		'Fat burners - 1500 <b>₽</b>'
		if KandidNapr = 1:'Cure for yeast infection - 1,500 <b>₽</b>'
		'Aunt Luda is sitting behind the counter, as usual. She gives you a friendly nod when she sees you: "Hi <<$name>>! How are you?"'

		if motherQW >= 2:
			act 'Ask about the ''garden''':
				cls
				gaptekfirst = 1
				gs 'stat'
				'<center><b><font color="maroon">Pharmacy</font></b></center>'
				'<center><img src="images/etogame/aptek.jpg"></center>'

				if motherQW = 2 and gaogorod < 40:
					if gaptekfirst = 0:
						gaptekfirst = 1
						minut += 5
						'You pretend to look at the goods positioned on the shelves, while you consider how to best approach your aunt. Your aunt notices you staring at the shelves, and comes from behind the counter when she''s done helping her last customer.'
						'"Hi <<$name>>, are you looking for something?"'
						'You take a deep breath and say: "Erm... yes aunt. My mother needs some things for her ''garden''?" putting extra emphasis on the word.'
						'Your aunt pretends to be confused, and teases you: "<<$nickname>>, are you sure you''re in the right store? This is a pharmacy, not a gardening center!"'
						'You''re slightly confused now, and try again: "I know, aunt... my mom said I should say ''garden''."'
						'She just laughs: "Just teasing, <<$nickname>>. Your mother has such green thumbs, she comes here all the time! Come on, I''ll show you what we have." She takes you by the hand and takes you to the counter holding the contraceptives.'
						'"Here you go. All of your gardening needs, right here. What can I get you?"'

						gs 'gaptek', 'garden'
					else
						minut += rand(5, 15)
						if gaprezikday ! daystart or gatabletkiday ! daystart:
							'You wait until the last customer leaves the pharmacy, and quickly dart over to the counter.'
							'"Hi aunt Luda, my mom needs a few more items for her garden."'
							'"Your mom, huh? Sure, sure... it''s right here, take your pick!" she chuckles, as you try to hide your blush.'
							'You intently stare at the items, avoiding her gaze as you mutter: "Thank you, Aunt..."'
							'"No problem, <<$nickname>>. But seriously, tell Natasha she shouldn''t spend so much time gardening. We keep running low on stock."'

						gs 'gaptek', 'garden'
						else
							minut += RAND(5,15)
							'You linger around the pharmacy, waiting for your aunt to become available. However, as time passes the pharmacy only becomes more and more crowded, and your aunt has a long line of customers to deal with. You decide you''ve wasted enough time, and to try again later.'
						end
					end
				elseif motherQW = 2 and gaogorod >= 20:
					gt'motherQW','motherQW_3'
				elseif motherQW >= 3 and galubri = 0:
					if gaprezikday ! daystart or gatabletkiday ! daystart:
						minut += RAND(5,15)
						gs'stat'
						if RAND(0,5) = 0 and oluuosegunday ! daystart:
							gt'motherQW','olu'
						else
							'You wait for your turn and move to the counter, discretely nodding at the counter with the contraceptives. Your aunt gives you a small smile and asks what she can do for you today.'

							gs 'gaptek', 'garden'
						end
					elseif gaprezikday = daystart and gatabletkiday = daystart:
						minut += RAND(5,15)

						'You wait for your turn and move up to the counter, discretely nodding at the counter with the contraceptives. She apologizes: "I''m sorry <<$name>>, those are all sold out." With some malice in her voice, she whispers: "Your stud will have to wait until tomorrow, unless you plan on entertaining him in some other way." Giving you a lewd grin, she ushers you away from the counter so she can help the next customer.'
					end
				elseif motherQW >= 3 and galubri = 1:
					if gaprezikday ! daystart or gatabletkiday ! daystart or galubriday ! daystart:
						minut += RAND(5,15)
						if RAND(0,5) = 0 and oluuosegunday ! daystart and tetyafirst < 3:
							gt'motherQW','olu'
						else
							'You wait for your turn and move to the counter, discretely nodding at the counter with the contraceptives. Your aunt gives you a small smile and asks what she can do for you today.'

							gs 'gaptek', 'garden'
						end
					elseif gaprezikday = daystart and gatabletkiday = daystart and galubriday = daystart:
						minut += RAND(5,15)

						'You wait for your turn and move up to the counter, discretely nodding at the counter with the contraceptives. She apologizes: "I''m sorry <<$name>>, those are all sold out." With some malice in her voice, she whispers: "Your stud will have to wait until tomorrow, unless you plan on entertaining him in some other way." Giving you a lewd grin, she ushers you away from the counter so she can help the next customer.'
					end
				end
				
				act 'Move away from the counter':gt 'gaptek', 'start'
			end
		end

		if money >= 500:
			if gatabletkiday ! daystart:
				act 'Buy birth control pills (500 <b>₽</b>) <<iif(tabletki > 0, ''[left:<b>'' + tabletki + ''</b>]'', '''')>>':
					cla
					*clr
					portion = input ("How many packages do you want to buy?")

					if portion <= 0:
						cla
						'You change your mind and feel flustered,'
						act 'Move away from the counter':gt 'gaptek', 'start'
					exit
						
					elseif portion > 1 and motherQW < 3:
						portion = 1
						'You quietly think to yourself, while you put most of the packages back on the shelf: "Just the one should be enough. It''s probably better if I don''t buy too many at once, otherwise aunt Luda might become suspicious."'
					end

					if portion * 500 <= money:
						tabletki += portion * 28
						minut += 5
						money -= portion * 500
						gatabletkiday = daystart
						'<center><img src="images/etogame/kassa.jpg"></center>'
						'You pay for the birth control pills and quickly put the strips in your pocket, before anyone sees you buy them.'
					else
						'You can''t afford to buy birth control pills.'
					end

					act 'Move away from the counter':gt 'gaptek', 'start'
				end
			end

			if klisma = 0 and motherQW >= 2 and gaptekfirst = 1:
				act 'Buy the enema kit (500 <b>₽</b>)':
					cla
					*clr
					klisma = 1
					minut += 5
					money -= 500
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You pay for the enema kit and quickly ask your aunt to put it in a paper bag, before the other customers see it.'

					act 'Move away from the counter':gt 'gaptek', 'start'
				end
			end

			act 'Buy antibiotics (500 <b>₽</b>) <<iif(lekarstvo > 0, ''[left:<b>'' + lekarstvo + ''</b>]'', '''')>>':
				cla
				*clr
				portion = input("How many packages do you want to buy? (One package contains 10 pills)")

				if portion <= 0:
					cla
					'You change your mind and feel flustered,'
					act 'Move away from the counter':gt 'gaptek', 'start'
				exit

				end

				if portion * 500 <= money:
					money -= portion * 500
					lekarstvo += portion * 10
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You buy some antibiotics, and put the pills in your pocket.'
				else
					'You can''t afford to buy the antibiotics.'
				end

				act 'Move away from the counter':gt 'gaptek', 'start'
			end

			act 'Buy vitamin tablets (500 <b>₽</b>) <<iif(vitamin > 0, ''[left:<b>'' + vitamin + ''</b>]'', '''')>>':
				cla
				*clr
				portion = input("How many packages do you want to buy? (One package contains 20 tablets)")

				if portion <= 0:
					cla
					'You change your mind and feel flustered,'
					act 'Move away from the counter':gt 'gaptek', 'start'
				exit

				end

				if portion * 500 <= money:
					vitamin += portion * 20
					money -= portion * 500
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You purchase the vitamin tablets and put them in your pocket.'
				else
					'You can''t afford the vitamin tablets.'
				end

				act 'Move away from the counter':gt 'gaptek', 'start'
			end

			act 'Buy painkillers (500 <b>₽</b>) <<iif(painkiller > 0, ''[left:<b>'' + painkiller + ''</b>]'', '''')>>':
				cla
				*clr
				portion = input("How many packs do you want to buy? (One package contains 16 tablets)")

				if portion <= 0:
					cla
					'You change your mind and feel flustered,'
					act 'Move away from the counter':gt 'gaptek', 'start'
				exit

				end

				if portion * 500 <= money:
					painkiller += portion * 16
					money -= portion * 500
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You purchase the painkiller and put them in your pocket.'
				else
					'You can''t afford the painkiller tablets.'
				end

				act 'Move away from the counter':gt 'gaptek', 'start'
			end
		end

		if money >= 600:
			act 'Buy soothing ointment (600 <b>₽</b>) <<iif(mosolmaz > 0, ''[left:<b>'' + mosolmaz + ''</b>]'', '''')>>':
				cla
				*clr
				portion = input("How many packages do you want to buy? (One package contains 10 treatments)")

				if portion <= 0:
					cla
					'You change your mind and feel flustered,'
					act 'Move away from the counter':gt 'gaptek', 'start'
				exit

				end

				if money >= portion * 600:
					money -= portion * 600
					mosolmaz += portion * 10
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You buy some ointment packages and quickly put them in your pocket. The next time your pussy feels sore, these should help.'
				else
					'You can''t afford the ointment.'
				end

				act 'Move away from the counter':gt 'gaptek', 'start'
			end
		end

		if money >= 1000:
			act 'Buy moisturizing lip balm (1,000 <b>₽</b>) <<iif(lipbalm > 0, ''[left:<b>'' + lipbalm + ''</b>]'', '''')>>':
				cla
				*clr
				portion = input("How many lip balms do you want to buy? (One lip balm is good enough for 25 uses)")

				if portion <= 0:
					cla
					'You change your mind and feel flustered,'
					act 'Move away from the counter':gt 'gaptek', 'start'
				exit

				end

				if portion * 1000 <= money:
					lipbalm += portion * 25
					money -= portion * 1000
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You buy the lip balm and put it in your pocket.'
				else
					'You can''t afford the lip balm.'
				end

				act 'Move away from the counter':gt 'gaptek', 'start'
			end
		end

		if money >= 1500:
			act 'Buy fat burners (1,500 <b>₽</b>) <<iif(fatdel > 0, ''[left:<b>'' + fatdel + ''</b>]'', '''')>>':
				cla
				*clr
				portion = input("How many fat burners do you want to buy?")

				if portion <= 0:
					cla
					'You change your mind and feel flustered,'
					act 'Move away from the counter':gt 'gaptek', 'start'
				exit

				end

				if portion * 1500 <= money:
					fatdel += portion
					money -= portion * 1500
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You buy some fat burning capsules and read the box; you have to take these with some water.'
				else
					'You can''t afford the fat burning capsules. Looks like you''ll have to work for it if you want to lose some weight.'
				end

				act 'Move away from the counter':gt 'gaptek', 'start'
			end

			if KandidNapr = 1:
				act 'Buy s cure for your yeast infection (1,500 <b>₽</b>)':
					cla
					*clr
					money -= 1500
					Kandidoz = 0
					'<center><img src="images/etogame/kassa.jpg"></center>'
					'You put the money on the counter and immediately open the package and swallow the tablet. A while later, you feel better.'

					act 'Move away from the counter':gt 'gaptek', 'start'
				end
			end
		end
	end
end

if $ARGS[0] = 'garden':
	if money >= 100 and motherQW >= 2 and gaptekfirst = 1 and gaprezikday ! daystart:
		act 'Buy condoms (100 <b>₽</b>) <<iif(prezik > 0, ''[left:<b>'' + prezik + ''</b>]'', '''')>>':
			cla
			*clr
			portion = input("How many packages you want to buy? (One package contains 5 condoms)")

			if portion <= 0:
				cla
				'You change your mind and feel flustered,'
				act 'Move away from the counter':gt 'gaptek', 'start'
			exit

			end

			if portion > 2 and motherQW < 3:portion = 2 & 'You tell yourself: "Two packages should be enough". You shouldn''t buy too many at once, otherwise your aunt might get suspicious.'
			if portion > 5 and motherQW >= 3:portion = 5 & 'Your aunt laughs and shakes her head. "I''m sorry <<$name>>, I can only give you five. With the amounts you''re buying, the condom factory can barely keep up delivering new stock."'

			if portion * 100 <= money:
				prezik += portion * 5
				minut += 5
				money -= portion * 100
				gaprezikday = daystart
				'<center><img src="images/etogame/kassa.jpg"></center>'
				'You pay for the condoms and quickly put them in your pocket, before anyone sees you buy them.'

				if motherQW < 3:gaogorod += portion
			else
				'You can''t afford the condoms.'
			end

			act 'Move away from the counter':gt 'gaptek', 'start'
		end
	end

	if money >= 200 and motherQW >= 2 and gaptekfirst = 1:
		act 'Buy  pregnancy tests (200 <b>₽</b>) <<iif(pregtest > 0, ''[left:<b>'' + pregtest + ''</b>]'', '''')>>':
			cla
			*clr
			portion = input("How many packages do you want to buy? (One package contains two testers)")

			if portion <= 0:
				cla
				'You change your mind and feel flustered,'
				act 'Move away from the counter':gt 'gaptek', 'start'
			exit

			end

			if portion * 200 <= money:
				pregtest += portion * 2
				minut += 5
				money -= portion * 200
				'<center><img src="images/etogame/kassa.jpg"></center>'
				'You pay for the pregnancy tests and quickly put them in your pocket, before anyone sees you buy them.'

				if motherQW < 3:gaogorod += portion
			else
				'You can''t afford to buy the pregnancy tests, and have to put them back on the counter.'
			end

			act 'Move away from the counter':gt 'gaptek', 'start'
		end
	end

	!! you can only buy lube here if your aunt arranged for it and you haven''t bought any today yet
	if money >= 300 and galubri = 1 and motherQW >= 2 and gaptekfirst = 1 and galubriday ! daystart:
		act 'Buy <b>lubricant</b> (300 <b>₽</b>) <<iif(lubri > 0, ''[left:<b>'' + lubri + ''</b>]'', '''')>>':
			cla
			*clr
			portion = input ("How many tubes do you want to buy? (One tube lasts for 5 uses)")

			if portion <= 0:
				cla
				'You change your mind and feel flustered,'
				act 'Move away from the counter':gt 'gaptek', 'start'
			exit

			end

			if portion > 3:portion = 3 & 'Your aunt shakes her head wearily: "Wow <<$nickname>>, you little vixen! You really love this stuff huh? I''m sorry but I can only sell you three, I need to keep a few in stock for other customers too. We don''t want the whole town to wonder where their supply of lubricant went."'

			if portion * 300 <= money:
				lubri += portion * 5
				minut += 5
				money -= portion * 300
				galubriday = daystart
				'<center><img src="images/etogame/kassa.jpg"></center>'
				'You pay for the lubricant and quickly put the tubes in your pocket, before anyone sees you buy them.'

				if motherQW < 3:gaogorod += portion
			else
				'You can''t afford to buy the lubricant.'
			end

			act 'Move away from the counter':gt 'gaptek', 'start'
		end
	end
end

--- gaptek ---------------------------------

