# booty_call
if $ARGS[0] = 'scheduler':
	!! clear SMS
	!! clear schedule
	killvar 'booty_call_time'
	killvar 'npc_booty_call'
	killvar 'npc_booty_call_time'
	i = 0
	gs 'booty_call', 'scheduler2'
end

if $ARGS[0] = 'scheduler2':
	if i <= arrsize('$fuckbuddy'):
		gs 'booty_call', 'npc_stat_update'
!!		if (rand(1,10) <= npc_sexdrive[$FuckBuddy[i]] or npc_booty_call[$FuckBuddy[i]] = daystart) and npc_rel[$FuckBuddy[i]] > 0 and npc_no_booty_call[$FuckBuddy[i]] ! daystart and npc_big_fight[$FuckBuddy[i]] < daystart - 7:

!!		temporary removal of npc_rel requirement until boy initiated breakups can occur

!!		if (rand(1,10) <= npc_sexdrive[$FuckBuddy[i]] or npc_booty_call[$FuckBuddy[i]] = daystart) and npc_no_booty_call[$FuckBuddy[i]] ! daystart and (npc_big_fight[$FuckBuddy[i]] < daystart - 7 and daystart > 7):
		if npc_booty_call_date[$boy] ! daystart and (rand(1,10) <= npc_sexdrive[$FuckBuddy[i]] or npc_booty_call[$FuckBuddy[i]] = daystart) and npc_no_booty_call[$FuckBuddy[i]] ! daystart:
			gs 'booty_call', 'scheduler3'
		else
			npc_no_booty_call[$FuckBuddy[i]] = daystart
		end
		i += 1
		gs 'booty_call', 'scheduler2'
	end
end


if $ARGS[0] = 'scheduler3':
	if npc_booty_call[$FuckBuddy[i]] = daystart:
		booty_call_time[$FuckBuddy[i]] = ((npc_booty_call_time[$FuckBuddy[i]] * 60) + rand(0,180))
	elseif week = npc_day_off[$FuckBuddy[i]]:
		booty_call_time[$FuckBuddy[i]] = (600 + rand(0,720))
	elseif week ! npc_day_off[$FuckBuddy[i]]:
		booty_call_time[$FuckBuddy[i]] = (rand(npc_start_free_time[$FuckBuddy[i]],(npc_end_free_time[$FuckBuddy[i]] - 1)) * 60) + rand(0,180)
	else
		booty_call_time[$FuckBuddy[i]] = 2000
	end
end

!!	if npc_start_free_time[$FuckBuddy[i]] = 0 or npc_day_off[$FuckBuddy[i]] = 0 or npc_end_free_time[$FuckBuddy[i]] = 0: 
!!		$boy = $FuckBuddy[i]
		
!!	end

!!		if ((rand(1,10) <= npc_sexdrive[$FuckBuddy[i]] or npc_booty_call[$FuckBuddy[i]] = daystart) and (rand(1,npc_rel[$FuckBuddy[i]]) > 0)) and npc_no_booty_call[$FuckBuddy[i]] ! daystart and npc_big_fight[$FuckBuddy[i]] < daystart - 7:

!!			elseif week < 6:
!!				booty_call_time[$FuckBuddy[i]] = 900 + rand(0,210)
!!			else
!!				booty_call_time[$FuckBuddy[i]] = 600 + rand(0,720)

if $ARGS[0] = 'set_booty_call_date':
	if sex_ev['invite_today'] = 1:
		npc_booty_call_date[$boy] = daystart
	elseif sex_ev['invite_tomorrow'] = 1:
		npc_booty_call_date[$boy] = daystart + 1
	end
	if npc_booty_call_time[$boy] = 0:
		npc_booty_call_time[$boy] = npc_start_free_time[$boy]
	end
end

if $ARGS[0] = 'block_booty_calls':
	if sex_ev['invite_today'] = 1:
		npc_booty_call_date[$boy] = 0
		npc_no_booty_call[$boy] = daystart
		npc_booty_call_time[$boy] = 0
	elseif sex_ev['invite_tomorrow'] = 1:
		npc_no_booty_call[$boy] = daystart + 1
	end
end

if $ARGS[0] = 'SMS raiser':
	i = 0
	:booty_call_sms_raiser_loop
	if i < arrsize('$FuckBuddy'):
		if booty_call_time[$FuckBuddy[i]] < ((hour * 60) + minut) and npc_no_booty_call[$FuckBuddy[i]] ! daystart and npc_last_booty_call[$boy] ! daystart:
			gs 'booty_call_sms', 'start', $FuckBuddy[i]
			gs 'booty_call_sms', 'Add SMS', $FuckBuddy[i]
			booty_call_time[$FuckBuddy[i]] = 2399
			!! this is a bit superfluous, but it makes the code run faster.
			booty_call_invite[$FuckBuddy[i]] = daystart
		end
		i += 1
		jump 'booty_call_sms_raiser_loop'
	end
end

if $ARGS[0] = 'home_links':
	i=0
	*nl
	:loopBC_homes
	if (npc_residence[$Fuckbuddy[i]] = 1 and $loc = 'pav_residential') or (npc_residence[$Fuckbuddy[i]] = 3 and $loc = 'city_residential')or (npc_residence[$Fuckbuddy[i]] = 4 and $loc = 'city_center'):
		dynamic(' ''<a href="exec: minut += 2 & gt ''''sex_ev_start'''',''''initiate_pre'''',''''<<$Fuckbuddy[i]>>'''' "><<$npc_firstname[$Fuckbuddy[i]]>>''''s</a> apartment is nearby.'' ')
		!! ''''
	end
	!!		dynamic(' ''<a href="exec: minut += 2 & gt ''''sex_ev_start'''',''''fb_npc_home_start'''',''''<<$Fuckbuddy[i]>>'''' "><<$npc_firstname[$Fuckbuddy[i]]>>''''s</a> apartment is nearby.'' ')

	i +=1
	if i < arrsize('$Fuckbuddy') : jump 'loopBC_homes'
end

if $ARGS[0] = 'text':
	!! boy code?
	!! IMAGE HERE
	'Your phone buzzes and you pull it out to see what''s happening. It''s a text from [boy code here].'
	*nl
	'	<b><font color="blue">hey <<$pcs_nickname>></font></b>'
	'<b><font color="pink">hey yourself</font></b>'
	*nl
	'you text back.'
	*nl
	'	<b><font color="blue">i was thinking about you today</font></b>'
	act'What about?':
		cla & *clr
		!! IMAGE HERE
		'	<b><font color="blue">i was thinking about you today</font></b>'
		'<b><font color="pink">what were you thinking about?</font></b>'
		booty_call['text'] = rand(1,3)
		if booty_call['text'] = 1:
			'	<b><font color="blue">wanted to know if you wanted to come over to my place</font></b>'
			'	<b><font color="blue">have some fun?</font></b>'
			*nl
			'You think you know what kind of fun he wants.'
		elseif booty_call['text'] = 2:
			'	<b><font color="blue">your mouth around my cock</font></b>'
			*nl
			'You think you know what kind of fun he wants.'
		elseif booty_call['text'] = 3:
			'	<b><font color="blue">fucking you on my couch</font></b>'
			*nl
			'You think you know what kind of fun he wants.'
		end
	end
	act'Me too':
		gt ''

	end


	act'About fucking me?':

		gt ''
	end
end


if $ARGS[0] = 'invite_yourself':


end

if $ARGS[0] = 'get_invited':
	if rand(0,1) = 1:
		'"Why don''t you come over to my place right now and we can have some fun?"'

	else
		'"Why don''t you come over to my place tonight and we can have some fun?"'
	end


end

!! ----------------------- text dialogue saved for possible future usage later ---------------------------------------
if $ARGS[0] = 'text1':
	!! boy code?
	!! missing code
	!! IMAGE HERE
	'Your phone buzzes and you pull it out to see what''s happening. It''s a text from [boy code here].'
	*nl
		'	<b><font color="blue">hey <<$pcs_nickname>></font></b>'
	'<b><font color="pink">hey yourself</font></b>'
	*nl
	'you text back.'
	*nl
	'	<b><font color="blue">i was thinking about you today</font></b>'
	act'What about?':
		cla & *clr
		!! IMAGE HERE
		'	<b><font color="blue">i was thinking about you today</font></b>'
		'<b><font color="pink">what were you thinking about?</font></b>'
		booty_call['text'] = rand(1,3)
		if booty_call['text'] = 1:
			'	<b><font color="blue">wanted to know if you wanted to come over to my place</font></b>'
			'	<b><font color="blue">have some fun?</font></b>'
			*nl
			'You think you know what kind of fun he wants.'
		elseif booty_call['text'] = 2:
			'	<b><font color="blue">your mouth around my cock</font></b>'
		elseif booty_call['text'] = 3:
			'	<b><font color="blue">fucking you on my bed</font></b>'
		end
		gs'booty_call_start','text2'
	end

	act'Me too':
		cla & *clr
		!! IMAGE HERE
		'	<b><font color="blue">i was thinking about you today</font></b>'
		'<b><font color="pink">me too</font></b>'
		'	<b><font color="blue">come over</font></b>'
!!		booty_call['text'] = rand(1,3)
!!		if booty_call['text'] = 1:
		'	<b><font color="blue">lets fuck like bunnies</font></b>'
	end
end

if $ARGS[0] = 'text2':
	act'Can''t':
		cla & *nl
		'<b><font color="pink">sorry, i cant</font></b>'
		'<b><font color="pink">i have stuff to do</font></b>'
		'	<b><font color="blue">shit</font></b>'
		'	<b><font color="blue">maybe next time then</font></b>'
		act'Put your phone away':gt'somewhere'
	end

	act'I''m on my way':
		cla & *nl
		'<b><font color="pink">ill come right now ;)</font></b>'
		if npc_humor[$boy] <= 1:
			'	<b><font color="blue">my cock is waiting for you</font></b>'
		elseif npc_humor[$boy] = 2:
			'	<b><font color="blue">in the street?</font></b>'
			'	<b><font color="blue">damn!</font></b>'
			'	<b><font color="blue">keep it in your pants till you get here!</font></b>'
		elseif npc_humor[$boy] = 3:
			'	<b><font color="blue">phrasing</font></b>'
		end
		!! missing code
		!! confirm player is coming over
		act'Put away your phone':gt $loc, $loc_arg
	end

	act'I''ll swing by later':
		cla & *nl
		'<b><font color="pink">not right now</font></b>'
		'<b><font color="pink">but i can come by later?</font></b>'
		'	<b><font color="blue">when?</font></b>'

		act 'Pick a time':
			cla & *clr
			!! IMAGE HERE
			!! missing code
			!! fix this code to work with this event
			contMeetHour[Call4Date["ContactIndex"]] = input ("When do you want to go over to his place? It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only <<hour>> - 22]")
			if contMeetHour[Call4Date["ContactIndex"]] <= hour or contMeetHour[Call4Date["ContactIndex"]] > 23:contMeetHour[Call4Date["ContactIndex"]] = 20

			'<b><font color="pink">maybe around <<contMeetHour[Call4Date["ContactIndex"]]>>:00?</font></b>'

			'"How about <<contMeetHour[Call4Date["ContactIndex"]]>>:00?."'
			'<<$Call4Date["CallerName"]>>, "Okay <<$Call4Date["SvetaName"]>>, see you at <<contMeetHour[Call4Date["ContactIndex"]]>>:00."'

			act'Put away your phone':gt $loc, $loc_arg
		end
	end
end

if $ARGS[0] = 'invite_yourself1':
	!! boy code?
	!! missing code
	!! IMAGE HERE
	'You tap out a quick message on your and hit send.'
	*nl
	'<b><font color="pink">hey</font></b>'
	'<b><font color="pink">doing anything right now?</font></b>'
	*nl
	!! missing code
	!! better way of randomizing this? personality based?
	if rand(1,3) = 3:
		'You don''t receive a response. He must be busy.'
		act'Put away your phone':gt $loc, $loc_arg
	elseif rand(1,2) = 2 and hour < 18:
		'	<b><font color="blue">im at work</font></b>'
		act'Sorry, never mind':
			cla & *nl
			'<b><font color="pink">oh</font></b>'
			'<b><font color="pink">sorry</font></b>'
			'<b><font color="pink">never mind</font></b>'
			'<b><font color="pink">i''ll text you later</font></b>'
			act'Put away your phone':gt $loc, $loc_arg
		end

		act'This is a booty call':
			cla & *nl
			'<b><font color="pink">when do you get off?</font></b>'
			'<b><font color="pink">this is a booty call</font></b>'
			'	<b><font color="blue">ill probably be free at 19:00</font></b>'
			'	<b><font color="blue">wanna come then?</font></b>'
			gs'booty_call_start','invite_yourself2'
		end

		act'I wanna fuck':
			cla & *nl
			'<b><font color="pink">i wanna fuck</font></b>'
			'<b><font color="pink">when do you get off?</font></b>'
			'	<b><font color="blue">ill probably be free at 19:00</font></b>'
			'	<b><font color="blue">wanna come then?</font></b>'
			gs'booty_call_start','invite_yourself2'
		end
	else
		'	<b><font color="blue">i was thinking about your naked body in my bed</font></b>'
		act'How about right now?':
			cla & *nl
			'<b><font color="pink">then we''re on the same page</font></b>'
			'<b><font color="pink">can i come over now?</font></b>'
			'	<b><font color="blue">yes</font></b>'
			'	<b><font color="blue">hurry</font></b>'
			'	<b><font color="blue">i want to fuck you right now</font></b>'
			'<b><font color="pink">i''m on my way <3</font></b>'
			!! missing code
			act'Put away your phone':gt $loc, $loc_arg
		end

		act'Can I come later?':
			cla & *nl
			!! missing code
			contMeetHour[Call4Date["ContactIndex"]] = input ("When do you want to go over to his place? It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only <<hour>> - 22]")
			if contMeetHour[Call4Date["ContactIndex"]] <= hour or contMeetHour[Call4Date["ContactIndex"]] > 23:contMeetHour[Call4Date["ContactIndex"]] = 20

			'<b><font color="pink">then we''re on the same page</font></b>'
			'<b><font color="pink">but i''m just trying to plan my day</font></b>'
			'<b><font color="pink">can i come over at <<contMeetHour[Call4Date["ContactIndex"]]>>:00?</font></b>'
			'	<b><font color="blue">what the fuck am i supposed to do until then?</font></b>'
			act'I don''t know':
				cla & *nl
				'<b><font color="pink">i dont know</font></b>'
				'<b><font color="pink">figure something out til i get there</font></b>'
				act'Put away your phone':gt $loc, $loc_arg
			end

			act'Try to stay hard':
				cla & *nl
				'<b><font color="pink">just try to stay hard</font></b>'
				'<b><font color="pink">i don''t want to get there and find out my meat stick has gone soft</font></b>'
				act'Put away your phone':gt $loc, $loc_arg
			end

			act'Dream on it':
				cla & *nl
				'<b><font color="pink">dream on it ;)</font></b>'
				act'Put away your phone':gt $loc, $loc_arg
			end
		end
	end
end

if $ARGS[0] = 'invite_yourself2':
	act'I''m busy then':
		cla & *nl
		'<b><font color="pink">shit</font></b>'
		'<b><font color="pink">im busy then</font></b>'
		'<b><font color="pink">maybe another day</font></b>'
		!! missing code
		!! add prevention so you can''t ask again today
		act'Put away your phone':gt $loc, $loc_arg
	end

	act'Yes':
		cla & *nl
		'<b><font color="pink">yeah, id like to come around that time ;)</font></b>'
		'	<b><font color="blue">great</font></b>'
		!! missing code
		!! add event to schedule

		act'Put away your phone':gt $loc, $loc_arg
	end
end

if $ARGS[0] = 'get_invited':
	if rand(0,1) = 1:
		'"Why don''t you come over to my place right now and we can have some fun?"'

	else
		'"Why don''t you come over to my place tonight and we can have some fun?"'
	end


end

!! ------------ NPC Stat Updater ------------------------

if $ARGS[0] = 'npc_stat_update':
	if npc_start_free_time[$FuckBuddy[i]] = 0 or npc_day_off[$FuckBuddy[i]] = 0:
		if npc_finance[$FuckBuddy[i]] = 0:
			if rand(1,3) = 1:
				npc_start_free_time[$FuckBuddy[i]] = 9
				npc_end_free_time[$FuckBuddy[i]] = 12
			elseif rand(1,2) = 1:
				npc_start_free_time[$FuckBuddy[i]] = 16
				npc_end_free_time[$FuckBuddy[i]] = 20
			else
				npc_start_free_time[$FuckBuddy[i]] = 20
				npc_end_free_time[$FuckBuddy[i]] = 23
			end
		elseif npc_finance[$FuckBuddy[i]] = 1:
			if rand(1,2) = 1:
				npc_start_free_time[$FuckBuddy[i]] = 9
				npc_end_free_time[$FuckBuddy[i]] = 12
			else
				npc_start_free_time[$FuckBuddy[i]] = 20
				npc_end_free_time[$FuckBuddy[i]] = 23
			end
		elseif npc_finance[$FuckBuddy[i]] = 2:
			npc_apt_type[$FuckBuddy[i]] = 5
			!!npc_apt_type[$npclastgenerated] = rand(5,6)
			!! apt_type 6 is disabled until pictures are added
			npc_occupation[$FuckBuddy[i]] = rand(14,18)
			npc_car[$FuckBuddy[i]] = rand(0,1)
		end
		npc_day_off[$FuckBuddy[i]] = rand(1,7)
	end
end

--- booty_call ---------------------------------