Browse Source

[fixed] Changed the free internat access system to use a flag and not add to your account to prevent the adding 9999 credit bug

Kevin_Smarts 1 year ago
parent
commit
2ab959878c

+ 23 - 34
locations/Komp.qsrc

@@ -21,16 +21,15 @@ if $ARGS[0] = 'start':
 
 	!!act 'SunReview of the Dead':gt 'KGZstart'
 
-	if $loc = 'shulga_room' or $loc = 'anushapt' or $loc = 'artemhome' or $loc = 'albinahome' or $loc = 'pav_library':
-		internet_store = internet
-		internet = 100000
-		act 'Browse the internet':gt 'komp', 'brows'
-	elseif $loc = 'dachain':
-		internet_store = internet
-		internet = 0
-	else	
-		'You have <<internet>> hours of prepaid internet access remaining.'
-		if internet > 0: act 'Browse the internet':gt 'komp', 'brows'
+	if internet_free = 2:
+		'There is no internet access here.'
+	elseif
+		if internet_free = 1:
+			'You have free internet access here.'
+		else
+			'You have <<internet>> hours of prepaid internet access remaining.'
+		end
+		if internet > 0 or internet_free = 1: act 'Browse the internet':gt 'komp', 'brows'
 	end
 
 	act 'Shut your computer down': 
@@ -44,14 +43,10 @@ if $ARGS[0] = 'brows':
 	menu_off = 0
 	
 	act 'Close the browser':
-		if $loc = 'shulga_room' or $loc = 'anushapt' or $loc = 'artemhome' or $loc = 'dachain' or $loc = 'albinahome' or $loc = 'pav_library':
-			internet = internet_store
-			killvar 'internet_store'
-		end
 		gt 'komp','start'
 	end
 	
-	if internet <= 0:
+	if internet <= 0 and internet_free = 0:
 		'<center><b>Browser</b></center>'
 		'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/eror.jpg"></center>'
 		'You have no prepaid internet access remaining. You need to buy more, before you can go online again.'
@@ -95,7 +90,7 @@ if $ARGS[0] = 'sale':
 	*clr & cla	
 	minut += 60
 	elektro += 3
-	internet -= 1
+	if internet_free = 0: internet -= 1
 
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/komp.jpg"></center>'
@@ -138,7 +133,7 @@ if $ARGS[0] = 'porno':
 	*clr & cla
 	gs 'stat'
 
-	if internet <= 0:
+	if internet <= 0 and internet_free = 0:
 		'<center><b>Browser</b></center>'
 		'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/eror.jpg"></center>'
 		'You have no prepaid internet access remaining. You need to buy more, before you can go online again.'
@@ -160,7 +155,7 @@ if $ARGS[0] = 'porno':
 			*clr & cla
 			elektro += 3
 			pcs_mood += rand(10, 20)
-			internet -= 1
+			if internet_free = 0: internet -= 1
 			gs 'stat'
 			'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/porno.jpg"></center>'
 			'You find a video you think you''d enjoy, and spend some time watching it. Wow, that girl is so lucky...'
@@ -179,7 +174,7 @@ end
 
 if $ARGS[0] = 'masturbate':
 	*clr & cla
-	internet -= 1
+	if internet_free = 0: internet -= 1
 	elektro += 1
 	gs 'sweat', 'add', 10
 
@@ -231,7 +226,7 @@ if $ARGS[0] = 'znak':
 	minut += 60
 	pcs_mood += 5
 	elektro += 3
-	internet -= 1
+	if internet_free = 0: internet -= 1
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/komp.jpg"></center>'
 	'You enter a dating site, and immediately see all sorts of profiles of both men and women.'
@@ -291,7 +286,7 @@ if $ARGS[0] = 'kabtv':
 	*clr & cla
 	minut += 60
 	elektro += 3
-	internet -= 1
+	if internet_free = 0: internet -= 1
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/komp.jpg"></center>'
 	'You check out the website of the local cable TV provider. A subscription for cable TV costs 300 <b>₽</b> per month, payable on the 25th.'
@@ -335,7 +330,7 @@ if $ARGS[0] = 'foto':
 	*clr & cla
 	gs 'stat'
 
-	if internet <= 0:
+	if internet <= 0 and internet_free = 0:
 		'<center><b>Browser</b></center>'
 		'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/eror.jpg"></center>'
 		'You have no prepaid internet access remaining. You need to buy more, before you can go online again.'
@@ -354,7 +349,7 @@ if $ARGS[0] = 'foto':
 				cla
 				minut += 60
 				elektro += 3
-				internet -= 1
+				if internet_free = 0: internet -= 1
 				fotsearchrand = rand(0,10)
 
 				if fotsearchrand <= 7:
@@ -400,7 +395,7 @@ end
 
 if $ARGS[0] = 'rabota':
 	*clr & cla
-	if internet <= 0:
+	if internet <= 0 and internet_free = 0:
 		'<center><b>Browser</b></center>'
 		'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/eror.jpg"></center>'
 		'You have no prepaid internet access remaining. You need to buy more, before you can go online again.'
@@ -408,7 +403,7 @@ if $ARGS[0] = 'rabota':
 		act 'Close the browser':gt 'komp','brows'
 	else
 		minut += 60
-		internet -= 1
+		if internet_free = 0: internet -= 1
 		komprabota = rand(0, 10)
 		if $loc = 'shulga_room':komprabota = rand(5, 15)
 		gs 'stat'
@@ -513,7 +508,7 @@ if $ARGS[0] = 'study':
 	*clr & cla
 	minut = minut + 60
 	elektro = elektro + 3
-	internet -= 1
+	if internet_free = 0: internet -= 1
 	intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
 	compskl_exp += 1
 	'<center><b>The Institute for Education Measurement</b></center>'
@@ -527,7 +522,7 @@ if $ARGS[0] = 'agent':
 	*clr & cla
 	minut += 60
 	elektro += 3
-	internet -= 1
+	if internet_free = 0: internet -= 1
 	gs 'stat'
 	gs 'housing', 'rent'
 	gs 'housing', 'sale'
@@ -1841,13 +1836,7 @@ if $ARGS[0] = 'hotornot':
 	end
 end
 
-if $ARGS[0] = 'fin': 
-	if $loc = 'shulga_room' or $loc = 'anushapt' or $loc = 'artemhome' or $loc = 'dachain' or $loc = 'albinahome' or $loc = 'pav_library': 
-		internet = internet_store
-		killvar 'internet_store'
-	end
-	gt $loc, $loc_arg
-end
+if $ARGS[0] = 'fin': gt $loc, $loc_arg
 
 
 --- komp ---------------------------------

+ 2 - 1
locations/anushapt.qsrc

@@ -575,6 +575,7 @@ if $ARGS[0] = 'anushroom':
 	CLOSE ALL
 	$track_loop = ''
 	music_loop = 1
+	internet_free = 0
 	*clr & cla
 	minut += 1
 	gs 'stat'
@@ -898,7 +899,7 @@ if $ARGS[0] = 'computer':
 		*clr & cla
 		'You decide to use Anushka''s computer. You''re sure she wouldn''t mind.'
 		act 'Turn the computer off':gt 'anushapt','anushroom'
-		act 'Go online': gt 'Komp', 'start'
+		act 'Go online': internet_free = 1 & gt 'Komp', 'start'
 		act 'Check out her porn':
 			*clr & cla
 			'<center><h4><font color="maroon">Anushka''s Room</font></h4></center>'

+ 4 - 3
locations/artemhome.qsrc

@@ -275,6 +275,7 @@ if $ARGS[0] = 'artemroom':
 	CLOSE ALL
 	$track_loop = ''
 	music_loop = 1
+	internet_free = 0
 	*clr & cla
 	minut += 1
 	gs 'stat'
@@ -553,14 +554,14 @@ if $ARGS[0] = 'computer':
 		'"I saved up my allowance for years before I could afford it." He says.'
 		'"Mind if I use it? I want to check my emails and stuff." You ask him.'
 		'He nods. "Sure go ahead."'
-		act 'Go online': gt 'Komp', 'start'
+		act 'Go online': internet_free = 1 & gt 'Komp', 'start'
 		act 'Find something else to look at':gt 'artemhome','artemroom'
 	elseif ArtemLoc = 2 and ArtemCompUse > 0:
 		'You look at the computer, then at Artem. Artem meets your look... and breaks into a smile. "Go ahead and use it if you want. I don''t mind."'
-		act 'Go online': gt 'Komp', 'start'
+		act 'Go online': internet_free = 1 & gt 'Komp', 'start'
 		act 'Find something else to look at':gt 'artemhome','artemroom'
 	else
-		act 'Go online': gt 'Komp', 'start'
+		act 'Go online': internet_free = 1 & gt 'Komp', 'start'
 		act 'Find something else to look at':gt 'artemhome','artemroom'
 	end
 end

+ 2 - 2
locations/dachain.qsrc

@@ -9,7 +9,7 @@ if $args[0] = 'start':
 	$menu_loc = 'dachain'
 	$menu_arg = 'start'
 	menu_off = 0
-	internetS = internet
+	internet_free = 0
 
 	killvar '$locclass'
 	gs 'themes', 'indoors'
@@ -31,7 +31,7 @@ if $args[0] = 'start':
 	if stol = 1:$stol = 'a new <a href="exec:gt ''stol'', ''start''">table</a>'
 	'In front of the window there is <<$stol>>.'
 	*nl
-	if komp = 1:'Your <a href="exec: gt ''Komp'',''start''">laptop</a> is on the table.'
+	if komp = 1:'Your <a href="exec: internet_free = 2 & gt ''Komp'',''start''">laptop</a> is on the table, but there is no internet coverage here.'
 	*nl
 	
 	if hour >= 6 and hour <= 20 and etoexhib = 11:'Kopashatsya working in the garden, hmm... maybe sometime <a href="exec:gt ''etoexhib'', ''pos10''">motivate</a> for them to work quicker and smarter.'

+ 2 - 1
locations/pav_library.qsrc

@@ -7,13 +7,14 @@ $menu_loc = 'pav_library'
 $menu_arg = ''
 menu_off = 0
 frost = 0
+internet_free = 0
 gs 'stat'
 gs 'themes', 'indoors'
 '<center><b><font color="maroon">Community center library</font></b></center>'
 '<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/gdkbibl.jpg"></center>'
 'For such a small town, the library is surprisingly large - containing many interesting books on a wide variety of subjects.'
 *nl
-'Between the bookshelves are some tables which can be used for studying. Some of them have <a href="exec: gt ''Komp'',''start''">computers</a> for public use.'
+'Between the bookshelves are some tables which can be used for studying. Some of them have <a href="exec: internet_free = 1 & gt ''Komp'',''start''">computers</a> for public use.'
 if lernHome > 0:
 'You could do your homework with the help of one of the computers.'
 end

+ 2 - 1
locations/shulga_room.qsrc

@@ -17,6 +17,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 	$loc_arg = 'start'
 	$loc = 'shulga_room'
 	$locclass = 'livingr'
+	internet_free = 0
 	!Daily discussions:
 	!Vasily
 	if bazar_day ! daystart: bazar_count = 10
@@ -86,7 +87,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 		end
 	end
 
-	'There are two sofas next to a <a href="exec: gt ''shulga_room'', ''shultv''">TV</a>, and a <a href="exec: gt ''Komp'',''start''">laptop</a> sitting on a table covered in empty beer bottles.'
+	'There are two sofas next to a <a href="exec: gt ''shulga_room'', ''shultv''">TV</a>, and a <a href="exec: internet_free = 1 & gt ''Komp'',''start''">laptop</a> sitting on a table covered in empty beer bottles.'
 	if hour >= 0 and hour < 7: '<a href="exec: gt ''shulga_room'', ''shulga_bazar_sleep''">Vasily</a> is sleeping on the big couch'
 
 	shulga_room_rnd = rand(0,2)