# city_musicstore

if $ARGS[0] = 'musicshop':
	*clr & cla	
	if ml_musicstorevisited = 0:
		ml_musicstorevisited = 1
		gt 'city_musicstore', 'firstvisit'
	elseif ml_didntbuyguitarthefirstvisit = 1:
		gt 'city_musicstore', 'cameback'
	else
		'<center><img src="images/locations/city/citycenter/mall/musicstore/music_store.jpg"></center>'
		'You enter the store, welcomed by the familiar mix of random notes and bits of songs screaming from the back.'
		act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
		!{ act 'Try some guitars':
			!!TO DO: Better scenes here
			if pcs_instrmusic < 30 and pcs_perform < 10:
				'You pick up a guitar you like the look of, but are too shy to play it. After strumming a few chords, you put it back on it''s stand.'
			else
				'Some texts here depending on music skill and performing skill'			
			end
		end }
		act 'Leave': 
			if ml_boughtguitar > 0 or ml_boughtamp > 0:
				gt 'city_musicstore', 'payandtakestuff'
			end
			gt 'torgcentr'
		end

		musicrand = rand(1,2)
		if musicrand = 1 and yearstart >= 2 and (week > 5 and hour >= 8 and hour < 17):
			'As you approach the counter, you see your old classmate Radomir standing behind it.'
			act 'Approach the counter':
				*clr
				delact 'Approach the counter'
				gs 'npc_relationship', 'modify', 'A154', 'like'
				gs 'stat'
				'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big154.jpg"></center>'
				if npc_rel['A154'] >= 60:
					if hotcat >= 6:
						'He gives you a smile when he sees you. "Come to hang out with me on my break? Maybe we can have a little fun?" he asks with a wink.'
						'You smile. "No, I just came to look around and maybe do a little shopping."'
						'He smiles and starts telling you about a variety of instruments. He seems to really know his stuff.'
					else
						'He gives you a slight knowing smirk when he sees you. "So what can I do for one of my fans?"'
						'"I just came to look around and maybe do a little shopping," you reply.' 
						'He nods and starts telling you about a variety of instruments. He seems to really know his stuff.'
					end
				elseif npc_rel['A154'] <= 20:
					'He visibly sighs when he sees you and does his best to ignore you, though he answers any questions about instruments that you ask with the barest amount of information.'
				else
					if hotcat >= 6:
						'Radomir is talking about the band''s latest gig as you approach. He looks your body up and down when he sees you. "Nice to see all the working out is paying off. Looking good."'
						'You smile. "Thanks, but I just came to look around and maybe do a little shopping."'
						'He nods and starts telling you about a variety of instruments. He seems to really know his stuff.'
					else
						'He smirks when he sees you. "Come to try and butter me up before I get famous?"' 
						'You ignore his comment and ask him about some of the instruments.'
						'He nods and starts telling you about a variety of instruments. He seems to really know his stuff.'
					end
				end
			end
		else
			'Jimmy just nods at you, then returns his attention to the guitar laying on the counter in front of him.'
		end
	end
end

if $ARGS[0] = 'firstvisit':
	musicrand = rand(1,5)
	if musicrand = 1:
		'<center><img src="images/locations/city/citycenter/mall/musicstore/boys_rocking.jpg"></center>'
		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums and even keyboards. In the back are three teenage boys trying to play some of the guitars. They''re loud and not very good...'
		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
	elseif musicrand = 2:
		'<center><img src="images/locations/city/citycenter/mall/musicstore/nostairways.jpg"></center>'
		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums and even keyboards.'
		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
		'He suddenly turns and throws a sponge at one of the boys playing in the back. "No. Stairway. To. Heaven!" he growls and points at the sign on the wall before turning back to you.'
	else
		'<center><img src="images/locations/city/citycenter/mall/musicstore/music_store.jpg"></center>'
		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums and even keyboards.'
		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
	end
	
	act 'Approach the counter':
		*clr & cla
		'<center><img src="images/locations/city/citycenter/mall/musicstore/jimmy.jpg"></center>'
		'He straightens up. "Hello there, I''m Jimmy! Is there anything I can help you with?"'
		act 'Look for a guitar':
			*clr & cla
			'<center><img src="images/locations/city/citycenter/mall/musicstore/cheap_acoustic_1.jpg"></center>'		
			'You start browsing the guitars on offer, but aren''t sure what you''re looking and gladly accept his help. After answering his questions about what you''re looking for, he finally picks up an affordable acoustic guitar as a recommendation.'
			'He leaves you alone with the instrument, so you sit down to try it. You strum the chords that you know, trying to play something.'
			if money > 3400 or karta > 3400:
				if money < 14280 and karta < 14280:
					'While the guitar isn''t the best sounding, it''s comfortable and looking at the price tags, the only one you can afford.'
				else 
					'The guitar isn''t the best sounding. However, looking at the price tags on the others, you''re not sure if you should spend so much money on a better one until you''re better at playing.'
				end
				if money > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with cash': gt 'city_musicstore', 'buycheapacoustic', 'money'

				if karta > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with card': gt 'city_musicstore', 'buycheapacoustic', 'karta'						
				act 'You have to think about it':
					ml_didntbuyguitarthefirstvisit = 1
					'You hesitate before deciding not to buy it, at least not for now. "I''ll have to talk to think about it first," you tell Jimmy.'
					'He nods. "You know what? I''ll put it aside for you in case you change your mind, but be quick before someone else beats you to it!" He scribbles something on a post-it note and sticks it on the guitar. "I''ll try to keep the price the same, 3,400 <b>₽</b>."'
					act 'Leave': gt 'torgcentr'
				end
			else
				ml_didntbuyguitarthefirstvisit = 1
				'While the guitar isn''t the best sounding, it is comfortable. Unfortunately, while it''s cheaper than the rest, it still costs more than you have. You hand it back to Jimmy with a sigh. "Sorry, but I can''t buy it right now."'
				'He nods. "You know what? I''ll put it aside for you in case you change your mind, but be quick before someone else beats you to it!" He scribbles something on a post-it note and sticks it on the guitar. "I''ll try to keep the price the same, 3,400 <b>₽</b>."'
				act 'Leave': gt 'torgcentr'
			end				
		end
		act 'Leave': 
			ml_didntbuyguitarthefirstvisit = 1		
			gt 'torgcentr'
		end
	end
	act 'Leave': 
		ml_didntbuyguitarthefirstvisit = 1		
		gt 'torgcentr'
	end
end


if $ARGS[0] = 'cameback':
	*clr & cla
	'<center><img src="images/locations/city/citycenter/mall/musicstore/music_store.jpg"></center>'
	*nl
	'You enter the store, passing the door to be submerged in a loud, cacophony environment.'
	if money > 3400 or karta > 3400: 
		act 'Ask Jimmy about the guitar':
			cla
			'<center><img src="images/locations/city/citycenter/mall/musicstore/jimmy.jpg"></center>'
			'You walk up to the counter where Jimmy is busy tinkering with a guitar.'
			'"Hey Jimmy, I was wondering if you still have that guitar?"'
			'He looks up from the guitar. "Oh hey. Sure, I have it. Let me get it for you."'
			'He disappears for a while before he brings the guitar out. "See, all in good shape. Properly set up and everything."'
			if money > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with cash': gt 'city_musicstore', 'buycheapacoustic', 'money'
			if karta > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with card': gt 'city_musicstore', 'buycheapacoustic', 'karta'						
		end
	end
	act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
	act 'Try some guitars': 
		'<center><img src="images/locations/city/citycenter/mall/musicstore/try_guitars.jpg"></center>'
		!! TO DO: Better scenes here			
		if pcs_instrmusic < 30 and pcs_perform < 10:
			'You pick up a guitar you like the look of, but are too shy to play it. After strumming a few chords, you put it back on it''s stand.'
		else
			'Some texts here depending on music skill and performing skill'			
		end
	end
	act 'Leave': 
		if ml_boughtguitar > 0 or ml_boughtamp > 0:
			gt 'city_musicstore', 'payandtakestuff'
		end
		gt 'torgcentr'
	end
end


if $ARGS[0] = 'buycheapacoustic':
	*clr & cla
	'<center><img src="images/locations/city/citycenter/mall/musicstore/starterkit.jpg"></center>'
	if ml_didntbuyguitarthefirstvisit = 1:
		'You decide to buy the guitar and take it to the counter, where Jimmy throws in a gigbag and a set of strings and picks. "A proper starter kit," he states and rings up the purchase.'
		killvar 'ml_didntbuyguitarthefirstvisit'
	else
		'Jimmy puts the guitar in a gigbag and drops a set of strings and picks in the pocket. "A proper starter kit," he states and rings up the purchase.'
	end
	'He looks at you thoughtfully, then drops a thick, slightly worn booklet in the bag. "Some stuff to learn from," he says while handing your purchase to you. "Congratulations, welcome to the starving musician community."'
	
	gs 'city_musicstore', 'first_setup'
	
	if $ARGS[1] = 'money': money -= 3400
	if $ARGS[1] = 'karta': karta -= 3400
	gs 'stat'
	act 'Leave': gt 'torgcentr'
end

if $ARGS[0] = 'payandtakestuff':
	if ml_boughtamp + ml_guitar['carried'] > 0 or ml_boughtguitar > 1:
		minut += (ml_boughtguitar * 5) + (ml_boughtguitar * 5)
		'Jimmy takes your details and your home address after you pay to set up the delivery. "It should be there tomorrow."'
	else	
		minut += 20
        ml_guitar['carried'] = 1
		'Jimmy disappears into the back of the shop with your guitar before returning 10 minutes later. "That''s it all set up, but if you need to tweak anything, just bring it in and we''ll do it for you, free of charge."'
		'He puts the guitar in ' + iif(ml_gigbag = 1, 'a gigbag', '') + iif(ml_hardcase = 1, 'its case', '') + ' and hands it to you. "All the best, <<$pcs_nickname>>."'
	end
	killvar 'ml_boughtamp'
	killvar 'ml_boughtguitar'
	killvar 'ml_gigbag'
	killvar 'ml_hardcase'
	act 'Leave': gt 'torgcentr'
end

if $ARGS[0] = 'first_setup':
	!! First instrument and other items
	ml_guitars['jb-budget-acoustic'] = 1
	ml_strings = 2
	ml_guitar['chordbook'] = 1
	ml_guitar['hasguitar'] = 1 
	ml_guitar['carried'] = 1

	!! Has to set it here as cikl calculates it otherwise at midnight
	ml_performance['max_perform_minutes'] = pcs_instrmusic + pcs_vokal
	ml_performance['performed_minutes'] = 0
end

--- city_musicstore ---------------------------------
