# music_buskingevents

!! TODO: Add the vocal only scenario
if $ARGS[0] = 'busking':
	ml_buskingtime = 60
	minut += ml_buskingtime
	gs 'exp_gain', 'instrmusic', rand(1,3)
	gs 'exp_gain', 'vokal', rand(1,3)
	
	ml_busking['busking_count'] += 1
	ml_busking['busking_time'] += ml_buskingtime

	if perform_lvl < 50: gs 'exp_gain', 'perform', rand(1,3)
	*clr & cla
	gs 'music_buskingevents', 'calculate_tips'
	money += ml_tipsearned
	gs 'stat'
	
	dynamic '<<$ARGS[1]>>_music += rand(0,3)'
	
	ml_performance['total_time_performed'] += ml_buskingtime
	ml_performance['performed_minutes'] += ml_buskingtime
	ml_busking['busking_count'] += 1
	ml_busking['busking_time'] += ml_buskingtime
	ml_busking['total_earnings'] += ml_tipsearned

!!	TODO: More meat to the scene.	
	'<center><img <<$set_imgh>> src="images/pc/activities/music/guitarf'+ rand(1,2) +'.jpg"></center>'	
	'You start to play the songs you know, pushing your open guitar case forward a little in case people drop some change there.' + iif(ml_online['account'] = 1 and ml_online['active'] = 1, ' You also set up the sign with the link to your webprofile.', '') + ' After playing for an hour you have made <<ml_tipsearned>> <b>P</b> in tips.'

!!	act 'Finish': gt $curloc, 'start'	
!!  Random events come here. The displayed actions depend on the event
	act 'Finish': gs 'music_buskingevents', 'finish'
	killvar 'ml_buskingtime'
end


!! TODO: Add the vocal only scenario
if $ARGS[0] = 'calculate_tips':
	
	if $region = 'city_center' or $region = 'city_park':
		ml_location_mod = 30
	elseif $region = 'pav':
		ml_location_mod = 0
	elseif $region = 'liames':
		ml_location_mod = 15
	end 	

	ml_time_mod = 5
	if week >= 5: ml_time_mod += 10
	if hour >= 17: ml_time_mod += 10
		
	ml_time_loc_mod = (ml_location_mod + ml_time_mod)	

	ml_tipsmax = ((pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*35)) * ml_time_loc_mod)/50	

	ml_tipsearned = (max(rand(ml_time_loc_mod,ml_tipsmax),0)*ml_buskingtime) / 60

	
	killvar 'ml_location_mod'
	killvar 'ml_time_mod'	
	killvar 'ml_tipsmax'
	killvar 'ml_time_loc_mod'
end

!! TODO: Add the vocal only scenario ??
if $ARGS[0] = 'anushka':
	CLOSE ALL
	*clr & cla
	menu_off = 1
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/pc/activities/music/guitarf'+ rand(1,2) +'.jpg"></center>'
	if pcs_instrmusic > 80:
		gs 'npc_relationship', 'modify', 'A144', 'love'
		if npc_rel['A144'] > 50:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she grins and walks over. "Wow, that was amazing, <<$pcs_nickname>>! You should come over and we can jam together some time."' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		elseif npc_rel['A144'] > 20:
			'As you stop playing and get ready to pack up you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she grins and walks over. "Wow, that was amazing, <<$pcs_nickname>>!"' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		else
			'You start losing yourself in the music, occasionally glancing up to look at the people passing by as several leave some rubles in your case. You then see some movement that attracts your attention and spot Anushka watching you play. She seems to have a look of surprise as she bobs her head slightly to the music. You know she doesn''t really like you, but maybe she at least respects your ability. When she sees you looking at her, she disappears into the crowd.'
		end
	elseif pcs_instrmusic > 60:
		gs 'npc_relationship', 'modify', 'A144', 'like'
		if npc_rel['A144'] > 50:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she grins and walks over. "That was pretty damn good, <<$pcs_nickname>>. You should come over and we can jam together some time."' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		elseif npc_rel['A144'] > 20:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she grins and walks over. "That was pretty damn good, <<$pcs_nickname>>."'
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		else
			'You start losing yourself in the music, occasionally glancing up to look at the people passing by as some leave some rubles in your case. You then see some movement that attracts your attention and spot Anushka watching you play. She seems to have a look of mild surprise and respect? You know she doesn''t really like you, but maybe she at least respects your ability. When she sees you looking at her, she disappears into the crowd.'
		end
	elseif pcs_instrmusic > 40:
		gs 'npc_relationship', 'modify', 'A144', 'like'
		if npc_rel['A144'] > 50:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she smiles and walks over. "I didn''t know you had turned into a wandering minstrel, <<$pcs_nickname>>. Not bad, not bad at all. You should come over sometime and we can play together. I can give you some tips if you like?"' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		elseif npc_rel['A144'] > 20:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she smiles and walks over. "I didn''t know you had turned into a wandering minstrel, <<$pcs_nickname>>. Not bad, not bad at all."' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		else
			'You start losing yourself in the music, occasionally glancing up to look at the people passing by as some leave some rubles in your case. You then see some movement that attracts your attention and spot Anushka watching you play. She seems to have a look of mild surprise and maybe even mild approval? You know she doesn''t really like you, but maybe she at least respects your ability. When she sees you looking at her, she disappears into the crowd.'
		end
	elseif pcs_instrmusic > 20:
		if npc_rel['A144'] > 50:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she smiles and walks over. "Not bad, <<$pcs_nickname>>, not bad. I''ve heard better, but also heard worse too. You should come over sometime and we can play together. I can teach you a few things if you like?"' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		elseif npc_rel['A144'] > 20:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly.'
			'When she notices that you saw her, she smiles and walks over. "Not bad, <<$pcs_nickname>>, not bad. I''ve heard better, but also heard worse too."' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a smile and a wave.'
		else
			'You start losing yourself in the music, occasionally glancing up to look at the people passing by as a few leave some rubles in your case. You then see some movement that attracts your attention and spot Anushka watching you play. She seems to have a look of disdain on her face; you know she doesn''t really like you, but had hoped she would respect your ability at least. When she sees you looking at her, she scoffs before walking away.'
		end
	else
		gs 'npc_relationship', 'modify', 'A144', 'dislike'
		if npc_rel['A144'] > 50:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly with a pained expression on her face.'
			'When she notices that you saw her, she forces a smile to her face. "You need to practice. A lot. Honestly, I wouldn''t even be playing in public with that lack of skill."'
			'You frown. "I''m trying!"'
			'She sighs. "Stop by some time and I can teach you the basics you need to know."' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away with a hint of disappointment on her face.'
		elseif npc_rel['A144'] > 20:
			'As you stop playing and get ready to pack up, you spot Anushka standing not far from you, watching you quietly with a pained expression on her face.'
			'When she notices that you saw her, she forces a smile to her face. "My god, that physically hurt my soul it was so bad! I''ve heard two cats fucking that sounded more pleasant than that!"'
			'You frown. "I''m trying! I''ve been practicing!"'
			'She shakes her head slightly. "Well you need to practice some more. Honestly you shouldn''t even play in public until you''re a lot better than that."' 
			'The two of you talk for a few minutes about music before she says she needs to get going. She walks away clearly a little disappointed in your performance.'
		else
			'You start losing yourself in the music, occasionally glancing up to look at the people passing by. Most seem to hurry by to try and get away from the racket you''re making as you see some movement that attracts your attention and you spot Anushka watching you play. She seems to have a look of utter pain and disdain on her face; she clearly doesn''t approve of your lack of musical talent. When she sees you looking at her, she scoffs and shakes her head in disgust before walking away.'
		end
	end
	act 'Finish': gs 'music_actions', 'finish'
end

if $ARGS[0] = 'lena_and_lera':
!!TODO: Harassment scene
	pcs_mood -= 10
	*nl
	'Lena and Lera harasses <<$pcs_nickname>>'
	act 'Finish': gs 'music_actions', 'finish'
end

if $ARGS[0] = 'finish':
	ml_rand_event = rand(0,100)
	if ml_rand_event <= 10 and $region = 'pav' and npc_rel['A144'] > 40: 
		gs 'music_buskingevents', 'anushka'
	elseif ml_rand_event <= 30 and $region = 'pav' and ml_delparcoQW['Stage'] = 0:
		gs 'music_gigstarts', 'zariyah_passing_by'
!!	elseif ml_rand_event < 15 and $ARGS[1] = 'pav' and ((npc_rel['A20'] < 20 or npc_rel['A21'] < 20):
!! TODO: if the gopniks don''t like the PC and/or her music is awful, there is a chance that Lena and Lera harasses her.
!!		gs 'music_buskingevents', 'lena_and_lera', 1
!!	elseif ml_rand_event < 15 and $ARGS[1] = 'pav' and ( (npc_rel['A20'] < 40 or npc_rel['A21'] < 40) and (pcs_instrmusic < 30 or pcs_perform < 30 or pcs_vokal < 30) ):
!!		gs 'music_buskingevents', 'lena_and_lera', 2
	else
		gs 'music_actions', 'finish'
	end
end
--- music_buskingevents ---------------------------------
