Преглед изворни кода

More fix for shop stock item

illume пре 7 година
родитељ
комит
a66f2e7f8a
9 измењених фајлова са 130 додато и 107 уклоњено
  1. 9 3
      locations/_buy_item
  2. 3 2
      locations/_buy_single_item
  3. 11 7
      locations/_single_stock_item
  4. 27 14
      locations/_stock_item
  5. 19 19
      locations/gaptek
  6. 7 5
      locations/kiosk
  7. 2 2
      locations/pharmacy
  8. 7 6
      locations/rinok
  9. 45 49
      locations/shop

+ 9 - 3
locations/_buy_item

@@ -1,16 +1,22 @@
 # $buy_item
 !! call this to actually buy an item from a store
 
+!! ARGS 0 is the value to set the variable to
+!! ARGS 1 is the item description
+!! ARGS 2 is the price
+!! ARGS 3 is the variable name for the item
+!! ARGS 4 is the location to go back to
+!! ARGS 5 is $metka
+
 count = ARGS[0]
 $item = $ARGS[1]
 price = ARGS[2]
 $variable_name = $ARGS[3]
-$location = $ARGS[4]
 
 dynamic "set <<$variable_name>> += <<count>>"
 set money -= price
-$message = '<font color="green">You bought <<count>> <b><<$item>></b>.</font>'
-gt $location
+$message = '<center><font color="green">You bought <<count>> <b><<$item>></b>.</font></center>'
+gt $ARGS[4], $ARGS[5]
 
 --- $buy_item ---------------------------------
 

+ 3 - 2
locations/_buy_single_item

@@ -7,11 +7,12 @@
 !! ARGS 2 is the price
 !! ARGS 3 is the variable name for the item
 !! ARGS 4 is the location to go back to
+!! ARGS 5 is $metka
 
 dynamic "set <<$ARGS[3]>> = <<ARGS[0]>>"
 set money -= ARGS[2]
-$message = '<font color="green">You bought a <b><<$ARGS[1]>></b>.</font>'
-gt $location
+$message = '<center><font color="green">You bought a <b><<$ARGS[1]>></b>.</font></center>'
+gt $ARGS[4], $ARGS[5]
 
 --- $buy_single_item ---------------------------------
 

+ 11 - 7
locations/_single_stock_item

@@ -8,8 +8,10 @@
 !! ARGS 2 is the price
 !! ARGS 3 is the variable name for the item
 !! ARGS 4 is the location to go back to
-!! ARGS 5 > 0 to  force-disable buy link
-$location = $ARGS[4]
+!! ARGS 5 is $metka
+!! ARGS 6 > 0 to  force-disable buy link
+!! ARGS 7 is replacement text for 6
+!$location = $ARGS[4]
 
 !! This will check to see if the item is already owned
 dynamic "$RESULT = iif(<<$ARGS[3]>> >= <<ARGS[0]>>, '', 'not owned')"
@@ -19,11 +21,13 @@ end
 
 $RESULT = '<tr>' + _
 '<td align="center"><<FUNC(''$stock_item_info'', $ARGS[3])>></td>' + _
-'<td align="center"><<$ARGS[1]>></td>' + _
-'<td></td>' + _
-'<td align="right">'
-if money >= ARGS[2] and ARGS[5] < 1:
-	$RESULT += '<a href="exec: gs ''$buy_single_item'', <<ARGS[0]>>, ''<<$ARGS[1]>>'', <<ARGS[2]>>, ''<<$ARGS[3]>>'', ''<<$ARGS[4]>>''">buy</a>'
+'<td align="center"><<$ARGS[1]>></td>'
+if ARGS[6] > 0:
+	$RESULT += '<td colspan=2 align=center>'+$ARGS[7]+'</td>'
+elseif money >= ARGS[2]:
+	$RESULT += '<td>not owned</td><td align="left"><a href="exec: gs ''$buy_single_item'', <<ARGS[0]>>, ''<<$ARGS[1]>>'', <<ARGS[2]>>, ''<<$ARGS[3]>>'', ''<<$ARGS[4]>>''">buy</a>'
+else
+	$RESULT += 	'<td>not owned</td><td></td>'
 end
 $RESULT += '</td><td align="left">for <<ARGS[2]>> <b>₽</b></td></tr>'
 

+ 27 - 14
locations/_stock_item

@@ -2,25 +2,38 @@
 !! generic function to be used to stock items in stores
 !! see # pharmacy for an example of use
 
+!! ARGS 0 is the value identifying when the item is owned
+!! it is assumed that anything >= the value is acceptable, this allows for upgrades like regular tv to plasma
+!! ARGS 1 is the item description
+!! ARGS 2 is the price
+!! ARGS 3 is the variable name for the item
+!! ARGS 4 is the location to go back to
+!! ARGS 5 is $metka
+!! ARGS 6 > 0 to  force-disable buy link
+!! ARGS 7 is replacement text for 6
+
 count = ARGS[0]
 $item = $ARGS[1]
-price = ARGS[2]
-$variable_name = $ARGS[3]
-$location = $ARGS[4]
-dynamic 'in_inventory = <<$variable_name>>'
-
-if ARGS[5] < 1:
-	$buy_link = '<a' + iif(money >= price, ' href="exec: gs ''$buy_item'', <<count>>, ''<<$item>>'', <<price>>, ''<<$variable_name>>'', ''<<$location>>''">buy ','>buy ') + count + '</a>'
-else
-	$buy_link = ''
-end
+!price = ARGS[2]
+!$variable_name = $ARGS[3]
+!$location = $ARGS[4]
+dynamic 'in_inventory = <<$ARGS[3]>>'
 
 $RESULT = '<tr>' + _
 '<td align="center"><<FUNC(''$stock_item_info'', $ARGS[3])>></td>' + _
-'<td align="center"><<$item>></td>' + _
-'<td align="right">(you have <<in_inventory>>)</td>' + _
-'<td align="right"><<$buy_link>></td>' + _
-'<td align="left">for <<price>> <b>₽</b></td>' + _
+'<td align="center"><<$ARGS[1]>></td>'
+if ARGS[6] > 0:
+	$RESULT += '<td colspan=2 align=center>'+$ARGS[7]+'</td>'
+else
+	!$buy_link = '<a' + iif(money >= price, ' href="exec: gs ''$buy_item'', <<count>>, ''<<$item>>'', <<price>>, ''<<$variable_name>>'', ''<<$location>>''">buy ','>buy ') + count + '</a>'
+	$RESULT += '<td align="right">(you have <<in_inventory>>)</td>'
+	if money >= ARGS[2]:
+		$RESULT += '<td align=right><a href="exec: gs ''$buy_item'', <<ARGS[0]>>, ''<<$ARGS[1]>>'', <<ARGS[2]>>, ''<<$ARGS[3]>>'', ''<<$ARGS[4]>>'', ''<<$ARGS[5]>>''">buy ' + count + '</a>'
+	else
+		$RESULT += '<td></td>'
+	end
+end
+$RESULT += '<td align="left">for <<ARGS[2]>> <b>₽</b></td>' + _
 '</tr>'
 
 --- $stock_item ---------------------------------

+ 19 - 19
locations/gaptek

@@ -10,17 +10,6 @@ if $ARGS[0] = 'start' or gaptek_loc = 1 or $message ! '':
 	'<center><B><font color="maroon">Pharmacy</font></B></center>'
 	!'<center><img src="images/etogame/aptek.jpg"></center>'
 	'<center><img src="images/qwest/apteka/apteka_worker_1.jpg"></center>'
-	if $message ! '':
-		$message
-		killvar '$message'
-		'"Do you need anything else?"'
-	else
-		if StoryLine = 0:
-			'The woman behind the counter in a white coat. - Hello, what you need?"'
-		else
-			'Aunt Luda is sitting behind the counter, as usual. She gives you a friendly nod when she sees you: "Hi <<$name>>! How are you?"'
-		end
-	end
 
 	act 'Leave the pharmacy':gt 'pavCommercial'
 	
@@ -40,23 +29,34 @@ if $ARGS[0] = 'start' or gaptek_loc = 1 or $message ! '':
 		'The pharmacy is currently closed. There''s a sign on the door, that says it''s open between 8:00 and 20:00 every day.'
 		exit
 	end
-
-	iif($ARGS[1] = '', '', '<center><<$ARGS[1]>></center>')
-	*pl '<center><table align="center">'
-	*P FUNC ('$stock_item', 5, 'condoms', 100, 'prezik', $CURLOC, $ARGS[0], StoryLine)
-	*P FUNC ('$stock_item', 1, 'pregnancy test', 200, 'pregtest', $CURLOC, $ARGS[0], StoryLine)
-	*P FUNC ('$stock_item', 28, 'birth control pills', 500, 'tabletki', $CURLOC, $ARGS[0], StoryLine)
+	'<center>'
+	if $message ! '':
+		$message
+		killvar '$message'
+		'"Do you need anything else?"'
+	else
+		if StoryLine = 0:
+			'The woman behind the counter in a white coat. - Hello, what you need?"'
+		else
+			'Aunt Luda is sitting behind the counter, as usual. She gives you a friendly nod when she sees you: "Hi <<$name>>! How are you?"'
+		end
+	end
+	'</center>'
+	*pl '<center><table align="center" width=80%>' 
+	*P FUNC ('$stock_item', 5, 'condoms', 100, 'prezik', $CURLOC, $ARGS[0], StoryLine, 'Aunt will tell mom!')
+	*P FUNC ('$stock_item', 1, 'pregnancy test', 200, 'pregtest', $CURLOC, $ARGS[0], StoryLine, 'Aunt will tell mom!')
+	*P FUNC ('$stock_item', 28, 'birth control pills', 500, 'tabletki', $CURLOC, $ARGS[0], StoryLine, 'Aunt will tell mom!')
+	*P FUNC ('$stock_item', 5, 'lubricant', 300, 'lubri', $CURLOC, $ARGS[0], StoryLine, 'Aunt will tell mom!')
 	*P FUNC ('$stock_item', 10, 'antibiotics', 500, 'lekarstvo', $CURLOC, $ARGS[0])
 	*P FUNC ('$stock_item', 20, 'vitamin drinks', 500, 'vitamin', $CURLOC, $ARGS[0])
 	*P FUNC ('$stock_item', 16, 'painkillers', 500, 'painkiller', $CURLOC, $ARGS[0])
 	*P FUNC ('$stock_item', 10, 'ointments for chafing', 600, 'mosolmaz', $CURLOC, $ARGS[0])
-	*P FUNC ('$stock_item', 5, 'lubricant', 300, 'lubri', $CURLOC, $ARGS[0], StoryLine)
 	*P FUNC ('$stock_item', 25, 'lip balm', 100, 'lipbalm', $CURLOC, $ARGS[0])
 	*P FUNC ('$stock_item', 1, 'weight loss pill', 2000, 'fatdel', $CURLOC, $ARGS[0])
 	*P FUNC ('$stock_item', 20, 'Tampons', 200, 'tampon', $CURLOC, $ARGS[0])
 	*P FUNC ('$stock_item', 20, 'Sanitary napkins', 200, 'sanpad', $CURLOC, $ARGS[0])
-	*P FUNC ('$single_stock_item', 1, 'enema kit', 500, 'klisma', $CURLOC, $ARGS[0], StoryLine)
 	*P FUNC ('$single_stock_item', 1, 'breast pump', 800, 'breastpump', $CURLOC, $ARGS[0])
+	*P FUNC ('$single_stock_item', 1, 'enema kit', 500, 'klisma', $CURLOC, $ARGS[0], StoryLine, 'You should stealthy')	
 	*P '</table></center>'
 	!! for original start we can just use stockitem, for alt start there are other plot elements involved
 	!strip polt-related item, other use new system

+ 7 - 5
locations/kiosk

@@ -123,7 +123,13 @@ if $kioskloc = 'counter':
 	
 	'<center><img WIDTH = 800 HEIGHT = 500 src="images/community/kiosk/kiosk123.jpg"></center>'
 	'<center><img src="images/community/kiosk/ruch.jpg"></center>'
-	iif($ARGS[1] = '', '', '<center><<$ARGS[1]>></center>')	
+	if $message ! '':
+		'<center>'+$message+'</center>'
+		killvar '$message'
+	else
+		''
+	end	
+	*pl '<center><table align="center" width=80%>' 
 	*pl '<center><table align="center">'
 	*P FUNC ('$stock_item', 20, 'Cigarettes', 50, 'siga', 'kiosk')
 	*P FUNC ('$single_stock_item', 1, 'Fashion magazine', 50, 'fashmag', 'kiosk')
@@ -134,10 +140,6 @@ if $kioskloc = 'counter':
 	*P FUNC ('$single_stock_item', 1, 'Fitness magazine', 50, 'fitmag', 'kiosk')
 	'</table></center>'
 	*pl
-	if $message ! '':
-		$message
-		killvar '$message'
-	end	
 	if money >= 50:
 			act 'Eat snack (50 <b>₽</b>)':
 				money -= 50

+ 2 - 2
locations/pharmacy

@@ -39,9 +39,9 @@ if $ARGS[0] = 'shop' or $ARGS[0] = '':
 	if $message ! '':
 		$message
 		killvar '$message'
-		'"Do you need anything else?"'
+		'<center>"Do you need anything else?"</center>'
 	else
-		'The girl behind the counter in a white coat. - Hello, what you need?"'
+		'<center>The girl behind the counter in a white coat. - Hello, what you need?"</center>'
 	end
 
 	!! output for purchased item

+ 7 - 6
locations/rinok

@@ -26,8 +26,13 @@ if $ARGS[0] = 'start' or $metka = 'start':
 
 	'On one of the stalls has a sign "Cash paid for secondhand clothes", here you can <a href="exec:cloc=2 & gt ''clothing'', ''view_clothing_list'', ''sell''">sell individual items</a> or <a href="exec:gs ''portnoi''">all of your unwanted clothes</a>.'
 
-	iif($ARGS[1] = '', '', '<center><<$ARGS[1]>></center>')
-	*pl '<center><table align="center">'
+	if $message ! '':
+		'<center>'+$message+'</center>'
+		killvar '$message'
+	else
+		''
+	end	
+	*pl '<center><table align="center" width=80%>' 
 	*P FUNC ('$stock_item', 10, 'Dishwashing detergent', 45, 'fairy', 'rinok')
 	*P FUNC ('$stock_item', 10, 'Clothing detergent', 90, 'poroshok', 'rinok')
 	*P FUNC ('$stock_item', 8, 'Plates', 500, 'cltarelka', 'rinok')
@@ -38,10 +43,6 @@ if $ARGS[0] = 'start' or $metka = 'start':
 	*P FUNC ('$stock_item', 5, 'Underwear', 1450, 'clrbelo', 'rinok')
 	*P iif(umbrella = 0, FUNC ('$single_stock_item', 1, 'Umbrella', 1000, 'umbrella', 'rinok'), '')
 	'</table></center>'
-	if $message ! '':
-		$message
-		killvar '$message'
-	end
 	*pl
 	if analplugIN = 1 and tanga = 0 and PCloSkirt > 2:
 		nurand = rand(0, 100)

+ 45 - 49
locations/shop

@@ -215,8 +215,13 @@ if $shoplocation = 'grocery':
 	end
 
 	!! output from purchase
-	iif($ARGS[1] = '', '', '<center><<$ARGS[1]>></center>')
-	*pl '<center><table align="center">' 
+	if $message ! '':
+		'<center>'+$message+'</center>'
+		killvar '$message'
+	else
+		''
+	end	
+	*pl '<center><table align="center" width=80%>' 
 	*P FUNC ('$stock_item', 1, 'Regular food', 50, 'eda', $CURLOC) 
 	*P FUNC ('$stock_item', 10, 'Regular food', 500, 'eda', $CURLOC) 
 	*P FUNC ('$stock_item', 1, 'Diet food', 250, 'edaD', $CURLOC) 
@@ -226,11 +231,6 @@ if $shoplocation = 'grocery':
 	*P iif(bag > 0, FUNC ('$single_stock_item', 1, 'Sandwich', 100, 'buterbrod', $CURLOC), '<tr><td></td><td>Sandwich</td><td colspan=2>You need a handbag</td><td>for 100 <b>₽</b></td></tr>') 
 	*P iif(bag > 0, FUNC ('$single_stock_item', 1, 'Bottle of wine', 500, 'wine', $CURLOC), '<tr><td></td><td>Bottle of wine</td><td colspan=2>You need a handbag</td><td>for 500 <b>₽</b></td></tr>') 
 	*P '</table></center>'
-	if $message ! '':
-		$message
-		killvar '$message'
-	end
-	clr
 	gs 'stat'
 	fcolor = rgb(0, 0, 0)
 	bcolor = rgb(255, 255, 255)
@@ -256,7 +256,12 @@ if $shoplocation= 'cosmetics':
 	end
 
 	!! output from purchase
-	iif($ARGS[1] = '', '', '<center><<$ARGS[1]>></center>')
+	if $message ! '':
+		'<center>'+$message+'</center>'
+		killvar '$message'
+	else
+		''
+	end	
 	*pl '<center><table align="center" width=80%>' 
 	*P FUNC ('$stock_item', 50, 'Cosmetics', 1000, 'kosmetica', $CURLOC) 
 	*P FUNC ('$stock_item', 10, 'Razors', 500, 'stanok', $CURLOC) 
@@ -266,18 +271,12 @@ if $shoplocation= 'cosmetics':
 	*P FUNC ('$stock_item', 30, 'Shampoo', 500, 'shampoo', $CURLOC) 
 	*P FUNC ('$stock_item', 10, 'Hair scrunchies', 80, 'hscrunch', $CURLOC) 
 	*P FUNC ('$stock_item', 12, 'Hair pins', 100, 'hpingrip', $CURLOC)
-	
-	*P iif(bag > 0, FUNC ('$stock_item', 10, 'Wipes', 100, 'salfetka', $CURLOC), '<tr><td></td><td>Wipes</td><td colspan=2>You need a handbag</td><td>for 100 <b>₽</b></td></tr>') 
-	*P iif(bag > 0, FUNC ('$stock_item', 10, 'Portable makeup', 1000, 'kosmetitka', $CURLOC), '<tr><td></td><td>Portable makeup</td><td colspan=2>You need a handbag</td><td>for 1000 <b>₽</b></td></tr>') 
-	*P iif(bag > 0, FUNC ('$stock_item', 20, 'Mouthwash', 400, 'mouthwash', $CURLOC), '<tr><td></td><td>Mouthwash</td><td colspan=2>You need a handbag</td><td>for 400 <b>₽</b></td></tr>') 
-	*P iif(bag > 0, FUNC ('$single_stock_item', 1, 'Comb', 150, 'greben', $CURLOC), '<tr><td></td><td>Comb</td><td colspan=2>You need a handbag</td><td>for 150 <b>₽</b></td></tr>') 
-	*P FUNC ('$single_stock_item', 1, 'Handbag', 5000, 'bag', $CURLOC) 
+	*P FUNC ('$stock_item', 10, 'Wipes', 100, 'salfetka', $CURLOC, '', bag, 'You need a handbag')
+	*P FUNC ('$stock_item', 10, 'Portable makeup', 1000, 'kosmetitka', $CURLOC, '', bag, 'You need a handbag')
+	*P FUNC ('$stock_item', 20, 'Mouthwash', 400, 'mouthwash', $CURLOC, '', bag, 'You need a handbag')
+	*P FUNC ('$single_stock_item', 1, 'Comb', 150, 'greben', $CURLOC, '', bag, 'You need a handbag')
+	*P FUNC ('$single_stock_item', 1, 'Handbag', 5000, 'bag', $CURLOC, '', bag, '')
 	*P '</table></center>'
-	if $message ! '':
-		$message
-		killvar '$message'
-	end
-	clr
 	gs 'stat'
 	fcolor = rgb(0, 0, 0)
 	bcolor = rgb(255, 255, 255)
@@ -306,17 +305,17 @@ if $shoplocation = 'hardware':
 	end
 
 	!! output from purchase
-	iif($ARGS[1] = '', '', '<center><<$ARGS[1]>></center>')
+	if $message ! '':
+		'<center>'+$message+'</center>'
+		killvar '$message'
+	else
+		''
+	end	
 	*pl '<center><table align="center" width=80%>' 
 	*P FUNC ('$stock_item', 20, 'Dishwashing detergent', 100, 'fairy', $CURLOC) 
 	*P FUNC ('$stock_item', 30, 'Clothing detergent', 250, 'poroshok', $CURLOC) 
 	*P FUNC ('$stock_item', 5, 'Plates', 300, 'cltarelka', $CURLOC) 
 	*P '</table></center>'
-	if $message ! '':
-		$message
-		killvar '$message'
-	end
-	clr
 	gs 'stat'
 	fcolor = rgb(0, 0, 0)
 	bcolor = rgb(255, 255, 255)
@@ -363,19 +362,17 @@ if $shoplocation = 'clothing':
 		exit
 	end
 
-	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')
-
-	*pl '<center><table align="center">' + _
-	FUNC ('$stock_item', 1, 'Underwear', 300, 'clrbelo', $CURLOC) + _
-	FUNC ('$stock_item', 7, 'Sale pack of underwear', 2000, 'clrbelo', $CURLOC) + _
-	'</table></center>'
-
-	'<br/>Women''s clothing cost 2,500 <b>₽</b> each.'
 	if $message ! '':
-		$message
+		'<center>'+$message+'</center>'
 		killvar '$message'
-	end
-	clr
+	else
+		''
+	end	
+	*pl '<center><table align="center" width=80%>' 
+	*P FUNC ('$stock_item', 1, 'Underwear', 300, 'clrbelo', $CURLOC) 
+	*P FUNC ('$stock_item', 7, 'Sale pack of underwear', 2000, 'clrbelo', $CURLOC) 
+	*P '</table></center>'
+	'<br/>Women''s clothing cost 2,500 <b>₽</b> each.'
 	gs 'stat'
 	fcolor = rgb(0, 0, 0)
 	bcolor = rgb(255, 255, 255)
@@ -671,24 +668,23 @@ if $shoplocation = 'tech':
 		exit
 	end
 
-	*p iif($ARGS[0] = 'start' or $ARGS[0] = '' or $ARGS[0] = 'move', '<br/>', '<center><<$ARGS[0]>></center>')
-
+	if $message ! '':
+		'<center>'+$message+'</center>'
+		killvar '$message'
+	else
+		''
+	end	
 	*pl '<center><table align="center" width=80%>' 
-	*P iif(housr > 0, FUNC ('$single_stock_item', 1, 'Scondhand Small CRT TV', 5000, 'TV', $CURLOC), '<tr><td></td><td>Scondhand Small CRT TV</td><td colspan=2>costs 5000 <b>₽</b></td><td>You need your own home</td></tr>') 
-	*P iif(housr > 0, FUNC ('$single_stock_item', 2, 'Large Plasma TV', 35000, 'TV', $CURLOC), '<tr><td></td><td>Large Plasma TV</td><td colspan=2>costs 35000 <b>₽</b></td><td>You need your own home</td></tr>') 
+	*P FUNC ('$single_stock_item', 1, 'Scondhand Small CRT TV', 5000, 'TV', $CURLOC, '', housr, 'You need your own home')
+	*P FUNC ('$single_stock_item', 2, 'Large Plasma TV', 35000, 'TV', $CURLOC, '', housr, 'You need your own home')
 	*P FUNC ('$single_stock_item', 1, 'Computer', 25000, 'komp', $CURLOC)
-	*p iif(komp > 0, FUNC ('$single_stock_item', 1, 'Computer game Dead Sunset', 500, 'GameCD2', $CURLOC), '')
-	*P iif(housr > 0, FUNC ('$single_stock_item', 1, 'Dishwasher', 50000, 'posudomashina', $CURLOC), '<tr><td></td><td>Dishwasher</td><td colspan=2>costs 50000 <b>₽</b></td><td>You need your own home</td></tr>')
-	*P iif(housr > 0, FUNC ('$single_stock_item', 1, 'Washing machine', 50000, 'stiralka', $CURLOC), '<tr><td></td><td>Washing machine</td><td colspan=2>costs 50000 <b>₽</b></td><td>You need your own home</td></tr>') 
+	*p FUNC ('$single_stock_item', 1, 'Computer game Dead Sunset', 500, 'GameCD2', $CURLOC, '', iif(komp > 0, 0, 1), 'You need a computer')
+	*P FUNC ('$single_stock_item', 1, 'Dishwasher', 50000, 'posudomashina', $CURLOC, '', housr, 'You need your own home')
+	*P FUNC ('$single_stock_item', 1, 'Washing machine', 50000, 'stiralka', $CURLOC, '', housr, 'You need your own home')
 	*P FUNC ('$single_stock_item', 1, 'Camera', 10000, 'zenit', $CURLOC) 
 	*P FUNC ('$single_stock_item', 1, 'Mini camera disguised as a cigarette pack', 40000, 'minifoto', $CURLOC)
-	*P iif((vasya_shulgin>=30 and webcamera = 0) or (camwhore = 1 and webcamera = 0), FUNC ('$single_stock_item', 1, 'Webcam', 10000, 'webcamera', $CURLOC), '<tr><td></td><td>Webcam</td><td colspan=2>costs 10000 <b>₽</b></td><td>You have no use of it</td></tr>') 
+	*P FUNC ('$single_stock_item', 1, 'Webcam', 10000, 'webcamera', $CURLOC, '', iif((vasya_shulgin>=30 and webcamera = 0) or (camwhore = 1 and webcamera = 0), 1, 0), 'You have no use this')
 	*P '</table></center>'
-	if $message ! '':
-		$message
-		killvar '$message'
-	end
-	clr
 	gs 'stat'
 	fcolor = rgb(0, 0, 0)
 	bcolor = rgb(255, 255, 255)