Przeglądaj źródła

paternity test function, sending from post office, recieving on phone as SMS
(not complete, but should not cause problems)

Malen 7 lat temu
rodzic
commit
69d5272645
4 zmienionych plików z 114 dodań i 3 usunięć
  1. 1 0
      glife-notepad++
  2. 10 3
      locations/din_bad
  3. 89 0
      locations/pattest
  4. 14 0
      locations/postoffice

+ 1 - 0
glife-notepad++

@@ -493,6 +493,7 @@
             <File name="locations\party_boy" />
             <File name="locations\party_boys" />
             <File name="locations\party_girls" />
+			<File name="locations\pattest" />
             <File name="locations\pavCommercial" />
             <File name="locations\pavResidential" />
             <File name="locations\paysex" />

+ 10 - 3
locations/din_bad

@@ -577,9 +577,16 @@ $d_bag = {
 	if wine = 1 and alkowine = 0:pl'Your purse contains a bottle of <a href="exec:dynamic $dinalkowin1">wine</a>'
 	if wine = 1 and alkowine = 1:pl'Your purse contains a half-bottle of <a href="exec:dynamic $dinalkowin2">wine</a>'
 	if foto = 1:pl'Your purse contains a strange photo'
-	pl '<a href="exec:dynamic $Phone_menu "><b>Phone</b></a>'
-	pl'<center><a href="exec:gs''stat''"><img src="images/pic/icon/back.png"></a></center>'
-	pl'<center><a href="exec:gs''stat''"><b>Return</b></a></center>'
+	if pattest > 0:
+		if pattest > 1:$tt = 's' else $tt = ''
+		pl'You carry <<pattest>> unused paternity test<<$tt>> with you.'
+	end
+	if used_pattest > 0:
+		if used_pattest > 1:$tt = 's' else $tt = ''
+		pl'You carry <<used_pattest>> <a href="exec:dynamic $test_purse">unsent</a> paternity test<<$tt>> with you.'
+	end
+	pl'<br><center><a href="exec:gs''stat''"><img src="images/pic/icon/back.png"></a></center>'
+	killvar 'tt'
 }
 
 $dinalkowin1 = {

+ 89 - 0
locations/pattest

@@ -0,0 +1,89 @@
+# pattest
+!! It is called like "gs 'pattest','Kolka'", or "gs 'pattest',$boy"
+!! It needs some automatic call, usable when a named guy has cum in or on you, and only his cum is in/on the area (do not call this with "rapist", "unknown" or "gopnik")
+!! There needs to be an option to call it selectively when certain circumstances are met ($boy gives sample voluntarily).
+
+if ARGS[1] ! 1 and pattest > 0:
+	j = 0
+	p ''
+	clr
+	if kid > 0 and arrpos('surefather','0') ! kid:
+		pl '<br>Select the child you want to compare with <<$ARGS[0]>>:<br>'
+		$papa = $ARGS[0]
+		:kiddieloop
+			kidid[j] = j
+			value = kidid[j]
+			if surefather[j] = 0:pl '    <a href="exec:func(''pattest'', value, 1) & pattest -= 1 & gs ''stat''"><<$kidname[j]>></a>'
+		if j < kid-1:j += 1 & jump 'kiddieloop'
+	elseif kid = 0:
+		msg 'You do not have children yet!'
+		gs 'stat'
+	else
+		msg 'You are sure about the father of every one of your children!'
+		gs 'stat'
+	end
+	killvar 'j'
+	killvar 'kidid'
+elseif ARGS[1] ! 1:
+	msg 'You do not have any paternity test to use!'
+	gs 'stat'
+end
+
+if ARGS[1] = 1:
+	testresDay[ARGS[0]] = 2147483647
+	if $ChildFath[ARGS[0]] = $papa:testresRes[ARGS[0]] = 1 else testresRes[ARGS[0]] = 0
+	$testresPotfath[ARGS[0]] = $papa
+	testresKid[ARGS[0]] = ARGS[0]
+	purse_pattest[ARGS[0]] = 1
+	used_pattest += 1
+	killvar 'papa'
+end
+
+!! Just shows the kid and the tested father
+$test_purse = {
+	j = 0
+	$msg = 'Tests in your purse:'
+	:pursekid
+		if purse_pattest[j] = 1:$msg += '<br><<$testresPotfath[j]>>''s test for fatherhood of <<$kidname[j]>>.'
+	if j < kid-1:j += 1 & jump 'pursekid'
+	msg $msg
+	killvar 'msg'
+}
+
+!! used: dynamic $send_test, <kidnumber> 
+$send_test = {
+	j = 0
+	:kloop
+		kidid[j] = j
+		if patpack[j] = 1:'    <a href="exec: testresDay[kidid[j]] = daystart+rand(5,7) & patpack[kidid[j]] = 0 & used_pattest -= 1 & money -= 20000">$kidname[j]</a>'
+	if j < kid-1:j += 1 & jump 'kloop'
+	testresDay[ARGS[0]] = daystart+rand(5,7)
+	purse_pattest[ARGS[0]] = 0
+	used_pattest -= 1
+}
+
+$sms_testresult = {
+	cyc = 0
+	:testloop
+		if testresKid[cyc] ! 1:cyc += 1 & jump 'testloop'
+		if daystart >= testresDay[cyc]:
+			c2 = arrsize('SMS_msg')
+			$SMS_msg[c2] = 'Result of testing: <br>'
+			if testresRes[cyc] = 1:$SMS_msg[c2] += 'matching DNA' else $SMS_msg[c2] += 'no DNA match'
+			$SMS_msg[c2] += '<br>between <<$testresPotfath[cyc]>> and <<$kidname[testresKid[cyc]]>>.'
+			
+			$SMS_effect[c2] = {
+				if testresRes[cyc] = 1:
+					surefather[testresKid[cyc]] = 1
+					$ChildThFath[testresKid[cyc]] = $ChildFath[testresKid[cyc]]
+				else
+					if $ChildThFath[testresKid[cyc]] = $testresPotfath[testresKid[cyc]]:$ChildThFath[testresKid[cyc]] = 'unknown'
+				end
+			}
+			testresKid[cyc] = 0
+		end
+	if cyc < kid-1: cyc += 1 & jump 'testloop'
+	killvar 'cyc'
+	killvar 'c2'
+}
+--- pattest -------------------------

+ 14 - 0
locations/postoffice

@@ -186,6 +186,20 @@ if $postloc = 'counter':
 		end
 	end
 	
+	if used_pattest > 0:
+		act 'Send paternity test (20.000<b>₽</b>)':
+			if money >= 20000:
+				dynamic $send_test
+				cls
+				gs 'stat'
+				'You pay the fee of the testing, then you mail your used paternity test to the testing labor in Saint Petersburg with the copy of your receipt of payment. You will get answer in SMS withing a week.'
+			else
+				'Unfortunately you have no money to send the test in. You could, but they would just throw it out without the receipt of payment.'
+			end
+			act 'Done':$postloc = 'counter' & gt 'postoffice'
+		end
+	end
+	
 	act 'Check received mail':
 		cls
 		gs 'stat'