Browse Source

Merge remote-tracking branch 'netuttki/master'

KevinSmarts 4 years ago
parent
commit
bfb5ba8135

+ 2 - 0
.gitignore

@@ -16,3 +16,5 @@ VideoDecodeStats/CURRENT
 VideoDecodeStats/LOCK
 VideoDecodeStats/LOG
 VideoDecodeStats/LOG.old
+
+glmf.code-workspace

+ 0 - 0
glmf.code-workspace


+ 3 - 0
locations/AlbStars.qsrc

@@ -264,6 +264,7 @@ if $ARGS[0] = 'starlets':
 	timemult = 0
 	pcs_mood -= 5
 	inhib_exp += rand(2,4)
+	if perform_lvl < 35: perform_exp += 1
 
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/shared/gym/fit1.jpg"></center>'
@@ -311,6 +312,8 @@ if $ARGS[0] = 'starlets':
 				dynamic $showerdin
 				profiDanceTime += 1
 				inhib_exp += rand(3,5)
+				if perform_lvl < 35: perform_exp += rand(1,2)
+				
 				gs 'stat'
 				'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/albina/dance.jpg"></center>'
 				'Albina calls for a car. Once the car arrives, you all bundle in. You arrive at a building with a large hall, where people are sitting around a stage.'

+ 2 - 0
locations/Cheatmenu_din.qsrc

@@ -1115,6 +1115,8 @@ $cheatmenu['stats'] = {
 	*p 'Instruments (<<instrmusic_lvl>>) - Total (<<pcs_instrmusic>>): ' & dynamic $cheatmenu['printStatLinks'], 'instrmusic', 'Instrumental Music'
 	*p 'Photography (<<photoskl_lvl>>) - Total (<<pcs_photoskl>>): ' & dynamic $cheatmenu['printStatLinks'], 'photoskl', 'Photography'
 	*p 'Artistic (<<artskls_lvl>>) - Total (<<pcs_artskls>>): ' & dynamic $cheatmenu['printStatLinks'], 'artskls', 'Artistic Skills'
+	*p 'Performing (<<perform_lvl>>) - Total (<<pcs_perform>>): ' & dynamic $cheatmenu['printStatLinks'], 'perform', 'Performance'
+	*p 'Music Production (<<musicprod_lvl>>) - Total (<<pcs_musicprod>>): ' & dynamic $cheatmenu['printStatLinks'], 'musicprod', 'Music Production'
 	*nl
 	*pl'<b>Dance:</b>'
 	*p 'Modern Dance (<<danc_lvl>>) - Total (<<pcs_danc>>): ' & dynamic $cheatmenu['printStatLinks'], 'danc', 'Modern Dancing'

+ 40 - 18
locations/anushapt.qsrc

@@ -990,27 +990,49 @@ if $ARGS[0] = 'guitar':
 		'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
 		'You check out the two guitars. One of them is an acoustic guitar that looks fairly old, but well cared for. The other is a electric guitar that looks a lot newer and more expensive.'
 		act 'Look at something else':gt 'anushapt','anushroom'
-		act 'Pretend to play':
-			minut += 10
-			pcs_mood += 10
-			instrmusic_exp += rand(0,1) 
-			gs 'stat'
-			'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
-			'You decide to live out one of your fantasies. You''ve always wanted to play the guitar. You grab hold of the guitar then you begin to pretend to play. You putg on a show as if you were a real rock star. After a while, you need to catch your breath. Playing was a lot harder than you thought.'
-			act 'Put the guitar back':gt 'anushapt','anushroom'
+		if instrmusic_lvl < 5:
+			act 'Pretend to play':
+				*clr & cla
+				minut += 10
+				pcs_mood += 10
+				instrmusic_exp += rand(0,1) 
+				gs 'stat'
+				'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
+				'You decide to live out one of your fantasies. You''ve always wanted to play the guitar. You grab hold of the guitar then you begin to pretend to play. You putg on a show as if you were a real rock star. After a while, you need to catch your breath. Playing was a lot harder than you thought.'
+				act 'Put the guitar back':gt 'anushapt','anushroom'
+			end
 		end
 		act 'Try to play it':
 			*clr & cla
-			instrmusic_exp += rand(0,2)
-			pcs_mood += 5
-			minut += 20
-			gs 'pain', 1, 'fingers', 'ache'
-			gs 'stat'
-			'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
-			'You gently brush your fingers over the strings. The feeling of the course strings against them is exhilarating. You come up with a song you want to try and play and start to work your magic...'
-			'Unfortunately, playing the guitar is a lot harder than it looks. It takes you several minutes to hit the right notes and several more to play even the tiny first fraction of the song without making a mistake. The strings cut into your tender, uncalloused fingertips and after about 20 minutes you decide to stop for now.'
-			'Learning how to play the guitar can be a frustrating, painful, and frustrating experience you realize... Yet, you cannot help, but to gently stroke the guitar once more before putting it back in its stand. You look forward to trying to play again.'
-			act 'Put the guitar back':gt 'anushapt','anushroom'
+			if instrmusic_lvl < 10:
+				instrmusic_exp += rand(0,2)
+				pcs_mood += 5
+				minut += 20
+				gs 'pain', 1, 'fingers', 'ache'
+				gs 'stat'
+				'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
+				'You gently brush your fingers over the strings. The feeling of the coarse strings against them is exhilarating. You come up with a song you want to try and play and start to work your magic...'
+				'Unfortunately, playing the guitar is a lot harder than it looks. It takes you several minutes to hit the right notes and several more to play even the tiny first fraction of the song without making a mistake. The strings cut into your tender, uncalloused fingertips and after about 20 minutes you decide to stop for now.'
+				'Learning how to play the guitar can be a frustrating, painful, and frustrating experience you realize... Yet, you cannot help, but to gently stroke the guitar once more before putting it back on its stand. You look forward to trying to play again.'
+				act 'Put the guitar back':gt 'anushapt','anushroom'
+			elseif instmusic_lvl < 20:
+				instrmusic_exp += rand(0,20)
+				pcs_mood += 5
+				minut += 20
+				'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
+				'You gently brush your fingers over the strings then slowly start to pick at them, playing a few tunes and strumming some chords, then you try to play some songs that you started to learn.'
+				'Finally you put the guitar back on its stand.'
+				act 'Put the guitar back':gt 'anushapt','anushroom'
+			else
+				instrmusic_exp += rand(0,20)
+				pcs_mood += 5
+				minut += 20
+				'<center><img src="images/locations/pavlovsk/resident/apartment/anushapt/anushroom/guitar.jpg"></center>'
+				'You pick up the guitar, running your hand along the neck, picking a few chords, then flick your hair back and start to play the latest song you''ve learned,, quietly singing along, before switching to another one.'
+				'Your fingers dance gracefully over the strings, and you spend a long time just having fun with Anushka''s guitar.'
+				'<<$OpenInnerThought>>"Maybe I should come over with mine and see what we could play together"<<$CloseInnerThought>> you muse as you place the instrument back on its stand.'
+				act 'Put the guitar back':gt 'anushapt','anushroom'
+			end
 		end
 	end
 end

+ 3 - 1
locations/bed.qsrc

@@ -5,7 +5,9 @@ if $ARGS[0] = 'start':
 	menu_off = 1
 	shour = 24 - hour
 	gs 'stat'
-
+	ml_guitar['carried'] = 0
+	ml_guitarAtHome = 1
+	
 	if hour > 22 and rand(0, 100) < 2 and houserab = 1 and houserabday ! daystart and pcs_sleep < 50 and tanhouse1 = 1:gt 'bed', 'rab'
 	if hour > 22 and rand(0, 200) = 0 and housrA = 1 and husband = 0:gt 'bed', 'vor'
 

+ 54 - 40
locations/bedrPar.qsrc

@@ -254,23 +254,60 @@ if pcs_sewng >= 80:
 	end
 end
 
-if ml_guitarWithMe = 1:
+if ml_guitar['carried'] = 1:
 	act 'Place the guitar next to your desk': 
-		ml_guitarWithMe = 0
-		ml_guitarAtHome = 1
+		ml_guitar['carried'] = 0
 		gt 'bedrPar', 'start'
 	end
-elseif ml_guitarAtHome = 1:
+elseif ml_guitar['hasguitar'] and ml_guitar['carried'] = 0:
 	act 'Pick up the guitar':
-		ml_guitarWithMe = 1
-		ml_guitarAtHome = 0
+		ml_guitar['carried'] = 1
 		gt 'bedrPar', 'start'
 	end
 end
 
-if hour > 8 and hour < 20:
+			
+if ml_online['account'] = 0 and internet > 0:
+	act 'Set up an online music account (0:30)': gt 'music_onlinemusic', 'setupAccount'
+end
+
+!!Uploading recorded music if there are any not uploaded yet
+if ml_uploadablemusic > 0 and internet > 0 and ml_online['account'] = 1:
+	if pcs_inhib < 30:
+		if pcs_inhib < 10: 
+			$diff = 'hard'
+		elseif pcs_inhib < 20: 
+			$diff = 'medium'
+		else 
+			$diff = 'easy'
+		end
+		gs 'willpower', 'skill', 'self', $diff
+
+		will_cost = (will_cost * 2) - (pcs_perform)
+		if will_cost <= pcs_willpwr:
+			act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
+		else	
+			act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+		end
+	end
+	act 'Upload music': gt 'music_onlinemusic', 'uploadallmusic'
+end
 
-	if ml_guitar = 1 and (ml_chordbook = 1 or ml_guitarlessoncount > 0) and ml_performed_minutes <= ml_maxperform_minutes:
+if ml_uploadablemusic > 0:
+	act 'Delete old recordings': gt 'music_onlinemusic', 'deleteoldmusic'
+end
+
+if hour > 8 and hour < 22:
+
+	if ml_guitar['hasguitar'] = 1:
+		act 'Play something on the guitar (10 minutes)':
+			mood += 10
+			'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
+			'You hum along the tune, relaxing into the music, just enjoying it. When you look up a quarter of an hour passed and you are in a much better mood.'
+		end
+	end
+
+	if ml_guitar['hasguitar'] = 1 and (ml_guitar['chordbook'] = 1 or ml_guitarlesson['lessoncount'] > 0) and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and alko < 5:
 		if sisterHere = 1 and pcs_inhib < 30:
 			if pcs_inhib < 10: 
 				$diff = 'hard'
@@ -283,7 +320,7 @@ if hour > 8 and hour < 20:
 			will_cost = (will_cost * 3) - (pcs_perform)
 			if will_cost <= pcs_willpwr:
 				act 'Practice guitar (0:30) (<<will_cost>> Willpower)': 
-					inhib_exp += rand(0,1)
+					inhib_exp += rand(1,2)
 					gs 'willpower', 'pay', 'self'
 					gs 'stat'
 					gt 'music_bedroomPractice', 'guitar'
@@ -295,13 +332,11 @@ if hour > 8 and hour < 20:
 			act 'Practice guitar (0:30)': gt 'music_bedroomPractice', 'guitar'
 		end
 	end
-			
-	if ml_online['account'] = 0 and internet > 0:
-		act 'Set up an online music account (0:30)': gt 'music_onlinemusic', 'setupAccount'
-	end
 
 	!! Streaming music 
-	if ml_guitar = 1 and ml_online['account'] = 1 and internet > 0 and sisterHere = 0 and ml_performed_minutes <= ml_maxperform_minutes:
+	if ml_guitar['hasguitar'] = 1 and ml_online['account'] = 1 and internet > 0 and sisterHere = 0 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and ml_performance['max_perform_minutes'] >= 15 and alko < 5 and ml_streaming['lastday'] ! daystart:
+		ml_streamtime =  min((ml_performance['max_perform_minutes']-ml_performance['performed_minutes']), 60)
+
 		if pcs_inhib < 30:
 			if pcs_inhib < 10: 
 				$diff = 'hard'
@@ -314,22 +349,22 @@ if hour > 8 and hour < 20:
 			will_cost = (will_cost * 3) - (pcs_perform)
 	
 			if will_cost <= pcs_willpwr:
-				act 'Live stream (1:00) (<<will_cost>> Willpower)': 
+				act 'Live stream (<<ml_streamtime>> minutes) (<<will_cost>> Willpower)': 
 					inhib_exp += rand(1,3)	
 					gs 'willpower', 'pay', 'self'
 					gs 'stat'
 					gt 'music_onlinemusic', 'liveStream'
 				end
 			else	
-				act 'Live stream (1:00) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+				act 'Live stream (<<ml_streamtime>> minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 			end
 		else 
-			act 'Live stream (1:00)': gt 'music_onlinemusic', 'liveStream'			
+			act 'Live stream (<<ml_streamtime>> minutes)': gt 'music_onlinemusic', 'liveStream'			
 		end
 	end
 
 	!! Recording music
-	if ml_guitar = 1 and sisterHere = 0 and ml_performed_minutes <= ml_maxperform_minutes:
+	if ml_guitar['hasguitar'] = 1 and sisterHere = 0 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and alko < 5:
 		if pcs_inhib < 20:
 			if pcs_inhib < 10: 
 				$diff = 'medium'
@@ -365,30 +400,9 @@ if hour > 8 and hour < 20:
 		end
 	end
 
-		!!Uploading recorded music if there are any not uploaded yet
-	if ml_uploadablemusic > 0 and internet > 0 and ml_online['account'] = 1:
-		if pcs_inhib < 30:
-			if pcs_inhib < 10: 
-				$diff = 'hard'
-			elseif pcs_inhib < 20: 
-				$diff = 'medium'
-			else 
-				$diff = 'easy'
-			end
-			gs 'willpower', 'skill', 'self', $diff
-
-			will_cost = (will_cost * 2) - (pcs_perform)
-			if will_cost <= pcs_willpwr:
-				act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
-			else	
-				act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
-			end
-		end
-		act 'Upload music': gt 'music_onlinemusic', 'uploadallmusic'
-	end
 end
 
-
+ !! if ml_deparcoQW > 3: act 'Rehearse for your show': gt 'music_bedroomPractice', 'rehearsing'
 
 if sisterHere = 0 and breastpump = 1 and bp_unbox <= 0:
 	'<a href="exec: gt ''lact_bp'', ''bp_unbox_event''">Unbox</a> your breast pump'

+ 4 - 0
locations/brother.qsrc

@@ -1,6 +1,10 @@
 # brother
 
 brotherAge = year - ((npc_dob['A34'] - (npc_dob['A34'] mod 10000)) / 10000)
+
+!! This is a temporary patch!
+BrotherHappy = 1
+
 if (npc_dob['A34'] mod 10000)/100 > month: brotherAge -= 1
 if (npc_dob['A34'] mod 10000)/100 = month and (npc_dob['A34'] mod 100) > day: brotherAge -= 1
 

+ 6 - 1
locations/cafe_parco.qsrc

@@ -29,10 +29,15 @@ if $args[0]= 'inner':
 		act 'Order take-out (0:20) (350 <b>₽</b>)':money -= 350 & gt 'food', 'f_food'
 	end
 
-	if ml_venues['del_parco'] = 1 and (ml_delparcoQW = 1 or ml_delparcoQW = 2) and (delparcogigdeadline-6 >= daystart and delparcogigdeadline <= daystart):
+	if ml_venues['del_parco'] = 1 and (ml_delparcoQW = 1 or ml_delparcoQW = 2) and (daystart <= ml_delparcogigdeadline):
 		act 'Speak with Zariyah about her offer': gt 'music_delparco', 'talkwithzariyah'
 	end
 
+
+	if ml_venues['del_parco'] = 1 and ml_delparcoQW = 3 and (daystart ! ml_delparcogigdeadline):
+		act 'Accept Zariyah''s offer': gt 'music_delparco', 'acceptafterthinking'
+	end
+
 	if ml_venues['del_parco'] = 1 and ml_delparcoQW > 2 and ml_gigday['delparco'] = daystart and ml_gighour['delparco'] = hour:
 		act 'Perform at the cafe': gt 'music_delparco', 'eveningshow'
 	end

+ 21 - 12
locations/cikl.qsrc

@@ -1863,19 +1863,20 @@ end
 !! How many hours a day can Sveta perform. It maxes out at 3.
 !! Using the actual skill level, not the one modified by Attributes because that is more realistic for this.
 
-ml_maxperform_minutes = instrmusic_lvl + vocal_lvl
-ml_performed_minutes = 0
+ml_performance['max_perform_minutes'] = pcs_instrmusic + pcs_vokal
+ml_performance['performed_minutes'] = 0
 
 
 !! Calculating the fame increase from the uploaded songs and removing ones that do not effect fame anymore to keep the 
 !! data at a sane level
 if ml_onlinesongcount > 0:
 	i = 0
-	j = 0
+	j = -1
     
 	:looponlinesongs        
 !!      this so every song counts only every 7 days and only for a limited number of weeks 
 		if ml_onlinesong_freshness[i] > 0:		
+			j += 1
 			ml_tempsong_freshness[j] = ml_onlinesong_sfreshness[i]
 			ml_tempsong_lastcalcday[j] = ml_onlinesong_lastcalcday[i]
 			ml_tempsong_hotcat[j] = ml_onlinesong_hotcat[i]
@@ -1889,7 +1890,6 @@ if ml_onlinesongcount > 0:
             	ml_tempsong_lastcalcday[j] = daystart
 
 			end
-			j += 1
 		end
 		i += 1
 	if i < ml_onlinesongcount: jump 'looponlinesongs'
@@ -1902,14 +1902,16 @@ if ml_onlinesongcount > 0:
 
 	i = 0
 	
-	:looprebuildsongs
-		ml_onlinesong_freshness[i] = ml_tempsong_freshness[i]
-		ml_onlinesong_hotcat[i] = ml_tempsong_hotcat[i]
-		ml_onlinesong_lastcalcday[i] = ml_tempsong_lastcalcday[i]
-		ml_onlinesong_skilllevel[i] = ml_tempsong_skilllevel[i]
-		ml_onlinesong_uploaded[i] = ml_tempsong_uploaded[i]
-		i += 1
-	if i < j: jump 'looprebuildsongs'
+	if j >= 0:
+		:looprebuildsongs
+			ml_onlinesong_freshness[i] = ml_tempsong_freshness[i]
+			ml_onlinesong_hotcat[i] = ml_tempsong_hotcat[i]
+			ml_onlinesong_lastcalcday[i] = ml_tempsong_lastcalcday[i]
+			ml_onlinesong_skilllevel[i] = ml_tempsong_skilllevel[i]
+			ml_onlinesong_uploaded[i] = ml_tempsong_uploaded[i]
+			i += 1
+		if i <= j: jump 'looprebuildsongs'
+	end
 
 	killvar 'ml_tempsong_freshness'
 	killvar 'ml_tempsong_lastcalcday'
@@ -1919,5 +1921,12 @@ if ml_onlinesongcount > 0:
 
 end
 
+
+!! Repertoire quality decay if no practice is done
+if ml_performance['set_lastpracticeday'] ! (daystart-1): repertoire_quality -= 2
+
+
+
+
 --- cikl ---------------------------------
 

+ 5 - 4
locations/city_center.qsrc

@@ -101,9 +101,10 @@ if shantpopala > 0:
 	exit
 end
 
-if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitar['carried'] = 1 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and ml_performance['max_perform_minutes'] >= 15:
 	*nl
 	'With the weather being pleasant and sunny, there are groups of people moving around the streets. You could play some music, practice performing songs and maybe make some money too.'
+	ml_buskingtime =  min((ml_performance['max_perform_minutes']-ml_performance['performed_minutes']), 60)	
 	if pcs_inhib < 30: 
 		if pcs_inhib < 10: 
 			$diff = 'hard'
@@ -116,18 +117,18 @@ if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitarWit
 		gs 'willpower', 'skill', 'self', $diff
 		will_cost = (will_cost * 3) - (pcs_perform)
 		if will_cost <= pcs_willpwr:
-			act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+			act 'Start busking (<<ml_buskingtime>> minutes) (<<will_cost>> Willpower)': 
 				inhib_exp += rand(1,3)
 				gs 'willpower', 'pay', 'self'
 				gs 'stat'
 				gs 'music_buskingevents', 'busking', 'city'
 			end
 		else	
-			act 'Start busking (1 hour) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+			act 'Start busking (<<ml_buskingtime>> minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 		end
 		
 	else
-		act 'Start busking (1 hour)': gs 'music_buskingevents', 'busking', 'city'
+		act 'Start busking (<<ml_buskingtime>> minutes)': gs 'music_buskingevents', 'busking', 'city'
 	end	
 end
 

+ 1 - 1
locations/city_drugden.qsrc

@@ -164,7 +164,7 @@ if $ARGS[0] = 'heroin':
 	gs 'stat'
 	'<center><b>Local drug den</b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/den/narkopriton.jpg"></center>'
-	'"That''ll be 300 <b>₽</b>," he says.'
+	'"That''ll be 420 <b>₽</b>," he says.'
 	act 'Leave the drug den': minut += 5 & gt 'city_residential'
 	if money >= 420:
 		act 'Buy and use heroin (420 <b>₽</b>)':

+ 44 - 43
locations/city_musicstore.qsrc

@@ -47,38 +47,38 @@ if $ARGS[0] = 'firstvisit':
   	'Suddenly he 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.'
  	'<center><img src="images/locations/city/citycenter/mall/musicstore/nostairways.jpg"></center>'
 
-	if guitar = 0:
-			act 'Look for a guitar':
-				*clr & cla
-				'<center><img src="images/locations/city/citycenter/mall/musicstore/cheap_acoustic_1.jpg"></center>'		
-				'You start to browse the guitars in the shop, not entirely sure what you are looking for and gladly accept the help of the store clerk. After answering his questions and chatting about music and what you are looking for he finally picks up an affordable acoustic guitar as a recommendation.'
-				'After some conversation with the store owner he offers you an affordable acoustic guitar to buy'
-				'Jimmy leaves you alone with the instrument, so you sit down to try it, strumming the chords that you know, trying to play something.'
-				if money > 3400 or karta > 3400:
-					if money < 14280 and karta < 14280:
-						'While the guitar is not the best sounding one it''s comfortable and looking at the price tags, the only one you can afford.'
-					else 
-						'While the guitar is not the best sounding one it''s comfortable and looking at the price tags, you are not sure you should spend too much money until you are better at playing the guitar.'
-					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 for a moment, unsure whether to buy it or not and finally decide to not do it, at least not now. "I will have to talk to my mum first" you say to Jimmy. '
-						'He just nods "Don''t worry <<$pcs_name>>. You know what, I will put it aside for you for a bit in case you change your mind". He scribbles something on a post-it note, and sticks it on the guitar "I will try to keep the price the same, 3,400 rubels."'
-						act 'Leave': gt 'torgcentr'
-					end
-				else
-					ml_didntbuyguitarthefirstvisit = 1
-					'While the guitar is not the best sounding one it''s comfortable. Unfortunately while it''s cheaper than the rest, it still costs more than you have. With a sigh you hand it back to Jimmy "I''m sorry, but, I can''t buy it now."'
-					'He just nods "Don''t worry, I tell you what, I will put it aside for you if you change your mind. He scribbles something on a post-it note, and sticks it on the guitar "I will try to keep the price the same, 3,400 rubels."'
-					act 'Leave': gt 'torgcentr'
-				end				
+	act 'Look for a guitar':
+		*clr & cla
+		'<center><img src="images/locations/city/citycenter/mall/musicstore/cheap_acoustic_1.jpg"></center>'		
+		'You start to browse the guitars in the shop, not entirely sure what you are looking for and gladly accept the help of the store clerk. After answering his questions and chatting about music and what you are looking for he finally picks up an affordable acoustic guitar as a recommendation.'
+		'After some conversation with the store owner he offers you an affordable acoustic guitar to buy'
+		'Jimmy leaves you alone with the instrument, so you sit down to try it, strumming the chords that you know, trying to play something.'
+		if money > 3400 or karta > 3400:
+			if money < 14280 and karta < 14280:
+				'While the guitar is not the best sounding one it''s comfortable and looking at the price tags, the only one you can afford.'
+			else 
+				'While the guitar is not the best sounding one it''s comfortable and looking at the price tags, you are not sure you should spend too much money until you are better at playing the guitar.'
 			end
-		end
+			if money > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with cash': gt 'city_musicstore', 'buycheapacoustic', 'money'
 
-	act 'Leave': gt 'torgcentr'
+			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 for a moment, unsure whether to buy it or not and finally decide to not do it, at least not now. "I will have to talk to my mum first" you say to Jimmy. '
+				'He just nods "Don''t worry <<$pcs_firstname>>. You know what, I will put it aside for you for a bit in case you change your mind". He scribbles something on a post-it note, and sticks it on the guitar "I will try to keep the price the same, 3,400 rubels."'
+				act 'Leave': gt 'torgcentr'
+			end
+		else
+			ml_didntbuyguitarthefirstvisit = 1
+			'While the guitar is not the best sounding one it''s comfortable. Unfortunately while it''s cheaper than the rest, it still costs more than you have. With a sigh you hand it back to Jimmy "I''m sorry, but, I can''t buy it now."'
+			'He just nods "Don''t worry, I tell you what, I will put it aside for you if you change your mind. He scribbles something on a post-it note, and sticks it on the guitar "I will try to keep the price the same, 3,400 rubels."'
+			act 'Leave': gt 'torgcentr'
+		end				
+	end
+	act 'Leave': 
+		ml_didntbuyguitarthefirstvisit = 1		
+		gt 'torgcentr'
+	end
 end
 
 
@@ -88,14 +88,15 @@ if $ARGS[0] = 'cameback':
 	*nl
 	'You enter the store, passing the door to be submerged in a loud, cacophonic environment.'
 	if money > 3400 or karta > 3400: 
-	act 'Ask Jimmy about the guitar':
-		cla
-		'You walk up to the counter where Jimmy is busy tinkering with a guitar.'
-		'"Hi Jimmy... I was wondering if you still has that guitar..."'
-		'Jimmy looks up from the guitar "Hi <<$pcs_name>>, sure, I have it. Let me get it for you."'
-		'He disappears for several minutes before he brings out the guitar. "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'						
+		act 'Ask Jimmy about the guitar':
+			cla
+			'You walk up to the counter where Jimmy is busy tinkering with a guitar.'
+			'"Hi Jimmy... I was wondering if you still has that guitar..."'
+			'Jimmy looks up from the guitar "Hi <<$pcs_firstname>>, sure, I have it. Let me get it for you."'
+			'He disappears for several minutes before he brings out the guitar. "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': 
@@ -128,9 +129,9 @@ if $ARGS[0] = 'buycheapacoustic':
 	'He looks at you thoughtfully, then drops a thick, slightly worn booklet in the bag "Some stuff to learn from" he says handing your purchase to you "Congratulations, welcome to the starving musician community."'
 	ml_guitars['jb-budget-acoustic'] = 1
 	ml_strings = 2
-	ml_chordbook = 1
-	ml_guitar = 1 
-	ml_guitarWithMe = 1
+	ml_guitar['chordbook'] = 1
+	ml_guitar['hasguitar'] = 1 
+	ml_guitar['carried'] = 1
 	
 	if $ARGS[1] = 'money': money -= 3400
 	if $ARGS[2] = 'karta': karta -= 3400
@@ -139,12 +140,12 @@ if $ARGS[0] = 'buycheapacoustic':
 end
 
 if $ARGS[0] = 'payandtakestuff':
-	if ml_boughtamp + ml_guitarWithMe > 0 or ml_boughtguitar > 1:
+	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, and sets up the delivery. "It should be there tomorrow, <<$pcs_nickname>>."'
 	else	
 		minut += 20
-        ml_guitarWithMe = 1
+        ml_guitar['carried'] = 1
 		'Jimmy disappears with your chosen guitar in the back of the shop only to return after about 10 minutes. "It''s all set up, <<$pcs_nickname>>, if you need to tweak anything, just bring it in, we will do it, no charge."'
 		*nl
 		'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>>."'

+ 12 - 12
locations/city_musicstore_stock.qsrc

@@ -14,7 +14,7 @@ if $ARGS[0]='electric':
             <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
         </TH>
         <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio</a></center>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''"Studio Equipmet</a></center>
         </TH>
     </table></center>'
     '<center><font size="+4" color="red"><b>Warning: Right now, these guitars have no effect on gameplay!</b></font></center>'
@@ -181,7 +181,7 @@ if $ARGS[0]='acoustic':
             <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
         </TH>
         <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio</a></center>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''"Studio Equipmet</a></center>
         </TH>
     </table></center>'
     '<center><font size="+4" color="red"><b>Warning: Right now, these guitars have no effect on gameplay!</b></font></center>'
@@ -202,7 +202,7 @@ if $ARGS[0]='acoustic':
             karta -= 320000
             ml_boughtguitar += 1  
             ml_hardcase = 1 
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1      
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1      
             gs 'stat' 
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -214,7 +214,7 @@ if $ARGS[0]='acoustic':
             money -= 320000
             ml_boughtguitar += 1  
             ml_hardcase = 1 
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1  
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
             gs 'stat'     
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -226,7 +226,7 @@ if $ARGS[0]='acoustic':
             karta -= 81990
             ml_boughtguitar += 1 
             ml_hardcase = 1
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
             gs 'stat'    
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -238,7 +238,7 @@ if $ARGS[0]='acoustic':
             money -= 81990
             ml_boughtguitar += 1 
             ml_hardcase = 1
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
             gs 'stat'    
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -250,7 +250,7 @@ if $ARGS[0]='acoustic':
             karta -= 63900
             ml_boughtguitar += 1     
             ml_hardcase = 1
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1  
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
             gs 'stat'        
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -262,7 +262,7 @@ if $ARGS[0]='acoustic':
             money -= 63900
             ml_boughtguitar += 1     
             ml_hardcase = 1
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1  
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
             gs 'stat'        
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -274,7 +274,7 @@ if $ARGS[0]='acoustic':
             karta -= 41900
             ml_boughtguitar += 1
             ml_gigbag = 1
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1 
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1 
             gs 'stat'  
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -286,7 +286,7 @@ if $ARGS[0]='acoustic':
             money -= 41900
             ml_boughtguitar += 1
             ml_gigbag = 1
-            if ml_guitarWithMe = 0: ml_guitarWithMe = 1  
+            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
             gs 'stat' 
             gt 'city_musicstore_stock', 'acoustic'
         end
@@ -307,7 +307,7 @@ if $ARGS[0]='amplifier':
             <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
         </TH>
         <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio</a></center>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''"Studio Equipmet</a></center>
         </TH>
     </table></center>'
     '<center><font size="+4" color="red"><b>Warning: Right now, these amplifiers have no effect on gameplay!</b></font></center>'
@@ -395,7 +395,7 @@ if $ARGS[0]='studio':
             <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
         </TH>
         <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio</a></center>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipmet</a></center>
         </TH>
     </table></center>'
 

+ 5 - 4
locations/city_park.qsrc

@@ -181,9 +181,10 @@ if $ARGS[0] = 'start':
 	end
 
 
-	if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+	if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitar['carried'] = 1 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and ml_performance['max_perform_minutes'] >= 15:
 		*nl
 		'With the weather being pleasant and sunny, there are groups of people moving around the streets. You could play some music, practice performing songs and maybe make some money too.'
+		ml_buskingtime =  min((ml_performance['max_perform_minutes']-ml_performance['performed_minutes']), 60)
 		if pcs_inhib < 30: 
 			if pcs_inhib < 10: 
 				$diff = 'hard'
@@ -196,18 +197,18 @@ if $ARGS[0] = 'start':
 			gs 'willpower', 'skill', 'self', $diff
 			will_cost = (will_cost * 3) - (pcs_perform)
 			if will_cost <= pcs_willpwr:				
-				act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+				act 'Start busking (<<ml_buskingtime>> minutes) (<<will_cost>> Willpower)': 
 					inhib_exp += rand(1,3)
 					gs 'willpower', 'pay', 'self'
 					gs 'stat'
 					gs 'music_buskingevents', 'busking', 'city'
 				end
 			else	
-				act 'Start busking (1 hour) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+				act 'Start busking (<<ml_buskingtime>> minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 			end
 			
 		else
-			act 'Start busking (1 hour)': gs 'music_buskingevents', 'busking', 'city'
+			act 'Start busking (<<ml_buskingtime>> minutes)': gs 'music_buskingevents', 'busking', 'city'
 		end
 	end
 

+ 6 - 6
locations/dachain.qsrc

@@ -44,22 +44,22 @@ if $args[0] = '':
 !!-------------------------------------------------------------------------------------------------------------------------------------
 
 	!!Storing and picking up the guitar
-	if ml_guitarWithMe = 1:
+	if ml_guitar['carried'] = 1:
 		act 'Place the guitar next to your desk': 
-			ml_guitarWithMe = 0
+			ml_guitar['carried'] = 0
 			ml_guitarAtHome = 1
 			gt $loc
 		end
 	elseif ml_guitarAtHome = 1:
 		act 'Pick up the guitar':
-			ml_guitarWithMe = 1
+			ml_guitar['carried'] = 1
 			ml_guitarAtHome = 0
 			gt $loc
 		end
 	end
 
 	!!Guitar practice 
-	if ml_guitar = 1 and (ml_chordbook = 1 or ml_guitarlessoncount > 0) and ml_performed_minutes <= ml_maxperform_minutes:
+	if ml_guitar['hasguitar'] = 1 and (ml_guitar['chordbook'] = 1 or ml_guitarlesson['lessoncount'] > 0) and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 		act 'Practice guitar (0:30)': gt 'music_bedroomPractice', 'guitar'
 	end
 			
@@ -68,7 +68,7 @@ if $args[0] = '':
 	end
 
 	!! Streaming music 
-	if ml_online['account'] = 1 and internet > 0 and ml_performed_minutes <= ml_maxperform_minutes:
+	if ml_online['account'] = 1 and internet > 0 and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 		if pcs_inhib < 30:
 			if pcs_inhib < 10: 
 				$diff = 'hard'
@@ -96,7 +96,7 @@ if $args[0] = '':
 	end
 
 	!! Recording music
-	if ml_performed_minutes <= ml_maxperform_minutes:
+	if ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 		if pcs_inhib < 20:
 			if pcs_inhib < 10: 
 				$diff = 'medium'

+ 5 - 5
locations/liames.qsrc

@@ -95,10 +95,10 @@ if rand(1,100) >= 95:
 	act 'Continue': gt'liames'
 end
 
-if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitar['carried'] = 1 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and ml_performance['max_perform_minutes'] >= 15:
 	*nl
 	'With the weather being pleasant and sunny, there are groups of people moving around the streets. You could play some music, practice performing songs and maybe make some money too.'
-	
+	ml_buskingtime =  min((ml_performance['max_perform_minutes']-ml_performance['performed_minutes']), 60)
 	if pcs_inhib < 30: 
 		if pcs_inhib < 10: 
 			$diff = 'hard'
@@ -111,17 +111,17 @@ if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitarWit
 		gs 'willpower', 'skill', 'self', $diff
 		will_cost = (will_cost * 3) - (pcs_perform)
 		if will_cost <= pcs_willpwr:
-			act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+			act 'Start busking (<<ml_buskingtime>> minutes) (<<will_cost>> Willpower)': 
 				inhib_exp += rand(1,3)
 				gs 'willpower', 'pay', 'self'
 				gs 'stat'
 				gs 'music_buskingevents', 'busking', 'oldtown'
 			end
 		else	
-			act 'Start busking (1 hour) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+			act 'Start busking (<<ml_buskingtime>> minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 		end		
 	else
-		act 'Start busking (1 hour)': gs 'music_buskingevents', 'busking', 'oldtown'
+		act 'Start busking (<<ml_buskingtime>> minutes)': gs 'music_buskingevents', 'busking', 'oldtown'
 	end
 end
 

+ 51 - 9
locations/music_bedroompractice.qsrc

@@ -3,24 +3,33 @@
 if $ARGS[0] = 'guitar':
 	*clr & cla
 	minut += 30
-	ml_performed_minutes += 15
+	ml_performance['performed_minutes'] += 15
+	ml_performance['total_time_performed'] += 15	
+	pcs_mood += 5
+	gs 'stat'
 
 	'<center><img <<$set_imgh>> src="images/pc/activities/music/guitarpractice_1.jpg"></center>'
-	if ml_guitarlessoncount = 0 and ml_chordbook = 1 and instrmusic_lvl <= 15:
+	if ml_guitarlesson['lessoncount'] = 0 and ml_guitar['chordbook'] = 1 and instrmusic_lvl <= 10:
+		instrmusic_exp += rand(1,3)
+		gs 'pain', 1, 'fingers', 'ache'
+		gs 'stat'
 		'You open the book you got from Jimmy and start to practice the chords and basic techniques on the guitar.'
 		'It goes slowly, your fingers get in the way and they start to hurt after a short time as the strings dig into them, but you soldier on until.'
-		'The strings still either buzz, or don''t ring but by the end you start to get a feel for how to do it better. '
-		instrmusic_exp += rand(1,3)
-		
-	elseif ml_guitarlessoncount = 0 and ml_chordbook = 1 and instrmusic_lvl > 15 and instrmusic_lvl < 25 and internet < 1:
+		'The strings still either buzz, or don''t ring but by the end you start to get a feel for how to do it better. '				
+	elseif ml_guitarlesson['lessoncount'] = 0 and ml_guitar['chordbook'] = 1 and instrmusic_lvl > 10 and instrmusic_lvl < 25 and internet < 1:
 		'You open the chordbook you got from Jimmy and start to practice, but you feel that you don''t really improve that much.'
 		instrmusic_exp += rand(1,2)	
-	elseif ml_guitarlessoncount = 0 and ml_chordbook = 1 and instrmusic_lvl > 15 and internet > 0:
+	elseif ml_guitarlesson['lessoncount'] = 0 and ml_guitar['chordbook'] = 1 and instrmusic_lvl > 15 and internet > 0:
+		'<center><video autoplay loop src="images/pc/activities/music/onlineguitarlesson.mp4"></video></center>'
 		'You look at the book you got from Jimmy, then decide to turn to the internet for new lessons.'
 		instrmusic_exp += rand(1,3)	
-	elseif ml_guitarlessoncount > 0:
+	elseif ml_guitarlesson['lessoncount'] > 0 and instrmusic_lvl >= 25 and internet > 0:
+		instrmusic_exp += rand(2,3)
+		'<center><video autoplay loop src="images/pc/activities/music/onlineguitarlesson.mp4"></video></center>'
+		'You work through the practices from your guitarlesson then turn to the internet to learn some more new songs.'
+	else
 		'You pick up you guitar and the lessons from the guitar teacher and start to practice.'
-		instrmusic_exp += rand(2,5)
+		instrmusic_exp += rand(2,3)
 	end
 	if $loc = 'sitr':
 		act 'Finish practice': gt $loc
@@ -30,4 +39,37 @@ if $ARGS[0] = 'guitar':
 end
 
 
+if $ARGS[0] = 'rehearsing':
+	*clr & cla	
+	minut += 30
+	pcs_mood += 5
+	ml_performance['performed_minutes'] += 30
+	ml_performance['total_time_performed'] += 30
+	gs 'stat'
+	
+	'<center><img <<$set_imgh>> src="images/pc/activities/music/guitarpractice_1.jpg"></center>'
+	if ml_performance['set_quality'] < 25:
+	!! TODO: Very, very beginning, many mistakes, frowny..
+	elseif ml_performance['set_quality'] < 50:
+	!! TODO: Getting better, the main bits are learned, most of the lyrics remembered
+	elseif ml_performance['set_quality'] < 75:
+	!! TODO: Not perfect,  could play it with some errors and mistakes
+	elseif ml_performance['set_quality'] < 95:
+	!! TODO: Almost perfect, some minor errors, occassionally  missed words in the lyrics
+	else
+	!! TODO: Done and dusted, learned it all.
+	end
+	
+	if ml_performance['set_quality'] < 85:
+		instrmusic_exp += rand(1,3)
+		vokal_exp += rand(1,3)
+		if perform_lvl < 35: perform_exp += rand(1,3)	
+	end
+	ml_performance['set_quality'] += rand(1,(pcs_instrmusic + pcs_vokal + pcs_perform)/10)
+	ml_performance['set_lastpracticeday'] = daystart 
+		
+	act 'Finish practice': gt $loc, 'start'
+end
+
+
 --- music_bedroompractice ---------------------------------

+ 66 - 17
locations/music_buskingevents.qsrc

@@ -1,48 +1,97 @@
 # music_buskingevents
 
 if $ARGS[0] = 'busking':
-	minut += 60	
+	minut += ml_buskingtime
 	instrmusic_exp += rand(1,3)
 	vokal_exp += rand(1,3)
-	perform_exp += rand(1,2)
 	
+	ml_busking['busking_count'] += 1
+	ml_busking['busking_time'] += ml_buskingtime
+
+	if perform_lvl < 50: perform_exp += rand(1,3)
+	*clr & cla
 	gs 'music_buskingevents', 'calculate_tips', $ARGS[1]
 	money += ml_tipsearned
 	gs 'stat'
 	
 	dynamic '<<$ARGS[1]>>_music += rand(0,3)'
 	
-	ml_performed_minutes += 60
-	
-	*clr & cla
+	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
+	ml_rand_event = rand(0,100)
+	if ml_rand_event <= 10 and $ARGS[1] = 'pav' and npc_rel['A144'] > 40: 
+		gs 'music_buskingevents', 'anushka'
+	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
+		act 'Finish': gt $curloc, 'start'	
+	end
+
 end
 
 if $ARGS[0] = 'calculate_tips':
 	
 	if $ARGS[1] = 'city':
-		ml_location_mod = 6
+		ml_location_mod = 30
 	elseif $ARGS[1] = 'pav':
-		ml_location_mod = 1
+		ml_location_mod = 0
 	elseif $ARGS[1] = 'oldtown'
-		ml_location_mod = 3
+		ml_location_mod = 15
 	end 	
 
-	if week >= 5: ml_time_mod += 2
-	if hour >= 17: ml_time_mod += 2
-	
-	ml_time_loc_mod = (ml_location_mod + ml_time_mod) / 2
-	
-	
-	ml_tipsmax = (pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*35)) * ml_time_loc_mod
-	ml_tipsearned = max(rand(0,ml_tipsmax),0)
+	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)/5	
+
+	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
+
+if $ARGS[0] = 'anushka':
+
+!!TODO: A few scenarios: Friends, besties, neutral. Player is an awful, bad, ok, good musician. Anushka has seen PC play music before (either busking or they played together).	
+	npc_rel['A144'] += 2
+	*nl	
+	'As you stop playing and get ready to pack up you spot <<$npc_firstname['A144']>> standing not far from you, watching you quietly.'
+
+	if npc_rel['A144'] > 60:
+		'As she notices that you saw her she grins and starts to walk up to you "I didn''t know you turned into a wandering minstrel, <<$pcs_nickname>>."'
+	elseif pcs_instrmusic > 35 and pcs_vokal > 35:
+		'As she notices that you saw her, she nods "Not bad, <<$pcs_nickname>>. I have things to do though, see you at school." she says and walks off.'
+	else	
+		'As she notices that you saw her, she just shakes her head with a smirk and walks off.'
+	end
+	act 'Finish': gt $curloc, 'start'
+end
+
+
+if $ARGS[0] = 'lena_and_lera':
+!!TODO: Harassment scene
+	mood -= 10
+	*nl
+	'Lena and Lera harasses <<$pcs_nickname>>'
+	act 'Finish': gt $curloc, 'start'
 end
 
 --- music_buskingevents ---------------------------------

+ 92 - 5
locations/music_delparco.qsrc

@@ -21,19 +21,106 @@ if $ARGS[0] = 'delparco_accept':
 !!	TODO: Better scene.	
 	'You accept.'
     act 'Discuss the live music with': gt 'music_delparco', 'firstdiscussion'
-	act 'Leave': gt 'music_delparco', 'talkwithzariyah'
+	act 'Leave': gt 'cafe_parco', 'start'
 end
 
 
-if $ARGS[0] = 'firstdiscussion':
-	ml_delparcoQW = 3
+if $ARGS[0] = 'firstdiscussion':	
+	if (week + 2 <= 7): 
+		ml_answerdeadline = week + 2
+	else: 
+		ml_answerdeadline = week - 5
+	end
+	
 !!	TODO: Obviously, blahblah is not proper text.	
-	'Blahblah about how it''s gonna work.'
-	act 'Leave': gt 'cafe_parco', 'start'
+	*nl
+	'You take a seat facing Zariyah "I thought about it a bit more and, yes, I would like to do it just need to know a bit more. I never really did anything like this."'
+	'She nods and picks up a pen "I understand, <<$pcs_nickname>>. Well, it''s not like playing in an arena or anything. We just need someone to play on Fridays. It would be half an hour, but it''s not background music, you play songs."'
+	'She wiggles the pen, writing down some of what she say "And we would pay you. It''s not a lot of money, but we pay you 800 rubles. And we would like to start two weeks from now at 8 in the evening."'
+	'You think for a moment. 800 rubles is way more than you can get anywhere else in Pavlovsk. On the other hand, 30 minutes is quite a few songs, and you will have to practice a lot in the beginning to do it.'
+	*nl
+	act 'Accept the offer':
+		ml_deparcoQW = 4
+		'"I would love to do it!" you almost bite your tongue as you stop, but the fact that someone asks you to play is a first step to your dream. You almost couldn''t contain yourself.'
+		'"Excellent!" Zariyah smiles at you, and pushes the paper she was writing on towards you "Everything is there. Don''t forget, two weeks from now, Friday at 8pm, so please be here latest half past seven.
+		Trust me, you will need the time to set yourself up. And then every Friday if it works out."'
+		ml_gigday['delparco'] = daystart + 19 - week
+		ml_gighour['delparco'] = 19
+		ml_gigfee['delparco'] = 800
+		
+		killvar 'ml_answerdeadline'
+		
+		act 'Leave': gt 'cafe_parco', 'start'
+	act 'Ask for some time':
+		ml_delparcoQW = 3
+		ml_delparcogigdeadline = daystart + 2
+		ml_delparcooriginaldate = daystart
+		'"I have to think, I want to make sure that I can do it. It''s a big commitment and I don''t want to, you know.. not do it right."'
+		'Zariyah nods "Ok, <<$pcs_nickname>>, but please, let me know by <<$week['ml_answerdeadline']>>."'
+		
+		killvar 'ml_answerdeadline'
+
+		act 'Leave': gt 'cafe_parco', 'start'
+	end
+
+	
 end
 
+if $ARGS[0] = 'acceptafterthinking':
+
+	offset = (daystart-ml_delparcooriginaldate)
+	ml_gigday['delparco'] = daystart + 19 - offset - week
+	ml_gighour['delparco'] = 19
+	ml_gigfee['delparco'] = 800
+	ml_delparco['performance'] = 50
+	ml_deparcoQW = 4
+	
+	'"I would love to do it!" you almost bite your tongue as you stop, but the fact that someone asks you to play is a first step to your dream. You almost couldn''t contain yourself.'
+	'"Excellent!" Zariyah smiles at you, and pushes the paper she was writing on towards you "Everything is there. Don''t forget, two weeks from now, Friday at 8pm, so please be here latest half past seven.
+	Trust me, you will need the time to set yourself up. And then every Friday if it works out."'
+
+	killvar 'offset'
+	killvar 'ml_delparcooriginaldate'
+	act 'Leave': gt 'cafe_parco', 'start'	
+end	
 
 if $ARGS[0] = 'eveningshow':
+	minut += 60
+	ml_correction_chance = ml_performance['set_quality'] + ((hotcat - 5)*3) + (pcs_perform/10)
+	ml_success = rand(0,100)
+	instrmusic_exp = rand(1,2)
+	vokal_exp = rand(1,2)
+	ml_performance['performed_minutes'] += 30
+	ml_performance['total_time_performed'] += 30
+
+	if perform_lvl < 45 = rand(1,3)	
+	'<center><video autoplay loop src="images/pc/activities/music/GigPlaceHolder.mp4"></video></center>'
+!!TODO: More scene, on set up, arriving, etc.	
+	if ml_success < ml_performance['set_quality']: 
+		ml_delparco['performance'] += 10
+		pav_music += rand(1,5)
+		pcs_mood += 15
+		'You played with no issues playing everything as it was meant to be.'
+	elseif ml_success < ml_correction_chance:
+		ml_delparco['performance'] += 5
+		pav_music += rand(1,3)
+		'You made some mistakes and forgot the lyrics in some places, but you were able to compensate by your performance and yes, your looks.'
+		pcs_mood += 5
+	elseif ml_success < ml_correction_chance + 10:
+		pav_music -= rand(0,2)
+		pcs_mood -= 5
+		'You made quite a few mistakes and forgot the lyrics in places, and even though you tried your best to compensate by your performance and your looks, you could see that people have noticed them. '
+		'You will have to practice even more and rehearse your songs before your next gig.'
+	else 
+		ml_delparco['performance'] -= 20
+		pav_music -= rand(5,10)
+		pcs_mood -= 15
+		'Today definitely wasn''t your day. You bombed, there is no better word for it. While you lasted your 30 minutes, you could see on the audience that they didn''t really enjoy it, even though they politely clapped at the end.'
+		'You will have to do some serious practicing if you want to have another chance to perform.'
+	end
+end
+	
+
 
 end
 

+ 5 - 2
locations/music_gigstarts.qsrc

@@ -35,9 +35,11 @@ if $ARGS[0] = 'delparco_accept':
 	*clr & cla
 	ml_venues['del_parco'] = 1
 	ml_delparcoQW = 2
+	ml_delparcogigdeadline = daystart + (12 - week)
+
 	'<center><img src="images/pc/activities/music/zariyah.jpg"></center>'
 	'You look at the woman a bit surprised, then you smile back "Of course! I mean... you mean like a proper stage performance?"'	
-	'She nods "Well, it''s a small cafe so you wouldn''t be playing on a stage, per se, but yes, in front of people. You would sing and play your music." she looks at her watch "I will have to go, but please come to the cafe ' + iif(week < 5, 'this week', 'next week') + ' and we can discuss the details. Poka!" she gives a small wave and hurries off.'
+	'She nods "Well, it''s a small cafe so you wouldn''t be playing on a stage, per se, but yes, in front of people. You would sing and play your music." she looks at her watch "I will have to go, but please come to the cafe before next Friday, during the week, and we can discuss the details. Poka!" she gives a small wave and hurries off.'
 	act 'Leave': gt $loc, 'start'
 end
 
@@ -45,9 +47,10 @@ if $ARGS[0] = 'delparco_decline':
 	*clr & cla
 	ml_venues['del_parco'] = 1	
 	ml_delparcoQW = 1
+	ml_delparcogigdeadline = daystart + (12 - week)
 	'<center><img src="images/pc/activities/music/zariyah.jpg"></center>'
 	'You look at the woman a bit surprised "I''m... that''s really nice but... I''m not sure... "'
-	'She looks at you for a long moment then shakes her head "You need to be a bit more confident if you want do anything with music. Listen" she looks at her watch " I have to run, but if you change your mind, come to the cafe during the week. You are good, and you should not miss out on opportunities." she says before heading off."'
+	'She looks at you for a long moment then shakes her head "You need to be a bit more confident if you want do anything with music. Listen" she looks at her watch " I have to run, but if you change your mind, come to the cafe during the week before next Saturday. You are good, and you should not miss out on opportunities." she says before heading off."'
 	act 'Leave': gt $loc, 'start'
 end
 

+ 50 - 40
locations/music_guitarlesson.qsrc

@@ -1,33 +1,43 @@
 # music_guitarlesson
 
 if $ARGS[0] = 'enquiry':
+
+	if age < 18:
+		ml_guitarlesson['lessoncost'] = 300
+	else
+		ml_guitarlesson['lessoncost'] = 500
+	end
+
 	'You follow the directions from the receptionist and reach the room where the guitar lessons take place. 
 	The door is half open, and peeking in you see a dark haired man in his thirties sitting at a table, scribbling in a note book.'
-	'"Uhm, hi, I''m looking for the guitar lessons?" you call outas you step into the room.
+	'"Uhm, hi, I''m looking for the guitar lessons?" you call out as you step into the room.
 	The man looks up, then smiles as he sees you "Please, come in. I''m Viktor Zenchuk, and yes, this is where I teach guitar. Would you be interested?"'
 	*nl
-	'You shift on your feet "I''m <<$pcs_name>>, and yes, I think. Can you please tell me a bit more?"'
+	'You shift on your feet "I''m <<$pcs_firstname>>, and yes, I think. Can you please tell me a bit more?"'
 	' "Sure. I assume you are a beginner..." he looks at you, and you nod "Then obviously we would start at the basics. The instrument, chords, some basic theory. We would meet once a week, here. 
 	If you have a guitar, that''s great, if not, you can use mine. But you will really need to get a guitar to practice at home. The lessons cost 500 rubels, but if you are under 18' +iif(vidage < 18, ', which I assume you are,', '')+ ' then it''s only 300 rubels."'
 	*nl
-	'He looks at you "So, <<$pcs_name>>, do you think you would be interested in taking lessons?"'
+	'He looks at you "So, <<$pcs_firstname>>, do you think you would be interested in taking lessons?"'	
 	npc_rel['ML1'] = 45
-	ml_enquired = 1
+
+	ml_guitarlesson['enquired'] = 1	
 	act 'Sign up': 		
 		'You nod "Yes, I really would like to learn to play the guitar. When can we start?"'
 		'The teacher pushes the book closer to you "I will need your name here, and the school and class you attend, and also, I need to see your passport, to confirm you are under 18." You write down the information, and show him your passport.'
 		'"Eccellent, now, what day would you like to come for your first lesson?"'		
-		'<a href="exec: ml_lessonday = 1 & $ml_lessonday = ''Monday'' & gt ''music_guitarlesson'', ''goodbye''">Monday</a>'
-		'<a href="exec: ml_lessonday = 2 & $ml_lessonday = ''Tuesday'' & gt ''music_guitarlesson'', ''goodbye''">Tuesday</a>'
-		'<a href="exec: ml_lessonday = 3 & $ml_lessonday = ''Wednesday''  & gt ''music_guitarlesson'', ''goodbye''">Wednesday</a>'
-		'<a href="exec: ml_lessonday = 4 & $ml_lessonday = ''Thursday''  & gt ''music_guitarlesson'', ''goodbye''">Thursday</a>'
-		'<a href="exec: ml_lessonday = 5 & $ml_lessonday = ''Friday''  & gt ''music_guitarlesson'', ''goodbye''">Friday</a>'
-		'<a href="exec: ml_lessonday = 6 & $ml_lessonday = ''Saturday''  & gt ''music_guitarlesson'', ''goodbye''">Saturday</a>'
-		'<a href="exec: ml_lessonday = 8 & $ml_lessonday = ''None''  & gt ''music_guitarlesson'', ''goodbye''">You don''t know yet</a>'
+		
+		'Select your next lesson'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 1 & $ml_guitarlesson[''lessonday''] = ''Monday'' & gt ''music_guitarlesson'', ''goodbye''">Monday</a>'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 2 & $ml_guitarlesson[''lessonday''] = ''Tuesday'' & gt ''music_guitarlesson'', ''goodbye''">Tuesday</a>'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 3 & $ml_guitarlesson[''lessonday''] = ''Wednesday''  & gt ''music_guitarlesson'', ''goodbye''">Wednesday</a>'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 4 & $ml_guitarlesson[''lessonday''] = ''Thursday''  & gt ''music_guitarlesson'', ''goodbye''">Thursday</a>'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 5 & $ml_guitarlesson[''lessonday''] = ''Friday''  & gt ''music_guitarlesson'', ''goodbye''">Friday</a>'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 6 & $ml_guitarlesson[''lessonday''] = ''Saturday''  & gt ''music_guitarlesson'', ''goodbye''">Saturday</a>'
+		'<a href="exec: ml_guitarlesson[''lessonday''] = 8 & $ml_guitarlesson[''lessonday''] = ''None''  & gt ''music_guitarlesson'', ''goodbye''">You don''t know yet</a>'
 	end
 	act 'You have to think':
 		'You hesitate for a moment "I would be, but I have to talk with my <<$npc_nickname[''A29'']>> first."'
-		'The teacher nods "That''s understandable. Just come in when you know and we can set up the lesson" He smiles at you "It was a pleasure to meet you, <<$pcs_name>>, and I''m looking forward to seeing you again."'
+		'The teacher nods "That''s understandable. Just come in when you know and we can set up the lesson" He smiles at you "It was a pleasure to meet you, <<$pcs_firstname>>, and I''m looking forward to seeing you again."'
 		act 'Leave': gt 'pav_commclubs'
 	end
 end
@@ -37,12 +47,12 @@ if $ARGS[0] = 'setlessonday':
 	'You meet the teacher and agree on your next lesson.'
 	
 	'Select your next lesson'
-	'<a href="exec: ml_lessonday = 1 & $ml_lessonday = ''Monday'' & gt ''music_guitarlesson'', ''goodbye''">Monday</a>'
-	'<a href="exec: ml_lessonday = 2 & $ml_lessonday = ''Tuesday'' & gt ''music_guitarlesson'', ''goodbye''">Tuesday</a>'
-	'<a href="exec: ml_lessonday = 3 & $ml_lessonday = ''Wednesday''  & gt ''music_guitarlesson'', ''goodbye''">Wednesday</a>'
-	'<a href="exec: ml_lessonday = 4 & $ml_lessonday = ''Thursday''  & gt ''music_guitarlesson'', ''goodbye''">Thursday</a>'
-	'<a href="exec: ml_lessonday = 5 & $ml_lessonday = ''Friday''  & gt ''music_guitarlesson'', ''goodbye''">Friday</a>'
-	'<a href="exec: ml_lessonday = 6 & $ml_lessonday = ''Saturday''  & gt ''music_guitarlesson'', ''goodbye''">Saturday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 1 & $ml_guitarlesson[''lessonday''] = ''Monday'' & gt ''music_guitarlesson'', ''goodbye''">Monday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 2 & $ml_guitarlesson[''lessonday''] = ''Tuesday'' & gt ''music_guitarlesson'', ''goodbye''">Tuesday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 3 & $ml_guitarlesson[''lessonday''] = ''Wednesday''  & gt ''music_guitarlesson'', ''goodbye''">Wednesday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 4 & $ml_guitarlesson[''lessonday''] = ''Thursday''  & gt ''music_guitarlesson'', ''goodbye''">Thursday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 5 & $ml_guitarlesson[''lessonday''] = ''Friday''  & gt ''music_guitarlesson'', ''goodbye''">Friday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 6 & $ml_guitarlesson[''lessonday''] = ''Saturday''  & gt ''music_guitarlesson'', ''goodbye''">Saturday</a>'
 end
 
 
@@ -55,8 +65,13 @@ end
 
 if $ARGS[0] = 'lesson':
 !! TODO: Do the guitarlesson stuff here - a few different scenes maybe?
-	
-	'<center><img <<$set_imgh>> src="mod/musiclife/images/locations/pavlovsk/community/guitarlesson/guitarteach_'+ rand(1,2) +'.jpg"></center>'	
+	money -= ml_guitarlesson['lessoncost']
+	ml_guitarlesson['nextlesson'] = 0
+	ml_guitarlesson['lessoncount'] += 1	
+	minut += 45
+	npc_rel['ML1'] += 1
+
+	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/guitarlesson/guitarteach_'+ rand(1,2) +'.jpg"></center>'	
 	if instrmusic_lvl < 15:
 		instrmusic_exp += rand(1,3)
 		'You spend the next 45 minutes learning the basics of the guitar and some chords. At the end of the lesson your fingers and hands hurt, but you feel that you have learned a lot.'
@@ -64,33 +79,27 @@ if $ARGS[0] = 'lesson':
 		instrmusic_exp += rand(1,3)
 		'You spend the next 45 minutes working on songs you have learned and improving some specific techniques.'
 	end
+
 	
 	'Select your next lesson'
-	'<a href="exec: ml_lessonday = 1 & $ml_lessonday = ''Monday'' & gt ''music_guitarlesson'', ''goodbye''">Monday</a>'
-	'<a href="exec: ml_lessonday = 2 & $ml_lessonday = ''Tuesday'' & gt ''music_guitarlesson'', ''goodbye''">Tuesday</a>'
-	'<a href="exec: ml_lessonday = 3 & $ml_lessonday = ''Wednesday''  & gt ''music_guitarlesson'', ''goodbye''">Wednesday</a>'
-	'<a href="exec: ml_lessonday = 4 & $ml_lessonday = ''Thursday''  & gt ''music_guitarlesson'', ''goodbye''">Thursday</a>'
-	'<a href="exec: ml_lessonday = 5 & $ml_lessonday = ''Friday''  & gt ''music_guitarlesson'', ''goodbye''">Friday</a>'
-	'<a href="exec: ml_lessonday = 6 & $ml_lessonday = ''Saturday''  & gt ''music_guitarlesson'', ''goodbye''">Saturday</a>'
-	'<a href="exec: ml_lessonday = 8 & $ml_lessonday = ''None''  & gt ''music_guitarlesson'', ''goodbye''">You don''t know yet</a>'
-	
-	money -= ml_gitlesson_cost
-	ml_guitarlessonday = daystart
-	ml_glessonweekday = week
-	ml_guitarlessoncount += 1	
-	minut += 45
-	npc_rel['ML1'] += 1
-	
-	
-	act 'End lesson': gt 'pav_commclubs'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 1 & $ml_guitarlesson[''lessonday''] = ''Monday'' & gt ''music_guitarlesson'', ''goodbye''">Monday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 2 & $ml_guitarlesson[''lessonday''] = ''Tuesday'' & gt ''music_guitarlesson'', ''goodbye''">Tuesday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 3 & $ml_guitarlesson[''lessonday''] = ''Wednesday''  & gt ''music_guitarlesson'', ''goodbye''">Wednesday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 4 & $ml_guitarlesson[''lessonday''] = ''Thursday''  & gt ''music_guitarlesson'', ''goodbye''">Thursday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 5 & $ml_guitarlesson[''lessonday''] = ''Friday''  & gt ''music_guitarlesson'', ''goodbye''">Friday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 6 & $ml_guitarlesson[''lessonday''] = ''Saturday''  & gt ''music_guitarlesson'', ''goodbye''">Saturday</a>'
+	'<a href="exec: ml_guitarlesson[''lessonday''] = 8 & $ml_guitarlesson[''lessonday''] = ''None''  & gt ''music_guitarlesson'', ''goodbye''">You don''t know yet</a>'
 end
 
 
 if $ARGS[0] = 'goodbye':
 !!	TODO: Kinda ok for now but needs a less awkward phrasing
 	*clr & cla
-	if ml_lessonday < 8:
-		'You agree to meet for your next lesson on <<$ml_lessonday>> at <<hour>>:00. The teacher enters it in the diary and you say good bye before you leave.'
+	ml_guitarlesson['nextlesson'] = daystart + (ml_guitarlesson['lessonday'] + 7 - week)
+	ml_guitarlesson['lessonhour'] = 15
+
+	if ml_guitarlesson['lessonday'] < 8:
+		'You agree to meet for your next lesson on <<$ml_guitarlesson[''lessonday'']>> at <<ml_guitarlesson[''lessonhour'']>>:00. The teacher enters it in the diary and you say good bye before you leave.'
 	else
 		'You are not sure when it would be a good day right now, so you agree to decide on a day later, you say good bye and leave.'
 	end
@@ -99,7 +108,8 @@ end
 
 
 if $ARGS[0] = 'advertisement':
-	ml_guitarlessonadv = 1
+
+	ml_guitarlesson['advertisement'] = 1
 	
 	'<center>As you pass by the community centre door you see a new colour note screaming "Guitar Lessons!" in bright letters over the image of a guitar.<center>'
 	*nl

+ 178 - 38
locations/music_onlinemusic.qsrc

@@ -2,41 +2,88 @@
 
 if $ARGS[0] = 'setupAccount':
 	ml_online['account'] = 1
+	minut += 30
+	ml_online_minute += 30
+	gs 'music_onlinemusic', 'internetcount'
+	gs 'stat'
+	
 	'You log into Youtube to set up a channel for your music. You can upload videos or live stream, but you will need to open a bank account if you want to receive any tips from viewers of your stream.'	
 !!	TODO: Ask for a screen name? 
-	act 'Leave': gt $loc, 'start'
+	if $loc = 'sitr':
+		act 'Leave': gt $loc
+	else
+		act 'Leave': gt $loc, 'start'
+	end
+
 end
 
 
-if $ARGS[0] = 'liveStream':
-	internet -= 1
+if $ARGS[0] = 'liveStream':	
 	if komp = 0 or webcamera = 0:
-!!	TODO: Much, much better scene.
-		minut += 60
-		ml_maxsuperchats = 	( pav_music/2 + city_music + oldtown_music/2 + village_music/2 + global_performer + pcs_apprnc )
-		ml_superchats = rand( 0, ml_maxsuperchats)
-		if ml_guitar = 1:
-			ml_famebase = ( pcs_instrmusic + pcs_vokal + pcs_perform + ( (hotcat-5) * 20 ) ) / 100
-			instrmusic_exp += rand(0,2)					
+!!	TODO: Much, much better scene needed.
+		ml_streaming['times_streamed'] += 1		
+		minut += ml_streamtime
+		ml_online_minute += ml_streamtime
+		gs 'music_onlinemusic', 'internetcount'
+		gs 'stat'
+
+		ml_maxsuperchats = 	( pav_music + (city_music * 2) + oldtown_music + village_music + (global_performer * 2) + pcs_apprnc )
+		ml_superchats = (rand( 0, ml_maxsuperchats) * ml_streamtime) / 60
+		if ml_guitar['hasguitar'] = 1:
+			ml_famebase = ( pcs_instrmusic + pcs_vokal + pcs_perform + ( (hotcat-5) * 20 ) ) / 20
+			instrmusic_exp += rand(1,3)					
 		else	
-			ml_famebase = ( (pcs_vokal * 2) + pcs_perform + ( (hotcat-5) * 20 ) ) / 100
+			ml_famebase = ( (pcs_vokal * 2) + pcs_perform + ( (hotcat-5) * 20 ) ) / 20
 		end
 		pav_music += rand(0, ml_famebase)
 		city_music += rand(0, ml_famebase)
-		vokal_exp += rand(0,2)	
-		perform_exp += rand(0,3)	
-		karta += superchats
-		ml_online['livestreamcount'] += 1
-		ml_performed_minutes += 60
+		vokal_exp += rand(1,3)	
+		if perform_lvl < 35: perform_exp += rand(1,3)
+
+		ml_streaming['livestreamcount'] += 1
+		ml_streaming['lastday'] = daystart
+		ml_performance['performed_minutes'] += ml_streamtime
+		ml_performance['total_time_performed'] += ml_streamtime
+		ml_streaming['total_earnings'] += ml_superchats		
+		ml_streaming['unclaimed_earnings'] += ml_superchats
+		
 		'<center><img <<$set_imgh>> src="images/pc/activities/music/gomixer_hero.jpg"/></center>'
 		'You set up your phone on a little tri-pod and log into your account. After settling down comfortably, you start to stream.'			
-		'Your fans tipped you <<superchats>> rubels for your performance.'
-		if bankAccount = 0:
-			'You need to open a bank account before you can receive the money.'
+		'Your fans tipped you <<ml_superchats>> rubels for your performance.'
+		
+		if bankAccount = 0:			
+			*nl
+			'You have earned <b><<ml_streaming[''unclaimed_earnings'']>></b> rubels so far, but you need to open a bank account before you can receive the money.'
+
+			if $loc = 'sitr':
+				act 'Stop the stream': gt $loc
+			else
+				act 'Stop the stream': gt $loc, 'start'
+			end
+
+		else		
+			*nl
+			'You have <b><<ml_streaming[''unclaimed_earnings'']>></b> rubels on your account.'
+			act 'Stop the stream and transfer the money to your bank account':				
+				karta += ml_streaming['unclaimed_earnings']
+				ml_streaming['unclaimed_earnings'] = 0
+				if $loc = 'sitr':
+					gt $loc
+				else 
+					gt $loc, 'start'
+				end
+			end
+			act 'Stop the stream':
+				if $loc = 'sitr':
+					gt $loc
+				else 
+					gt $loc, 'start'
+				end
+			end
 		end
 
 	end
-	act 'Stop the stream': gt $loc, 'start'
+	
 end
 
 if $ARGS[0] = 'recordSong':
@@ -46,15 +93,17 @@ if $ARGS[0] = 'recordSong':
 	'As you don''t have a computer you can''t really do much with the songs quality. But then you have seen quite a few people work with only with their phones. Like Ling Ling.'
 	
 	minut += 30
+	
 	vokal_exp += rand(1,4)	
-	perform_exp += rand(1,3)	
-	ml_performed_minutes += 15
+	if perform_lvl < 35: perform_exp += rand(1,3)
+	ml_performance['performed_minutes'] += 15
+	ml_performance['total_time_performed'] += 15
 
 	ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
-	if ml_guitar = 1:
+	if ml_guitar['hasguitar'] = 1:
 		ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
 		ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
-		instrmusic_exp += rand(1,4)		
+		instrmusic_exp += rand(1,3)		
 	else
 		ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
 		ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((hotcat-4)*10)
@@ -62,6 +111,7 @@ if $ARGS[0] = 'recordSong':
 
 	ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
 	ml_onlinesong_uploaded[ml_onlinesongcount] = 0
+
 	ml_uploadablemusic += 1
 	ml_onlinesongcount += 1		
 
@@ -86,7 +136,11 @@ if $ARGS[0] = 'recordSong':
 			act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
 		end
 	else 
-		act 'Leave': gt $loc, 'start'
+		if $loc = 'sitr':
+			act 'Leave': gt $loc
+		else
+			act 'Leave': gt $loc, 'start'
+		end
 	end
 end
 
@@ -97,17 +151,18 @@ if $ARGS[0] = 'recordAndEditSong':
 	'You open plug in your home studio kit and start up the recording software. After several tries you finally end up with a version you are content with.'
 	'The next hour just flies by as you edit the video and the audio, trying to increate the quality of the recording as much as you can'
 	minut += 90
-	instrmusic_exp += rand(1,4)		
-	vokal_exp += rand(1,4)	
-	perform_exp += rand(1,3)	
-	musicprod_exp += rand(1,3)
-	ml_performed_minutes += 15
+
+	vokal_exp += rand(1,3)	
+	if perform_lvl < 35: perform_exp += rand(1,3)	
+	if musicprod_lvl < 35: musicprod_exp += rand(1,3)
+	ml_performance['performed_minutes'] += 15
+	ml_performance['total_time_performed'] += 15
 
 	ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
-	if ml_guitar = 1:
+	if ml_guitar['hasguitar'] = 1:
 		ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
 		ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
-		instrmusic_exp += rand(1,4)		
+		instrmusic_exp += rand(1,3)		
 	else
 		ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
 		ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((hotcat-4)*10)
@@ -115,6 +170,7 @@ if $ARGS[0] = 'recordAndEditSong':
 
 	ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
 	ml_onlinesong_uploaded[ml_onlinesongcount] = 0
+
 	ml_uploadablemusic += 1
 	ml_onlinesongcount += 1	
 
@@ -150,12 +206,16 @@ end
 
 
 if $ARGS[0] = 'uploadmusic':
-	if will_cost > 0:
+	if  pcs_inhib < 30:
 		'You hesitate for a long moment, but finally take a deep breath and click on the "Upload" button and your newly recorded song moves over to the internet for all to see.'
 		'You bite in your lip, then close the screen before you change your mind and delete it.'
 	else
 		'You smile brightly and click on the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen. They will like it."'
 	end
+	ml_online_minute += 10
+	gs 'music_onlinemusic', 'internetcount'
+	gs 'stat'
+
 	ml_uploadablemusic -= 1 
 	ml_onlinesong_uploaded[ml_onlinesongcount-1] = 1
 
@@ -172,19 +232,27 @@ end
 if $ARGS[0] = 'uploadallmusic':
 	'<center><img src="images/pc/activities/music/uploadmusic.jpg"/></center>'
 	if will_cost > 0:
-		'You hesitate for a long moment, but finally take a deep breath and click on the "Upload" button and all your recorded songs, one by one move over to the internet for all to see.'
+		'You go through the songs you recorded, and clear out the old ones that you really ,really don''t like anymore then after a moment of hesitation you take a deep breath and click on the "Upload" button.
+		The screen changes and one by one, your songs move over to the internet for all to see.'
 		'You bite in your lip, then close the screen before you change your mind and delete them.'
 	else
-		'You smile brightly and click on the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen, this is how art grows."'
+		'You smile brightly as you browse through your recordings, deleting some old ones, then finally click the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen, this is how art grows."'
 	end
+
+	gs 'music_onlinemusic', 'deleting'
+
 	i = 0
 	:uploadallmusic			
-		if ml_onlinesong_uploaded[i] = 0: 
-			ml_onlinesong_uploaded[i] = 1			
+		if ml_onlinesong_uploaded[i] = 0 and internet > 0: 
+			ml_online_minute += 10
+			gs 'music_onlinemusic', 'internetcount'
+			gs 'stat'
+
+			ml_onlinesong_uploaded[i] = 1	
+			ml_uploadablemusic -= 1		
 		end
 		i += 1
 	if i < ml_onlinesongcount:jump 'uploadallmusic'
-	ml_uploadablemusic -= 0
 	killvar 'will_cost'
 
 	if $loc = 'sitr':
@@ -194,5 +262,77 @@ if $ARGS[0] = 'uploadallmusic':
 	end
 end
 
+if $ARGS[0] = 'deleteoldmusic':
+	'You go through your recorded musics and delete all the old ones where your playing doesn''t really reflect what you can do these days'
+	gs 'music_onlinemusic', 'deleting'
 
+	if $loc = 'sitr':
+		act 'Leave': gt $loc
+	else
+		act 'Leave': gt $loc, 'start'
+	end
+end
+
+!!----------------------------------------------------------------------------------------------------------------------------
+!!-----------------------------------------   GoSub functions all go here   --------------------------------------------------
+!!----------------------------------------------------------------------------------------------------------------------------
+
+if $ARGS[0] = 'deleting':
+
+	ml_threshold_skilllevel = ((pcs_instrmusic + pcs_vokal + pcs_perform)*80)/100
+
+	i = 0
+	j = -1
+	
+	:deletemusic
+		if (ml_onlinesong_uploaded = 1) or (ml_onlinesong_uploaded = 0 and ml_onlinesong_skilllevel > ml_threshold_skilllevel):
+			j += 1
+			ml_tempsong_freshness[j] = ml_onlinesong_sfreshness[i]
+			ml_tempsong_lastcalcday[j] = ml_onlinesong_lastcalcday[i]
+			ml_tempsong_hotcat[j] = ml_onlinesong_hotcat[i]
+			ml_tempsong_skilllevel[j] = ml_onlinesong_skilllevel[i]
+			ml_tempsong_uploaded[j] = ml_onlinesong_uploaded[i]			
+		else
+			ml_uploadablemusic -= 1
+		end
+
+		i += 1
+	if i < ml_onlinesongcount:jump 'deletemusic'
+
+	killvar 'ml_onlinesong_freshness'
+	killvar 'ml_onlinesong_lastcalcday'
+	killvar 'ml_onlinesong_hotcat'
+	killvar 'ml_onlinesong_skilllevel'
+	killvar 'ml_onlinesong_uploaded'
+	killvar 'i'
+
+	ml_onlinesongcount = 0
+
+	if j >= 0:
+		:looprebuildsongs
+			ml_onlinesong_freshness[ml_onlinesongcount] = ml_tempsong_freshness[ml_onlinesongcount]
+			ml_onlinesong_hotcat[ml_onlinesongcount] = ml_tempsong_hotcat[ml_onlinesongcount]
+			ml_onlinesong_lastcalcday[ml_onlinesongcount] = ml_tempsong_lastcalcday[ml_onlinesongcount]
+			ml_onlinesong_skilllevel[ml_onlinesongcount] = ml_tempsong_skilllevel[ml_onlinesongcount]
+			ml_onlinesong_uploaded[ml_onlinesongcount] = ml_tempsong_uploaded[ml_onlinesongcount]
+			ml_onlinesongcount += 1
+		if ml_onlinesongcount <= j: jump 'looprebuildsongs'
+	end
+
+	killvar 'ml_tempsong_freshness'
+	killvar 'ml_tempsong_lastcalcday'
+	killvar 'ml_tempsong_hotcat'
+	killvar 'ml_tempsong_skilllevel'
+	killvar 'ml_tempsong_uploaded'
+	killvar 'ml_threshold_skilllevel'
+
+end
+
+if $ARGS[0] = 'internetcount':
+
+	if ml_online_minute >= 60:
+		internet -= 1
+		ml_online_minute -= 60
+	end
+end
 --- music_onlinemusic ---------------------------------

+ 2 - 0
locations/obj_din.qsrc

@@ -316,6 +316,8 @@ if $ARGS[0] = 'skills':
 	if pcs_instrmusic > 0: 'Instrumental Music - <<pcs_instrmusic>>'
 	if pcs_photoskl > 0: 'Photography - <<pcs_photoskl>>'
 	if pcs_artskls > 0: 'Artistic Skills - <<pcs_artskls>>'
+	if pcs_perform > 0: 'Performance - <<pcs_perform>>'
+	if pcs_musicprod > 0: 'Music Production - <<pcs_pcs_musicprodperform>>'
 
 	'</td><td width="25%" cellspacing="0" cellpadding="10" valign="top">'
 	'<b>Job Skills</b>'

+ 1 - 1
locations/pav_commcenter.qsrc

@@ -18,7 +18,7 @@ else
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/dk_night.jpg"></center>'
 end
 
-if month > 8 and ml_guitarlessonadv = 0: gt 'music_guitarlesson', 'advertisement'
+if month > 8 and ml_guitarlesson['advertisement']  = 0: gt 'music_guitarlesson', 'advertisement'
 
 if hour >= 20 and hour <= 23 and week >= 5 and week < 7:
 	'The entrance to the Community Centre is full of young people, the guys are just hanging around smoking and joking. The girls in small groups, all dressed up and gossiping. You see the bushes moving, Pavlovsks'' famous make out garden.'

+ 19 - 9
locations/pav_commclubs.qsrc

@@ -77,22 +77,32 @@ if hour >= 12 and hour < 20:
 		end
 	end
 
-	if ml_guitarlessonadv = 1 and ml_enquired = 0:
+	if ml_guitarlesson['advertisement'] = 1 and ml_guitarlesson['enquired'] = 0:
 		act 'Enquire about the guitar lessons': gt 'music_guitarlesson', 'enquiry'
 	end
 
-	if ml_lessonday = 8:
+	if  ml_guitarlesson['lessonday']  = 8:
 		act 'Arrange a lesson day': gt 'music_guitarlesson', 'setlessonday'
 	end
 
-	if (daystart - ml_guitarlessonday) + ml_glessonweekday >= 8 and ml_lessonday = week:
-		if age <= 18:
-			ml_gitlesson_cost = 300
-		else
-			ml_gitlesson_cost = 500
+	if (ml_guitarlesson['nextlesson'] = daystart):
+		if (ml_guitarlesson['lessonhour']-1 = hour): 
+			if (money >= ml_guitarlesson['lessoncost']):
+				act 'Wait for your guitar lesson (<<ml_guitarlesson[''lessoncost'']>> rubles)': 
+					minut += (60 - minut)
+					gt 'music_guitarlesson', 'lesson'
+				end
+			else
+				act 'Wait for your guitar lesson (<font color="red"><<ml_guitarlesson[''lessoncost'']>> rubles</font>))':'<font color="red">You don''t have enough money to pay for the lesson.</font>' 
+			end
+		end
+		if (ml_guitarlesson['lessonhour'] = hour):		
+			if (money >= ml_guitarlesson['lessoncost']):
+				act 'Go to your guitar lesson (<<ml_guitarlesson[''lessoncost'']>> rubles)': gt 'music_guitarlesson', 'lesson'
+			else
+				act 'Go to your guitar lesson (<font color="red"><<ml_guitarlesson[''lessoncost'']>> rubles</font>))':'<font color="red">You don''t have enough money to pay for the lesson.</font>' 
+			end
 		end
-		
-		act 'Go to your guitar lesson (<<ml_gitlesson_cost>> rubles)': gt 'music_guitarlesson', 'lesson'
 	end
 else
 	'Club''s closed.'

+ 5 - 4
locations/pav_commercial.qsrc

@@ -144,9 +144,10 @@ act 'Walk to the Five Eight estate (0:05)':minut += 5 & gt 'pav_complex', 'start
 act 'Walk to the train station (0:10)':minut += 10 & gt 'pav_train'
 act 'Walk to the highway (0:15)':minut += 15 & nroad = 20 & gt 'road'
 
-if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitar['carried'] = 1 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and ml_performance['max_perform_minutes'] >= 15:
 	*nl
 	'With the weather being pleasant and sunny, there are groups of people moving around the streets. You could play some music, practice performing songs and maybe make some money too.'
+	ml_buskingtime =  min((ml_performance['max_perform_minutes']-ml_performance['performed_minutes']), 60)
 	if pcs_inhib < 30: 
 		if pcs_inhib < 10: 
 			$diff = 'hard'
@@ -159,7 +160,7 @@ if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitarWit
 		gs 'willpower', 'skill', 'self', $diff
 		will_cost = (will_cost * 3) - (pcs_perform)
 		if will_cost <= pcs_willpwr:
-			act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+			act 'Start busking (<<ml_buskingtime>> minutes) (<<will_cost>> Willpower)': 
 				inhib_exp += rand(1,3)
 				gs 'willpower', 'pay', 'self'
 				gs 'stat'
@@ -170,11 +171,11 @@ if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitarWit
 				end
 			end
 		else	
-			act 'Start busking (1 hour) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+			act 'Start busking (<<ml_buskingtime>> minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 		end
 		
 	else
-		act 'Start busking (1 hour)':
+		act 'Start busking (<<ml_buskingtime>> minutes)':
 			gs 'music_buskingevents', 'busking', 'pav'
 			if rand(0,100) > 80 and (pcs_instrmusic + pcs_vokal + pcs_perform) >= 120 and hotcat >= 5:
 				gt 'music_gigstarts', 'delparco_start', 'pav_commercial'

+ 6 - 4
locations/pav_park.qsrc

@@ -170,9 +170,11 @@ if $ARGS[0] = 'start':
 	end
 
 
-	if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+	if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitar['carried'] = 1 and ml_performance['performed_minutes'] < ml_performance['max_perform_minutes'] and ml_performance['max_perform_minutes'] >= 15:
 		*nl
 		'With the weather being pleasant and sunny, the parks is full of people enjoying the weather. You could play some music, practice performing songs and maybe make some money too.'
+		ml_buskingtime =  min((ml_performance['max_perform_minutes']-ml_performance['performed_minutes']), 60)
+		
 		if pcs_inhib < 30: 
 			if pcs_inhib < 10: 
 				$diff = 'hard'
@@ -185,7 +187,7 @@ if $ARGS[0] = 'start':
 			gs 'willpower', 'skill', 'self', $diff
 			will_cost = (will_cost * 3) - (pcs_perform)
 			if will_cost <= pcs_willpwr:		
-				act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+				act 'Start busking (<<ml_buskingtime>> minutes) (<<will_cost>> Willpower)': 
 					inhib_exp += rand(1,3)
 					gs 'willpower', 'pay', 'self'
 					gs 'stat'
@@ -195,10 +197,10 @@ if $ARGS[0] = 'start':
 					end						
 				end
 			else	
-				act 'Start busking (1 hour) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+				act 'Start busking (<<ml_buskingtime>> minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 			end		
 		else	
-			act 'Start busking (1 hour)':
+			act 'Start busking (<<ml_buskingtime>> minutes)':
 				gs 'music_buskingevents', 'busking', 'pav'
 				if rand(0,100) > 75 and (pcs_instrmusic + pcs_vokal + pcs_perform) >= 120 and hotcat >= 5:
 					gt 'music_gigstarts', 'delparco_start', 'pav_park'

+ 2 - 2
locations/preSYS.qsrc

@@ -452,7 +452,7 @@ if $ARGS[0] = 'charselect':
 	act 'Random personality':
 !! This allows the player to select a random personality.
 		*clr & cla
-		persrand = rand(0, 17)
+		persrand = rand(0, 18)
 		if persrand <= 3:
 		!! Nerd
 			gs 'preSYS', 'nerdinfo'
@@ -511,7 +511,7 @@ if $ARGS[0] = 'charselect':
 				killvar 'persrand'
 				gs 'preSYS', 'alternative'
 			end
-		elseif persrand <= 17:
+		elseif persrand <= 18:
 		!! Outcast
 			gs 'preSYS', 'outcastinfo'
 			if persrand = 14:

+ 34 - 0
locations/saveupdater.qsrc

@@ -811,5 +811,39 @@ if gruptipe[9000] = 0:
 end
 !!--------0.8.0.1---school social group adjustment
 
+
+!!--------0.8.1--- Music variable names changed
+ml_guitar['carried'] = ml_guitarWithMe
+ml_guitar['hasguitar'] = ml_guitar
+ml_performance['performed_minutes'] = ml_performed_minutes
+ml_performance['max_perform_minutes'] = ml_max_perform_minutes
+
+ml_guitarlesson['lessonday'] = ml_lessonday
+$ml_guitarlesson['lessonday'] = $ml_lessonday
+ml_guitarlesson['lessonhour'] = 15
+ml_guitarlesson['nextlesson'] = daystart + (ml_guitarlesson['lessonday'] + 7 - week)
+ml_guitarlesson['advertisement'] = ml_guitarlessonadv
+ml_guitarlesson['enquired'] = ml_enquired
+
+if age < 18: 
+	ml_guitarlesson['lessoncost'] = 300
+else
+	ml_guitarlesson['lessoncost'] = 500
+end
+
+killvar 'ml_guitarWithMe'
+killvar 'ml_guitar'
+killvar 'ml_performed_minutes'
+killvar 'ml_max_perform_minutes'
+killvar 'ml_guitarlessonadv'
+killvar 'ml_enquired'
+killvar 'ml_lessonday'
+killvar '$ml_lessonday'
+killvar 'ml_lessoncost'
+
+
+!!--------0.8.1--- Music variable names changed
+
+
 --- saveupdater ---------------------------------
 

+ 6 - 6
locations/sitr.qsrc

@@ -90,22 +90,22 @@ if student > 0 and kursovik < 100:
 end
 
 !!Storing and picking up the guitar
-if ml_guitarWithMe = 1:
+if ml_guitar['carried'] = 1:
 	act 'Place the guitar next to your desk': 
-		ml_guitarWithMe = 0
+		ml_guitar['carried'] = 0
 		ml_guitarAtHome = 1
 		gt $loc
 	end
 elseif ml_guitarAtHome = 1:
 	act 'Pick up the guitar':
-		ml_guitarWithMe = 1
+		ml_guitar['carried'] = 1
 		ml_guitarAtHome = 0
 		gt $loc
 	end
 end
 
 !!Guitar practice 
-if ml_guitar = 1 and (ml_chordbook = 1 or ml_guitarlessoncount > 0) and ml_performed_minutes <= ml_maxperform_minutes:
+if ml_guitar['hasguitar'] = 1 and (ml_guitar['chordbook'] = 1 or ml_guitarlesson['lessoncount'] > 0) and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 	act 'Practice guitar (0:30)': gt 'music_bedroomPractice', 'guitar'
 end
 		
@@ -114,7 +114,7 @@ if ml_online['account'] = 0 and internet > 0:
 end
 
 !! Streaming music 
-if ml_online['account'] = 1 and internet > 0 and ml_performed_minutes <= ml_maxperform_minutes:
+if ml_online['account'] = 1 and internet > 0 and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 	if pcs_inhib < 30:
 		if pcs_inhib < 10: 
 			$diff = 'hard'
@@ -142,7 +142,7 @@ if ml_online['account'] = 1 and internet > 0 and ml_performed_minutes <= ml_maxp
 end
 
 !! Recording music
-if ml_performed_minutes <= ml_maxperform_minutes:
+if ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 	if pcs_inhib < 20:
 		if pcs_inhib < 10: 
 			$diff = 'medium'

+ 2 - 0
locations/stat_display.qsrc

@@ -1280,6 +1280,8 @@ else
 		if pcs_instrmusic > 0: gs 'show_table', '<<pcs_instrmusic>> Instrumental Music', '2'
 		if pcs_photoskl > 0: gs 'show_table', '<<pcs_photoskl>> Photography', '2'
 		if pcs_artskls > 0: gs 'show_table', '<<pcs_artskls>> Artistic Skills', '2'
+		if pcs_perform > 0: gs 'show_table', '<<pcs_perform>> Performance', '2'		
+		if pcs_musicprod > 0: gs 'show_table', '<<pcs_musicprod>> Music Production', '2'		
 	end
 
 	!!----------------------Job skills------------------------

+ 1 - 0
locations/stat_sklattrib.qsrc

@@ -88,6 +88,7 @@ $skl_name[35] = 'bushcraft'
 $skl_name[36] = 'cleaning'
 $skl_name[37] = 'bkbll'
 $skl_name[38] = 'cheer'
+$skl_name[39] = 'musicprod'
 
 !!Trait Section
 !!This is where Traits that will affect attribute or skill advancement or degradation have those aspects defined.

+ 3 - 0
locations/stat_sklattrib_lvlset.qsrc

@@ -198,6 +198,9 @@ perform[1] = 6 & perform[2] = 7 & perform[3] = -1
 pcs_cheer = (cheer_lvl + (pcs_agil + pcs_react + pcs_vital) / 3) / 2
 cheer[1] = 1 & cheer[2] = 2 & cheer[3] = 4 & cheer[4] = -1
 
+!!Music Production: Recording, mixing and producing music
+pcs_musicprod = (musicprod_lvl + (pcs_intel + pcs_prcptn + pcs_sprt) / 3) / 2
+musicprod[1] = 5 & musicprod[2] = 3 & musicprod[3] = 7 & musicprod[4] = -1
 
 !!Skiing; Should be self-explanatory
 !!To add this skill, copy this "$skl_name[x] = 'skng'" to the end of the skils list above and replace the x with the next index number, then remove the comment and bracket marks on the next two lines and delete this line