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

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
game.forcethirdperson()
debug.togglecollisions()
akspeaker.MoveTo(playerref)
akspeaker.SetDontMove()
;akspeaker.Setrestrained()
akspeaker.unequipall()

		ActorUtil.AddPackageOverride(akspeaker as Actor, PackageStop, 1)
		(akspeaker as Actor).EvaluatePackage()
	akspeaker.SetAnimationVariableInt("IsNPC", 1) ; disable head tracking
	akspeaker.SetAnimationVariableBool("bHumanoidFootIKDisable", True) ; disable inverse kinematics

debug.sendanimationevent(playerref, "NCK30_MassageMadness2")
debug.sendanimationevent(akspeaker, "NCK30_MassageMadness1")
utility.wait(MassageDurationSeconds)

ActorUtil.RemovePackageOverride(akspeaker as Actor, PackageStop)
		(akspeaker as Actor).EvaluatePackage()
		akspeaker.SetAnimationVariableInt("IsNPC", 1) ; enable head tracking
	akspeaker.SetAnimationVariableBool("bHumanoidFootIKDisable", False) ; enable inverse kinematics
akspeaker.SetDontMove(false)
;akspeaker.Setrestrained(false)
debug.togglecollisions()

debug.sendanimationevent(akspeaker, "idleforcedefaultstate")
debug.sendanimationevent(playerref, "idleforcedefaultstate")
akspeaker.AddItem(GoldRing as form, 1, true)
	akspeaker.EquipItem(GoldRing as form, false, true)
	utility.Wait(0.0500000)
	akspeaker.UnequipItem(GoldRing as form, false, true)
	akspeaker.RemoveItem(GoldRing as form, 1, true, none)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Package Property PackageStop  Auto
actor property playerref auto
Armor Property GoldRing  Auto
Float Property MassageDurationSeconds  Auto  
