:: gschool_randperson
<<set $here = 'gschool_randperson'>>
<<set $ARGS = $location_var[$here]>>
<!-- !! arguments: <gender> <excluded_first_name> <grupTipeEnabled>...-->
<!-- !! gender : 0 for male, 1 for female-->
<!-- !! excluded_first_name : can be '' or you can provide result of previous invocation, so you can compose non-repeating pairs of people-->
<!-- !! <grupTipeEnabled>... : 1 if you include grupTipe, 0 otherwise, look at examples below-->
<!-- !!-->
<!-- !! example:-->
<!-- !! $rand_girl = setup.func('gschool_randperson', 1, '', 1, 1, 0, 1, 0, 0)-->
<!-- !! $rand_girl1 = setup.func('gschool_randperson', 1, $rand_girl, 1, 1, 0, 1)-->
<!-- !!-->
<!-- !! Having grupTipes (social groups)-->
<!-- !! 1 - cool kids-->
<!-- !! 2 - jocks-->
<!-- !! 3 - nerds-->
<!-- !! 4 - Gopnik-->
<!-- !! 5 - outcasts-->
<!-- !! 6 - teachers-->
<!-- !! examples above instruct to choose random person from: cool kids, jocks and gopniks-->
<!-- !! NOTE that in $rand_girl1 zero values for outcasts and teachers are not defined - undefined values will be zero by language-->
<!-- !! Thanks to that you can include new social group and you don't need to make changes in all places-->
<!-- !! need rework-->
<!-- !!if $larg(0) = 'person_generator':-->
<!-- !!	rand_person_ind = 0-->
<!-- !!	rand_filtered_ind = 0-->
<!-- !!	:filter_loop-->
<!-- !!	  rand_person_ind = rand_person_ind + 1-->
<!-- !!	  if rand_person_ind >= ARRSIZE('grupTipe') : jump 'outside_filter_loop'-->
<!-- !!	  genderMatches = ARGS[0] = npcPol[$rand_person_ind]-->
<!-- !!	  nameIsNotRepeated = ARGS[1] <> <<=$npc($school_static_num[$rand_person_ind).firstname>>]-->
<!-- !!	  grupTipeIsLegal = grupTipe[$rand_person_ind] > 0-->
<!-- !!	  grupTipeMatches = ARGS[grupTipe[$rand_person_ind] + 1] = 1-->
<!-- !!	  if genderMatches and nameIsNotRepeated and grupTipeIsLegal and grupTipeMatches :-->
<!-- !!		rand_filtered[$rand_filtered_ind] = rand_person_ind-->
<!-- !!		rand_filtered_ind = rand_filtered_ind + 1-->
<!-- !!	  end-->
<!-- !!	  jump 'filter_loop'-->
<!-- !!	:outside_filter_loop-->
<!-- !!	if ARRSIZE('rand_filtered') > 0 :-->
<!-- !!	  random_person = rand_filtered[rand(0,ARRSIZE('rand_filtered'))]-->
<!-- !!	  $result = <<=$npc($school_static_num[$random_person).firstname>>]-->
<!-- !!	else-->
<!-- !!	  $rand_gender = IIF (ARGS[0] = 0, 'boy', 'girl')-->
<!-- !!	  $result =  '<<$rand_gender>> you don't know'-->
<!-- !!	end-->
<!-- !!	KILLVAR 'rand_person_ind'-->
<!-- !!	KILLVAR 'rand_filtered_ind'-->
<!-- !!	KILLVAR 'rand_filtered'-->
<!-- !!	KILLVAR '$rand_gender'-->
<!-- !!	KILLVAR 'random_person'-->
<!-- !!	KILLVAR 'genderMatches'-->
<!-- !!	KILLVAR 'nameIsNotRepeated'-->
<!-- !!	KILLVAR 'grupTipeIsLegal'-->
<!-- !!	KILLVAR 'grupTipeMatches'-->
<!-- !!end-->
<<if $location_var[$here][0] == 'couple_generator'>>
	<<warn 'JUMP MARKER ENCOUNTERED: :couple_jump'>>
	<<set $couple_rand = rand(1,53)>>
	<<if getvar("$couple_rand") == 1>>
		<<set $rand_girl = 'Viktoriya'>>
		<<set $rand_boy = 'Vanya'>>
	<<elseif getvar("$couple_rand") == 2>>
		<<set $rand_girl = 'Lina'>>
		<<set $rand_boy = 'Ivan'>>
	<<elseif getvar("$couple_rand") == 3>>
		<<set $rand_girl = 'Stasya'>>
		<<set $rand_boy = 'Andrey'>>
	<<elseif getvar("$couple_rand") == 4>>
		<<set $rand_girl = 'Lariska'>>
		<<set $rand_boy = 'Ivan'>>
	<<elseif getvar("$couple_rand") == 5>>
		<<set $rand_girl = 'Lizaveta'>>
		<<set $rand_boy = 'Andrey'>>
	<<elseif getvar("$couple_rand") == 6>>
		<<set $rand_girl = 'Lina'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 7>>
		<<set $rand_girl = 'Bella'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 8>>
		<<set $rand_girl = 'Lariska'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 9>>
		<<set $rand_girl = 'Irina'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 10>>
		<<set $rand_girl = 'Irina'>>
		<<set $rand_boy = 'Dimka'>>
	<<elseif getvar("$couple_rand") == 11>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Marcus'>>
	<<elseif getvar("$couple_rand") == 12 and getvar("$kotovLoveQW") <= 0>>
		<<set $rand_girl = 'Pauline'>>
		<<set $rand_boy = 'Vitek'>>
	<<elseif getvar("$couple_rand") == 13>>
		<<set $rand_girl = 'Pauline'>>
		<<set $rand_boy = 'Dan'>>
	<<elseif getvar("$couple_rand") == 14>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 15>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Valentin'>>
	<<elseif getvar("$couple_rand") == 16>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Arkadi'>>
	<<elseif getvar("$couple_rand") == 17>>
		<<set $rand_girl = 'Alyona'>>
		<<set $rand_boy = 'Valentin'>>
	<<elseif getvar("$couple_rand") == 18>>
		<<set $rand_girl = 'Alyona'>>
		<<set $rand_boy = 'Arkadi'>>
	<<elseif getvar("$couple_rand") == 19>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Andrey'>>
	<<elseif getvar("$couple_rand") == 20>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Ivan'>>
	<<elseif getvar("$couple_rand") == 21>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Dimka'>>
	<<elseif getvar("$couple_rand") == 22>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 23>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Vasily'>>
	<<elseif getvar("$couple_rand") == 24>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Svyatoslav'>>
	<<elseif getvar("$couple_rand") == 25>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Erast'>>
	<<elseif getvar("$couple_rand") == 26 and getvar("$fedorlove") < 1>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Fedor'>>
	<<elseif getvar("$couple_rand") == 27>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Marcus'>>
	<<elseif getvar("$couple_rand") == 28 and getvar("$kotovLoveQW") <= 0>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Vitek'>>
	<<elseif getvar("$couple_rand") == 29>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Dan'>>
	<<elseif getvar("$couple_rand") == 30>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 31>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Valentin'>>
	<<elseif getvar("$couple_rand") == 32>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Arkadi'>>
	<<elseif getvar("$couple_rand") == 33>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Roman'>>
	<<elseif getvar("$couple_rand") == 34>>
		<<set $rand_girl = 'Pauline'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 35>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 36>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Ivan'>>
	<<elseif getvar("$couple_rand") == 37>>
		<<set $rand_girl = 'Anushka'>>
		<<set $rand_boy = 'Lavrenti'>>
	<<elseif getvar("$couple_rand") == 38>>
		<<set $rand_girl = 'Alyona'>>
		<<set $rand_boy = 'Lavrenti'>>
	<<elseif getvar("$couple_rand") == 39>>
		<<set $rand_girl = 'Albina'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 40>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Lavrenti'>>
	<<elseif getvar("$couple_rand") == 41>>
		<<set $rand_girl = 'Alyona'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 42>>
		<<set $rand_girl = 'Lizaveta'>>
		<<set $rand_boy = 'Lavrenti'>>
	<<elseif getvar("$couple_rand") == 43>>
		<<set $rand_girl = '<<npc 'A18'>><</npc>>'>>
		<<set $rand_boy = 'Lazar'>>
	<<elseif getvar("$couple_rand") == 44>>
		<<set $rand_girl = '<<npc 'A18'>><</npc>>'>>
		<<set $rand_boy = 'Ivan'>>
	<<elseif getvar("$couple_rand") == 45>>
		<<set $rand_girl = 'Lariska'>>
		<<set $rand_boy = 'Ivan'>>
	<<elseif getvar("$couple_rand") == 46>>
		<<set $rand_girl = 'Lariska'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 47>>
		<<set $rand_girl = 'Lina'>>
		<<set $rand_boy = 'Andrey'>>
	<<elseif getvar("$couple_rand") == 48>>
		<<set $rand_girl = 'Lina'>>
		<<set $rand_boy = 'Svyatoslav'>>
	<<elseif getvar("$couple_rand") == 49>>
		<<set $rand_girl = 'Lina'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 50>>
		<<set $rand_girl = 'Pauline'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 51>>
		<<set $rand_girl = 'Lena'>>
		<<set $rand_boy = 'Radomir'>>
	<<elseif getvar("$couple_rand") == 52>>
		<<set $rand_girl = 'Lena'>>
		<<set $rand_boy = 'Lavrenti'>>
	<<elseif getvar("$couple_rand") == 53>>
		<<set $rand_girl = 'Sonia'>>
		<<set $rand_boy = 'Niko'>>
	<<else>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump couple_jump'>>
	<</if>>
	<<set $couple_rand to null>>
<</if>>
