;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname dcur_scquest_bondagesex Extends TopicInfo Hidden

Formlist Property dcur_solicitationbondageapplied Auto

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
	if Utility.RandomInt(0,99) < dcumenu.solicitationpaychance
		; customer will pay
		dcumenu.dcur_solicitationoutcome.SetValueInt(1)	
	else
		; customer will not pay	
		dcumenu.dcur_solicitationoutcome.SetValueInt(2)			
	endif
	dcumenu.dcur_solicitationbonus.SetValueInt(150)
	Actor pl = libs.playerref
	Utility.Wait(1)
	ActorUtil.AddPackageOverride(akspeaker, dcumenu.dcur_pk_standstill ,99)
	akspeaker.EvaluatePackage()	
	dclibs.strip(libs.playerRef, true)
	If Utility.RandomInt(0,99) < dcumenu.solicitationdrugchance		
		;libs.notify(akSpeaker.GetLeveledActorBase().GetName() + " forces you to use a drug!")
		libs.notify(akSpeaker.GetLeveledActorBase().GetName() + " はあなたにドラッグの使用を強制します!")
		if dclibs.hasSkoomaWhore()
			dclibs.drugher(libs.playerref)
		else
			libs.playerref.equipitem(dcumenu.skooma, true, true)	
		endif
		dcumenu.dcur_solicitationbonus.SetValueInt((dcumenu.dcur_solicitationbonus.GetValueInt() * 1.5) As Int)
	endif
	Utility.Wait(4)	
	dcur_solicitationbondageapplied.Revert()
	if Utility.RandomInt(0, 99) < 30 && dcumenu.usegag && !pl.WornHasKeyword(libs.zad_DeviousBelt)
		if dclibs.dcur_equiprandomgag(pl, dcumenu.equiptheme)	
			dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousGag)
		endif
	endif
	if dcumenu.usearmbinder
		if dclibs.dcur_equiprandomleatherarmbinder(pl, dcumenu.equiptheme)
			dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousArmbinder)
		endif
	endif
	if Utility.RandomInt(0, 99) < 20 && dcumenu.useblindfold
		if dclibs.dcur_equiprandomblindfold(pl, dcumenu.equiptheme)
			dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousBlindfold)
		endif
	endif
	if Utility.RandomInt(0, 99) < 30 && dcumenu.useboots
		if dclibs.dcur_equiprandomboots(pl, dcumenu.equiptheme)
			dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousBoots)
		endif
	endif
	if dclibs.dcur_equiprandomarmcuffs(pl, dcumenu.equiptheme)
		dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousArmCuffs)
	endif
	if dclibs.dcur_equiprandomlegcuffs(pl, dcumenu.equiptheme)
		dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousLegCuffs)
	endif
	if Utility.RandomInt(0, 99) < 60 && dclibs.dcur_equiprandomgloves(pl, dcumenu.equiptheme)
		dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousGloves)
	endif
	if Utility.RandomInt(0, 99) < 60 && dclibs.dcur_equiprandomcorset(pl, dcumenu.equiptheme)
		dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousCorset)
	endif
	if Utility.RandomInt(0, 99) < 60 && dclibs.dcur_equiprandomcollar(pl, dcumenu.equiptheme)
		dcur_solicitationbondageapplied.AddForm(libs.zad_DeviousCollar)
	endif
	if Utility.RandomInt(0,99) < dcumenu.solicitationbondagesexremovalchance		
		if Utility.RandomInt(0,99) < 25 && dcumenu.yokeweight > 0
			; lock a yoke on her, but only if the player didn't completely disable them in MCM
			dcur_bondagesexoutcome.SetValueInt(3)
		else	
			; leave items locked on
			dcur_bondagesexoutcome.SetValueInt(1)
		endif
	else
		dcur_bondagesexoutcome.SetValueInt(2)
	endif		
	dcumenu.dcur_solicitationcustomers.Revert()
	dcumenu.dcur_solicitationcustomers.AddForm(akspeaker.GetBaseObject())
	Utility.Wait(2)
	dclibs.sexwithplayer(akspeaker, consensual = true, stages = 1, randomanim = true, nostrip = true)				
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

zadlibs Property libs  Auto  
dcur_mcmconfig Property dcumenu  Auto  
dcur_library Property dclibs  Auto  
MiscObject Property Gold001  Auto  
SexLabFramework Property SexLab Auto
GlobalVariable Property dcur_solicitationacts  Auto  
GlobalVariable Property dcur_bondagesexoutcome  Auto  
