Forráskód Böngészése

Village market cleanup

Cleaned up to display better and better organized the code
Thekingofsweden 9 éve
szülő
commit
332fa1ea99
1 módosított fájl, 130 hozzáadás és 129 törlés
  1. 130 129
      locations/Grinok

+ 130 - 129
locations/Grinok

@@ -6,166 +6,167 @@ gs 'stat'
 gs 'time'
 '<center><h4>market</h4></center>'
 '<center><img src="images/pic/Grinok.jpg"></center>'
-'Located near the small market <a href="exec:minut += 3 & gt ''vokzalG''">station</a>'
+'This small market is location near the station.'
 
-if hour >= 12 and hour <= 18:
-	'In the market the sellers of goods and beckoning shoppers.'
+act 'Go back to the station':minut += 3 & gt 'vokzalG'
 
-	act 'Wander through the market':
-		cls
-		minut += 15
-		gs 'stat'
+if hour < 12 or hour > 18:
+	'In the market there is no one.'
+	if arturQW = 1 and (week = 6 or week = 7) and hour < 12:
+		act 'Wait for Arthur':hour = 12 & gt 'grinok'
+	end
+	exit
+end
 
-		'Stroll on the market for hot deals (0:15)'
-		if arturKnow = 0:rinevtip = rand(0, 6)
-		if arturKnow = 1:rinevtip = rand(0, 5)
+'In the market the sellers of goods and beckoning shoppers.'
 
-		if rinevtip = 0:
-			kosmpayrand = rand(3, 8)
-			kosmpay = kosmpayrand * 100
-			'You see that sell pretty cheap cosmetics for <<kosmpay>> rubles'
+act 'Wander through the market':
+	cls
+	minut += 15
+	gs 'stat'
 
-			if money >= kosmpay:
-				act 'Buy':
-					cls
-					minut += 15
-					money -= kosmpay
-					kosmetica += rand(10, 40)
-					gs 'stat'
-					gt $curloc
-				end
+	'Stroll on the market for hot deals (0:15)'
+	if arturKnow = 0:
+		temp = rand(0, 6)
+	else
+		temp = rand(0, 5)
+	end
+
+	if temp = 0:
+		kosmpay = rand(3, 8) * 100
+		'You see that sell pretty cheap cosmetics for <<kosmpay>> rubles.'
+
+		if money >= kosmpay:
+			act 'Buy':
+				cls
+				minut += 15
+				money -= kosmpay
+				kosmetica += rand(10, 40)
+				gs 'stat'
+				gt $curloc
 			end
-		elseif rinevtip = 1:
-			tovpayrand = rand(2, 5)
-			tovpay = tovpayrand * 100
-			'You see that sell for Vitaminki <<tovpay>> rubles'
+		end
+	elseif temp = 1:
+		tovpay = rand(2, 5) * 100
+		'You see that sell for Vitaminki <<tovpay>> rubles.'
 
-			if money >= tovpay:
-				act 'Buy':
-					cls
-					minut += 15
-					vitamin += 20
-					money -= tovpay
-					gt $curloc
-				end
+		if money >= tovpay:
+			act 'Buy':
+				cls
+				minut += 15
+				vitamin += 20
+				money -= tovpay
+				gt $curloc
 			end
-		elseif rinevtip = 2:
-			tovpayrand = rand(2, 8)
-			tovpay = tovpayrand * 10
-			'You see that sell condoms <<tovpay>> rubles'
+		end
+	elseif temp = 2:
+		tovpay = rand(2, 8) * 10
+		'You see that sell condoms <<tovpay>> rubles.'
 
-			if money >= tovpay:
-				act 'Buy':
-					cls
-					minut += 15
-					prezik += 5
-					money -= tovpay
-					gt $curloc
-				end
+		if money >= tovpay:
+			act 'Buy':
+				cls
+				minut += 15
+				prezik += 5
+				money -= tovpay
+				gt $curloc
 			end
-		elseif rinevtip = 3:
-			tovpayrand = rand(5, 10)
-			tovpay = tovpayrand * 100
-			'You see that sell lip balm for <<tovpay>> rubles'
+		end
+	elseif temp = 3:
+		tovpay = rand(5, 10) * 100
+		'You see that sell lip balm for <<tovpay>> rubles.'
 
+		if money >= tovpay:
+			act 'Buy':
+				cls
+				minut += 15
+				lipbalm += 20
+				money -= tovpay
+				gt $curloc
+			end
+		end
+	elseif temp = 4:
+		tovpay = rand(1, 5) * 1000
+		'You see that sell for handbag <<tovpay>> rubles.'
+
+		if bag = 0:
 			if money >= tovpay:
-				act 'Buy':
+				act 'buy':
 					cls
 					minut += 15
-					lipbalm += 20
+					bag = 1
 					money -= tovpay
 					gt $curloc
 				end
 			end
-		elseif rinevtip = 4:
-			tovpayrand = rand(1, 5)
-			tovpay = tovpayrand * 1000
-			'You see that sell for handbag <<tovpay>> rubles'
-
-			if bag = 0:
-				if money >= tovpay:
-					act 'buy':
-						cls
-						minut += 15
-						bag = 1
-						money -= tovpay
-						gt $curloc
-					end
-				end
-			elseif bag > 0:
-				'Hmm, you already have a bag, why do you need another.'
-			end
-		elseif rinevtip = 5:
-			if pornmarkonce = 0:pornmarkonce = 1
-			'Strolling on the market you accidentally wander into the far corner where they sell porn.'
-
-			act 'come_Up':gt 'Gpornmark'
-		elseif rinevtip = 6:
-			'Suddenly you hail "Hey devyushka, want tangerine skyushat?"'
-
-			act 'Look':gt 'arturRinok', 'start'
+		else
+			'Hmm, you already have a bag, why do you need another.'
 		end
+	elseif temp = 5:
+		if pornmarkonce = 0:pornmarkonce = 1
+		'Strolling on the market you accidentally wander into the far corner where they sell porn.'
 
-		act 'Move on':gt $curloc
-	end
+		act 'Go to the area with the porn':gt 'Gpornmark'
+	else
+		'Suddenly you hail "Hey devyushka, want tangerine skyushat?"'
 
-	if pornmarkonce = 1:
-		act 'Go to the area with porn':gt 'Gpornmark'
+		act 'Look':gt 'arturRinok', 'start'
 	end
 
-	if arturKnow = 1 and arturQW = 0:
-		act 'Go to Arthur':gt 'arturRinok', 'start'
-	elseif arturQW = 1 and (week = 6 or week = 7):
-		if hour = 12 or hour = 13:
-			act 'Go to Arthur':gt 'arturRinok', 'work_1'
-		end
-	elseif arturQW = 2:
-		if hour = 16 and minut >= 0 and minut <= 30:
-			act 'Go to Arthur':gt 'arturRinok', 'work_2'
-		elseif hour < 16:
-			act 'Wait Arthur':hour = 16 & gt 'Grinok'
-		end
-	end
+	act 'Move on':gt $curloc
+end
 
-	act 'Go to the book tray':
-		cls
-		minut += 15
-		gs 'stat'
-		'On the counter is a very entertaining fantasy book, which costs only 150 rubles and more are women''s novels in paperback standing 300 rubles.'
+if pornmarkonce = 1:
+	act 'Go to the area with porn':gt 'Gpornmark'
+end
 
-		if money >= 150:
-			act 'Buy fantasy book (150 rubles)':
-				cls
-				minut += 15
-				money -= 150
-				f_book += 1
-				gs 'stat'
-				'You bought the book for fantasy 150 rubles.'
+if arturKnow = 1 and arturQW = 0:
+	act 'Go to Arthur':gt 'arturRinok', 'start'
+elseif arturQW = 1 and (week = 6 or week = 7):
+	if hour = 12 or hour = 13:
+		act 'Go to Arthur':gt 'arturRinok', 'work_1'
+	end
+elseif arturQW = 2:
+	if hour = 16 and minut >= 0 and minut <= 30:
+		act 'Go to Arthur':gt 'arturRinok', 'work_2'
+	elseif hour < 16:
+		act 'Wait Arthur':hour = 16 & gt 'Grinok'
+	end
+end
 
-				act 'Leave':gt $curloc
-			end
+act 'Go to the book tray':
+	cls
+	minut += 15
+	gs 'stat'
+	'On the counter is a very entertaining fantasy book, which costs only 150 rubles and more are women''s novels in paperback standing 300 rubles.'
+
+	if money >= 150:
+		act 'Buy fantasy book (150 rubles)':
+			cls
+			minut += 15
+			money -= 150
+			f_book += 1
+			gs 'stat'
+			'You bought the book for fantasy 150 rubles.'
+
+			act 'Leave':gt $curloc
 		end
+	end
 
-		if money >= 300:
-			act 'Buy ladies'' novel (300 rubles)':
-				cls
-				minut += 15
-				money -= 300
-				w_book += 1
-				gs 'stat'
-				'You bought a ladies'' novel for 300 rubles.'
+	if money >= 300:
+		act 'Buy ladies'' novel (300 rubles)':
+			cls
+			minut += 15
+			money -= 300
+			w_book += 1
+			gs 'stat'
+			'You bought a ladies'' novel for 300 rubles.'
 
-				act 'Leave':gt $curloc
-			end
+			act 'Leave':gt $curloc
 		end
-
-		act 'Leave':gt $curloc
-	end
-else
-	'In the market there is no one.'
-	if arturQW = 1 and (week = 6 or week = 7) and hour < 12:
-		act 'Wait Arthur':hour = 12 & gt 'Grinok'
 	end
+
+	act 'Leave':gt $curloc
 end
 
 --- Grinok ---------------------------------