:: paysex
<<set $here = 'paysex'>>
<<set $ARGS = $location_var[$here]>>
<!-- ! Expects the guy names as array ($sex.npcId[0]='X', $sex.npcId[1]='Y',...)-->
<!-- ! Since there is no way of knowing how big $sex.npcId is, before using the array use: killvar '$sex.npcId'-->
<!-- ! It does not need the array size-->
<!-- ! Custom text can be entered for each kind of sex type, in $paysextext[0] = '', $paysextext[1] = '' format-->
<<set $menu_off = 1>>
<<if $location_var[$here][1] > 0>>
	<<set $knwn = $larg(1)>>
	<<warn 'JUMP MARKER ENCOUNTERED: :knownloop'>>
	<<setinit $knownboy[$knwn] = 1>>
	<<set $knwn -= 1>>
	<<if getvar("$knwn") > 0>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump knownloop'>>

	<</if>>
<</if>>
<<if $location_var[$here][0] == 'start'>>
	<<set $gang += 1>>
	<<run $pc.sweatAdd(10)>>
	<<set $picrand = rand(0, 1)>>
	<<gt 'paysex' 'var'>>
<</if>>
<<if $location_var[$here][0] == 'var'>>
	 	<<set $time.minutes += 5>>
	<<set $sexvar -= 1>>
	<<gs 'dinSex2' 'stamina_npc'>>
	<<set $pc.horny += 10>>
	<<set $randpicture = rand(0, 2)>>
	<<if getvar("$randpicture") == 0>>
		<<set $randpicture = 'vag'>>

	<</if>>
	<<if getvar("$randpicture") == 1>>
		<<set $randpicture = 'anal'>>

	<</if>>
	<<if getvar("$randpicture") == 2>>
		<<set $randpicture = 'dp'>>

	<</if>>
	<center><img <<$set_imgh>> src="images/locations/shared/sex/<<$randpicture>><<picrand>>.jpg"></center>
	<!-- ! Creating a random ordered array from $sex.npcId array-->
	COPYARR '$temp1' , '$sex.npcId'
	<<set $boyP = $sex.npcId[0]>>
	<<set $x = 0>>
	<<warn 'JUMP MARKER ENCOUNTERED: :randomorder'>>
	<<set $paysexrand = rand(ARRSIZE('$temp1')-1)>>
	<<setinit $temp2[$x] = $temp1[$paysexrand]>>
	<<set $x += 1>>
	<<set $temp1[$paysexrand] to null>>
	<<if ARRSIZE('$temp1') > 0>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump randomorder'>>

	<</if>>
	<!-- ! Describing the action of each participant. The order of events are fix, only the person doing it changes.-->
	<<set $j = 0>>
	<<set $i = ARRSIZE('$sex.npcId')>>
	<<warn 'JUMP MARKER ENCOUNTERED: :arrayloop'>>
	<<gs 'boyStat' $temp2[$j]>>
	<<if getvar("$j") == 0>>
		<<if getvar("$paysxsex") == 0>>
			<<run $pc.sexStatInc('vaginal','aware',1)>> <<set $paysxsex = 1>>

		<</if>>
		<<if $paysextext[$j] == ''>>
			<p>$boydesc fucks you in your pussy.</p>
		<<else>>
			<<$paysextext[$j]>>
		<</if>>
		<<set $cumprecheck = 1>>
		<<if getvar("$knownboy["+$j+"]") == 1>>
			<<cum '' $temp2[$j] 1 else gs 'cum_call' '' $temp2[$j]>>

		<</if>>
	<<elseif getvar("$j") == 1>>
		<<if getvar("$paysxanal") == 0>>
			<<run $pc.sexStatInc('anal','aware',1)>> <<set $paysxanal = 1>>

		<</if>>
		<<if $paysextext[$j] == ''>>
			<p>$boydesc fucks you in your ass.</p>
		<<else>>
			<<$paysextext[$j]>>
		<</if>>
	<<elseif getvar("$j") == 2>>
		<<if getvar("$paysxbj") == 0>>
			<<run $pc.sexStatInc('bj','aware',1)>> <<set $paysxbj = 1>>

		<</if>>
		<<if $paysextext[$j] == ''>>
			<p>$boydesc fucks you in your mouth.</p>
		<<else>>
			<<$paysextext[$j]>>
		<</if>>
	<<elseif getvar("$j") == 3>>
		<<if getvar("$paysxhj") == 0>>
			<<run $pc.sexStatInc('hj','aware',1)>> <<set $paysxhj = 1>>

		<</if>>
		<<if $paysextext[$j] == ''>>
			<p>$boydesc uses one of your hands to masturbate.</p>
		<<else>>
			<<$paysextext[$j]>>
		<</if>>
	<<elseif getvar("$j") == 4>>
		<<if $paysextext[$j] == ''>>
			<p>$boydesc uses one of your hands to masturbate.</p>
		<<else>>
			<<$paysextext[$j]>>
		<</if>>
	<<elseif getvar("$j") > 4>>
		<<if $paysextext[$j] == ''>>
			<p>$boydesc masturbates above your body, waiting for his turn to your body.</p>
		<<else>>
			<<$paysextext[$j]>>
		<</if>>
	<</if>>
	<<set $j += 1>>
	<<if $j < $i>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump arrayloop'>>

	<</if>>
	<<setinit $sex.npcId[0] = $boyP>>
	<<if $pc.horny >= 80>>
		<<set $pc.horny = 0>>
		<<set $orgasm += 1>>
	<</if>>
	<<if getvar("$sexvar") > 1>>
		<<act 'Continue'>>
			<<gt 'paysex' 'var'>>
		<</act>>
	<<else>>
		<<act 'Finish'>>
			<<gt 'paysex' 'end'>>
		<</act>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'end'>>
	 	<<set $sexvar -= 1>>
	<<gs 'dinSex2' 'stamina_npc'>>
	COPYARR '$temp1' , '$sex.npcId'
	<<set $pc.horny += 10>>
	<<image 'locations/shared/sex/cum<<picrand>>.jpg'>>
	<<set $x = 0>>
	<<warn 'JUMP MARKER ENCOUNTERED: :randomend'>>
	<<set $paysexrand = rand(ARRSIZE('$temp1')-1)>>
	<<setinit $temp2[$x] = $temp1[$paysexrand]>>
	<<set $x += 1>>
	<<set $temp1[$paysexrand] to null>>
	<<if ARRSIZE('$temp1') > 0>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump randomend'>>

	<</if>>
	<<set $j = 0>>
	<<set $i = ARRSIZE('$sex.npcId')>>
	<<warn 'JUMP MARKER ENCOUNTERED: :arrayloopend'>>
	<<gs 'boyStat' $temp2[$j]>>
	<<if getvar("$j") == 0>>
		<<if rand(3) != 0>>
			<p>$boydesc is cumming in your pussy.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum '' $temp2[$j] 1 else gs 'cum_call' '' $temp2[$j]>>

			<</if>>
		<<else>>
			<p>$boydesc is cumming on your labia.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'labia' $temp2[$j] 1 else gs 'cum_call' 'labia' $temp2[$j]>>

			<</if>>
		<</if>>
	<<elseif getvar("$j") == 1>>
		<<if rand(3) != 0>>
			<p>$boydesc is cumming in your ass.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'anus' $temp2[$j] 1 else gs 'cum_call' 'anus' $temp2[$j]>>

			<</if>>
		<<else>>
			<p>$boydesc is cumming on your ass.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'butt' $temp2[$j] 1 else gs 'cum_call' 'butt' $temp2[$j]>>

			<</if>>
		<</if>>
	<<elseif getvar("$j") == 2>>
		<<if rand(3) != 0>>
			<p>$boydesc is cumming in your mouth.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'mouth' $temp2[$j] 1 else gs 'cum_call' 'mouth' $temp2[$j]>>

			<</if>>
		<<else>>
			<p>$boydesc is cumming on your face.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'face' $temp2[$j] 1 else gs 'cum_call' 'face' $temp2[$j]>>

			<</if>>
		<</if>>
	<<elseif getvar("$j") > 2>>
		<<set $cumrand = rand(8)>>
		<<if getvar("$cumrand") == 0>>
			<p>$boydesc is cumming on your tits.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'breasts' $temp2[$j] 1 else gs 'cum_call' 'breasts' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 1>>
			<p>$boydesc is cumming on your belly.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'stomach' $temp2[$j] 1 else gs 'cum_call' 'stomach' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 2>>
			<p>$boydesc is cumming on your hair.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'hair' $temp2[$j] 1 else gs 'cum_call' 'hair' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 3>>
			<p>$boydesc is cumming on your face.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'face' $temp2[$j] 1 else gs 'cum_call' 'face' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 4>>
			<p>$boydesc is cumming on your ass.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'butt' $temp2[$j] 1 else gs 'cum_call' 'butt' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 5>>
			<p>$boydesc is cumming on your labia.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'labia' $temp2[$j] 1 else gs 'cum_call' 'labia' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 6>>
			<p>$boydesc is cumming in your pussy.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum '' $temp2[$j] 1 else gs 'cum_call' '' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 7>>
			<p>$boydesc is cumming in your ass.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'anus' $temp2[$j] 1 else gs 'cum_call' 'anus' $temp2[$j]>>

			<</if>>
		<<elseif getvar("$cumrand") == 8>>
			<p>$boydesc is cumming in your mouth.</p>
			<<if getvar("$knownboy["+$j+"]") == 1>>
				<<cum 'mouth' $temp2[$j] 1 else gs 'cum_call' 'mouth' $temp2[$j]>>

			<</if>>
		<</if>>
	<</if>>
	<<set $j += 1>>
	<<if $j < $i>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump arrayloopend'>>

	<</if>>
	<<if $pc.horny >= 80>>
		<<set $pc.horny = 0>>
		<<set $orgasm += 1>>
	<</if>>
	<<set $knownboy to null>>
	<<set $knwn to null>>
	After all of the guys had their way with your body, you can finally catch your breath.
	<<actCLA 'Leave'>>
		<<set $paysxbj = 0>>
		<<set $paysxsex = 0>>
		<<set $paysxanal = 0>>
		<<set $paysxhj = 0>>
		<<set $sex.npcId to null>>
		<<set $temp2 to null>>
		<<set $paysextext to null>>
		<<set $firstact = 0>>
		<<if getvar("$picrand") == 16 or getvar("$picrand") == 17>>
			<<gt 'office' 'work'>>
		<<elseif getvar("$picrand") == 18>>
			<<gt 'husbSex' 'dolgend'>>
		<<else>>
			<<gt $sexloc 'start'>>
		<</if>>
	<</actCLA>>
<</if>>
