Procházet zdrojové kódy

Merge remote-tracking branch 'netuttki/master'

KevinSmarts před 4 roky
rodič
revize
3e1d19eddd

+ 9 - 0
glife.qproj

@@ -777,6 +777,8 @@
 		<Location name="yarik"/>
 		<Location name="zoomagazine"/>
 		<Location name="budgetclothes"/>
+		<Location name="city_musicstore"/>
+		<Location name="city_musicstore_stock"/>
 	</Folder>
 	<Folder name="Photo studio">
 		<Location name="foto"/>
@@ -871,6 +873,13 @@
 		<Location name="boyfrend"/>
 		<Location name="boylove"/>
 	</Folder>
+	<Folder name="music">
+		<Location name="music_bedroompractice"/>
+		<Location name="music_onlinemusic"/>
+ 		<Location name="music_gigstarts"/>
+   		<Location name="music_guitarlesson"/>   
+   		<Location name="music_buskingevents"/>
+	</Folder>
 	<Folder name="Lover">
 		<Location name="girl"/>
 		<Location name="girlfriend"/>

+ 136 - 0
locations/bedrPar.qsrc

@@ -254,6 +254,142 @@ if pcs_sewng >= 80:
 	end
 end
 
+if ml_guitarWithMe = 1:
+	act 'Place the guitar next to your desk': 
+		ml_guitarWithMe = 0
+		ml_guitarAtHome = 1
+		gt 'bedrPar', 'start'
+	end
+elseif ml_guitarAtHome = 1:
+	act 'Pick up the guitar':
+		ml_guitarWithMe = 1
+		ml_guitarAtHome = 0
+		gt 'bedrPar', 'start'
+	end
+end
+
+if hour > 8 and hour < 20:
+
+	if ml_guitar = 1 and (ml_chordbook = 1 or ml_guitarlessoncount > 0) and ml_performed_minutes <= ml_maxperform_minutes:
+		if sisterHere = 1 and 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 * 3) - (pcs_perform)
+			if will_cost <= pcs_willpwr:
+				act 'Practice guitar (0:30) (<<will_cost>> Willpower)': 
+					inhib_exp += rand(0,1)
+					gs 'willpower', 'pay', 'self'
+					gs 'stat'
+					gt 'music_bedroomPractice', 'guitar'
+				end
+			else
+				act 'Practice guitar (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You feel too embarrassed to pick up your guitar in front of people</font>'
+			end
+		else
+			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 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 * 3) - (pcs_perform)
+	
+			if will_cost <= pcs_willpwr:
+				act 'Live stream (1:00) (<<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>'
+			end
+		else 
+			act 'Live stream (1:00)': gt 'music_onlinemusic', 'liveStream'			
+		end
+	end
+
+	!! Recording music
+	if ml_guitar = 1 and sisterHere = 0 and ml_performed_minutes <= ml_maxperform_minutes:
+		if pcs_inhib < 20:
+			if pcs_inhib < 10: 
+				$diff = 'medium'
+			elseif pcs_inhib < 20: 
+				$diff = 'easy'
+			end
+			gs 'willpower', 'skill', 'self', $diff
+
+			if will_cost <= pcs_willpwr:
+				act 'Record a song with your phone (0:30) (<<will_cost>> Willpower)': 
+					inhib_exp += rand(1,2)	
+					gs 'willpower', 'pay', 'self'
+					gs 'stat'
+					gt 'music_onlinemusic', 'recordSong'
+				end							
+				if komp = 1 and webcamera = 1 and ml_studio['scarlet-3rd-gen'] = 1:
+					act 'Record and edit a song (2:00) (<<will_cost>> Willpower)': 
+						inhib_exp += rand(1,2)	
+						gs 'willpower', 'pay', 'self'
+						gs 'stat'
+						gt 'music_onlinemusic', 'recordAndEditSong' 
+					end						
+				end
+			else	
+				act 'Record a song (0:30) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+				act 'Record and edit a song (1:30) (<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 'Record a song with your phone (0:30)': gt 'music_onlinemusic', 'recordSong'
+			if komp = 1 and webcamera = 1 and ml_studio['scarlet-3rd-gen'] = 1:
+				act 'Record and edit a song (1:30)': gt 'music_onlinemusic', 'recordAndEditSong'
+			end	
+		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 sisterHere = 0 and breastpump = 1 and bp_unbox <= 0:
 	'<a href="exec: gt ''lact_bp'', ''bp_unbox_event''">Unbox</a> your breast pump'
 elseif kid >= 1 and breastpump = 1 and bp_unbox <= 0:

+ 64 - 0
locations/cikl.qsrc

@@ -1855,5 +1855,69 @@ else
 end
 
 
+
+!!------------------------------------------------------------------------------------------------------------
+
+!!-------------Music career related variables and calculations------------------------------------------------
+
+!! 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
+
+
+!! 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
+    
+	:looponlinesongs        
+!!      this so every song counts only every 7 days and only for a limited number of weeks 
+		if ml_onlinesong_freshness[i] > 0:		
+			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]
+			*nl
+			if ml_tempsong_lastcalcday[j] <= (daystart - 7) and ml_tempsong_uploaded = 1:
+            	pav_music += rand(0, ml_tempsong_freshness[j]/50)
+            	city_music += rand(0, ml_tempsong_freshness[j]/100)
+            	ml_tempsong_freshness[j] -= 10
+            	ml_tempsong_lastcalcday[j] = daystart
+
+			end
+			j += 1
+		end
+		i += 1
+	if i < ml_onlinesongcount: jump 'looponlinesongs'
+
+	killvar 'ml_onlinesong_freshness'
+	killvar 'ml_onlinesong_lastcalcday'
+	killvar 'ml_onlinesong_hotcat'
+	killvar 'ml_onlinesong_skilllevel'
+	killvar 'ml_onlinesong_uploaded'
+
+	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'
+
+	killvar 'ml_tempsong_freshness'
+	killvar 'ml_tempsong_lastcalcday'
+	killvar 'ml_tempsong_hotcat'
+	killvar 'ml_tempsong_skilllevel'
+	killvar 'ml_tempsong_uploaded'
+
+end
+
 --- cikl ---------------------------------
 

+ 30 - 0
locations/city_center.qsrc

@@ -101,6 +101,36 @@ 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:
+	*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.'
+	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 * 3) - (pcs_perform)
+		if will_cost <= pcs_willpwr:
+			act 'Start busking (1 hour) (<<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>'
+		end
+		
+	else
+		act 'Start busking (1 hour)': gs 'music_buskingevents', 'busking', 'city'
+	end	
+end
+
 if car > 0 and cardrive = 2:'In the parking stands your <a href="exec:GS ''carF'', ''start''"><<$car>></a>.'
 
 act 'Wait':gs 'obj_din', 'wait'

+ 98 - 0
locations/city_musicstore.qsrc

@@ -0,0 +1,98 @@
+# city_musicstore
+
+if $ARGS[0] = 'musicshop':
+	*clr & cla	
+	if ml_musicstorevisited = 0:
+			ml_musicstorevisited = 1
+			gt 'city_musicstore', 'firstvisit'
+	else
+		'<center><img src="images/locations/city/citycenter/mall/musicstore/music-store-600.jpg"></center>'
+		'You enter the store, welcomed by the familiar mix of random notes and bits of songs screaming from the back.'
+		'Jimmy just nods at you, then returns his attention to the guitar laying on the counter in front of him.'
+
+		act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
+		act 'Try some guitars': 
+!!			TODO: Better scenes here			
+			if pcs_instrmusic < 30 and pcs_performing < 10:
+				'You pick up a guitar to try it, but you are too shy and after strumming a few chords you put it back on it''s stand'
+			else
+				'Some texts here depending on music skill and performing skill'			
+			end
+		end
+		act 'Leave': 
+			if ml_boughtguitar > 0 or ml_boughtamp > 0:
+				gt 'city_musicstore', 'payandtakestuff'
+			end
+			gt 'torgcentr'
+		end
+	end
+
+end
+
+if $ARGS[0] = 'firstvisit':
+	'<center><img src="images/locations/city/citycenter/mall/musicstore/music-store-600.jpg"></center>'
+	*nl
+	'You enter the store, passing the door to be submerged in a loud, cacophonic environment. 
+	The walls are filled with guitars, and in the back three teenaged guys are trying instruments in a very loud way.'
+
+!!	TODO: Replace the image, Waynes world is fun but silly
+
+	'<center><img src="images/locations/city/citycenter/mall/musicstore/waynesworld.jpg"></center>'
+	*nl
+    'A tall, dark haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
+   	'He straightens up "Hello there, I''m Jimmy" - he greets you - "Is there anything I can help you with?"'
+	*nl
+	'<center><img src="images/locations/city/citycenter/mall/musicstore/jimmy.jpg"></center>'
+	*nl
+  	'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.'
+				'While the guitar is not the best sounding one it''s comfortable' + iif(money <= 5000, ' and looking at the price tags, the only one you can afford.','.')
+			
+				act 'Buy a cheap acoustic guitar (3,400 <b>P</b>)': 
+					*clr & cla
+					'<center><img src="images/locations/city/citycenter/mall/musicstore/starterkit.jpg"></center>'
+					'You finally decide to buy the guitar, taking it to the checkout. Jimmy throws in a bag to carry the gitar and a set of strings and picks. "A proper starter kit" he states and rings up the purchase.'
+					'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
+					money -= 3400
+					gs 'stat'
+					act 'Leave': gt 'torgcentr'
+				end
+				act 'Leave': gt 'torgcentr'
+			end
+		end
+
+	act 'Leave': gt 'torgcentr'
+end
+
+
+if $ARGS[0] = 'payandtakestuff':
+	if ml_boughtamp + ml_guitarWithMe > 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
+		'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>>."'
+	end
+	killvar 'ml_boughtamp'
+	killvar 'ml_boughtguitar'
+	killvar 'ml_gigbag'
+	killvar 'ml_hardcase'
+	act 'Leave': gt 'torgcentr'
+end
+--- city_musicstore ---------------------------------

+ 261 - 0
locations/city_musicstore_stock.qsrc

@@ -0,0 +1,261 @@
+# city_musicstore_stock
+
+if $ARGS[0]='electric':
+    *clr & cla
+    $store = 'musicstore'
+    '<center><table border=1>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+        </TH>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+        </TH>
+        <TH>
+            <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>
+        </TH>
+    </table></center>'
+
+    '<center><table>
+        <tr>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/burny-rlg55-vld.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/epiphone-les-paul-express.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/fender-american-professional-stratocaster.jpg" align="left"></td>
+        </tr>
+        <tr>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/fender-player-tele.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/gibson-2019-les-paul.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/yamaha-pacifica-012-rm.jpg" align="left"></td>
+        </tr>
+    </table>
+    </center>' 
+    act 'Leave': gt 'city_musicstore', 'musicshop'
+
+    if karta >= 43990 and  ml_guitars['burny-rlg55-vld'] = 0:
+        act 'Buy the Burny RLG55 VLD (43,990 P)': 
+            ml_guitars['burny-rlg55-vld'] = 1
+            karta -= 43990
+            ml_boughtguitar += 1  
+            ml_gigbag = 1          
+            gt 'city_musicstore_stock', 'electric'
+        end        
+    end
+
+    if karta >= 14280  and ml_guitars['epiphone-les-paul-express'] = 0:
+        act 'Buy the Epiphone Les Paul Express (14,280 P)': 
+            ml_guitars['epiphone-les-paul-express'] = 1
+            karta -= 14280
+            ml_boughtguitar += 1   
+            ml_gigbag = 1         
+            gt 'city_musicstore_stock', 'electric'
+        end        
+    end
+
+    if karta >= 179000 and ml_guitars['fender-american-professional-stratocaster'] = 0:
+        act 'Buy the Fender American Professional Stratocaster (179,000 P)':
+            ml_guitars['fender-american-professional-stratocaster'] = 1
+            karta -= 179000            
+            ml_boughtguitar += 1 
+            ml_hardcase = 1           
+            gt 'city_musicstore_stock', 'electric'
+        end
+    end
+
+    if karta >= 83000 and ml_guitars['fender-player-tele'] = 0:
+        act 'Buy the Fender Player Tele (83,000 P)':
+            ml_guitars['fender-player-tele'] = 1
+            karta -= 83000
+            ml_boughtguitar += 1            
+            ml_hardcase = 1  
+            gt 'city_musicstore_stock', 'electric'
+        end
+    end
+
+    if karta >= 241000 and ml_guitars['gibson-2019-les-paul'] = 0:
+        act 'Buy the Gibson 2019 Les Paul (241,000 P)':
+            ml_guitars['gibson-2019-les-paul'] = 1
+            karta -= 241000
+            ml_boughtguitar += 1  
+            ml_hardcase = 1            
+            gt 'city_musicstore_stock', 'electric'
+        end        
+    end 
+
+    if karta >= 17990 and ml_guitars['yamaha-pacifica-012-rm'] = 0:
+        act 'Buy the Yamaha Pacifica 012 RM (17,900 P)':
+            ml_guitars['yamaha-pacifica-012-rm'] = 1
+            karta -= 17990
+            ml_boughtguitar += 1    
+            ml_gigbag =  1        
+            gt 'city_musicstore_stock', 'electric'
+        end
+    end
+end
+
+
+if $ARGS[0]='acoustic':
+    *clr & cla
+    $store = 'musicstore'
+    '<center><table border=1>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+        </TH>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+        </TH>
+        <TH>
+            <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>
+        </TH>
+    </table></center>'
+
+    '<center><table border=1>
+        <tr>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-hdc-28e.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-d10e-01.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-ed-sheeran.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-lx-1.jpg" align="left"></td>
+        </tr>
+    </table>
+    </center>'
+    act 'Leave': gt 'city_musicstore', 'musicshop'
+
+    if karta >= 320000 and ml_guitars['martin-hdc-28e'] = 0:
+        act 'Buy the Martin HDC-28E (320,000 P)': 
+            ml_guitars['martin-hdc-28e'] = 1
+            karta -= 320000
+            ml_boughtguitar += 1  
+            ml_hardcase = 1 
+            if ml_guitarWithMe = 0: ml_guitarWithMe = 1       
+            gt 'city_musicstore_stock', 'acoustic'
+        end
+    end
+
+    if karta >= 81990 and ml_guitars['martin-d10e-01'] = 0:    
+        act 'Buy the Martin D-10E-01 (81,990 P)':
+            ml_guitars['martin-d10e-01'] = 1
+            karta -= 81990
+            ml_boughtguitar += 1 
+            ml_hardcase = 1
+            if ml_guitarWithMe = 0: ml_guitarWithMe = 1    
+            gt 'city_musicstore_stock', 'acoustic'
+        end
+    end
+
+    if karta >= 63900 and ml_guitars['martin-ed-sheeran'] = 0:
+        act 'Buy the Martin Ed Sheeran Signature Edition (63,900 P)':
+            ml_guitars['martin-ed-sheeran'] = 1
+            karta -= 63900
+            ml_boughtguitar += 1     
+            ml_hardcase = 1
+            if ml_guitarWithMe = 0: ml_guitarWithMe = 1          
+            gt 'city_musicstore_stock', 'acoustic'
+        end
+    end
+
+    if karta >= 41990 and ml_guitars['martin-lx-1'] = 0:
+        act 'Buy the Martin LX-1 (41,900 P)': 
+            ml_guitars['martin-lx-1'] = 1
+            karta -= 41900
+            ml_boughtguitar += 1
+            ml_gigbag = 1
+            if ml_guitarWithMe = 0: ml_guitarWithMe = 1   
+            gt 'city_musicstore_stock', 'acoustic'
+        end
+    end
+end
+
+if $ARGS[0]='amplifier':
+    *clr & cla
+    $store = 'musicstore'
+    '<center><table border=1>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+        </TH>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+        </TH>
+        <TH>
+            <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>
+        </TH>
+    </table></center>'
+
+    '<center><table>
+        <tr>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/kustom-kg112fx.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/orange-rocker-32.jpg" align="left"></td>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/blackstar-artisan-15.jpg" align="left"></td>
+        </tr>
+    </table>
+    </center>'
+    act 'Leave': gt 'city_musicstore', 'musicshop'
+    if karta >= 10790 and ml_amplifiers['kustom-kg112fx'] = 0:
+        act 'Buy Kustom KG112FX (10,790 P)':
+            ml_amplifiers['kustom-kg112fx'] = 1
+            karta -= 10790
+            ml_boughtamp += 1
+            gt 'city_musicstore_stock', 'amplifier'
+        end
+    end
+
+    if karta >= 99990 and ml_amplifiers['orange-rocker-32'] = 0:
+        act 'Buy Kustom KG112FX (99,990 P)':
+            ml_amplifiers['orange-rocker-32'] = 1
+            karta -= 99990
+            ml_boughtamp += 1
+            gt 'city_musicstore_stock', 'amplifier'
+        end
+    end
+
+    if karta >= 145900 and ml_amplifiers['blackstar-artisan-15'] = 0:
+        act 'Buy Kustom KG112FX (145.900 P)':
+            ml_amplifiers['blackstar-artisan-15'] = 1
+            karta -= 145900
+            ml_boughtamp += 1
+            gt 'city_musicstore_stock', 'amplifier'
+        end
+    end
+end
+
+if $ARGS[0]='studio':
+    *clr & cla
+    $store = 'musicstore'
+    '<center><table border=1>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+        </TH>
+        <TH>
+            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+        </TH>
+        <TH>
+            <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>
+        </TH>
+    </table></center>'
+
+    '<center><table>
+        <tr>
+            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/home-studio.jpg" align="left"></td>
+        </tr>
+    </table>
+    </center>'
+    act 'Leave': gt 'city_musicstore', 'musicshop'
+    if karta >= 19980 and ml_studio['scarlet-3rd-gen'] = 0:
+        act 'Buy Focusrite Scarlett Solo Studio 3rd Gen (19,980 P)':
+            ml_studio['scarlet-3rd-gen'] = 1
+            karta -= 19980
+            ml_boughtamp += 1
+            gt 'city_musicstore_stock', 'studio'
+        end
+    end
+end
+--- city_musicstore_stock ---------------------------------

+ 31 - 0
locations/city_park.qsrc

@@ -180,6 +180,37 @@ if $ARGS[0] = 'start':
 		'You could go for a run in the park if you were wearing sports clothes and shoes.'
 	end
 
+
+	if hour >= 8 and hour <= 20 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+		*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.'
+		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 * 3) - (pcs_perform)
+			if will_cost <= pcs_willpwr:				
+				act 'Start busking (1 hour) (<<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>'
+			end
+			
+		else
+			act 'Start busking (1 hour)': gs 'music_buskingevents', 'busking', 'city'
+		end
+	end
+
 	if hour <= 7 or hour >= 21:
 		!!Succubus active hunting, can only hunt successfully once a day, but can try until success
 		If succubusQW = 5 and suchuntday ! daystart:

+ 29 - 0
locations/liames.qsrc

@@ -95,6 +95,35 @@ 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:
+	*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.'
+	
+	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 * 3) - (pcs_perform)
+		if will_cost <= pcs_willpwr:
+			act 'Start busking (1 hour) (<<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>'
+		end		
+	else
+		act 'Start busking (1 hour)': gs 'music_buskingevents', 'busking', 'oldtown'
+	end
+end
 
 if hour >= 15 and hour <= 22 and tusa = 0:
 	act 'Go to the local hangout':

+ 31 - 0
locations/music_bedroompractice.qsrc

@@ -0,0 +1,31 @@
+# music_bedroompractice
+
+if $ARGS[0] = 'guitar':
+	*clr & cla
+	minut += 30
+	ml_performed_minutes += 15
+
+	'<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:
+		'You open the book you got from Jimmy and start to practice the chords and basic techniques on the guitar'
+		instrmusic_exp += rand(1,3)
+		
+	elseif ml_guitarlessoncount = 0 and ml_chordbook = 1 and instrmusic_lvl > 15 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:
+		'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:
+		'You pick up you guitar and the lessons from the guitar teacher and start to practice.'
+		instrmusic_exp += rand(2,5)
+	end
+	if $loc = 'sitr':
+		act 'Finish practice': gt $loc
+	else
+		act 'Finish practice': gt $loc, 'start'
+	end
+end
+
+
+--- music_bedroompractice ---------------------------------

+ 48 - 0
locations/music_buskingevents.qsrc

@@ -0,0 +1,48 @@
+# music_buskingevents
+
+if $ARGS[0] = 'busking':
+	minut += 60	
+	instrmusic_exp += rand(1,3)
+	vokal_exp += rand(1,3)
+	perform_exp += rand(1,2)
+	
+	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
+!!	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'	
+end
+
+if $ARGS[0] = 'calculate_tips':
+	
+	if $ARGS[1] = 'city':
+		ml_location_mod = 6
+	elseif $ARGS[1] = 'pav':
+		ml_location_mod = 1
+	elseif $ARGS[1] = 'oldtown'
+		ml_location_mod = 3
+	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)
+
+	killvar 'ml_location_mod'
+	killvar 'ml_time_mod'	
+end
+
+--- music_buskingevents ---------------------------------

+ 54 - 0
locations/music_gigstarts.qsrc

@@ -0,0 +1,54 @@
+# music_gigstarts
+
+!!	This is where all the gig introduction meetings will go (pub owners, cafe managers, etc.)
+
+if $ARGS[0] = 'delparco_start':
+	'<center><img src="images/pc/activities/music/busking.jpg"></center>'
+	'As you finish your set, a tall woman steps up to you with a smile. "Hi, you are really good at this." she looks at you thoughtfully, then nods. "I''m Zariyah, I''m managing Del Parco and we are planning to run some live music evenings. Would you be interested in playing in a more formal setting?"'
+	
+	if pcs_inhib < 30:
+        if pcs_inhib < 10: 
+			$diff = 'hard'
+		elseif pcs_inhib < 20: 
+			$diff = 'medium'
+		elsei
+			$diff = 'easy'
+		end
+
+		gs 'willpower', 'skill', 'self', $diff
+		will_cost = (will_cost * 3) - (pcs_perform)
+		if will_cost <= pcs_willpwr:
+			act 'Accept (<<will_cost>> Willpower)': gt 'music_gigstarts', 'delparco_accept'
+		else	
+			act 'Accept (<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 'Accept (<<will_cost>> Willpower)': gt 'music_gigstarts', 'delparco_accept'
+    end
+	
+    act 'Decline': gt 'music_gigstarts', 'delparco_decline'
+end
+
+
+if $ARGS[0] = 'delparco_accept':
+	*clr & cla
+	ml_venues['del_parco'] = 1
+	ml_delparcoQW = 1
+	'<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.'
+	act 'Leave': gt $loc, 'start'
+end
+
+if $ARGS[0] = 'delparco_decline':
+	*clr & cla
+	ml_venues['del_parco'] = 1	
+	'<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."'
+	act 'Leave': gt $loc, 'start'
+end
+
+
+--- music_gigstarts ---------------------------------

+ 112 - 0
locations/music_guitarlesson.qsrc

@@ -0,0 +1,112 @@
+# music_guitarlesson
+
+if $ARGS[0] = 'enquiry':
+	'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.
+	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?"'
+	' "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?"'
+	npc_rel['ML1'] = 45
+	ml_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>'
+	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."'
+		act 'Leave': gt 'pav_commclubs'
+	end
+end
+
+if $ARGS[0] = 'setlessonday':
+!!	TODO: Write the proper scene here
+	'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>'
+end
+
+
+if $ARGS[0] = 'firstLesson':
+!!	TODO: Write a proper scene here
+	
+	gt 'music_guitarlesson', 'lesson'
+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>'	
+	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.'
+	else
+		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'
+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.'
+	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
+	act 'Leave': gt 'pav_commclubs'
+end
+
+
+if $ARGS[0] = 'advertisement':
+	ml_guitarlessonadv = 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
+	'<center><img src="images/locations/pavlovsk/community/guitarlesson/glessonad.jpg"></center>'
+	
+	act 'Leave': gt 'pav_commcenter'
+	
+end
+
+--- music_guitarlesson ---------------------------------

+ 181 - 0
locations/music_onlinemusic.qsrc

@@ -0,0 +1,181 @@
+# music_onlinemusic
+
+if $ARGS[0] = 'setupAccount':
+	ml_online['account'] = 1
+	'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'
+end
+
+
+if $ARGS[0] = 'liveStream':
+	internet -= 1
+	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)
+		ml_famebase = ( pcs_instrmusic + pcs_vokal + pcs_perform + ( (hotcat-5) * 20 ) ) / 100
+		pav_music += rand(0, ml_famebase)
+		city_music += rand(0, ml_famebase)
+		instrmusic_exp += rand(0,2)		
+		vokal_exp += rand(0,2)	
+		perform_exp += rand(0,3)	
+		karta += superchats
+		ml_online['livestreamcount'] += 1
+		ml_performed_minutes += 60
+		'<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.'
+		end
+
+	end
+	act 'Stop the stream': gt $loc, 'start'
+end
+
+if $ARGS[0] = 'recordSong':
+!!	TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
+	'<center><img <<$set_imgh>> src="images/pc/activites/music/phonerecording.jpg"/></center>'
+	'You set up your phone and settle down comfortably to record a song. After several tries you finally end up with a version you are content with and upload it to your account.'
+	'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
+	instrmusic_exp += rand(1,4)		
+	vokal_exp += rand(1,4)	
+	perform_exp += rand(1,3)	
+	ml_performed_minutes += 15
+
+	ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
+	ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
+	ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
+	ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
+	ml_onlinesong_uploaded[ml_onlinesongcount] = 0
+	ml_uploadablemusic += 1
+	ml_onlinesongcount += 1		
+
+	if ml_online['account'] = 1 and internet > 0:
+		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
+		else
+			act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
+		end
+	else 
+		act 'Leave': gt $loc, 'start'
+	end
+end
+
+if $ARGS[0] = 'recordAndEditSong':
+!!	TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
+	'<center><img <<$set_imgh>> src="images/pc/activities/music/phonerecording.jpg"/></center>'
+	'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
+
+	ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
+	ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + pcs_musicprod
+	ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
+	ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + pcs_musicprod + ((hotcat-4)*10)
+	ml_onlinesong_uploaded[ml_onlinesongcount] = 0
+	ml_uploadablemusic += 1
+	ml_onlinesongcount += 1	
+
+	if ml_online['account'] = 1 and internet > 0:
+		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
+		else 
+			act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
+		end
+	else
+		if $loc = 'sitr':
+			act 'Leave': gt $loc
+		else
+			act 'Leave': gt $loc, 'start'
+		end
+	end
+
+end
+
+
+if $ARGS[0] = 'uploadmusic':
+	if will_cost > 0:
+		'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_uploadablemusic -= 1 
+	ml_onlinesong_uploaded[ml_onlinesongcount-1] = 1
+
+	killvar 'will_cost'
+
+	if $loc = 'sitr':
+		act 'Leave': gt $loc
+	else
+		act 'Leave': gt $loc, 'start'
+	end
+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 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."'
+	end
+	i = 0
+	:uploadallmusic			
+		if ml_onlinesong_uploaded[i] = 0: 
+			ml_onlinesong_uploaded[i] = 1
+			ml_uploadablemusic -= 1 
+		end
+		i += 1
+	if i < ml_onlinesongcount:jump 'uploadallmusic'
+
+	killvar 'will_cost'
+
+	if $loc = 'sitr':
+		act 'Leave': gt $loc
+	else
+		act 'Leave': gt $loc, 'start'
+	end
+end
+
+
+--- music_onlinemusic ---------------------------------

+ 2 - 0
locations/pav_commcenter.qsrc

@@ -18,6 +18,8 @@ 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 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.'
 	'You hear people in the alley beside the club. <a href="exec:minut += 5 & gt ''ugel''">Investigate</a>.'

+ 20 - 0
locations/pav_commclubs.qsrc

@@ -76,6 +76,26 @@ if hour >= 12 and hour < 20:
 			act 'Leave': gt 'pav_commclubs'
 		end
 	end
+
+	if ml_guitarlessonadv = 1 and ml_enquired = 0:
+		act 'Enquire about the guitar lessons': gt 'music_guitarlesson', 'enquiry'
+	end
+
+	if ml_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
+		end
+		
+		act 'Go to your guitar lesson (<<ml_gitlesson_cost>> rubles)': gt 'music_guitarlesson', 'lesson'
+	end
+	
+end
 else
 	'Club''s closed.'
 end

+ 39 - 0
locations/pav_commercial.qsrc

@@ -147,6 +147,45 @@ 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:
+	*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.'
+	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 * 3) - (pcs_perform)
+		if will_cost <= pcs_willpwr:
+			act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+				inhib_exp += rand(1,3)
+				gs 'willpower', 'pay', 'self'
+				gs 'stat'
+				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'
+				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>'
+		end
+		
+	else
+		act 'Start busking (1 hour)':
+			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'
+			end		
+		end
+	end		
+end
+
 act 'Wait':gs 'obj_din', 'wait'
 
 !!if rand (0,2) ! 0:gs 'din_bad' & dynamic $mobile_check

+ 40 - 0
locations/pav_park.qsrc

@@ -169,6 +169,46 @@ if $ARGS[0] = 'start':
 		end
 	end
 
+
+	if hour >= 8 and hour <= 22 and sunWeather = 1 and temper >= 15 and ml_guitarWithMe = 1 and ml_performed_minutes <= ml_maxperform_minutes:
+		*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.'
+		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 * 3) - (pcs_perform)
+			if will_cost <= pcs_willpwr:		
+				act 'Start busking (1 hour) (<<will_cost>> Willpower)': 
+					inhib_exp += rand(1,3)
+					gs 'willpower', 'pay', 'self'
+					gs 'stat'
+					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'
+					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>'
+			end		
+		else	
+			act 'Start busking (1 hour)':
+				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'
+				end				
+			end
+		end		
+	end
+
+
+
 	if mey_vika['mey_vika_qw'] > 0 and mey_vika['mey_vika_qw'] < 27 and mey_vika['qw_day'] ! daystart:
 		if hour >= 20 or (week > 5 and hour < 8) or (week < 6 and week mod 2 = 0 and hour < 14) or (week mod 2 = 1 and hour < 18):
 			'<br>Vicky and Vanya never are in the park at this time.'

+ 112 - 0
locations/sitr.qsrc

@@ -89,6 +89,118 @@ if student > 0 and kursovik < 100:
 	end
 end
 
+!!Storing and picking up the guitar
+if ml_guitarWithMe = 1:
+	act 'Place the guitar next to your desk': 
+		ml_guitarWithMe = 0
+		ml_guitarAtHome = 1
+		gt $loc
+	end
+elseif ml_guitarAtHome = 1:
+	act 'Pick up the guitar':
+		ml_guitarWithMe = 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:
+	act 'Practice guitar (0:30)': gt 'music_bedroomPractice', 'guitar'
+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_online['account'] = 1 and internet > 0 and ml_performed_minutes <= ml_maxperform_minutes:
+	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 * 3) - (pcs_perform)
+
+		if will_cost <= pcs_willpwr:
+			act 'Live stream (1:00) (<<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>'
+		end
+	else 
+		act 'Live stream (1:00)': gt 'music_onlinemusic', 'liveStream'			
+	end
+end
+
+!! Recording music
+if ml_performed_minutes <= ml_maxperform_minutes:
+	if pcs_inhib < 20:
+		if pcs_inhib < 10: 
+			$diff = 'medium'
+		elseif pcs_inhib < 20: 
+			$diff = 'easy'
+		end
+		gs 'willpower', 'skill', 'self', $diff
+
+		if will_cost <= pcs_willpwr:
+			act 'Record a song with your phone (0:30) (<<will_cost>> Willpower)': 
+				inhib_exp += rand(1,2)	
+				gs 'willpower', 'pay', 'self'
+				gs 'stat'
+				gt 'music_onlinemusic', 'recordSong'
+			end							
+			if komp = 1 and webcamera = 1 and ml_studio['scarlet-3rd-gen'] = 1:
+				act 'Record and edit a song (2:00) (<<will_cost>> Willpower)': 
+					inhib_exp += rand(1,2)	
+					gs 'willpower', 'pay', 'self'
+					gs 'stat'
+					gt 'music_onlinemusic', 'recordAndEditSong' 
+				end						
+			end
+		else	
+			act 'Record a song (0:30) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+			act 'Record and edit a song (1:30) (<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 'Record a song with your phone (0:30)': gt 'music_onlinemusic', 'recordSong'
+		if komp = 1 and webcamera = 1 and ml_studio['scarlet-3rd-gen'] = 1:
+			act 'Record and edit a song (1:30)': gt 'music_onlinemusic', 'recordAndEditSong'
+		end	
+	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
+
 act 'Go out on the balcony': gt 'balkon','start'
 
 gs 'events', 'read'

+ 5 - 0
locations/torgcentr.qsrc

@@ -47,6 +47,11 @@ if hour >= 8 and hour <= 20:
 	*p '<a href="exec: minut += 3 & gt ''shopdacha''"><img src="images/locations/city/citycenter/mall/constructiont.png"></a>'
 !! Ilyich and Biryukov Construction - Builders / Land developers
 
+	act 'Go to the O''Skull Music Store': 
+		ml_boughtamp = 0
+		ml_boughtguitar = 0
+		gt 'city_musicstore', 'musicshop'
+	end
 
 	act 'Leave': minut += 5 & gt 'city_center'
 	act 'Go to the supermarket': gt 'shop', 'start'