Jump to content

Notice Me Senpai - A Notice Board Addon


Recommended Posts

Posted

Okay I am in the process of adding the buffer topic. The casual sex topic will be top level for returns though. It will only be buffered when they aren't in the faction yet, though the return dialogue as well as the buffer is hidden when casual dialogue is disabled. All of the slave scenarios disable casual sex dialogue automatically... and the love potion ones also disable prostitution and using the capture ring as well.

 

Likewise there was a feature added when I added the casual sex that I didn't talk about, there is dialogue for having sex with your spouse. You can also use Hypnotic gaze on them (If you have it) when they aren't in the mood. It's just as well I never mentioned it as the conditions are such that you don't get the dialogue if in the casual sex faction *fart sound*. 

 

Anyway that spouse dialogue will go away when Casual dialogue is shut off.

 

Le sigh...

Posted
On 4/26/2023 at 5:11 AM, Tentacus said:

If you guys like, in addition to the option of disabling it. I could make it so the casual sex topic has a buffer greet that is less jarring like the "I'd have a word with you" in the followers. If you want that speak up now, and I also wouldn't mind suggestions for the topic phrase, I can make it random but I'd probably limit it to like 3 phrases. The whore stuff would remain top level as it is, as I think it feels natural and polished.

 

Yes please. Yours is the only dialogue sex mod that has no way to back out if you choose the option, and it's hard to keep track of which dialogue option belongs to which mod. I also prefer using other mods like SLEN for the casual sex since it's a bit more fleshed out (but just barely).

 

I always appreciated SLEN for marking its options as "(SLEN) *dialogue*" so I knew which mod that belonged to.

Posted
On 4/26/2023 at 10:11 PM, Tentacus said:

If you guys like, in addition to the option of disabling it. I could make it so the casual sex topic has a buffer greet that is less jarring like the "I'd have a word with you" in the followers. If you want that speak up now, and I also wouldn't mind suggestions for the topic phrase, I can make it random but I'd probably limit it to like 3 phrases. The whore stuff would remain top level as it is, as I think it feels natural and polished.

 

 

I support this. Better be consistent with what appears with followers as a small brand to let players know that these lines are from the same mod. You know that too many mods try to add sex lines on npc. I try best to disable them all. It is a pain when random lines come up from not knowing which mod. 

Posted (edited)

Started the Bryling testing.

 

New character: Klea a young and naive wood elf beggar.

 

Klea has been worn down by the incessant rain. She was unable to sleep in her usual nook behind Thane Erikur's house and had curled up behind a pile of wood under an overhang. She hadn't eaten in days and there was nobody on the streets of solitude to beg off of. Eventually in near desperation she found her way to the palace. It was warm inside, and her fear of being acosted was less than her joy at being out of the rain.

 

She spent the entire morning sneaking around the back hallways, stealing food and drink where she found it, warming herself by the many fires. She even swiped a pair of fine shoes, to cover her grimy bare feet, blissfully unaware of the obviousness of such an act.

 

She overindulged in wine and found herself rather drunk, which enboldened her to start begging... At first with the guards, but then in her overconfidence she begged from the stern lady Thane... a choice that would change her life forever.

Edited by Tentacus
Posted (edited)

Man, weirdest shit there is one fragment script that causes the subtitle not to display in it's topic. There is 100% no logical reason this should ever happen but it always happens with this fragment so I've had to devise work arounds. This is one of those things that really tests your mettle as a mod maker... How the CK sometimes just acts like it's fucking haunted and arbitrarily makes up new rules and exceptions as you go. 

Edited by Tentacus
Posted (edited)

For those who don't make mods I thought I'd share something that shows the kind of complexity that goes into a mod like this. Here is the source for my main script. It's one of 87 scripts though most are much, much smaller. 

Spoiler

 

Scriptname _T_NoticeMeQuestScript extends Quest  

Actor Property AbeloneRef Auto
Actor Property AngrenorRef Auto
Actor Property ArcadiaRef Auto
Actor Property BirnaRef Auto
Actor Property BothelaRef Auto
Actor Property BrenuinBeggerRef Auto
Actor Property BrylingRef Auto
Actor Property DegaineRef Auto
Actor Property EddaRef Auto
Actor Property EndarieRef Auto
Actor Property ErdiRef Auto
Actor Property FrukiRef Auto
Actor Property HaelgaRef Auto
Actor Property HemmingRef Auto
Actor Property IngunRef Auto
Actor Property IrgnirRef Auto
Actor Property IrnskarRef Auto
Actor Property JulienneLylvieveRef Auto
Actor Property MavenRef Auto
Actor Property MaulRef Auto
Actor Property NarriRef Auto
Actor Property NosterOneEyeRef Auto
Actor Property OlavaTheFeebleRef Auto
Actor Property PlayerRef Auto
Actor Property SaadiaRef Auto
Actor Property SildaRef Auto
Actor Property SnilfRef Auto
Actor Property SvanaRef Auto
Actor Property TaarieRef Auto
Actor Property WuunferthRef Auto
Actor Property YsoldaRef Auto
Armor Property _T_NMS_Capture_Ring Auto
Armor Property _T_NMS_Menu_Ring Auto
Armor Property _T_RadiantCollar Auto
Armor Property _T_SackHood Auto
Armor Property _T_WristRope Auto
Armor Property ClothesBeggarRobes Auto
Armor Property zbfCuffsRope01 Auto
Armor Property zbfGagCloth Auto
Cell Property RiftenBlackBriarManor Auto
Cell Property SolitudeBrylingsHouse Auto
Cell Property SolitudeRadiantRaiment Auto
Faction Property _T_HistoryFaction Auto ; 1 No B rape, No P sex, 2 No B rape, P sex, 3 B rape, No P sex, 4  B rape, P sex, 5 No B rape, P Rape once, 6 No B rape, P rape multiple, 7 B rape, P rape once, 8 B rape, P rape multiple, 9 Reward offered
Faction Property _T_IncestFaction Auto
Faction Property _T_MartyrFaction Auto ; 1 Martyr, 2 "saved" by martyr
Faction Property _T_NMS_CaptiveFaction Auto
Faction Property _T_NMS_CasualSexFaction Auto
Faction Property _T_NMS_CuckFaction Auto
Faction Property _T_NMS_JohnFaction Auto
Faction Property _T_NMS_SlaveFaction Auto ; 1 Broken, 2 Depraved, 3 Beggar, 4 Depraved Beggar, 5 Cuck, 6 Depraved Cuck
Faction Property _T_NMS_WhoreFaction Auto ; 1 Monogomous, 2 game, 3 Untested whore, 4 New whore, 5 Unhappy whore, 6 Happy whore, 7 New slave whore, 8 slave whore, 9 broken slave whore.
Faction Property _T_PayPigFaction Auto
Faction Property _T_RapistFaction Auto
Faction Property _T_RatFaction Auto ;1 Uncaught, 2 friend, 3 lover, 4 victim, 5 Let free
Faction Property CrimeFactionCidhnaMine Auto
Faction Property CrimeFactionEastmarch Auto
Faction Property CrimeFactionFalkreath Auto
Faction Property CrimeFactionGreybeard Auto
Faction Property CrimeFactionHaafingar Auto
Faction Property CrimeFactionHjaalmarch Auto
Faction Property CrimeFactionImperial Auto
Faction Property CrimeFactionKhajiitCaravans Auto
Faction Property CrimeFactionNull Auto
Faction Property CrimeFactionOrcs Auto
Faction Property CrimeFactionPale Auto
Faction Property CrimeFactionReach Auto 
Faction Property CrimeFactionRift Auto
Faction Property CrimeFactionSons Auto
Faction Property CrimeFactionThievesGuild Auto
Faction Property CrimeFactionWhiterun Auto
Faction Property CrimeFactionWinterhold Auto
Faction Property CurrentFollowerFaction Auto
Formlist property _T_WaterskinList Auto
Formlist property manny_up_list_AvoidNPC Auto
GlobalVariable Property _T_AfterRape Auto
GlobalVariable Property _T_ArcadiasSlave Auto
GlobalVariable Property _T_BeatingCounter Auto
GlobalVariable Property _T_BeatingRecentCounter Auto
GlobalVariable Property _T_BothelasSlave Auto
GlobalVariable Property _T_BrylingsSlave Auto
GlobalVariable Property _T_CFIsNude Auto
GlobalVariable Property _T_CFNakedOutfit Auto
GlobalVariable Property _T_CFRestrained Auto
GlobalVariable Property _T_Disobedience Auto
GlobalVariable Property _T_Fisto Auto
GlobalVariable Property _T_HitCounter Auto
GlobalVariable Property _T_iNeed Auto
GlobalVariable Property _T_JustMartyred Auto ;Awww isn't love wonderful? They sacrificed themself for their spouse.
GlobalVariable Property _T_JustMurdered Auto ;You murdered your last captive in cold blood.
GlobalVariable Property _T_JustOzarked Auto ;Dueling banjos.
GlobalVariable Property _T_MavensSlave Auto
GlobalVariable Property _T_NakedOutfit Auto
GlobalVariable Property _T_NMS_Debug Auto
GlobalVariable Property _T_NMS_MasterToggle Auto
GlobalVariable Property _T_NMS_Reset Auto
GlobalVariable Property _T_NoCasual Auto
GlobalVariable Property _T_NoPigs Auto
GlobalVariable Property _T_NoPussy Auto
GlobalVariable Property _T_Obedience Auto
GlobalVariable Property _T_PattyHurst Auto ; Stockholm for the camp follower
GlobalVariable Property _T_PlayerWhore Auto
GlobalVariable Property _T_PrisonerBanditRaped Auto
GlobalVariable Property _T_PrisonerDialogue Auto ;0 first meet, 1 un player raped, 2 player raped
GlobalVariable Property _T_PrisonerGayness Auto ;0 straight (boo!), 1 Gay, 2 Bi
GlobalVariable Property _T_PrisonerHunger Auto
GlobalVariable Property _T_PrisonerIsBitch Auto ;S/He is a real pain in the ass.
GlobalVariable Property _T_PrisonerIsNude Auto
GlobalVariable Property _T_PrisonerIsSloot Auto ;S/He puts out.
GlobalVariable Property _T_PrisonerPlayerRaped Auto
GlobalVariable Property _T_PrisonerRejected Auto
GlobalVariable Property _T_PrisonerThirst Auto
GlobalVariable Property _T_RadiantsSlave Auto
GlobalVariable Property _T_RapePlayer Auto ;0: none 1: Oral 2: Anal 3: Anal/Pussy
GlobalVariable Property _T_RefractoryPeriod Auto
GlobalVariable Property _T_Rescue Auto
GlobalVariable Property _T_RestoreCasual Auto
GlobalVariable Property _T_RestoreWhore Auto
GlobalVariable Property _T_Restrained Auto
GlobalVariable Property _T_RunAway Auto
GlobalVariable Property _T_SlaveOrders Auto ; 0: none 1: Be Naked 2: Bring drink 3: Stay close
GlobalVariable Property _T_Stockholm Auto
GlobalVariable Property _T_Sunhelm Auto
GlobalVariable Property _T_Tutorial Auto
GlobalVariable Property _T_Whoreing Auto
GlobalVariable Property _T_WuunferthsSlave Auto
Idle property idlepickup_ground Auto
Idle property idlesilentbow Auto
Ingredient Property _T_Heartache Auto
Ingredient Property _T_Strangle Auto
Keyword Property _T_CaptiveForce Auto
Keyword Property _T_CFForce Auto
Keyword Property _T_CuckForce Auto
Keyword Property _T_Debuggery Auto
Keyword Property _T_FamForce Auto
Keyword Property _T_FlunkyForce Auto
Keyword Property _T_HoboForce Auto
Keyword Property _T_MaidForce Auto
Keyword Property _T_PrisonerForce Auto
Keyword Property _T_ReserveForce Auto
Keyword Property ClothingNecklace Auto
Keyword Property ClothingRing Auto
Keyword Property VendorItemWeapon Auto
Keyword Property zbfAnimHandsArmbinder Auto
Keyword Property zbfAnimHandsWrists Auto
Keyword Property zbfWornWrist Auto
Location Property MarkarthLocation Auto
Location Property ReachHoldLocation Auto
Location Property RiftenLocation Auto
Location Property RiverwoodLocation Auto
Location Property RoriksteadLocation Auto
Location Property SolitudeLocation Auto
Location Property SolitudeRadiantRaimentsLocation Auto
Location Property WhiterunLocation Auto
Location Property WhiterunHoldLocation Auto
Location Property WindhelmLocation Auto
MiscObject Property Gold001 Auto
MiscObject Property _T_NMS_CooldownToken Auto
Message Property _T_DebugClearMenu Auto
Message Property _T_DebugGetMenu Auto
Message Property _T_DebugMenu Auto
Message Property _T_DebugPortMenu Auto
Message Property _T_DebugToggleMenu Auto
Message Property _T_FemRapePosMESG Auto
Message Property _T_MaleRapePosMESG Auto
Message Property _T_WhosOnTopMESG Auto
ObjectReference Property RiftDoor Auto
Outfit Property _T_NekkidOutfit Auto
ReferenceAlias Property BadDaddy Auto
ReferenceAlias Property Bryling Auto
ReferenceAlias Property CampFollower Auto
ReferenceAlias Property Captive1 Auto
ReferenceAlias Property Captive2 Auto
ReferenceAlias Property Cuck Auto
ReferenceAlias Property Endarie Auto
ReferenceAlias Property ExPrisoner Auto
ReferenceAlias Property Family Auto
ReferenceAlias Property FollowerAngrenor Auto
ReferenceAlias Property FollowerBrenuin Auto
ReferenceAlias Property FollowerDegaine Auto
ReferenceAlias Property FollowerEdda Auto
ReferenceAlias Property FollowerNoster Auto
ReferenceAlias Property FollowerSilda Auto
ReferenceAlias Property FollowerSnilf Auto
ReferenceAlias Property Hemming Auto
ReferenceAlias Property HouseSlave01 Auto
ReferenceAlias Property HouseSlave02 Auto
ReferenceAlias Property HouseSlave03 Auto
ReferenceAlias Property HouseSlave04 Auto
ReferenceAlias Property Ingun Auto
ReferenceAlias Property Irnskar Auto
ReferenceAlias Property John Auto
ReferenceAlias Property LastPrisoner Auto
ReferenceAlias Property Maul Auto
ReferenceAlias Property Maven Auto
ReferenceAlias Property PainInTheAss Auto
ReferenceAlias Property Prisoner Auto
ReferenceAlias Property Rat Auto
ReferenceAlias Property Reserve01 Auto
ReferenceAlias Property Reserve02 Auto
ReferenceAlias Property Reserve03 Auto
ReferenceAlias Property Reserve04 Auto
ReferenceAlias Property Taarie Auto
ReferenceAlias Property Wuunferth Auto
Quest Property manny_up_rp Auto
SexLabFramework Property SexLab auto
Sound Property ITMClothingDown Auto
Sound Property ITMClothingUp Auto
Sound Property SexLabVoiceFemale02Medium Auto
Sound Property SexLabVoiceFemale02Mild Auto
Sound Property SexLabVoiceMale01Medium Auto
Sound Property SexLabVoiceMale01Mild Auto
Sound Property UIHealthHeartbeatBLP Auto
Sound Property UIQuestComplete Auto
Armor ACuff
Armor Amulet
Armor Apron
Armor Blindfold
Armor CFACuff
Armor CFAmulet
Armor CFApron
Armor CFBlindfold
Armor CFCollar
Armor CFGag
Armor CFHair
Armor CFHood
Armor CFLongHair
Armor CFPArms
Armor CFPBoots
Armor CFPClothes
Armor CFPGloves
Armor CFPHead
Armor CFStocking1
Armor CFStocking2
Armor CFStocking3
Armor CFWCuff
Armor Collar
Armor Gag
Armor Hair
Armor Hood
Armor LongHair
Armor PArms
Armor PBoots
Armor PClothes
Armor PGloves
Armor PHead
Armor Stocking1
Armor Stocking2
Armor Stocking3
Armor WCuff
Outfit CFDefaultOutfit
Outfit DefaultOutfit
Outfit TempDefaultOutfit

Event OnInit()
   Utility.Wait(2)
   Debug.notification("NOTICE ME SENPAI SETUP STARTED")
   Utility.Wait(0.1)
   If PlayerRef.GetItemCount(_T_NMS_Menu_Ring) == 0
      PlayerRef.AddItem(_T_NMS_Menu_Ring, 1)
   Endif   
   Utility.Wait(0.1)
   If PlayerRef.GetItemCount(_T_NMS_Capture_Ring) == 0
      PlayerRef.AddItem(_T_NMS_Capture_Ring, 1)
   Endif   
   Utility.Wait(0.1)
   Debug.notification("NOTICE ME SENPAI SETUP COMPLETE")
   Registerforsingleupdate(10.0)
   RegisterForSingleUpdateGameTime(6.0)
EndEvent
    
Event OnUpdate()
   Actor Damsel = Prisoner.GetReference() as Actor
   Actor Flunky = ExPrisoner.GetReference() as Actor
   Int RapeChance = Utility.RandomInt(0, 12) ;Chance that a Player Whore customer won't pay and how they will rape them.   
   Utility.Wait(0.1) 
   If _T_NMS_Debug.GetValue() > 0 || PlayerRef.IsEquipped(_T_NMS_Menu_Ring)
      Debuggery()
   Elseif RapeChance == 3
      _T_RapePlayer.SetValue(1) ;Oral
   Elseif RapeChance == 6 
      _T_RapePlayer.SetValue(2) ;Anal
   Elseif RapeChance == 9 
      _T_RapePlayer.SetValue(3) ;Anal/Vag
   Else       
      _T_RapePlayer.SetValue(0) ;They will pay        
   Endif   
   Utility.Wait(0.1)
   If manny_up_rp.GetStage() == 20 && _T_Rescue.GetValue() == 0 ;Set toggle condition
      Form Piece = Damsel.GetEquippedWeapon() as Form
      Utility.Wait(0.1)
      PainInTheAss.Clear()
      Utility.Wait(0.1)
      LastPrisoner.Clear()
      If Flunky != None
         If Flunky.GetFactionRank(_T_HistoryFaction) > 4 && Flunky.GetFactionRank(_T_HistoryFaction) < 9 
            DismissButFollow(Flunky)
         Else
            Dismiss(Flunky)
         Endif   
         Flunky = None
      Endif 
      Utility.Wait(0.1)
      If Piece != None     
         Damsel.UnEquipItem(Piece)
         Damsel.RemoveItem(Piece)
      Endif   
      Damsel.RemoveItem(VendorItemWeapon, -1)
      Damsel.RemoveItem(Gold001, -1)
      Damsel.RemoveItem(ClothingNecklace, -1)
      Damsel.RemoveItem(ClothingRing, -1)
      Utility.Wait(0.1)
      _T_AfterRape.SetValue(0)
      _T_BeatingCounter.SetValue(0)
      _T_BeatingRecentCounter.SetValue(0)
      _T_Fisto.SetValue(0)
      _T_HitCounter.SetValue(0)
      _T_JustMurdered.SetValue(0)
      _T_PrisonerBanditRaped.SetValue(0)
      _T_PrisonerDialogue.SetValue(0)
      _T_PrisonerGayness.SetValue(0)
      _T_PrisonerHunger.SetValue(0)
      _T_PrisonerIsBitch.SetValue(0)
      _T_PrisonerIsNude.SetValue(0)
      _T_PrisonerIsSloot.SetValue(0)
      _T_PrisonerPlayerRaped.SetValue(0)
      _T_PrisonerRejected.SetValue(0)
      _T_PrisonerThirst.SetValue(0)
      _T_RefractoryPeriod.SetValue(0)
      _T_Rescue.SetValue(1)
      _T_Restrained.SetValue(0)
      _T_Stockholm.SetValue(0)
      _T_Whoreing.SetValue(0)
      Utility.Wait(0.1)
      PainInTheAss.ForceRefIfEmpty(Damsel)
      Utility.Wait(0.1)
      LastPrisoner.ForceRefIfEmpty(Damsel)
      Utility.Wait(0.1)
      manny_up_list_AvoidNPC.AddForm(Damsel)
      Debug.Notification("NMS Rescue NPC stats Started")
      Utility.Wait(0.1)
      If Damsel.IsInFaction(_T_NMS_CasualSexFaction) == True      
         Damsel.SetFactionRank(_T_HistoryFaction, 2)
         Damsel.SetRelationshipRank(PlayerRef, 4)
         PlayerRef.SetRelationshipRank(Damsel, 4)
         Debug.Notification("You rescued your lover!")       
      Endif   
   Elseif manny_up_rp.GetStage() == 20 && _T_Rescue.GetValue() == 1 ;Write down history with player
      If Damsel.IsInFaction(_T_HistoryFaction) == false
         Damsel.AddToFaction(_T_HistoryFaction)
         Damsel.SetFactionRank(_T_HistoryFaction, 1)
         Damsel.SetRelationshipRank(PlayerRef, 2)
         PlayerRef.SetRelationshipRank(Damsel, 2)
      Else  
         If _T_PrisonerBanditRaped.GetValue() > 0 && _T_PrisonerPlayerRaped.GetValue() > 0 ; Bandits and player raped them
            If _T_PrisonerPlayerRaped.GetValue() > 1
               If Damsel.GetFactionRank(_T_HistoryFaction) != 8 ;Multiple player rapes
                  Damsel.SetFactionRank(_T_HistoryFaction, 8)
                  Damsel.SetRelationshipRank(PlayerRef, -2)
                  PlayerRef.SetRelationshipRank(Damsel, -2) 
                  ZipItSnitch(Damsel)                 
               Endif   
            Else   
               If Damsel.GetFactionRank(_T_HistoryFaction) != 7 ;single player rape
                  Damsel.SetFactionRank(_T_HistoryFaction, 7)
                  Damsel.SetRelationshipRank(PlayerRef, -2)
                  PlayerRef.SetRelationshipRank(Damsel, -2)     
                  ZipItSnitch(Damsel)              
               Endif   
            Endif 
         Elseif _T_PrisonerBanditRaped.GetValue() == 0 && _T_PrisonerPlayerRaped.GetValue() > 0 ; Only the player raped them
            If _T_PrisonerPlayerRaped.GetValue() > 1
               If Damsel.GetFactionRank(_T_HistoryFaction) != 6 ;Multiple player rapes
                  Damsel.SetFactionRank(_T_HistoryFaction, 6)
                  Damsel.SetRelationshipRank(PlayerRef, -2)
                  PlayerRef.SetRelationshipRank(Damsel, -2)  
                  ZipItSnitch(Damsel)                
               Endif   
            Else   
               If Damsel.GetFactionRank(_T_HistoryFaction) != 5 ;single player rape
                  Damsel.SetFactionRank(_T_HistoryFaction, 5)
                  Damsel.SetRelationshipRank(PlayerRef, -2)
                  PlayerRef.SetRelationshipRank(Damsel, -2)  
                  ZipItSnitch(Damsel)                
               Endif   
            Endif   
         Elseif _T_PrisonerIsSloot.GetValue() > 1
            If _T_PrisonerBanditRaped.GetValue() > 0
               If Damsel.GetFactionRank(_T_HistoryFaction) != 4 ;Raped by bandits and had consensual sex with player
                  Damsel.SetFactionRank(_T_HistoryFaction, 4)
                  Damsel.SetRelationshipRank(PlayerRef, 4)
                  PlayerRef.SetRelationshipRank(Damsel, 4)                  
               Endif   
            Else   
               If Damsel.GetFactionRank(_T_HistoryFaction) != 2 ;had consensual sex with player
                  Damsel.SetFactionRank(_T_HistoryFaction, 2)
                  Damsel.SetRelationshipRank(PlayerRef, 4)
                  PlayerRef.SetRelationshipRank(Damsel, 4)
               Endif   
            Endif   
         Else ;No player sex or rape
            If _T_PrisonerIsSloot.GetValue() == 1 ;Offered reward Not cashed in.
               If Damsel.GetFactionRank(_T_HistoryFaction) != 9
                  Damsel.SetFactionRank(_T_HistoryFaction, 9)
                  Damsel.SetRelationshipRank(PlayerRef, 4)
                  PlayerRef.SetRelationshipRank(Damsel, 4)
               Endif    
            Elseif _T_PrisonerBanditRaped.GetValue() > 0
               If Damsel.GetFactionRank(_T_HistoryFaction) != 3
                  Damsel.SetFactionRank(_T_HistoryFaction, 3)
                  Damsel.SetRelationshipRank(PlayerRef, 2)
                  PlayerRef.SetRelationshipRank(Damsel, 2)
               Endif                              
            Endif
         Endif    
      Endif 
   Elseif manny_up_rp.GetStage() != 20 && _T_Rescue.GetValue() == 1
      _T_AfterRape.SetValue(0)
      _T_BeatingCounter.SetValue(0)
      _T_BeatingRecentCounter.SetValue(0)
      _T_Fisto.SetValue(0)
      _T_HitCounter.SetValue(0)
      _T_PrisonerBanditRaped.SetValue(0)
      _T_PrisonerDialogue.SetValue(0)
      _T_PrisonerGayness.SetValue(0)
      _T_PrisonerHunger.SetValue(0)
      _T_PrisonerIsBitch.SetValue(0)
      _T_PrisonerIsNude.SetValue(0)
      _T_PrisonerIsSloot.SetValue(0)
      _T_PrisonerPlayerRaped.SetValue(0)
      _T_PrisonerRejected.SetValue(0)
      _T_PrisonerThirst.SetValue(0)
      _T_RefractoryPeriod.SetValue(0)
      _T_Rescue.SetValue(0)    
      _T_Restrained.SetValue(0)
      _T_Stockholm.SetValue(0)
      _T_Whoreing.SetValue(0)
      Utility.Wait(0.1)
      PainInTheAss.Clear()
      Debug.Notification("NMS Rescue NPC stats Cleared")         
   Elseif manny_up_rp.GetStage() != 20 && _T_Rescue.GetValue() == 0  
;Remove bondage hunger and thirst      
      If _T_Restrained.GetValue() < 3 && Flunky.WornHasKeyword(zbfWornWrist) == False && _T_PrisonerHunger.GetValue() > 0
         _T_PrisonerHunger.SetValue(0)
      Elseif _T_Restrained.GetValue() < 3 && Flunky.WornHasKeyword(zbfWornWrist) == False && _T_PrisonerThirst.GetValue() > 0
         _T_PrisonerThirst.SetValue(0)
;Make sure faction is set for late rape         
      Elseif _T_PrisonerBanditRaped.GetValue() > 0 && Damsel.GetFactionRank(_T_HistoryFaction) != 5 && Damsel.GetFactionRank(_T_HistoryFaction) != 6 && Damsel.GetFactionRank(_T_HistoryFaction) != 7 && Damsel.GetFactionRank(_T_HistoryFaction) != 8
         Damsel.SetFactionRank(_T_HistoryFaction, 6)
      Endif   
   Endif 
   Utility.Wait(0.1)  
   If _T_RefractoryPeriod.GetValue() > 0
      _T_RefractoryPeriod.Mod(1)
      Utility.Wait(0.1)
      If _T_RefractoryPeriod.GetValue() > 35
         _T_RefractoryPeriod.SetValue(0)
         _T_AfterRape.SetValue(0)
      Endif
   Endif   
   Utility.Wait(0.1)
   LastAliasCheck()
   Utility.Wait(0.1)
   If Flunky != None
      If _T_RunAway.GetValue() > 0
         _T_RunAway.Mod(1)
         Utility.Wait(0.1)
         If _T_RunAway.GetValue() > 35
            _T_RunAway.SetValue(0)
            Dismiss(Flunky)
         Endif
      Else 
         UpdateWhore(Flunky)
         Utility.Wait(0.1)      
         BreakTheWill(Flunky)
         If Flunky.GetRelationshipRank(PlayerRef) < 2
            Flunky.SetRelationshipRank(PlayerRef, 2)
            PlayerRef.SetRelationshipRank(Flunky, 2)
            Debug.Notification("<font size='20'>Your victim is unhappy, but resigned to their fate.</font>")              
         Endif                
      Endif   
   Elseif Damsel != None
      UpdateWhore(Damsel)
      Utility.Wait(0.1)
      BreakTheWill(Damsel)       
   Endif   
   Utility.Wait(0.1)
   PeppermintPatty()
   Utility.Wait(0.1) 
   Registerforsingleupdate(4.0)
   SlaveManagement()
EndEvent

Event OnUpdateGameTime()
    Actor Damsel
    Int Counter
    If _T_Rescue.GetValue() == 1
       Damsel = Prisoner.GetReference() as Actor
       _T_PrisonerHunger.Mod(1)
       _T_PrisonerThirst.Mod(1)    
    Else
       Damsel = ExPrisoner.GetReference() as Actor
       If _T_Restrained.GetValue() > 2 || Damsel.WornHasKeyword(zbfWornWrist) == True;Follower is tied up and can't feed themselves.
          _T_PrisonerHunger.Mod(1)
          _T_PrisonerThirst.Mod(1)
       Endif                  
    Endif
    Utility.Wait(0.1)
    String SlaveName = Damsel.GetBaseObject().GetName()
    ;Reduce irrational affection over time
    If Damsel.GetFactionRank(_T_NMS_SlaveFaction) != 2 && _T_Stockholm.GetValue() < 15
       If Counter == 1
          Counter = 2
       Elseif Counter == 2
          Counter = 3
       Elseif Counter == 3
          Counter = 1
          If _T_Stockholm.GetValue() > 0
             _T_Stockholm.Mod(-1)    
             Debug.Notification("<font size='20'>"+Slavename+" Irrational Affection -1</font>") 
          Endif
       Else      
          Counter = 1
       Endif   
    Endif 
    Utility.Wait(0.1)  
    _T_BeatingRecentCounter.SetValue(0)
    Utility.Wait(0.1)

    If _T_ArcadiasSlave.GetValue() == 2 || _T_BothelasSlave.GetValue() == 2
       If _T_Disobedience.GetValue() < 5
          _T_Obedience.Mod(1)
          Debug.Notification("Love potion duration - 1")
       Else
          Debug.Notification("Love potion duration didn't decrease")
       Endif
       Utility.Wait(0.2)
       If _T_Obedience.GetValue() < 0
          _T_Obedience.SetValue(0)   
       Endif         
    Elseif _T_RadiantsSlave.GetValue() == 2 || _T_BrylingsSlave.GetValue() == 2 || _T_WuunferthsSlave.GetValue() == 2
       Int Flip = Utility.RandomInt(0, 1)
       Utility.Wait(0.1)
       If _T_Disobedience.GetValue() == 0
          _T_Obedience.Mod(1)
          Debug.Notification("Good behavior. Obedience + 1")
       Elseif _T_DisObedience.GetValue() < 3
          _T_Disobedience.Mod(-1)
          Debug.Notification("Mild disobedience. No Obedience Gain")
       Elseif _T_Disobedience.GetValue() == 3 && _T_Obedience.GetValue() > 0
          _T_Obedience.Mod(-1)
          _T_Disobedience.Mod(-Flip)
          Debug.Notification("Disobedience. Obedience -1")
       Elseif _T_Disobedience.GetValue() > 3 && _T_Obedience.GetValue() > 0
          _T_Obedience.Mod(-2)
          _T_Disobedience.Mod(-Flip)
          Debug.Notification("Severe disobedience. Obedience -2")          
       Endif
       Utility.Wait(0.2)
       If _T_Obedience.GetValue() < 0
          _T_Obedience.SetValue(0)
          Debug.Notification("Slave Level: Unruly")    
       Elseif _T_Obedience.GetValue() < 5
          Debug.Notification("Slave Level: Unruly")
       Elseif _T_Obedience.GetValue() < 10 
          Debug.Notification("Slave Level: Somewhat Obedient") 
       Elseif _T_Obedience.GetValue() < 15
          Debug.Notification("Slave Level: Obedient")
       Elseif _T_Obedience.GetValue() < 25
          Debug.Notification("Slave Level: Very Obedient") 
       Elseif _T_Obedience.GetValue() < 35
          Debug.Notification("Slave Level: Extremely Obedient") 
       Elseif _T_Obedience.GetValue() > 34
          Debug.Notification("Slave Level: Completely Obedient")
       Endif  
    Elseif _T_MavensSlave.GetValue() == 2
       If _T_Obedience.GetValue() < 0
          _T_Obedience.SetValue(0)
          Debug.Notification("Slave Level: Unruly")    
       Elseif _T_Obedience.GetValue() < 5
          Debug.Notification("Slave Level: Unruly")
       Elseif _T_Obedience.GetValue() < 10 
          Debug.Notification("Slave Level: Somewhat Obedient") 
       Elseif _T_Obedience.GetValue() < 15
          Debug.Notification("Slave Level: Obedient")
       Elseif _T_Obedience.GetValue() < 25
          Debug.Notification("Slave Level: Very Obedient") 
       Elseif _T_Obedience.GetValue() < 35
          Debug.Notification("Slave Level: Extremely Obedient") 
       Elseif _T_Obedience.GetValue() > 34
          Debug.Notification("Slave Level: Completely Obedient")
       Endif                                           
    Endif
    Utility.Wait(0.1)   
    If _T_ArcadiasSlave.GetValue() == 2 && _T_Obedience.GetValue() > 25
       _T_ArcadiasSlave.SetValue(3)
       _T_Disobedience.SetValue(0)
       _T_Obedience.SetValue(0)
       _T_SlaveOrders.SetValue(0)
       Debug.Notification("Arcadia's Love potion has worn off.")
    Elseif _T_BothelasSlave.GetValue() == 2 && _T_Obedience.GetValue() > 25
       _T_BothelasSlave.SetValue(3)
       _T_Disobedience.SetValue(0)
       _T_Obedience.SetValue(0)
       _T_SlaveOrders.SetValue(0)
       Debug.Notification("The Hag's Love potion has worn off.")             
    Endif  
    RegisterForSingleUpdateGameTime(6.0)
EndEvent

Function BreakTheWill(actor Damsel)
    Actor Cap1 = Captive1.GetReference() as Actor
    Actor Cap2 = Captive2.GetReference() as Actor
    Utility.Wait(0.1)
    If Damsel.GetFactionRank(_T_HistoryFaction) > 4 && Damsel.GetFactionRank(_T_HistoryFaction) < 9
       Int Sex = Damsel.GetLeveledActorBase().GetSex()
       String SlaveName = Damsel.GetBaseObject().GetName()  
       ;Woman... be my slave
       If Damsel.GetFactionRank(_T_NMS_SlaveFaction) == 2 
          If Damsel.GetRelationshipRank(PlayerRef) < 4
             Damsel.SetRelationshipRank(PlayerRef, 4)
             PlayerRef.SetRelationshipRank(Damsel, 4)
          Endif  
       Else
          ;The torture... never stops.   
          If Damsel.IsInFaction(_T_NMS_SlaveFaction) == False && _T_BeatingCounter.GetValue() > 9
             Utility.Wait(0.1)
             Damsel.SetFactionRank(_T_NMS_SlaveFaction, 1)
             Utility.Wait(0.1)
             _T_PrisonerPlayerRaped.SetValue(3)
             Utility.Wait(0.1)
             UIQuestComplete.Play(PlayerRef)
             If Cap1 == Damsel
                Captive1.Clear()
                Debug.Notification("Captive 01 clear.")
             Elseif Cap2 == Damsel
                Captive2.Clear()
                Debug.Notification("Captive 02 clear.")
             Endif
             Utility.Wait(0.1)      
             Debug.Notification("<font size='20'>You broke their will! "+Slavename+"'s training stats will no longer go below 5.</font>")
          ;Dueling banjos   
          Elseif Damsel.IsInFaction(_T_NMS_SlaveFaction) == False && Damsel.IsInFaction(_T_IncestFaction) == True 
             Utility.Wait(0.1)
             Damsel.SetFactionRank(_T_NMS_SlaveFaction, 1)
             Utility.Wait(0.1)
             _T_PrisonerPlayerRaped.SetValue(3)
             Utility.Wait(0.1)
             UIQuestComplete.Play(PlayerRef)
             Debug.Notification("<font size='20'>The shame broke their will! "+Slavename+"'s training stats will no longer go below 5.</font>")             
          ;You made me love you... I didn't want to do it, I didn't want to do it.    
          ElseIf _T_Stockholm.GetValue() > 19      
             Damsel.SetFactionRank(_T_NMS_SlaveFaction, 2)
             Utility.Wait(0.1)
             Damsel.SetRelationshipRank(PlayerRef, 4)
             PlayerRef.SetRelationshipRank(Damsel, 4)
             Utility.Wait(0.2)
             UIQuestComplete.Play(PlayerRef)
             Debug.Notification("<font size='20'>"+Slavename+" is now your fully broken and devoted sex slave.</font>")
          ;I would die for you... feel pain for you... I would crawl on hands and knees until you see...
          Elseif _T_Stockholm.GetValue() > 14
             ;Keeping Irrational affection above 14 makes the NPC super friendly, especially useful for PLANCK VR, as they will no longer flinch from your touch.
             If Damsel.GetRelationshipRank(PlayerRef) < 4
                Damsel.SetRelationshipRank(PlayerRef, 4)
                PlayerRef.SetRelationshipRank(Damsel, 4)
                Debug.Notification("<font size='20'>"+Slavename+"'s mad love has made them obsessively devoted to you.</font>") 
             Endif   
          Elseif _T_Stockholm.GetValue() < 15 
             ;She's a super freak... she's super freaky
             If Damsel == OlavaTheFeebleRef && Damsel.GetFactionRank(_T_HistoryFaction) > 4 && Damsel.GetFactionRank(_T_HistoryFaction) < 9
                _T_StockHolm.SetValue(15)    
             ;Looooove... Love is strange. 
             Elseif _T_Stockholm.GetValue() > 9
                ;Keeping Irrational affection above 9 makes the NPC greets friendly, especially useful for PLANCK VR, as they will no longer flinch from your touch.
                If Damsel.GetRelationshipRank(PlayerRef) < 3
                   Damsel.SetRelationshipRank(PlayerRef, 3)
                   PlayerRef.SetRelationshipRank(Damsel, 3)
                   Debug.Notification("<font size='20'>Irrational love has made "+Slavename+" more polite.</font>")   
                Elseif Damsel.GetRelationshipRank(PlayerRef) > 3
                   Damsel.SetRelationshipRank(PlayerRef, 3)
                   PlayerRef.SetRelationshipRank(Damsel, 3)
                   Debug.Notification("<font size='20'>"+Slavename+" is no longer obsessed with you.</font>")  
                Endif
             Else
               If _T_PrisonerPlayerRaped.GetValue() == 0 && Damsel.GetFactionRank(_T_HistoryFaction) != 5 && Damsel.GetFactionRank(_T_HistoryFaction) != 6 && Damsel.GetFactionRank(_T_HistoryFaction) != 7 && Damsel.GetFactionRank(_T_HistoryFaction) != 8
                  ; Do nothing 
               Else
                  If Damsel == HaelgaRef && Damsel.IsInFaction(_T_NMS_SlaveFaction) == False
                     Damsel.SetFactionRank(_T_NMS_SlaveFaction, 2)
                     Utility.Wait(0.1)
                     Damsel.SetRelationshipRank(PlayerRef, 4)
                     PlayerRef.SetRelationshipRank(Damsel, 4)
                     Utility.Wait(0.1)
                     _T_PrisonerDialogue.SetValue(2)
                     _T_NMS_MasterToggle.Mod(1)
                     Utility.Wait(0.1)
                     UIQuestComplete.Play(PlayerRef)
                     Debug.Notification("<font size='20'>Haelga has become your willing and devoted love slave.</font>") 
                  Endif    
               Endif
             Endif
          Endif             
          ;Shattered                 
          If Damsel.GetFactionRank(_T_NMS_SlaveFaction) == 1 
             If _T_BeatingCounter.GetValue() < 5
                _T_BeatingCounter.SetValue(5)
             Endif 
             If Damsel == EddaRef || Damsel == SildaRef
                If _T_Stockholm.GetValue() < 10
                   _T_Stockholm.SetValue(10)
                Endif                  
             Else
                If _T_Stockholm.GetValue() < 5
                   _T_Stockholm.SetValue(5)
                Endif         
             Endif
             Utility.Wait(0.1)
             ;Keeping discipline above 7 makes the NPC greets friendlier 
             If _T_BeatingCounter.GetValue() > 6 && Damsel.GetRelationshipRank(PlayerRef) < 3
                Damsel.SetRelationshipRank(PlayerRef, 3)
                PlayerRef.SetRelationshipRank(Damsel, 3)
                Debug.Notification("<font size='20'>Discipline has taught "+Slavename+" to be more polite.</font>")
             Elseif _T_BeatingCounter.GetValue() < 7
                If _T_Rescue.GetValue() == 0 && Damsel.GetRelationshipRank(PlayerRef) > 2 && _T_Stockholm.GetValue() < 10
                   Damsel.SetRelationshipRank(PlayerRef, 2)
                   PlayerRef.SetRelationshipRank(Damsel, 2)
                   Debug.Notification("<font size='20'>"+Slavename+" has become less polite.</font>")
                Elseif _T_Rescue.GetValue() == 1 && Damsel.GetRelationshipRank(PlayerRef) > 0 && _T_Stockholm.GetValue() < 10
                   Damsel.SetRelationshipRank(PlayerRef, -2)
                   PlayerRef.SetRelationshipRank(Damsel, -2)
                   Debug.Notification("<font size='20'>"+Slavename+" has become less polite.</font>")                
                Endif                   
             Endif  
             ;constant rape of the broken slave has led to them becoming sexually depraved as a survival mechanism. Greets will always remain friendly.
             If _T_PrisonerPlayerRaped.GetValue() > 9
                Damsel.SetFactionRank(_T_NMS_SlaveFaction, 2)
                Utility.Wait(0.1)
                Damsel.SetRelationshipRank(PlayerRef, 4)
                PlayerRef.SetRelationshipRank(Damsel, 4)
                Utility.Wait(0.2)
                UIQuestComplete.Play(PlayerRef)
                Debug.Notification("<font size='20'>"+Slavename+" is now your fully broken and devoted sex slave.</font>")  
             Endif 
          ElseIf _T_Stockholm.GetValue() < 10
             If _T_Rescue.GetValue() == 0 && Damsel.GetRelationshipRank(PlayerRef) > 2
                Damsel.SetRelationshipRank(PlayerRef, 2)
                PlayerRef.SetRelationshipRank(Damsel, 2)
                Debug.Notification("<font size='20'>"+Slavename+" has become less polite.</font>")
             Elseif _T_Rescue.GetValue() == 1 && Damsel.GetRelationshipRank(PlayerRef) > 0
                Damsel.SetRelationshipRank(PlayerRef, -2)
                PlayerRef.SetRelationshipRank(Damsel, -2)
                Debug.Notification("<font size='20'>"+Slavename+" has become less polite.</font>")               
             Endif        
          Endif
       Endif
       If _T_PrisonerIsSloot.GetValue() > 0
          _T_PrisonerIsSloot.SetValue(0)
       Endif  
    Elseif _T_PrisonerIsSloot.GetValue() > 1 && Damsel.GetRelationshipRank(PlayerRef) < 4
       Damsel.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(Damsel, 4)
    Elseif Damsel.GetRelationshipRank(PlayerRef) < 2
       Damsel.SetRelationshipRank(PlayerRef, 2)
       PlayerRef.SetRelationshipRank(Damsel, 2)       
    Endif  
EndFunction

Function LastAliasCheck()
    Actor PiARef = None
    If _T_Rescue.GetValue() == 0
       If PainInTheAss != None
          PiARef = PainInTheAss.GetReference() as actor
       Endif
       Utility.Wait(0.1)
       If PiARef != None ;Citizen rescue exists
          PainInTheAss.Clear()
          Debug.Notification("NMS Rescue NPC alias Cleared")
       Endif 
    Else
       If _T_NakedOutfit.GetValue() > 0
          _T_NakedOutfit.SetValue(0)
          Debug.Notification("Naked Outfit Cleared")
       Endif   
    Endif   
    ; Globals insurance check
    If _T_RefractoryPeriod.GetValue() < 0
       _T_RefractoryPeriod.SetValue(0)
    Endif   
    If _T_BeatingCounter.GetValue() < 0
       _T_BeatingCounter.SetValue(0)
    Endif   
    If _T_Stockholm.GetValue() < 0
       _T_Stockholm.SetValue(0)
    Endif  
EndFunction

Function PeppermintPatty()
    If _T_PattyHurst.GetValue() > 9
       Actor Stooge = CampFollower.GetReference() as Actor
       String StoogeName = Stooge.GetBaseObject().GetName()
       Utility.Wait(0.1)
       If Stooge.GetFactionRank(_T_NMS_SlaveFaction) == 2
          _T_PattyHurst.SetValue(0)
          Debug.Notification("<font size='20'>"+StoogeName+" Is a devoted slave.</font>") 
       Elseif Stooge.GetFactionRank(_T_NMS_SlaveFaction) == 1
          Stooge.SetFactionRank(_T_NMS_SlaveFaction, 2)
          Utility.Wait(0.1)
          Stooge.SetRelationshipRank(PlayerRef, 4)
          PlayerRef.SetRelationshipRank(Stooge, 4)
          _T_PattyHurst.SetValue(0)
          UIQuestComplete.Play(PlayerRef)
          Debug.Notification("<font size='20'>"+StoogeName+" is now your fully devoted accomplice and sex slave.</font>")            
       Else
          Stooge.SetFactionRank(_T_NMS_SlaveFaction, 1)
          _T_PattyHurst.SetValue(0)
          UIQuestComplete.Play(PlayerRef)
          Debug.Notification("<font size='20'>"+StoogeName+"'s will has been broken. Training stats will no longer go below 5.</font>")
       Endif
    Endif 

    If _T_SunHelm.GetValue() == 0 && Game.GetModByname("SunHelmSurvival.esp") != 255
       _T_WaterskinList.Revert()  
       Potion SunFull = Game.GetFormFromFile(0x054DE9AD, "SunHelmSurvival.esp") as Potion
       Potion SunMid = Game.GetFormFromFile(0x054DE9AF, "SunHelmSurvival.esp") as Potion
       Potion SunLow = Game.GetFormFromFile(0x054DE9AE, "SunHelmSurvival.esp") as Potion  
       Utility.Wait(0.1)
       _T_WaterskinList.AddForm(SunFull)   
       _T_WaterskinList.AddForm(SunMid)
       _T_WaterskinList.AddForm(SunLow)
       Utility.Wait(0.1)
       Debug.Notification("NMS: Sunhelm detected. Waterskins added.") 
       _T_SunHelm.SetValue(1)
    Elseif _T_iNeed.GetValue() == 0 && Game.GetModByname("iNeed.esp") != 255
       _T_WaterskinList.Revert() 
       Potion iNeedFull = Game.GetFormFromFile(0x05004376, "iNeed.esp") as Potion
       Potion iNeedMid = Game.GetFormFromFile(0x0500437D, "iNeed.esp") as Potion
       Potion iNeedLow = Game.GetFormFromFile(0x0500437F, "iNeed.esp") as Potion 
       Utility.Wait(0.1)
       _T_WaterskinList.AddForm(iNeedFull)   
       _T_WaterskinList.AddForm(iNeedMid)
       _T_WaterskinList.AddForm(iNeedLow)
       Utility.Wait(0.1)
       Debug.Notification("NMS: iNeed detected. Waterskins added.")
       _T_iNeed.SetValue(1)
    Endif
EndFunction   

Function SetCuffs(Actor Damsel)
    Actor Stooge = CampFollower.GetReference() as Actor
    If Stooge == Damsel
       CFACuff = Damsel.GetWornForm(0x00800000) As Armor
       CFWCuff = Damsel.GetWornForm(0x20000000) As Armor   
    Else 
       ACuff = Damsel.GetWornForm(0x00800000) As Armor
       WCuff = Damsel.GetWornForm(0x20000000) As Armor   
    Endif
EndFunction   

Function SetGag(Actor Damsel)
    Actor Stooge = CampFollower.GetReference() as Actor
    If Stooge == Damsel
       CFGag = Damsel.GetWornForm(0x00004000) As Armor
    Else  
       Gag = Damsel.GetWornForm(0x00004000) As Armor
    Endif
EndFunction   

;Note: This is different from the vanilla setoutfit function which is called in this same script. This one is only called by (I believe) The _T_ExPrisonerInventory fragment.
Function SetOutfit(Actor Damsel)
    Actor Stooge = CampFollower.GetReference() as Actor
    Actor Flunky = ExPrisoner.GetReference() as Actor
    Utility.Wait(0.1)
    If Stooge == Damsel
       CFAmulet = Damsel.GetWornForm(0x00000020) As Armor
       CFApron = Damsel.GetWornForm(0x00004000) As Armor
       CFACuff = Damsel.GetWornForm(0x00800000) As Armor
       CFBlindfold = Damsel.GetWornForm(0x02000000) As Armor
       CFCollar = Damsel.GetWornForm(0x00008000) As Armor
       CFGag = Damsel.GetWornForm(0x00004000) As Armor
       CFHair = Damsel.GetWornForm(0x00000002) As Armor
       CFHood = Damsel.GetWornForm(0x00000001) As Armor
       CFLongHair = Damsel.GetWornForm(0x00000800) As Armor
       CFPArms = Damsel.GetWornForm(0x00000010) As Armor
       CFPBoots = Damsel.GetWornForm(0x00000080) As Armor
       CFPClothes = Damsel.GetWornForm(0x00000004) As Armor
       CFPHead = Damsel.GetWornForm(0x00001000) As Armor
       CFPGloves = Damsel.GetWornForm(0x00000008) As Armor
       CFStocking1 = Damsel.GetWornForm(0x00010000) As Armor
       CFStocking2 = Damsel.GetWornForm(0x00020000) As Armor
       CFStocking3 = Damsel.GetWornForm(0x00800000) As Armor
       CFWCuff = Damsel.GetWornForm(0x20000000) As Armor
       Utility.Wait(0.1)
       If CFPClothes == None
          _T_CFIsNude.SetValue(1)
          Utility.Wait(0.1)
          _T_CFNakedOutfit.SetValue(1)
          Utility.Wait(0.1)
          If _T_Tutorial.GetValue() == 0
             _T_Tutorial.SetValue(1)
             Utility.Wait(0.1)
             Debug.Messagebox("TUTORIAL: You have set an outfit without a torso item. For the purposes of Notice Me Senpai, this outfit will be recognized as being nude in dialogue. The Undress and dress dialogue options will be disabled until you set an outfit with a torso, this is to prevent mismatches in function between the two methods of clothing management. Do not use other mods to manage clothing for this NPC.")
          Else
             Debug.Notification("Nude Outfit selected. Dressing dialogue disabled.")
          Endif
       Else
          _T_CFIsNude.SetValue(0)
          Utility.Wait(0.1)
          _T_CFNakedOutfit.SetValue(0)
       Endif
    Elseif Flunky == Damsel      
       Amulet = Damsel.GetWornForm(0x00000020) As Armor
       Apron = Damsel.GetWornForm(0x00004000) As Armor
       ACuff = Damsel.GetWornForm(0x00800000) As Armor
       Blindfold = Damsel.GetWornForm(0x02000000) As Armor
       Collar = Damsel.GetWornForm(0x00008000) As Armor
       Gag = Damsel.GetWornForm(0x00004000) As Armor
       Hair = Damsel.GetWornForm(0x00000002) As Armor
       Hood = Damsel.GetWornForm(0x00000001) As Armor
       LongHair = Damsel.GetWornForm(0x00000800) As Armor      
       PArms = Damsel.GetWornForm(0x00000010) As Armor
       PBoots = Damsel.GetWornForm(0x00000080) As Armor
       PClothes = Damsel.GetWornForm(0x00000004) As Armor
       PGloves = Damsel.GetWornForm(0x00000008) As Armor
       Stocking1 = Damsel.GetWornForm(0x00010000) As Armor
       Stocking2 = Damsel.GetWornForm(0x00020000) As Armor
       Stocking3 = Damsel.GetWornForm(0x00800000) As Armor       
       PHead = Damsel.GetWornForm(0x00001000) As Armor
       WCuff = Damsel.GetWornForm(0x20000000) As Armor
       Utility.Wait(0.1)
       If PClothes == None
          _T_PrisonerIsNude.SetValue(1)
          Utility.Wait(0.1)
          _T_NakedOutfit.SetValue(1)
          Utility.Wait(0.1)
          If _T_Tutorial.GetValue() == 0
             _T_Tutorial.SetValue(1)
             Utility.Wait(0.1)
             Debug.Messagebox("TUTORIAL: You have set an outfit without a torso item. For the purposes of Notice Me Senpai, this outfit will be recognized as being nude in dialogue. The Undress and dress dialogue options will be disabled until you set an outfit with a torso, this is to prevent mismatches in function between the two methods of clothing management. Do not use other mods to manage clothing for this NPC.")
          Else
             Debug.Notification("Nude Outfit selected. Dressing dialogue disabled.")
          Endif
       Else
          _T_PrisonerIsNude.SetValue(0)
          Utility.Wait(0.1)
          _T_NakedOutfit.SetValue(0)
       Endif      
    Endif    
EndFunction    

Function Strip(Actor Damsel)
    Actor Stooge = CampFollower.GetReference() as Actor
    Actor Johnny = John.GetReference() as Actor
    Utility.Wait(0.1)
    If Johnny == Damsel
       PArms = PlayerRef.GetWornForm(0x00000010) As Armor
       PBoots = PlayerRef.GetWornForm(0x00000080) As Armor
       PClothes = PlayerRef.GetWornForm(0x00000004) As Armor
       PHead = PlayerRef.GetWornForm(0x00001000) As Armor
       PGloves = PlayerRef.GetWornForm(0x00000008) As Armor 
       Utility.Wait(0.1)
       If PBoots != None
          PlayerRef.UnequipItem(PBoots)
       Endif   
       If PGloves != None
          PlayerRef.UnequipItem(PGloves)
       Endif
       If PArms != None
          PlayerRef.UnequipItem(PArms)
       Endif
       If PClothes != None
          PlayerRef.UnequipItem(PClothes)
       Endif
       If PHead != None
          PlayerRef.UnequipItem(PHead)
       Endif
    Elseif Damsel.IsInFaction(CurrentFollowerFaction) == True || Damsel.HasKeyword(_T_HoboForce) == True  
       Armor FClothes = Damsel.GetWornForm(0x00000004) As Armor
       Utility.Wait(0.1)
       If FClothes != None
          Damsel.UnEquipAll()
       Else   
          Damsel.Disable()
          Utility.Wait(0.3)
          Damsel.Enable()
       Endif  
    Elseif Stooge == Damsel
       If _T_CFIsNude.GetValue() == 0  
          CFAmulet = Damsel.GetWornForm(0x00000020) As Armor
          CFACuff = Damsel.GetWornForm(0x00800000) As Armor
          CFBlindfold = Damsel.GetWornForm(0x02000000) As Armor
          CFCollar = Damsel.GetWornForm(0x00008000) As Armor
          CFGag = Damsel.GetWornForm(0x00004000) As Armor
          CFHood = Damsel.GetWornForm(0x00000001) As Armor    
          CFPArms = Damsel.GetWornForm(0x00000010) As Armor
          CFPBoots = Damsel.GetWornForm(0x00000080) As Armor
          CFPClothes = Damsel.GetWornForm(0x00000004) As Armor
          CFPHead = Damsel.GetWornForm(0x00001000) As Armor
          CFPGloves = Damsel.GetWornForm(0x00000008) As Armor
          CFWCuff = Damsel.GetWornForm(0x20000000) As Armor
          Utility.Wait(0.2)
          If CFPHead != None
             Damsel.UnequipItem(CFPHead)
             ITMClothingDown.Play(PlayerRef)
          Endif  
          Utility.Wait(0.1)   
          If CFPGloves != None
             Damsel.UnequipItem(CFPGloves)
             ITMClothingDown.Play(PlayerRef)
          Endif  
          Utility.Wait(0.1)         
          If CFPArms != None
             Damsel.UnequipItem(CFPArms)
             ITMClothingDown.Play(PlayerRef)
          Endif
          Damsel.PlayIdle(idlepickup_ground)
          Utility.Wait(1.0) 
          If CFPBoots != None
             Damsel.UnequipItem(CFPBoots)
             ITMClothingDown.Play(PlayerRef)
          Endif
          Utility.Wait(1.0)   
          Damsel.PlayIdle(idlesilentbow) 
          Utility.Wait(1.0)   
          Form CFPiece = Damsel.GetEquippedWeapon() as Form
          If CFPiece != None
             Damsel.RemoveItem(CFPiece, 1, True, PlayerRef)
          Endif     
          Utility.Wait(0.1)               
          If CFPClothes != None
             Damsel.UnequipItem(CFPClothes)
             ITMClothingDown.Play(PlayerRef)
          Endif   
          _T_CFIsNude.SetValue(1)
          Utility.Wait(0.1)
       Else 
          Damsel.PlayIdle(idlepickup_ground)
          Utility.Wait(1.0) 
          If CFPClothes != None
             Damsel.EquipItem(CFPClothes)
             ITMClothingUp.Play(PlayerRef)
          Endif        
          Utility.Wait(1.0)                 
          If CFPBoots != None
             Damsel.EquipItem(CFPBoots)
             ITMClothingUp.Play(PlayerRef) 
          Endif  
          Utility.Wait(1.0)         
          If CFPArms != None
             Damsel.EquipItem(CFPArms)
             ITMClothingUp.Play(PlayerRef) 
          Endif  
          Utility.Wait(0.1)
          If CFPGloves != None
             Damsel.EquipItem(CFPGloves)
             ITMClothingUp.Play(PlayerRef) 
          Endif  
          Utility.Wait(0.1)       
          If CFPHead != None
             Damsel.EquipItem(CFPHead)
             ITMClothingUp.Play(PlayerRef) 
          Endif                     
          _T_CFIsNude.SetValue(0) 
       Endif          
    Else  
       If _T_PrisonerIsNude.GetValue() == 0  
          Amulet = Damsel.GetWornForm(0x00000020) As Armor
          ACuff = Damsel.GetWornForm(0x00800000) As Armor
          Blindfold = Damsel.GetWornForm(0x02000000) As Armor
          Collar = Damsel.GetWornForm(0x00008000) As Armor
          Gag = Damsel.GetWornForm(0x00004000) As Armor
          Hood = Damsel.GetWornForm(0x00000001) As Armor
          PArms = Damsel.GetWornForm(0x00000010) As Armor
          PBoots = Damsel.GetWornForm(0x00000080) As Armor
          PClothes = Damsel.GetWornForm(0x00000004) As Armor
          PHead = Damsel.GetWornForm(0x00001000) As Armor
          PGloves = Damsel.GetWornForm(0x00000008) As Armor       
          WCuff = Damsel.GetWornForm(0x20000000) As Armor
          Utility.Wait(0.2)
          If PHead != None
             Damsel.UnequipItem(PHead)
             ITMClothingDown.Play(PlayerRef)
          Endif  
          Utility.Wait(0.1)   
          If PGloves != None
             Damsel.UnequipItem(PGloves)
             ITMClothingDown.Play(PlayerRef)
          Endif  
          Utility.Wait(0.1)         
          If PArms != None
             Damsel.UnequipItem(PArms)
             ITMClothingDown.Play(PlayerRef)
          Endif
          Damsel.PlayIdle(idlepickup_ground)
          Utility.Wait(1.0) 
          If PBoots != None
             Damsel.UnequipItem(PBoots)
             ITMClothingDown.Play(PlayerRef)
          Endif
          Utility.Wait(1.0)   
          Damsel.PlayIdle(idlesilentbow) 
          Utility.Wait(1.0)   
          Form Piece = Damsel.GetEquippedWeapon() as Form
          If Piece != None
             Damsel.RemoveItem(Piece, 1, True, PlayerRef)
          Endif     
          Utility.Wait(0.1)               
          If PClothes != None
             Damsel.UnequipItem(PClothes)
             ITMClothingDown.Play(PlayerRef)
          Endif   
          _T_PrisonerIsNude.SetValue(1)
          Utility.Wait(0.1) 
       Else 
          Damsel.PlayIdle(idlepickup_ground)
          Utility.Wait(1.0) 
          If PClothes != None
             Damsel.EquipItem(PClothes)
             ITMClothingUp.Play(PlayerRef) 
          Endif        
          Utility.Wait(1.0)                 
          If PBoots != None
             Damsel.EquipItem(PBoots)
             ITMClothingUp.Play(PlayerRef) 
          Endif  
          Utility.Wait(1.0)         
          If PArms != None
             Damsel.EquipItem(PArms)
             ITMClothingUp.Play(PlayerRef) 
          Endif  
          Utility.Wait(0.1)
          If PGloves != None
             Damsel.EquipItem(PGloves)
             ITMClothingUp.Play(PlayerRef) 
          Endif  
          Utility.Wait(0.1)       
          If PHead != None
             Damsel.EquipItem(PHead)
             ITMClothingUp.Play(PlayerRef) 
          Endif                     
          _T_PrisonerIsNude.SetValue(0)
       Endif  
    Endif
EndFunction

Function FixNude(Actor Damsel)
    Actor Stooge = CampFollower.GetReference() as Actor
    Actor Flunky = ExPrisoner.GetReference() as Actor
    Utility.Wait(0.1)
    If Flunky == Damsel
       If _T_PrisonerIsNude.GetValue() == 0                  
          If PClothes != None
             Damsel.EquipItem(PClothes)
          Endif        
          Utility.Wait(0.1)                 
          If PBoots != None
             Damsel.EquipItem(PBoots)
          Endif  
          Utility.Wait(0.1)         
          If PArms != None
             Damsel.EquipItem(PArms)
          Endif  
          Utility.Wait(0.1)
          If PGloves != None
             Damsel.EquipItem(PGloves)
          Endif  
          Utility.Wait(0.1)         
          If PHead != None
             Damsel.EquipItem(PHead)
          Endif                             
       Endif 
       If Hair != None
          Damsel.EquipItem(Hair)
       Endif
       If LongHair != None
          Damsel.EquipItem(LongHair)
       Endif         
       If Amulet != None
          Damsel.EquipItem(Amulet)
       Endif
       If Apron != None
          Damsel.EquipItem(Apron)
       Endif                
       If ACuff != None
          Damsel.EquipItem(ACuff)
       Endif     
       If Blindfold != None
          Damsel.EquipItem(Blindfold)
       Endif 
       If Collar != None
          Damsel.EquipItem(Collar)
       Endif   
       If Gag != None
          Damsel.EquipItem(Gag)
       Endif     
       If Hood != None
          Damsel.EquipItem(Hood)
       Endif
       If Stocking1 != None
          Damsel.EquipItem(Stocking1)
       Endif
       If Stocking2 != None
          Damsel.EquipItem(Stocking2)
       Endif
       If Stocking3 != None
          Damsel.EquipItem(Stocking3)
       Endif       
       If WCuff != None
          Damsel.EquipItem(WCuff)
       Endif   
       Utility.Wait(0.1)
       If _T_Restrained.GetValue() == 5 || _T_Restrained.GetValue() == 6
          Damsel.EquipItem(zbfGagCloth)
       Endif   
       Utility.Wait(0.1)
       If _T_NakedOutfit.GetValue() == 0
          Armor FArms = Damsel.GetWornForm(0x00000010) As Armor
          Armor FBoots = Damsel.GetWornForm(0x00000080) As Armor
          Armor FClothes = Damsel.GetWornForm(0x00000004) As Armor
          Armor FGloves = Damsel.GetWornForm(0x00000008) As Armor
          Utility.Wait(0.1)
          If _T_PrisonerIsNude.GetValue() > 0
             If FGloves != None
                Damsel.UnequipItem(FGloves)
             Endif
             If FArms != None
                Damsel.UnequipItem(FArms)
             Endif
             If FClothes != None
                Damsel.UnequipItem(FClothes)
             Endif   
             If FBoots != None
                Damsel.UnequipItem(FBoots)
             Endif   
          Endif 
       Endif   
    ElseIf Stooge == Damsel
       If _T_CFIsNude.GetValue() == 0                  
          If CFPClothes != None
             Damsel.EquipItem(CFPClothes)
          Endif        
          Utility.Wait(0.1)                 
          If CFPBoots != None
             Damsel.EquipItem(CFPBoots)
          Endif  
          Utility.Wait(0.1)         
          If CFPArms != None
             Damsel.EquipItem(CFPArms)
          Endif  
          Utility.Wait(0.1)
          If CFPGloves != None
             Damsel.EquipItem(CFPGloves)
          Endif  
          Utility.Wait(0.1)         
          If CFPHead != None
             Damsel.EquipItem(CFPHead)
          Endif                             
       Endif
       If CFHair != None
          Damsel.EquipItem(CFHair)
       Endif
       If CFLongHair != None
          Damsel.EquipItem(CFLongHair)
       Endif         
       If CFAmulet != None
          Damsel.EquipItem(CFAmulet)
       Endif
       If CFApron != None
          Damsel.EquipItem(CFApron)
       Endif                  
       If CFACuff != None
          Damsel.EquipItem(CFACuff)
       Endif     
       If CFBlindfold != None
          Damsel.EquipItem(CFBlindfold)
       Endif 
       If CFCollar != None
          Damsel.EquipItem(CFCollar)
       Endif   
       If CFGag != None
          Damsel.EquipItem(CFGag)
       Endif     
       If CFHood != None
          Damsel.EquipItem(CFHood)
       Endif
       If CFStocking1 != None
          Damsel.EquipItem(CFStocking1)
       Endif
       If CFStocking2 != None
          Damsel.EquipItem(CFStocking2)
       Endif
       If CFStocking3 != None
          Damsel.EquipItem(CFStocking3)
       Endif             
       If CFWCuff != None
          Damsel.EquipItem(CFWCuff)
       Endif   
       Utility.Wait(0.1)
       If _T_CFRestrained.GetValue() == 5 || _T_CFRestrained.GetValue() == 6
          Damsel.EquipItem(zbfGagCloth)
       Endif   
       Utility.Wait(0.1)
       If _T_CFNakedOutfit.GetValue() == 0
          Armor CArms = Damsel.GetWornForm(0x00000010) As Armor
          Armor CBoots = Damsel.GetWornForm(0x00000080) As Armor
          Armor CClothes = Damsel.GetWornForm(0x00000004) As Armor
          Armor CGloves = Damsel.GetWornForm(0x00000008) As Armor
          Utility.Wait(0.1)
          If _T_CFIsNude.GetValue() > 0
             If CGloves != None
                Damsel.UnequipItem(CGloves)
             Endif
             If CArms != None
                Damsel.UnequipItem(CArms)
             Endif
             If CClothes != None
                Damsel.UnequipItem(CClothes)
             Endif   
             If CBoots != None
                Damsel.UnequipItem(CBoots)
             Endif   
          Endif
       Endif        
    Endif   
EndFunction

Function FixOutfit(Actor Damsel)
    Actor Stooge = CampFollower.GetReference() as Actor
    Actor Flunky = ExPrisoner.GetReference() as Actor
    If Stooge == Damsel 
       If CFPHead != None
          Damsel.UnequipItem(CFPHead)
       Endif     
       If CFPGloves != None
          Damsel.UnequipItem(CFPGloves)
       Endif           
       If CFPArms != None
          Damsel.UnequipItem(CFPArms)
       Endif 
       If CFPBoots != None
          Damsel.UnequipItem(CFPBoots)
       Endif      
       If CFPClothes != None
          Damsel.UnequipItem(CFPClothes)
       Endif
       If CFHair != None
          Damsel.UnequipItem(CFHair)
       Endif
       If CFLongHair != None
          Damsel.UnequipItem(CFLongHair)
       Endif         
       Utility.Wait(0.1)
       Damsel.SetOutfit(_T_NekkidOutfit)
       Damsel.SetOutfit(_T_NekkidOutfit, true)
       Utility.Wait(0.1)
       If CFHair != None
          Damsel.EquipItem(CFHair)
       Endif
       If CFLongHair != None
          Damsel.EquipItem(CFLongHair)
       Endif         
       If CFPClothes != None
          Damsel.EquipItem(CFPClothes)
       Endif                    
       If CFPBoots != None
          Damsel.EquipItem(CFPBoots)
       Endif         
       If CFPArms != None
          Damsel.EquipItem(CFPArms)
       Endif
       If CFPGloves != None
          Damsel.EquipItem(CFPGloves)
       Endif       
       If CFPHead != None
          Damsel.EquipItem(CFPHead)
       Endif  
       Utility.Wait(0.2)
       Damsel.SetOutfit(None)
       Damsel.SetOutfit(None, true)                     
    Elseif Flunky == Damsel       
       DefaultOutfit = Damsel.GetActorBase().GetOutfit()
       Amulet = Damsel.GetWornForm(0x00000020) As Armor
       Apron = Damsel.GetWornForm(0x00004000) As Armor
       ACuff = Damsel.GetWornForm(0x00800000) As Armor
       Blindfold = Damsel.GetWornForm(0x02000000) As Armor
       Collar = Damsel.GetWornForm(0x00008000) As Armor
       Gag = Damsel.GetWornForm(0x00004000) As Armor
       Hair = Damsel.GetWornForm(0x00000002) As Armor
       Hood = Damsel.GetWornForm(0x00000001) As Armor
       LongHair = Damsel.GetWornForm(0x00000800) As Armor  
       PArms = Damsel.GetWornForm(0x00000010) As Armor
       PBoots = Damsel.GetWornForm(0x00000080) As Armor
       PClothes = Damsel.GetWornForm(0x00000004) As Armor
       PHead = Damsel.GetWornForm(0x00001000) As Armor
       PGloves = Damsel.GetWornForm(0x00000008) As Armor
       Stocking1 = Damsel.GetWornForm(0x00010000) As Armor
       Stocking2 = Damsel.GetWornForm(0x00020000) As Armor
       Stocking3 = Damsel.GetWornForm(0x00800000) As Armor       
       WCuff = Damsel.GetWornForm(0x20000000) As Armor    
       Utility.Wait(0.2)      
       If PHead != None
          Damsel.UnequipItem(PHead)
       Endif  
       If PGloves != None
          Damsel.UnequipItem(PGloves)
       Endif            
       If PArms != None
          Damsel.UnequipItem(PArms)
       Endif
       If PBoots != None
          Damsel.UnequipItem(PBoots)
       Endif  
       If PClothes != None
          Damsel.UnequipItem(PClothes)
       Endif
       If Hair != None
          Damsel.UnequipItem(Hair)
       Endif
       If LongHair != None
          Damsel.UnequipItem(LongHair)
       Endif         
       Utility.Wait(0.1)
       Damsel.SetOutfit(_T_NekkidOutfit)
       Damsel.SetOutfit(_T_NekkidOutfit, true)
       Utility.Wait(0.1)
       If Hair != None
          Damsel.EquipItem(Hair)
       Endif
       If LongHair != None
          Damsel.EquipItem(LongHair)
       Endif         
       If PClothes != None
          Damsel.EquipItem(PClothes)
       Endif                       
       If PBoots != None
          Damsel.EquipItem(PBoots)
       Endif          
       If PArms != None
          Damsel.EquipItem(PArms)
       Endif  
       If PGloves != None
          Damsel.EquipItem(PGloves) 
       Endif    
       If PHead != None
          Damsel.EquipItem(PHead)
       Endif  
       Utility.Wait(0.2)
       Damsel.SetOutfit(None)
       Damsel.SetOutfit(None, true)                        
    Endif
EndFunction

Function RatRapeFixOutfit(Actor Damsel)
       DefaultOutfit = Damsel.GetActorBase().GetOutfit()
       Amulet = Damsel.GetWornForm(0x00000020) As Armor
       Apron = Damsel.GetWornForm(0x00004000) As Armor
       ACuff = Damsel.GetWornForm(0x00800000) As Armor
       Blindfold = Damsel.GetWornForm(0x02000000) As Armor
       Collar = Damsel.GetWornForm(0x00008000) As Armor
       Gag = Damsel.GetWornForm(0x00004000) As Armor
       Hair = Damsel.GetWornForm(0x00000002) As Armor
       Hood = Damsel.GetWornForm(0x00000001) As Armor
       LongHair = Damsel.GetWornForm(0x00000800) As Armor  
       PArms = Damsel.GetWornForm(0x00000010) As Armor
       PBoots = Damsel.GetWornForm(0x00000080) As Armor
       PClothes = Damsel.GetWornForm(0x00000004) As Armor
       PHead = Damsel.GetWornForm(0x00001000) As Armor
       PGloves = Damsel.GetWornForm(0x00000008) As Armor
       Stocking1 = Damsel.GetWornForm(0x00010000) As Armor
       Stocking2 = Damsel.GetWornForm(0x00020000) As Armor
       Stocking3 = Damsel.GetWornForm(0x00800000) As Armor       
       WCuff = Damsel.GetWornForm(0x20000000) As Armor    
       Utility.Wait(0.2)
       If PHead != None
          Damsel.UnequipItem(PHead)
       Endif  
       If PGloves != None
          Damsel.UnequipItem(PGloves)
       Endif      
       If PArms != None
          Damsel.UnequipItem(PArms)
       Endif
       If PBoots != None
          Damsel.UnequipItem(PBoots)
       Endif  
       If PClothes != None
          Damsel.UnequipItem(PClothes)
       Endif   
       Utility.Wait(0.1)
       Damsel.SetOutfit(_T_NekkidOutfit)
       Damsel.SetOutfit(_T_NekkidOutfit, true)
       _T_PrisonerIsNude.SetValue(1)
       _T_NakedOutfit.SetValue(1)   
EndFunction   

Function FollowMe(Actor Follower)
    Actor Stooge = CampFollower.GetReference() as Actor
    Actor Flunky = ExPrisoner.GetReference() as Actor
    Actor Mark = Rat.GetReference() as Actor
    Utility.Wait(0.1)
    If Follower.GetFactionRank(_T_RatFaction) == 1
       ;There are whores in this house (Full featured)
       If Follower == BirnaRef
          PlayerRef.RemoveItem(Gold001, 25)
          Follower.SetFactionRank(_T_RatFaction, 3) ;independant whore
          Follower.SetFactionRank(_T_HistoryFaction, 2) ;Sex
       Elseif Follower == YsoldaRef
          PlayerRef.RemoveItem(Gold001, 70)
          Follower.SetFactionRank(_T_RatFaction, 3) ;independant whore
          Follower.SetFactionRank(_T_HistoryFaction, 2) ;Sex          
       Elseif Follower == EddaRef || Follower == SildaRef 
          PlayerRef.RemoveItem(Gold001, 10)
          Follower.SetFactionRank(_T_RatFaction, 3) ;independant whore
          Follower.SetFactionRank(_T_HistoryFaction, 2) ;Sex
          Follower.SetFactionRank(_T_NMS_SlaveFaction, 1) ;Broken by life
          _T_Stockholm.SetValue(10) ;Grateful
       Else  
          Follower.SetFactionRank(_T_RatFaction, 2) ;Friend
          Follower.SetFactionRank(_T_HistoryFaction, 1) ;No Sex
       Endif   
       Utility.Wait(0.1)
       manny_up_list_AvoidNPC.AddForm(Follower)
    Elseif Follower.GetFactionRank(_T_RatFaction) == 3 
       If Follower == BirnaRef
          PlayerRef.RemoveItem(Gold001, 25)
       Elseif Follower == YsoldaRef
          PlayerRef.RemoveItem(Gold001, 70)          
       Elseif Follower == EddaRef || Follower == SildaRef
          PlayerRef.RemoveItem(Gold001, 10)
       Endif
    Elseif Mark == Follower
       ;Not a whore, just a little slut.
       If Follower == SvanaRef
         Follower.SetFactionRank(_T_HistoryFaction, 2)
         Follower.SetRelationshipRank(PlayerRef, 4)
         PlayerRef.SetRelationshipRank(Follower, 4)
         Follower.SetFactionRank(_T_RatFaction, 3) ;lover not rescued
       ; More whores (Whores lite now with fewer calories)
       Elseif Follower == AbeloneRef || Follower == ErdiRef || Follower == FrukiRef || Follower == IrgnirRef || Follower == JulienneLylvieveRef || Follower == NarriRef || Follower == SaadiaRef
         Follower.SetFactionRank(_T_HistoryFaction, 2)
         Follower.SetFactionRank(_T_NMS_WhoreFaction, 6); Happy Whore
         Follower.SetRelationshipRank(PlayerRef, 4)
         PlayerRef.SetRelationshipRank(Follower, 4)
         Follower.SetFactionRank(_T_RatFaction, 3) ;lover not rescued  
       Endif
       Utility.Wait(0.1) 
       Rat.Clear()
       manny_up_list_AvoidNPC.AddForm(Follower)                  
    Endif  
    Utility.Wait(0.1)
    If Flunky != None
       If Flunky.GetFactionRank(_T_HistoryFaction) > 4 && Flunky.GetFactionRank(_T_HistoryFaction) < 9 && Flunky.HasKeyword(_T_MaidForce) == False
          DismissButFollow(Flunky)
       Else
          Dismiss(Flunky)
          Utility.Wait(0.1)
          If Stooge == Follower
             DismissCampFollower(Follower)
          Endif   
       Endif
    Else
       If Stooge == Follower
          DismissCampFollower(Follower)
       Endif   
    Endif
    Utility.Wait(0.4)
    _T_AfterRape.SetValue(0)
    _T_BeatingCounter.SetValue(0)
    _T_BeatingRecentCounter.SetValue(0)
    _T_Fisto.SetValue(0)
    _T_HitCounter.SetValue(0)
    _T_JustMurdered.SetValue(0)
    _T_PrisonerBanditRaped.SetValue(0)
    _T_PrisonerDialogue.SetValue(0)
    _T_PrisonerGayness.SetValue(0)
    _T_PrisonerHunger.SetValue(0)
    _T_PrisonerIsBitch.SetValue(0)
    _T_PrisonerIsNude.SetValue(0)
    _T_PrisonerIsSloot.SetValue(0)
    _T_PrisonerPlayerRaped.SetValue(0)
    _T_PrisonerRejected.SetValue(0)
    _T_PrisonerThirst.SetValue(0)
    _T_RefractoryPeriod.SetValue(0)
    _T_Restrained.SetValue(0)
    _T_RunAway.SetValue(0)
    _T_Stockholm.SetValue(0)
    _T_Whoreing.SetValue(0)    
    ExPrisoner.Clear()
    Debug.Notification("NMS Ex Prisoner NPC stats Cleared")  
    Utility.Wait(0.1)  
    ExPrisoner.ForceRefIfEmpty(Follower)
    Utility.Wait(0.1) 
    If Follower.GetFactionRank(_T_NMS_SlaveFaction) == 2
       Follower.setplayerteammate(0)
       Debug.Notification("Your slave is following you") 
    Elseif Follower.GetFactionRank(_T_HistoryFaction) > 4 && Follower.GetFactionRank(_T_HistoryFaction) < 9 ;Raped by player
       Follower.setplayerteammate(0)
       Debug.Notification("Your victim is following you") 
    Else 
       Follower.setplayerteammate(1)
       If Follower.GetFactionRank(_T_NMS_WhoreFaction) == 6
          Debug.Notification("Your whore is following you")
       Elseif Follower.GetFactionRank(_T_HistoryFaction) == 2 || Follower.GetFactionRank(_T_HistoryFaction) == 4
          Debug.Notification("Your lover is following you")
       Else   
          Debug.Notification("Your friend is following you") 
       Endif  
    Endif
    ZipItSnitch(Follower)
    Utility.Wait(0.1)
    FixOutfit(Follower)
    Utility.Wait(0.1)
    FixWhore(Follower) 
    Utility.Wait(0.1) 
    FixNude(Follower)
    ;Gaydar  
    If Sexlab.GetSexuality(Follower) < 35 ;Giovani
       _T_PrisonerGayness.SetValue(1)
    ElseIf Sexlab.GetSexuality(Follower) < 65 ;Josuke
       _T_PrisonerGayness.SetValue(2)
    Else   
       _T_PrisonerGayness.SetValue(0) ;Joeseph Joestar... OH MY GOD.   
    Endif       
EndFunction

Function FollowMeCF(Actor Flunky)
    Actor Stooge = CampFollower.GetReference() as Actor
    Utility.Wait(0.1)
    CFDefaultOutfit = Flunky.GetActorBase().GetOutfit()
    CFAmulet = Flunky.GetWornForm(0x00000020) As Armor
    CFApron = Flunky.GetWornForm(0x00004000) As Armor
    CFACuff = Flunky.GetWornForm(0x00800000) As Armor
    CFBlindfold = Flunky.GetWornForm(0x02000000) As Armor
    CFCollar = Flunky.GetWornForm(0x00008000) As Armor
    CFGag = Flunky.GetWornForm(0x00004000) As Armor
    CFHair = Flunky.GetWornForm(0x00000002) As Armor
    CFHood = Flunky.GetWornForm(0x00000001) As Armor
    CFLongHair = Flunky.GetWornForm(0x00000800) As Armor 
    CFPArms = Flunky.GetWornForm(0x00000010) As Armor
    CFPBoots = Flunky.GetWornForm(0x00000080) As Armor
    CFPClothes = Flunky.GetWornForm(0x00000004) As Armor
    CFPHead = Flunky.GetWornForm(0x00001000) As Armor
    CFPGloves = Flunky.GetWornForm(0x00000008) As Armor
    CFStocking1 = Flunky.GetWornForm(0x00010000) As Armor
    CFStocking2 = Flunky.GetWornForm(0x00020000) As Armor
    CFStocking3 = Flunky.GetWornForm(0x00800000) As Armor    
    CFWCuff = Flunky.GetWornForm(0x20000000) As Armor      
    Utility.Wait(0.2)        
    If Stooge != None 
       DismissCampFollower(Stooge)
    Else
       CampFollower.Clear()
    Endif       
    Utility.Wait(0.1)
    CampFollower.Clear()
    Utility.Wait(0.1)
    CampFollower.ForceRefIfEmpty(Flunky)
    If Flunky.GetFactionRank(_T_NMS_SlaveFaction) == 2
       Flunky.setplayerteammate(0)
       Debug.Notification("Your complicit slave is following")
    Else 
       Flunky.setplayerteammate(0)
       Debug.Notification("Your complicit victim is following")
    Endif   
    Utility.Wait(0.2)
    ZipItSnitch(Flunky)
    Utility.Wait(0.1)
    FixOutfit(Flunky) 
EndFunction

Function ZipItSnitch(Actor Snitch)
    If Snitch.IsInFaction(CrimeFactionCidhnaMine)
       Snitch.RemoveFromFaction(CrimeFactionCidhnaMine)
    Elseif Snitch.IsInFaction(CrimeFactionEastmarch)
       Snitch.RemoveFromFaction(CrimeFactionEastmarch)
    Elseif Snitch.IsInFaction(CrimeFactionFalkreath)
       Snitch.RemoveFromFaction(CrimeFactionFalkreath)     
    Elseif Snitch.IsInFaction(CrimeFactionGreybeard)
       Snitch.RemoveFromFaction(CrimeFactionGreybeard)            
    Elseif Snitch.IsInFaction(CrimeFactionHaafingar)
       Snitch.RemoveFromFaction(CrimeFactionHaafingar)   
    Elseif Snitch.IsInFaction(CrimeFactionHjaalmarch)
       Snitch.RemoveFromFaction(CrimeFactionHjaalmarch)    
    Elseif Snitch.IsInFaction(CrimeFactionImperial)
       Snitch.RemoveFromFaction(CrimeFactionImperial)     
    Elseif Snitch.IsInFaction(CrimeFactionKhajiitCaravans)
       Snitch.RemoveFromFaction(CrimeFactionKhajiitCaravans)            
    Elseif Snitch.IsInFaction(CrimeFactionOrcs)
       Snitch.RemoveFromFaction(CrimeFactionOrcs)   
    Elseif Snitch.IsInFaction(CrimeFactionPale)
       Snitch.RemoveFromFaction(CrimeFactionPale)
    Elseif Snitch.IsInFaction(CrimeFactionReach)
       Snitch.RemoveFromFaction(CrimeFactionReach)     
    Elseif Snitch.IsInFaction(CrimeFactionRift)
       Snitch.RemoveFromFaction(CrimeFactionRift)            
    Elseif Snitch.IsInFaction(CrimeFactionSons)
       Snitch.RemoveFromFaction(CrimeFactionSons)   
    Elseif Snitch.IsInFaction(CrimeFactionThievesGuild)
       Snitch.RemoveFromFaction(CrimeFactionThievesGuild)  
    Elseif Snitch.IsInFaction(CrimeFactionWhiterun)
       Snitch.RemoveFromFaction(CrimeFactionWhiterun)     
    Elseif Snitch.IsInFaction(CrimeFactionWinterhold)
       Snitch.RemoveFromFaction(CrimeFactionWinterhold)            
    Endif 
    Debug.Notification("NMS Follower crime reporting disabled")    
EndFunction     

Function BeMyMaid(Actor Maid)
    Actor Stooge = CampFollower.GetReference() as Actor
    Utility.Wait(0.1)
    If Stooge == Maid
       DismissCampFollower(Maid)
    Else   
       Dismiss(Maid)
    Endif  
    Utility.Wait(0.1)
    If HouseSlave01.GetReference() == None
       HouseSlave01.ForceRefTo(Maid)  
       Debug.Notification("1st house slave assigned")
       Utility.Wait(0.2)
       ZipItSnitch(Maid)     
    Elseif HouseSlave02.GetReference() == None
       HouseSlave02.ForceRefTo(Maid)
       Debug.Notification("2nd house slave assigned")
       Utility.Wait(0.2)
       ZipItSnitch(Maid)           
    Elseif HouseSlave03.GetReference() == None
       HouseSlave03.ForceRefTo(Maid)
       Debug.Notification("3rd house slave assigned")
       Utility.Wait(0.2)
       ZipItSnitch(Maid)           
    Elseif HouseSlave04.GetReference() == None
       HouseSlave04.ForceRefTo(Maid)
       Debug.Notification("4th house slave assigned")
       Utility.Wait(0.2)
       Debug.Notification("You must dismiss a house slave before you can assign another.")
       ZipItSnitch(Maid)           
    Else
       Debug.Messagebox("You have too many house slaves. Dismiss a house slave, and try again.")
    Endif 
    Utility.Wait(0.2)
    Maid.EvaluatePackage()         
EndFunction

Function BeOnBench(Actor Reserve)
    Actor Stooge = CampFollower.GetReference() as Actor
    Utility.Wait(0.1)
    If Stooge == Reserve
       DismissCampFollower(Reserve)
    Else   
       Dismiss(Reserve)
    Endif  
    Utility.Wait(0.1)
    If Reserve01.GetReference() == None
       Reserve01.ForceRefTo(Reserve)  
       Debug.Notification("1st reserve assigned")
       Utility.Wait(0.2)
       ZipItSnitch(Reserve)     
    Elseif Reserve02.GetReference() == None
       Reserve02.ForceRefTo(Reserve)
       Debug.Notification("2nd reserve assigned")
       Utility.Wait(0.2)
       ZipItSnitch(Reserve)           
    Elseif Reserve03.GetReference() == None
       Reserve03.ForceRefTo(Reserve)
       Debug.Notification("3rd reserve assigned")
       Utility.Wait(0.2)
       ZipItSnitch(Reserve)           
    Elseif Reserve04.GetReference() == None
       Reserve04.ForceRefTo(Reserve)
       Debug.Notification("4th reserve assigned")
       Utility.Wait(0.2)
       Debug.Notification("You must dismiss a reserve before you can assign another.")
       ZipItSnitch(Reserve)           
    Else
       Debug.Messagebox("You have too many reserves. Dismiss a reserve, and try again.")
    Endif 
    Utility.Wait(0.2)
    Reserve.EvaluatePackage()         
EndFunction

Function ClearCooldowns(Actor Guy)
    Int CDN = Guy.GetItemCount(_T_NMS_CooldownToken) As Int
    Utility.Wait(0.1)
    Guy.RemoveItem(_T_NMS_CooldownToken, CDN)
    _T_NMS_Reset.SetValue(0)
EndFunction    

Function ClearHistory(Actor Guy)
    Actor Cap1 = Captive1.GetReference() as Actor
    Actor Cap2 = Captive2.GetReference() as Actor   
    If Guy.HasKeyword(_T_HoboForce)
       RemoveBuddy(Guy)
    Endif  
    Utility.Wait(0.1)
    If Guy.HasKeyword(_T_FlunkyForce)
       Dismiss(Guy)
    Elseif Guy.HasKeyword(_T_MaidForce)
       DismissMaid(Guy)
    Elseif Guy.HasKeyword(_T_ReserveForce)
       DismissReserve(Guy)       
    Elseif Guy.HasKeyword(_T_CFForce)
       DismissCampFollower(Guy)
    Elseif Cap1 == Guy
       Captive1.Clear()
    Elseif Cap2 == Guy
       Captive2.Clear()
    Endif          
    Guy.RemoveFromFaction(_T_HistoryFaction)
    Guy.RemoveFromFaction(_T_IncestFaction)
    Guy.RemoveFromFaction(_T_MartyrFaction)
    Guy.RemoveFromFaction(_T_NMS_CaptiveFaction)
    Guy.RemoveFromFaction(_T_NMS_CasualSexFaction)
    Guy.RemoveFromFaction(_T_NMS_CuckFaction)
    Guy.RemoveFromFaction(_T_NMS_JohnFaction)
    Guy.RemoveFromFaction(_T_NMS_SlaveFaction)
    Guy.RemoveFromFaction(_T_NMS_WhoreFaction)
    Guy.RemoveFromFaction(_T_PayPigFaction)
    Guy.RemoveFromFaction(_T_RatFaction)
    ClearCooldowns(Guy)
    Debug.Notification("NPC HISTORY CLEARED")
    _T_NMS_Reset.SetValue(0)
EndFunction    

Function Debuggery()
   Actor Flunky = ExPrisoner.GetReference() as Actor
   Actor Stooge = CampFollower.GetReference() as Actor
   Actor Slave01 = HouseSlave01.GetReference() as Actor
   Actor Slave02 = HouseSlave02.GetReference() as Actor
   Actor Slave03 = HouseSlave03.GetReference() as Actor
   Actor Slave04 = HouseSlave04.GetReference() as Actor   
   Actor Res01 = Reserve01.GetReference() as Actor
   Actor Res02 = Reserve02.GetReference() as Actor
   Actor Res03 = Reserve03.GetReference() as Actor
   Actor Res04 = Reserve04.GetReference() as Actor
   Actor Pimp = BadDaddy.GetReference() as Actor
   _T_NMS_Reset.SetValue(0)
   Utility.Wait(0.1)
   Int aButton = _T_DebugMenu.Show()
   If aButton == 0 ;toggles
      Int iButton = _T_DebugToggleMenu.Show()
      If iButton == 0 ;Player Whore Mode
         If _T_PlayerWhore.GetValue() == 0
            _T_PlayerWhore.SetValue(1)
            Debug.Notification("Player Whore Enabled")
            Debuggery() 
         Else
            _T_PlayerWhore.SetValue(0)
            Debug.Notification("Player Whore Disabled")
            aButton = _T_DebugMenu.Show()
            Debuggery() 
         Endif
      Elseif iButton == 1 ;No Casual sex
         If _T_NoCasual.GetValue() == 0
            _T_NoCasual.SetValue(1)
            Debug.Notification("Casual Sex Dialogue Disabled")
            Debuggery()
         Else
            _T_NoCasual.SetValue(0)
            Debug.Notification("Casual Sex Dialogue Enabled")
            Debuggery()
         Endif
      Elseif iButton == 2 ;guard dialogue   
         If _T_NoPigs.GetValue() == 0
            _T_NoPigs.SetValue(1)
            Debug.Notification("Guard Dialogue Disabled")
            Debuggery()
         Else
            _T_NoPigs.SetValue(0)
            Debug.Notification("Guard Dialogue Enabled")
            Debuggery() 
         Endif
      Elseif  iButton == 3 ;Futa Vag dialogue 
         If _T_NoPussy.GetValue() == 0
            _T_NoPussy.SetValue(1)
            Debug.Notification("Vagina Dialogue Disabled")
            Debuggery()
         Else
            _T_NoPussy.SetValue(0)
            Debug.Notification("Vagina Dialogue Enabled")
            Debuggery() 
         Endif 
      Endif 
   Elseif aButton == 1 ;Clear histories and cooldowns
      Int jButton = _T_DebugClearMenu.Show()
      If jButton == 0 ;Clear player Refractory  
         _T_RefractoryPeriod.SetValue(0)
         Debuggery()
      Elseif jButton == 1 ;Clear NPC Refractory
         _T_NMS_Reset.SetValue(1)
         _T_NMS_Debug.SetValue(0)
         Utility.Wait(0.1)
         PlayerRef.UnEquipItem(_T_NMS_Menu_Ring)             
      Elseif jButton == 2 ;Clear NPC History
         _T_NMS_Reset.SetValue(2)
         _T_NMS_Debug.SetValue(0)
         Utility.Wait(0.1)
         PlayerRef.UnEquipItem(_T_NMS_Menu_Ring)              
      Elseif jButton == 3 ;Dismiss all
         If Flunky != None
            Dismiss(Flunky)
         Else   
            ExPrisoner.Clear()
         Endif
         If Stooge != None
            DismissCampFollower(Stooge)
         Else
            CampFollower.Clear()   
         Endif  
         If Slave01 != None
            DismissMaid(Slave01)
         Else
            HouseSlave01.Clear()   
         Endif
         If Slave02 != None
            DismissMaid(Slave02)
         Else
            HouseSlave02.Clear()   
         Endif             
         If Slave03 != None
            DismissMaid(Slave03)
         Else
            HouseSlave03.Clear()   
         Endif    
         If Slave04 != None
            DismissMaid(Slave04)
         Else
            HouseSlave04.Clear()   
         Endif
         If Res01 != None
            DismissReserve(Res01)
         Else
            Reserve01.Clear()   
         Endif
         If Res02 != None
            DismissReserve(Res02)
         Else
            Reserve02.Clear()   
         Endif             
         If Res03 != None
            DismissReserve(Res03)
         Else
            Reserve03.Clear()   
         Endif    
         If Res04 != None
            DismissReserve(Res04)
         Else
            Reserve04.Clear()   
         Endif
         If Pimp != None
            BadDaddy.Clear()
         Endif           
         Captive1.Clear()
         Captive2.Clear()
         Utility.Wait(0.1)
         Debug.Notification("NMS FOLLOWERS DISMISSED")
         Debuggery() 
      Endif          
   Elseif  aButton == 2 ;Teleports
      Actor Cap1 = Captive1.GetReference() as Actor
      Actor Cap2 = Captive2.GetReference() as Actor 
      Actor Cuckhold = Cuck.GetReference() as Actor
      Actor Mark = Rat.GetReference() as actor
      Actor PITA = PainInTheAss.GetReference() as actor
      Actor Trick = John.GetReference() as Actor
      Utility.Wait(0.1)          
      Int kButton = _T_DebugPortMenu.Show()
      If kButton == 0 ;Main and CF
         If PITA != None 
            PITA.Moveto(PlayerRef)
         Endif  
         If Flunky != None 
            Flunky.Moveto(PlayerRef)
         Endif   
         If Stooge != None 
            Stooge.Moveto(PlayerRef)
         Endif  
      Elseif kButton == 1 ;Captives      
         If Cap1 != None 
            Cap1.Moveto(PlayerRef)
         Endif   
         If Cap2 != None 
            Cap2.Moveto(PlayerRef)
         Endif  
      Elseif kButton == 2 ;John
         If Trick != None 
            Trick.Moveto(PlayerRef)
         Endif  
      Elseif kButton == 3 ;cuck
         If Cuckhold != None 
            Cuckhold.Moveto(PlayerRef)
         Endif  
      Elseif kButton == 4 ;Casual partner/Whore/Mark
         If Mark != None 
            Mark.Moveto(PlayerRef)
         Endif     
      Elseif kButton == 5 ;Pimp
         If Pimp != None 
            Pimp.Moveto(PlayerRef)
         Endif                  
      Endif 
      Debuggery()                                                               
   Elseif  aButton == 3 ;Get items
      Int lButton = _T_DebugGetMenu.Show()
      If lButton == 0 ;Get Rings      
         PlayerRef.AddItem(_T_NMS_Menu_Ring, 1)
         PlayerRef.AddItem(_T_NMS_Capture_Ring, 1)
         Debuggery() 
      Elseif lButton == 1 ;Get abduction kit      
         PlayerRef.AddItem(_T_SackHood, 1)
         PlayerRef.AddItem(_T_WristRope, 1) 
         Debuggery()
      Elseif lButton == 1 ;Beggar Clothes      
         PlayerRef.AddItem(ClothesBeggarRobes, 1)
         Debuggery()
      Endif
   Else 
      _T_NMS_Debug.SetValue(0)
      Utility.Wait(0.1)
      PlayerRef.UnEquipItem(_T_NMS_Menu_Ring)           
   Endif 
EndFunction  

Function DismissMaid(Actor Maid)
    Utility.Wait(0.2)
    If HouseSlave01.GetReference() == Maid
       HouseSlave01.Clear()  
       Debug.Notification("1st house slave cleared")  
    Elseif HouseSlave02.GetReference() == Maid
       HouseSlave02.Clear()
       Debug.Notification("2nd house slave cleared")        
    Elseif HouseSlave03.GetReference() == Maid
       HouseSlave03.Clear()
       Debug.Notification("3rd house slave cleared")         
    Elseif HouseSlave04.Clear() == Maid
       HouseSlave04.Clear()
       Debug.Notification("4th house slave cleared")
    Endif     
EndFunction

Function DismissReserve(Actor Reserve)
    Utility.Wait(0.2)
    If Reserve01.GetReference() == Reserve
       Reserve01.Clear()  
       Debug.Notification("1st reserve cleared")  
    Elseif Reserve02.GetReference() == Reserve
       Reserve02.Clear()
       Debug.Notification("2nd reserve cleared")        
    Elseif Reserve03.GetReference() == Reserve
       Reserve03.Clear()
       Debug.Notification("3rd reserve cleared")         
    Elseif Reserve04.Clear() == Reserve
       Reserve04.Clear()
       Debug.Notification("4th reserve cleared")
    Endif     
EndFunction

Function Dismiss(Actor Flunky)
    If _T_PrisonerIsNude.GetValue() == 1;Redress ex prisoner
       Strip(Flunky)
    Endif 
    ExPrisoner.Clear()
    Utility.Wait(0.2) 
    Flunky.SetOutfit(DefaultOutfit)
    Utility.Wait(0.1)       
    _T_AfterRape.SetValue(0)
    _T_BeatingCounter.SetValue(0)
    _T_BeatingRecentCounter.SetValue(0)
    _T_Fisto.SetValue(0)
    _T_HitCounter.SetValue(0)
    _T_PrisonerBanditRaped.SetValue(0)
    _T_PrisonerDialogue.SetValue(0)
    _T_PrisonerGayness.SetValue(0)
    _T_PrisonerHunger.SetValue(0)
    _T_PrisonerIsBitch.SetValue(0)
    _T_PrisonerIsNude.SetValue(0)
    _T_PrisonerIsSloot.SetValue(0)
    _T_NakedOutfit.SetValue(0)
    _T_PrisonerPlayerRaped.SetValue(0)
    _T_PrisonerRejected.SetValue(0)
    _T_PrisonerThirst.SetValue(0)
   ;_T_RefractoryPeriod.SetValue(0) To make whores work
    _T_Restrained.SetValue(0)
    _T_Stockholm.SetValue(0)
    _T_Whoreing.SetValue(0)
    Utility.Wait(0.1)
    If Amulet != None
       Flunky.UnequipItem(Amulet)
    Endif
    If Apron != None
       Flunky.UnequipItem(Apron)
    Endif         
    If ACuff != None
       Flunky.UnequipItem(ACuff)
    Endif     
    If Blindfold != None
       Flunky.UnequipItem(Blindfold)
    Endif 
    If Collar != None
       Flunky.UnequipItem(Collar)
    Endif   
    If Gag != None
       Flunky.UnequipItem(Gag)
    Endif     
    If Hood != None
       Flunky.UnequipItem(Hood)
    Endif
    If Stocking1 != None
       Flunky.UnequipItem(Stocking1)
    Endif    
    If Stocking2 != None
       Flunky.UnequipItem(Stocking2)
    Endif
    If Stocking3 != None
       Flunky.UnequipItem(Stocking3)
    Endif      
    If WCuff != None
       Flunky.UnequipItem(WCuff)
    Endif
    If Hair != None
       Flunky.UnequipItem(Hair)
    Endif
    If LongHair != None
       Flunky.UnequipItem(LongHair)
    Endif      
    Utility.Wait(0.1)
    Amulet = Flunky.GetWornForm(0x00000020) As Armor
    Apron = Flunky.GetWornForm(0x00004000) As Armor
    ACuff = Flunky.GetWornForm(0x00800000) As Armor
    Blindfold = Flunky.GetWornForm(0x02000000) As Armor
    Collar = Flunky.GetWornForm(0x00008000) As Armor
    Gag = Flunky.GetWornForm(0x00004000) As Armor
    Hair = Flunky.GetWornForm(0x00000002) As Armor
    Hood = Flunky.GetWornForm(0x00000001) As Armor
    LongHair = Flunky.GetWornForm(0x00000800) As Armor
    Stocking1 = Flunky.GetWornForm(0x00010000) As Armor
    Stocking2 = Flunky.GetWornForm(0x00020000) As Armor
    Stocking3 = Flunky.GetWornForm(0x00800000) As Armor      
    WCuff = Flunky.GetWornForm(0x20000000) As Armor    
    Debug.Notification("NMS NPC stats cleared")
    Utility.Wait(0.1)
    ;Insurance
    _T_BeatingCounter.SetValue(0)
    _T_Stockholm.SetValue(0)
EndFunction

Function DismissButFollow(Actor Flunky)
    Actor Stooge = CampFollower.GetReference() as Actor
    Utility.Wait(0.1)
    TempDefaultOutfit = DefaultOutfit
    CFAmulet = Flunky.GetWornForm(0x00000020) As Armor
    CFApron = Flunky.GetWornForm(0x00004000) As Armor
    CFACuff = Flunky.GetWornForm(0x00800000) As Armor
    CFBlindfold = Flunky.GetWornForm(0x02000000) As Armor
    CFCollar = Flunky.GetWornForm(0x00008000) As Armor
    CFGag = Flunky.GetWornForm(0x00004000) As Armor
    CFHair = Flunky.GetWornForm(0x00000002) As Armor
    CFHood = Flunky.GetWornForm(0x00000001) As Armor
    CFLongHair = Flunky.GetWornForm(0x00000800) As Armor 
    CFPArms = Flunky.GetWornForm(0x00000010) As Armor
    CFPBoots = Flunky.GetWornForm(0x00000080) As Armor
    CFPClothes = Flunky.GetWornForm(0x00000004) As Armor
    CFPHead = Flunky.GetWornForm(0x00001000) As Armor
    CFPGloves = Flunky.GetWornForm(0x00000008) As Armor
    CFStocking1 = Flunky.GetWornForm(0x00010000) As Armor
    CFStocking2 = Flunky.GetWornForm(0x00020000) As Armor
    CFStocking3 = Flunky.GetWornForm(0x00800000) As Armor    
    CFWCuff = Flunky.GetWornForm(0x20000000) As Armor      
    Utility.Wait(0.2)    
    Dismiss(Flunky)
    Utility.Wait(0.1)
    If Stooge != None 
       DismissCampFollower(Stooge)
    Else
       CampFollower.Clear()
    Endif       
    Utility.Wait(0.1)
    CampFollower.Clear()
    Utility.Wait(0.1)
    CFDefaultOutfit = TempDefaultOutfit
    Utility.Wait(0.1)
    CampFollower.ForceRefIfEmpty(Flunky)
    Debug.Notification("Complicit victim is following")
    Utility.Wait(0.2)
    ZipItSnitch(Flunky)
    Utility.Wait(0.1)
    FixOutfit(Flunky)
    Utility.Wait(0.1)
    ;Insurance
    _T_BeatingCounter.SetValue(0)
    _T_Stockholm.SetValue(0)
EndFunction

Function DeadClear(Actor Corpse)
    Actor Fam = Family.GetReference() as Actor
    Actor Cuckhold = Cuck.GetReference() as Actor
    Utility.Wait(0.1)
    If Cuckhold == Corpse
       Cuck.Clear()
    Elseif Fam == Corpse
       Family.Clear()
    Endif
    Utility.Wait(0.1)
    Corpse.RemoveFromFaction(_T_RatFaction)
    Corpse.RemoveFromFaction(_T_HistoryFaction)
    Corpse.RemoveFromFaction(_T_NMS_SlaveFaction)
    Corpse.RemoveFromFaction(_T_NMS_WhoreFaction)
    Corpse.RemoveFromFaction(_T_IncestFaction)
    Corpse.RemoveFromFaction(_T_PayPigFaction)
    Debug.Notification("Corpse factions cleared")
EndFunction

Function DismissCampFollower(Actor Flunky)
    If _T_CFIsNude.GetValue() > 0 ;Redress Camp Follower
       Strip(Flunky)
    Endif
    Utility.Wait(0.1)   
    CampFollower.Clear()
    Utility.Wait(0.2)
    Flunky.SetOutfit(CFDefaultOutfit)    
    Debug.Notification("Dismissed victim is no longer following")
    _T_CFIsNude.SetValue(0)
    _T_CFNakedOutfit.SetValue(0)
    _T_CFRestrained.SetValue(0)
EndFunction

Function Gasp()
    Int Psex = PlayerRef.GetActorBase().GetSex()
    If Psex == 0
       SexLabVoiceMale01Mild.Play(PlayerRef)
    Else 
       SexLabVoiceFemale02Mild.Play(PlayerRef)
    Endif
EndFunction 

Function Moan()
    Int Psex = PlayerRef.GetActorBase().GetSex()
    If Psex == 0
       SexLabVoiceMale01Medium.Play(PlayerRef)
    Else 
       SexLabVoiceFemale02Medium.Play(PlayerRef)
    Endif
EndFunction 

Function Sayonara(Actor Flunky)
    Flunky.RemoveFromFaction(_T_HistoryFaction)
    Flunky.RemoveFromFaction(_T_NMS_WhoreFaction)
    Flunky.SetRelationshipRank(PlayerRef, -2)
    PlayerRef.SetRelationshipRank(Flunky, -2)  
EndFunction   

Function UpdateWhore(Actor Whore)
   If Whore.GetFactionRank(_T_HistoryFaction) > 4 && Whore.GetFactionRank(_T_HistoryFaction) < 9
      If Whore.GetFactionRank(_T_NMS_WhoreFaction) == 2
         Whore.SetFactionRank(_T_NMS_WhoreFaction, 0)
      Elseif Whore.GetFactionRank(_T_NMS_WhoreFaction) > 2 && Whore.GetFactionRank(_T_NMS_WhoreFaction) < 7
         Whore.SetFactionRank(_T_NMS_WhoreFaction, 7)       
      Endif    
   Endif   
EndFunction

Function FixWhore(Actor Whore)
   If Whore.GetFactionRank(_T_HistoryFaction) != 5 && Whore.GetFactionRank(_T_HistoryFaction) != 6 && Whore.GetFactionRank(_T_HistoryFaction) != 7 && Whore.GetFactionRank(_T_HistoryFaction) != 8
      If Whore.GetFactionRank(_T_NMS_WhoreFaction) != 5 && Whore.GetFactionRank(_T_NMS_WhoreFaction) != 6
         Whore.SetFactionRank(_T_NMS_WhoreFaction, 0)
         Whore.RemoveFromFaction(_T_NMS_WhoreFaction)
      Endif
   Elseif Whore.GetFactionRank(_T_HistoryFaction) > 4 && Whore.GetFactionRank(_T_HistoryFaction) < 9
      If Whore.GetFactionRank(_T_NMS_WhoreFaction) == 2
         Whore.SetFactionRank(_T_NMS_WhoreFaction, 0)
      Elseif Whore.GetFactionRank(_T_NMS_WhoreFaction) > 2 && Whore.GetFactionRank(_T_NMS_WhoreFaction) < 7
         Whore.SetFactionRank(_T_NMS_WhoreFaction, 7)       
      Endif         
   Endif   
EndFunction

Function FuckYouLikeAnAnimal(Actor Partner)
   Int PSex = Sexlab.GetGender(PlayerRef) ;Customer sex
   Int Sex = Partner.GetLeveledActorBase().GetSex() ;Whore sex
   Bool Bottom = False
   String PartnerName = Partner.GetBaseObject().GetName()
   Utility.Wait(0.1)
   Int iButton = _T_WhosOnTopMESG.Show()
   If iButton == 1 
      Bottom = True
   Endif
   Utility.Wait(0.1)
   If Partner.GetRelationshipRank(PlayerRef) < 2
      Partner.SetRelationshipRank(PlayerRef, 2)
      PlayerRef.SetRelationshipRank(Partner, 2)   
      Debug.Notification("<font size='20'>"+PartnerName+" Intimacy + 1</font>")
   Elseif Partner.GetRelationshipRank(PlayerRef) < 3
      Partner.SetRelationshipRank(PlayerRef, 3)
      PlayerRef.SetRelationshipRank(Partner, 3)  
      Debug.Notification("<font size='20'>"+PartnerName+" Intimacy + 1</font>")    
   Elseif Partner.GetRelationshipRank(PlayerRef) < 4
      Partner.SetRelationshipRank(PlayerRef, 4)
      PlayerRef.SetRelationshipRank(Partner, 4)
      Debug.Notification("<font size='20'>"+PartnerName+" Intimacy + 1</font>")
   Endif  
   Utility.Wait(0.1)
   _T_RefractoryPeriod.SetValue(1)
   Utility.Wait(0.1)
   actor[] sexActors = new actor[2]
   ;Just the ladies
   If PSex == 1 && Sex == 1
      If Bottom == False ;Eat me!
         sexActors[0] = PlayerRef
         sexActors[1] = Partner
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "Cunnilingus", tagSuppress="FM,MF,MM,Aggressive,kissing,Foreplay,LeadIn,Anal,Missionary,Cowgirl,Doggy,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo,Object", RequireAll = True)
         SexLab.StartSex(sexActors, anims)   
      Else ;I like tacos too!
         sexActors[0] = Partner
         sexActors[1] = PlayerRef         
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "Cunnilingus", tagSuppress="FM,MF,MM,Aggressive,kissing,Foreplay,LeadIn,Anal,Missionary,Cowgirl,Doggy,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo,Object", RequireAll = True)
         SexLab.StartSex(sexActors, anims)         
      Endif  
   ;Female player hetero   
   ElseIf PSex == 1 && Sex == 0 
      If Bottom == False ;She's a Modern girl.  
         sexActors[0] = PlayerRef
         sexActors[1] = Partner
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "Cunnilingus,Cowgirl,Carry", tagSuppress="FF,MM,Lesbian,kissing,Foreplay,LeadIn,Blowjob,Rimjob,Aggressive,Anal,footjob,boobjob,Footjob,Boobjob,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo", RequireAll = False)
         SexLab.StartSex(sexActors, anims)
      Else ;Who needs orgasms anyway?
         sexActors[0] = PlayerRef
         sexActors[1] = Partner
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "Blowjob,Doggy,Missionary,Anal", tagSuppress="FF,MM,Lesbian,kissing,Foreplay,LeadIn,Blowjob,Rimjob,Aggressive,footjob,boobjob,Footjob,Boobjob,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo", RequireAll = False)
         SexLab.StartSex(sexActors, anims)
      Endif
   ;Male Player hetero 
   ElseIf PSex == 0 && Sex == 1
      If Bottom == False ;I'm sure she never fakes it... right?
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "Blowjob,Doggy,Missionary,Anal", tagSuppress="FF,MM,Lesbian,kissing,Foreplay,LeadIn,Blowjob,Rimjob,Aggressive,footjob,boobjob,Footjob,Boobjob,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo", RequireAll = False)
         SexLab.StartSex(sexActors, anims)
      Else ;Yes, Lady Demitrescu.
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "Cunnilingus,Cowgirl,Carry", tagSuppress="FF,MM,Lesbian,kissing,Foreplay,LeadIn,Blowjob,Rimjob,Aggressive,Anal,footjob,boobjob,Footjob,Boobjob,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo", RequireAll = False)
         SexLab.StartSex(sexActors, anims)
      Endif   
   ;Men men men men... manly men.             
   ElseIf PSex == 0 && Sex == 0 
      If Bottom == False ;Blow me... pal!
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "MM,M2M", tagSuppress="FM,MF,FF,69,Cunnilingus,kissing,Foreplay,LeadIn,boobjob,Boobjob,footjob,Footjob,Guro,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Spanking,Mage,Dildo,Lesbian", RequireAll = False)
         SexLab.StartSex(sexActors, anims)
      Else ;Yes, Daddy!
         sexActors[0] = PlayerRef
         sexActors[1] = Partner
         sslBaseAnimation[] anims
         anims = SexLab.GetAnimationsByTags(2, "MM,M2M", tagSuppress="FM,MF,FF,69,Cunnilingus,kissing,Foreplay,LeadIn,boobjob,Boobjob,footjob,Footjob,Guro,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Spanking,Mage,Dildo,Lesbian", RequireAll = False)
         SexLab.StartSex(sexActors, anims)
      Endif   
   Endif
EndFunction

Function GoToDMC(Actor Partner)
   ;Rape rape rape, ano ko wo raaaaape!
   Int PSex = Sexlab.GetGender(PlayerRef) ;Customer sex
   Int Sex = Partner.GetLeveledActorBase().GetSex() ;Whore sex
   Int Pos = 0 ;oral rape
   Message RapePos = _T_FemRapePosMESG
   String PartnerName = Partner.GetBaseObject().GetName()
   Utility.Wait(0.1)
   If Sex == 0
      RapePos = _T_MaleRapePosMESG
   Endif
   Utility.Wait(0.1)
   If PSex == 0 
      Int iButton = RapePos.Show()
      If iButton == 1
         Pos = 1 ;Anal rape
      Elseif iButton == 2  
         Pos = 2 ;Vaginal rape
      Endif
   Endif   
   Utility.Wait(0.1)
   If Partner.IsInFaction(_T_HistoryFaction) == 0
      Partner.SetFactionRank(_T_HistoryFaction, 6)
      Partner.SetFactionRank(_T_RatFaction, 4)
   Endif   
   Debug.Notification("<font size='20'>"+PartnerName+" is afraid.</font>")
   Utility.Wait(0.2)
   actor[] sexActors = new actor[2]
   ;FF rape
   If PSex == 1 && Sex == 1
      sexActors[0] = PlayerRef
      sexActors[1] = Partner
      sslBaseAnimation[] anims
      anims = SexLab.GetAnimationsByTags(2, "Cunnilingus", tagSuppress="FM,MF,MM,kissing,Foreplay,LeadIn,Anal,Missionary,Cowgirl,Doggy,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo,Object", RequireAll = True)
      SexLab.StartSex(sexActors, anims)          
   ;Female rapes male   
   ElseIf PSex == 1 && Sex == 0  
      sexActors[0] = PlayerRef
      sexActors[1] = Partner
      sslBaseAnimation[] anims
      anims = SexLab.GetAnimationsByTags(2, "Cunnilingus,Cowgirl,Facesit", tagSuppress="FF,MM,Lesbian,kissing,Foreplay,LeadIn,Blowjob,Rimjob,Anal,footjob,boobjob,Footjob,Boobjob,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Magic,Mage,Dildo", RequireAll = False)
      SexLab.StartSex(sexActors, anims)
   ;Male rapes female 
   ElseIf PSex == 0 && Sex == 1
      If Pos == 0 ;Oral rape
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         If Partner.WornHasKeyword(zbfAnimHandsArmbinder) == true || Partner.WornHasKeyword(zbfAnimHandsWrists) == true  
            anims = SexLab.GetAnimationsByTags(2, "Binding,Wrists,Armbinder", tagSuppress="MM,M2M,69,Kissing,Loving,Foreplay,Boobjob,BoobJob,Handjob,Footjob,FootJob,Cowgirl,Missionary,Doggy,DoggyStyle,Anal,Vaginal,Carry,Standing,Spanking,Cunnilingus,FemDom,Pillory,XCross,Stockade,Fisting,SubSub,Lesbian,Dildo,Mage,Magic", RequireAll = False) 
            SexLab.StartSex(sexActors, anims)
         Else   
            anims = SexLab.GetAnimationsByTags(2, "FaceFuck,Blowjob", tagSuppress="MM,M2M,69,Kissing,Loving,Foreplay,Cowgirl,Missionary,Doggy,Cunnilingus,FemDom,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Fisting,SubSub,Lesbian,Dildo,Mage,Magic", RequireAll = false)
            SexLab.StartSex(sexActors, anims)   
         Endif   
      Elseif Pos == 1 ;Anal rape
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         If Partner.WornHasKeyword(zbfAnimHandsArmbinder) == true || Partner.WornHasKeyword(zbfAnimHandsWrists) == true  
            anims = SexLab.GetAnimationsByTags(2, "Wrists,Binding,Armbinder", tagSuppress="M2M,MM,69,Blowjob,Rimjob,Boobjob,BoobJob,Footjob,FootJob,Handjob,Vaginal,Oral,Cowgirl,Carry,Pussy,Cunnilingus,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Spanking,Mage,Dildo,Lesbian", RequireAll = False)
            SexLab.StartSex(sexActors, anims)    
         Else   
            anims = SexLab.GetAnimationsByTags(2, "Anal", tagSuppress="M2M,MM,69,Powerbomb,Blowjob,Rimjob,Cowgirl,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Spanking,Mage,Dildo,Lesbian")
            SexLab.StartSex(sexActors, anims)
         Endif   
      Elseif Pos == 2 ;Vaginal rape
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         If Partner.WornHasKeyword(zbfAnimHandsArmbinder) == true || Partner.WornHasKeyword(zbfAnimHandsWrists) == true  
            anims = SexLab.GetAnimationsByTags(2, "Wrists,Binding,Armbinder", tagSuppress="M2M,MM,69,Anal,Oral,Blowjob,Rimjob,Boobjob,BoobJob,Handjob,Footjob,FootJob,Cunnilingus,Leadin,Pillory,XCross,Stockade,Furniture,Breast,Boobjob,Footjob,Fisting,SubSub", RequireAll = False)
            SexLab.StartSex(sexActors, anims)
         Else   
            anims = SexLab.GetAnimationsByTags(2, "Aggressive,Powerbomb,Rough", tagSuppress="M2M,MM,69,Anal,Blowjob,Rimjob,Boobjob,BoobJob,Handjob,Footjob,FootJob,Oral,Leadin,Loving,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Furniture,Breast,Boobjob,Footjob,Fisting,SubSub", RequireAll = false)
            SexLab.StartSex(sexActors, anims)
         Endif            
      Endif   
   ;Male rapes male             
   ElseIf PSex == 0 && Sex == 0 
      If Pos == 0 ;Oral rape
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         If Partner.WornHasKeyword(zbfAnimHandsArmbinder) == true || Partner.WornHasKeyword(zbfAnimHandsWrists) == true  
            anims = SexLab.GetAnimationsByTags(2, "Binding,Wrists,Armbinder", tagSuppress="69,Kissing,Loving,Foreplay,Boobjob,BoobJob,Handjob,Footjob,FootJob,Cowgirl,Missionary,Doggy,DoggyStyle,Anal,Vaginal,Carry,Standing,Spanking,Cunnilingus,FemDom,Pillory,XCross,Stockade,Fisting,SubSub,Lesbian,Dildo,Mage,Magic", RequireAll = False)
            SexLab.StartSex(sexActors, anims) 
         Else   
            anims = SexLab.GetAnimationsByTags(2, "FaceFuck,Blowjob,Oral", tagSuppress="69,Kissing,Loving,Foreplay,Cowgirl,Missionary,Doggy,Cunnilingus,FemDom,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Fisting,SubSub,Lesbian,Dildo,Mage,Magic", RequireAll = false)
            SexLab.StartSex(sexActors, anims)
         Endif   
      Elseif Pos == 1 ;Anal rape
         sexActors[0] = Partner
         sexActors[1] = PlayerRef
         sslBaseAnimation[] anims
         If Partner.WornHasKeyword(zbfAnimHandsArmbinder) == true || Partner.WornHasKeyword(zbfAnimHandsWrists) == true  
            anims = SexLab.GetAnimationsByTags(2, "Wrists,Binding,Armbinder", tagSuppress="69,Blowjob,Rimjob,Boobjob,BoobJob,Footjob,FootJob,Handjob,Vaginal,Oral,Cowgirl,Carry,Pussy,Cunnilingus,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Spanking,Mage,Dildo,Lesbian", RequireAll = False)
            SexLab.StartSex(sexActors, anims)
         Else   
            anims = SexLab.GetAnimationsByTags(2, "Anal", tagSuppress="69,Blowjob,Rimjob,Cowgirl,Bondage,Bound,Binding,Armbinder,Pillory,XCross,Stockade,Cuffed,Fisting,SubSub,Spanking,Mage,Dildo,Lesbian")
            SexLab.StartSex(sexActors, anims)
         Endif 
      Endif      
   Endif 
EndFunction

Function LibidoRefresh()
   _T_RefractoryPeriod.SetValue(0)
EndFunction   

Function Martyr(Actor Mark)
   Actor Fam = Family.GetReference() as Actor
   Utility.Wait(0.1)
   If Fam == Mark
      If _T_JustOzarked.GetValue() == 0
         Form Piece = Mark.GetEquippedWeapon() as Form
         Actor Flunky = ExPrisoner.GetReference() as Actor
         _T_JustOzarked.SetValue(1)
         If Piece != None
            Mark.UnequipItem(Piece)
         Endif   
         Utility.Wait(0.1)
         DismissButFollow(Flunky)
         Utility.Wait(0.1)
         If Mark.IsInFaction(_T_RatFaction)
            Mark.SetFactionRank(_T_RatFaction, 4)
         Endif          
         Utility.Wait(0.1)
         Mark.RemoveItem(VendorItemWeapon, -1, True, PlayerRef)
         Mark.SetRelationshipRank(PlayerRef, -2)
         PlayerRef.SetRelationshipRank(Mark, -2)   
         Mark.SetFactionRank(_T_HistoryFaction, 6)
         Utility.Wait(0.1)
         FollowMe(Mark)
         Utility.Wait(0.1)
         manny_up_list_AvoidNPC.AddForm(Mark)           
      Else   
         _T_JustOzarked.SetValue(0)
         Family.Clear()
      Endif 
   Else   
      If _T_JustMartyred.GetValue() == 0
         Form Piece = Mark.GetEquippedWeapon() as Form
         Actor Flunky = ExPrisoner.GetReference() as Actor
         _T_JustMartyred.SetValue(1)
         If Piece != None
            Mark.UnequipItem(Piece)
         Endif   
         Utility.Wait(0.1)
         Dismiss(Flunky)
         Utility.Wait(0.1)
         If Mark.IsInFaction(_T_RatFaction)
            Mark.SetFactionRank(_T_RatFaction, 4)
         Endif           
         Utility.Wait(0.1)
         Mark.RemoveItem(VendorItemWeapon, -1, True, PlayerRef)
         Mark.SetRelationshipRank(PlayerRef, -2)
         PlayerRef.SetRelationshipRank(Mark, -2)   
         Mark.SetFactionRank(_T_HistoryFaction, 6)
         Mark.SetFactionRank(_T_MartyrFaction, 1)
         Flunky.SetFactionRank(_T_MartyrFaction, 2)
         Utility.Wait(0.1)
         FollowMe(Mark) 
         Utility.Wait(0.1)
         Mark.RemoveFromFaction(_T_NMS_CuckFaction)
         Utility.Wait(0.1)
         manny_up_list_AvoidNPC.AddForm(Mark)
         Cuck.Clear()
         Utility.Wait(0.1)
         If Mark.IsInFaction(_T_RatFaction)
            Mark.SetFactionRank(_T_RatFaction, 4)
         Endif               
      Else   
         _T_JustMartyred.SetValue(0)
      Endif 
   Endif    
EndFunction

Function RemoveBuddy(actor Chump)
   If Chump == AngrenorRef 
      FollowerAngrenor.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Elseif Chump == BrenuinBeggerRef
      FollowerBrenuin.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Elseif Chump == DegaineRef
      FollowerDegaine.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Elseif Chump == EddaRef 
      FollowerEdda.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Elseif Chump == NosterOneEyeRef 
      FollowerNoster.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Elseif Chump == SildaRef     
      FollowerSilda.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Elseif Chump == SnilfRef
      FollowerSnilf.Clear()
      Chump.SetFactionRank(_T_NMS_CaptiveFaction, 1)
      Chump.RemoveFromFaction(CurrentFollowerFaction)
   Endif               
EndFunction   

Function SetHogtie(actor Slave)
   Actor Stooge = CampFollower.GetReference() as Actor
   String SlaveName = Slave.GetBaseObject().GetName()
   Utility.Wait(0.1)
   If Stooge == Slave 
      _T_CFRestrained.SetValue(3)
      _T_PattyHurst.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Attention bonding + 1</font>")        
   Else
      _T_Restrained.SetValue(3)
      _T_BeatingCounter.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Discipline + 1</font>")      
   Endif   
EndFunction

Function SetHogtieGagged(actor Slave)
   Actor Stooge = CampFollower.GetReference() as Actor
   String SlaveName = Slave.GetBaseObject().GetName()
   Utility.Wait(0.1)
   If Stooge == Slave
      _T_CFRestrained.SetValue(5)
      _T_PattyHurst.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Attention bonding + 1</font>")      
   Else
      _T_Restrained.SetValue(5)
      _T_BeatingCounter.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Discipline + 1</font>")      
   Endif   
EndFunction

Function SetNormaltie(actor Slave)
   Actor Stooge = CampFollower.GetReference() as Actor
   String SlaveName = Slave.GetBaseObject().GetName()
   Utility.Wait(0.1)
   If Stooge == Slave 
      _T_CFRestrained.SetValue(4)
      _T_PattyHurst.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Attention bonding + 1</font>")       
   Else
      _T_Restrained.SetValue(4)
      _T_StockHolm.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Irrational Affection + 1</font>")      
   Endif   
EndFunction

Function SetNormaltieGagged(actor Slave)
   Actor Stooge = CampFollower.GetReference() as Actor
   String SlaveName = Slave.GetBaseObject().GetName()
   Utility.Wait(0.1)
   If Stooge == Slave 
      _T_CFRestrained.SetValue(6)
      _T_PattyHurst.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Attention bonding + 1</font>")     
   Else
      _T_Restrained.SetValue(6)
      _T_StockHolm.Mod(1)
      Debug.Notification("<font size='20'>"+Slavename+" Irrational Affection + 1</font>")      
   Endif   
EndFunction

Function SetFree(actor Slave)
   Actor Stooge = CampFollower.GetReference() as Actor
   Utility.Wait(0.1)
   If Stooge == Slave 
      _T_CFRestrained.SetValue(0)
   Else
      _T_Restrained.SetValue(0)    
   Endif   
EndFunction

Function SlaveManagement()
    Actor Johnny = John.GetReference() as Actor
    If _T_MavensSlave.GetValue() == 2
       If MavenRef.IsDead() == True
          Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
          Debug.MessageBox("You the feel inside of the collar draw closer to your throat. The diameter continues to shrink mercilessly crushing your windpipe.")
          Utility.Wait(5)
          Debug.MessageBox("You begin to pass out. The last thing you ever hear is the sound of your own neck bones cracking.")
          Utility.Wait(0.1)
          Sound.StopInstance(Heartbeat)
          Utility.Wait(0.1)
          PlayerRef.Kill()
       Else
          If Game.GetPlayer().IsInLocation(RiftenLocation) == False                
             Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
             Debug.MessageBox("You the feel inside of the collar draw closer to your throat. The diameter continues to shrink mercilessly crushing your windpipe.")
             Utility.Wait(5)
             Debug.MessageBox("You begin to pass out. The last thing you ever hear is the sound of your own neck bones cracking.")
             Utility.Wait(0.1)
             Sound.StopInstance(Heartbeat)
             Utility.Wait(0.1)
             PlayerRef.Kill()
          Elseif MavenRef.GetItemCount(_T_NMS_CooldownToken) == 0 && MavenRef.GetDistance(PlayerRef) > 400 && Johnny != MavenRef
             Int StrangleChance = Utility.RandomInt(0, 2)
             Utility.Wait(0.1)
             If StrangleChance == 1 && _T_SlaveOrders.GetValue() != 2
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("The collar is strangling you! Return to your Mistress!") 
                Utility.Wait (0.1)
                PlayerRef.EquipItem(_T_Strangle, 1, abSilent = True)
                Utility.Wait (3)
                Debug.Notification("The collar loosens it's grip slightly.") 
                Sound.StopInstance(Heartbeat)
             Endif
          Endif
          Utility.Wait(0.1)
          If _T_SlaveOrders.GetValue() == 1
             SlaveNudeCheck()
          Elseif _T_SlaveOrders.GetValue() == 3 && MavenRef.GetDistance(PlayerRef) > 400 && Johnny != MavenRef
             If _T_Disobedience.GetValue() < 6
                _T_Disobedience.Mod(1)
                Debug.Notification("You are too far from Mistress Maven. Disobedience + 1")
             Endif   
          Endif      
       Endif  
       SlaveMaulCheck() 
    Elseif _T_BrylingsSlave.GetValue() == 2
       If BrylingRef.IsDead() == True 
          _T_BrylingsSlave.SetValue(3)
       Elseif BrylingRef.HasKeyword(_T_CaptiveForce) || BrylingRef.HasKeyword(_T_FlunkyForce) || BrylingRef.HasKeyword(_T_CFForce) || BrylingRef.HasKeyword(_T_PrisonerForce)      
          _T_BrylingsSlave.SetValue(0)
       Else
          If Game.GetPlayer().IsInLocation(SolitudeLocation) == False
             If CrimeFactionHaafingar.GetCrimeGold() < 2000
                Debug.MessageBox("You disobeyed Mistress Bryling. There will be dire consequences.")
                Utility.Wait(2)
                CrimeFactionHaafingar.SetCrimeGold(2000)
                Debug.MessageBox("The guards will be hunting you.")
             Endif
          Else     
             If _T_SlaveOrders.GetValue() == 3 && BrylingRef.GetDistance(PlayerRef) > 400 && Johnny != BrylingRef
                If _T_Disobedience.GetValue() < 6
                   _T_Disobedience.Mod(1)
                   Debug.Notification("You are too far from Mistress Bryling. Disobedience + 1")
                Endif   
             Endif              
          Endif
       Endif  
       SlaveBryCheck()        
    Elseif _T_RadiantsSlave.GetValue() == 2
       If EndarieRef.IsDead() == True || TaarieRef.IsDead() == True
          _T_RadiantsSlave.SetValue(3)
          PlayerRef.UnequipItem(_T_RadiantCollar, True, False)
          Debug.Notification("You freed yourself from the collar")
       Elseif TaarieRef.HasKeyword(_T_CaptiveForce) || TaarieRef.HasKeyword(_T_FlunkyForce) || TaarieRef.HasKeyword(_T_CFForce) || TaarieRef.HasKeyword(_T_PrisonerForce)
          _T_RadiantsSlave.SetValue(0)
          PlayerRef.UnequipItem(_T_RadiantCollar, True, False)
          Debug.Notification("You freed yourself from the collar")          
       Elseif EndarieRef.HasKeyword(_T_CaptiveForce) || EndarieRef.HasKeyword(_T_FlunkyForce) || EndarieRef.HasKeyword(_T_CFForce) || EndarieRef.HasKeyword(_T_PrisonerForce)
          _T_RadiantsSlave.SetValue(0)
          PlayerRef.UnequipItem(_T_RadiantCollar, True, False)
          Debug.Notification("You freed yourself from the collar")        
       Else   
          If Game.GetPlayer().IsInLocation(SolitudeRadiantRaimentsLocation) == False
             If CrimeFactionHaafingar.GetCrimeGold() < 2000
                Debug.MessageBox("You escaped your Mistresses. There will be dire consequences.")
                Utility.Wait(2)
                CrimeFactionHaafingar.SetCrimeGold(2000)
                Debug.MessageBox("The guards will be hunting you.")
                _T_RadiantsSlave.SetValue(3)
                Utility.Wait(0.1)
                PlayerRef.UnEquipItem(_T_RadiantCollar, False, True)
                PlayerRef.EquipItem(_T_RadiantCollar, False, True)
             Endif
          Endif
          Utility.Wait(0.1)
          SlaveNudeCheck()        
       Endif
       SlaveRadCheck()        
    Elseif _T_BothelasSlave.GetValue() == 2
       If BothelaRef.IsDead() == True
          _T_BothelasSlave.SetValue(3)
          Debug.Notification("The spell is broken")
       Elseif Game.GetPlayer().IsInLocation(ReachHoldLocation) == False
          Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
          Debug.MessageBox("You have abandoned your beloved Bothela! Your heart begins to race and flutter... the guilt feels like a dagger thrust between your ribs.")
          Utility.Wait(2)
          Debug.MessageBox("In that moment you know that you will die... your heart seizes in your chest and you start to foam at the mouth. You deserve this for leaving her.")
          Utility.Wait(0.1)
          Sound.StopInstance(Heartbeat)
          Utility.Wait(0.1)
          PlayerRef.Kill()          
       Else        
          If BothelaRef.GetItemCount(_T_NMS_CooldownToken) == 0 && BothelaRef.GetDistance(PlayerRef) > 400 
             Int LongingChance = Utility.RandomInt(0, 5)
             Utility.Wait(0.1)
             If LongingChance == 1
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("You feel a sharp pain in your heart like a dagger being plunged into it!") 
                Utility.Wait(3)
                Gasp()
                Debug.Notification("You feel an overwhelming need to make love to the hag Bothela!") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 3, abSilent = True)
                Utility.Wait(0.1)
                _T_Disobedience.Mod(1)
             Elseif LongingChance == 3
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("Your heart feels as if it's being crushed within your chest!") 
                Utility.Wait(3)
                Gasp()
                Debug.Notification("You feel an irrational desire to take pleasure with the hag Bothela!") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 1, abSilent = True)
                Utility.Wait(0.1)
                _T_Disobedience.Mod(1)
             Elseif LongingChance == 5
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("You can't breathe... It feels as if you are drowning!") 
                Utility.Wait(3)
                Gasp()
                Debug.Notification("You must go to the hag Bothela and make love to her!") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 2, abSilent = True) 
                Utility.Wait(0.1)
                _T_Disobedience.Mod(1)              
             Endif
          Elseif BothelaRef.GetItemCount(_T_NMS_CooldownToken) == 0 && BothelaRef.GetDistance(PlayerRef) < 401 
             Int LongingChance = Utility.RandomInt(0, 5)
             Utility.Wait(0.1)
             If LongingChance == 1
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("You feel a sharp pain. in your heart.") 
                Utility.Wait(3) 
                Gasp()             
                Debug.Notification("You need to make love to Bothela.")
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 1, abSilent = True)                
             Elseif LongingChance == 3
                Moan()
                Debug.Notification("You feel intense arousal.")
                Utility.Wait(3)                
                Gasp()
                Debug.Notification("You need to make love to Bothela.")
             Elseif LongingChance == 5
                Moan()
                Debug.Notification("You feel strangely hot all over.") 
                Utility.Wait(3)
                Gasp()                
                Debug.Notification("You need to make love to Bothela.")        
             Endif                
          Endif
       Endif
       If PlayerRef.IsEquipped(_T_NMS_Capture_Ring)
          PlayerRef.UnEquipItem(_T_NMS_Capture_Ring)
          Debug.Messagebox("Bothela wouldn't approve of that kind of behavior")
       Endif
       SlavePotionCheck() 
    Elseif _T_ArcadiasSlave.GetValue() == 2
       If ArcadiaRef.IsDead() == True
          _T_ArcadiasSlave.SetValue(3)
          Debug.Notification("The spell is broken")
       Elseif Game.GetPlayer().IsInLocation(WhiterunHoldLocation) == False || Game.GetPlayer().IsInLocation(RiverwoodLocation) == True || Game.GetPlayer().IsInLocation(RoriksteadLocation) == True
          Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
          Debug.MessageBox("You have abandoned your beloved Queen Arcadia! Your heart begins to race and flutter... the guilt feels like a dagger thrust between your ribs.")
          Utility.Wait(2)
          Debug.MessageBox("In that moment you know that you will die... your heart seizes in your chest and you start to foam at the mouth. You deserve this for leaving her.")
          Utility.Wait(0.1)
          Sound.StopInstance(Heartbeat)
          Utility.Wait(0.1)
          PlayerRef.Kill()          
       Else          
          If ArcadiaRef.GetItemCount(_T_NMS_CooldownToken) == 0 && ArcadiaRef.GetDistance(PlayerRef) > 400 
             Int LongingChance = Utility.RandomInt(0, 5)
             Utility.Wait(0.1)
             If LongingChance == 1
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("You feel an intense pain like a needle being plunged into your eye!") 
                Utility.Wait(3)
                Gasp()
                Debug.Notification("You feel an overwhelming need to go to Arcadia and make love to her.") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 3, abSilent = True)
                Utility.Wait(0.1)
                _T_Disobedience.Mod(1)
             Elseif LongingChance == 3
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("Your heart races, and you feel an intense pain in your nether region!") 
                Utility.Wait(3)
                Gasp()
                Debug.Notification("You feel an irresistable desire to take pleasure with the Arcadia!") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 1, abSilent = True)
                Utility.Wait(0.1)
                _T_Disobedience.Mod(1)
             Elseif LongingChance == 5
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("You can't breathe... It feels as if you are being strangled!") 
                Utility.Wait(3)
                Gasp()
                Debug.Notification("You must go to Arcadia and make love to her!") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 2, abSilent = True)
                Utility.Wait(0.1)
                _T_Disobedience.Mod(1)             
             Endif
          Elseif ArcadiaRef.GetItemCount(_T_NMS_CooldownToken) == 0 && ArcadiaRef.GetDistance(PlayerRef) < 401 
             Int LongingChance = Utility.RandomInt(0, 5)
             Utility.Wait(0.1)
             If LongingChance == 1
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("You feel a sharp pain. in your heart.") 
                Utility.Wait(3)
                Gasp()               
                Debug.Notification("You need to make love to Arcadia.") 
                Sound.StopInstance(Heartbeat)
                Utility.Wait(0.1)
                PlayerRef.EquipItem(_T_Heartache, 1, abSilent = True)                      
             Elseif LongingChance == 3
                Moan()
                Debug.Notification("You feel intense arousal.") 
                Utility.Wait(3)
                Gasp()               
                Debug.Notification("You need to make love to Arcadia.") 
             Elseif LongingChance == 5
                Moan()
                Debug.Notification("You feel strangely hot all over.") 
                Utility.Wait(3)
                Gasp()              
                Debug.Notification("You need to make love to Arcadia.")        
             Endif               
          Endif  
       Endif  
       If PlayerRef.IsEquipped(_T_NMS_Capture_Ring)
          PlayerRef.UnEquipItem(_T_NMS_Capture_Ring)
          Debug.Messagebox("Arcadia wouldn't approve of that kind of behavior")
       Endif
       SlavePotionCheck()                  
    Elseif _T_WuunferthsSlave.GetValue() == 2
       If WuunferthRef.IsDead() == True
          Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
          Debug.MessageBox("You the feel inside of the collar draw closer to your throat. The diameter continues to shrink mercilessly crushing your windpipe.")
          Utility.Wait(5)
          Debug.MessageBox("You begin to pass out. The last thing you ever hear is the sound of your own neck bones cracking.")
          Utility.Wait(0.1)
          Sound.StopInstance(Heartbeat)
          Utility.Wait(0.1)
          PlayerRef.Kill()
       Else  
          If Game.GetPlayer().IsInLocation(WindhelmLocation) == False
             Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
             Debug.MessageBox("You the feel inside of the collar draw closer to your throat. The diameter continues to shrink mercilessly crushing your windpipe.")
             Utility.Wait(5)
             Debug.MessageBox("You begin to pass out. The last thing you ever hear is the sound of your own neck bones cracking.")
             Utility.Wait(0.1)
             Sound.StopInstance(Heartbeat)
             Utility.Wait(0.1)
             PlayerRef.Kill()
          Elseif WuunferthRef.GetItemCount(_T_NMS_CooldownToken) == 0 && WuunferthRef.GetDistance(PlayerRef) > 400 && Johnny != WuunferthRef
             Int StrangleChance = Utility.RandomInt(0, 2)
             Utility.Wait(0.1)
             If StrangleChance == 1 && _T_SlaveOrders.GetValue() != 2
                Int Heartbeat = UIHealthHeartbeatBLP.Play(PlayerRef)
                Debug.Notification("The collar is strangling you! Return to your Master!") 
                Utility.Wait (0.1)
                PlayerRef.EquipItem(_T_Strangle, 1, abSilent = True)
                Utility.Wait (3)
                Debug.Notification("The collar loosens it's grip slightly.") 
                Sound.StopInstance(Heartbeat)
             Endif
          Endif
       Endif  
       Utility.Wait(0.1)
       If _T_SlaveOrders.GetValue() == 1
          SlaveNudeCheck()
       Elseif _T_SlaveOrders.GetValue() == 3 && WuunferthRef.GetDistance(PlayerRef) > 400 && Johnny != WuunferthRef
          If _T_Disobedience.GetValue() < 6
             _T_Disobedience.Mod(1)
             Debug.Notification("You are too far from Master Wuunferth. Disobedience + 1")
          Endif   
       Endif   
       SlaveWuunCheck()
    Else ;Nobody's slave
       If _T_RestoreCasual.GetValue() == 1
          _T_NoCasual.SetValue(0)
          _T_RestoreCasual.SetValue(0)
          Debug.notification("Casual dialogue restored") 
       Endif
       If _T_RestoreWhore.GetValue() == 1
          _T_PlayerWhore.SetValue(1)
          _T_RestoreWhore.SetValue(0)
          Debug.notification("Player whore dialogue restored") 
       Endif                                                                       
    Endif
EndFunction   

Function SlaveBryCheck()
    Actor Brie = Bryling.GetReference() as Actor
    Actor Ernie = Irnskar.GetReference() as Actor
    Bool NoTres = SolitudeBrylingsHouse.GetActorOwner() == Game.GetPlayer().GetActorBase()
    Utility.Wait(0.1) 
    If Brie == None 
       Bryling.ForceRefIfEmpty(BrylingRef)
       Debug.Notification("Mistress Bryling Added")
    Endif 
    If Ernie == None 
       Irnskar.ForceRefIfEmpty(IrnskarRef)
       Debug.Notification("Irnskar Added")
    Endif     
    Utility.Wait(0.1) 
    If NoTres == False
       SolitudeBrylingsHouse.SetActorOwner(Game.GetPlayer().GetActorBase())
    Endif
    If BrylingRef.GetRelationshipRank(PlayerRef) < 4
       BrylingRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(BrylingRef, 4)
    Endif 
    If IrnskarRef.GetRelationshipRank(PlayerRef) < 4
       IrnskarRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(IrnskarRef, 4)
    Endif     
    If _T_NoCasual.GetValue() == 0
       _T_NoCasual.SetValue(1)
       _T_RestoreCasual.SetValue(1)
    Endif           
EndFunction 

Function SlaveMaulCheck()
    Actor Dean = Hemming.GetReference() as Actor
    Actor Gary = Maul.GetReference() as Actor
    Actor Molatov = Maven.GetReference() as Actor
    Actor Triana = Ingun.GetReference() as Actor
    Bool NoTres = RiftenBlackBriarManor.GetActorOwner() == Game.GetPlayer().GetActorBase()
    Utility.Wait(0.1)
    If RiftDoor.IsLocked() == True
       RiftDoor.Lock(false, true)
    Endif  
    Utility.Wait(0.1)     
    If Dean == None 
       Hemming.ForceRefIfEmpty(HemmingRef)
       Debug.Notification("Hemming Added")
    Endif   
    If Gary == None 
       Maul.ForceRefIfEmpty(MaulRef)
       Debug.Notification("Maul Added")
    Endif
    If Molatov == None 
       Maven.ForceRefIfEmpty(MavenRef)
       Debug.Notification("Mistress Maven Added")
    Endif      
    If Triana == None 
       Ingun.ForceRefIfEmpty(IngunRef)
       Debug.Notification("Ingun Added")
    Endif
    Utility.Wait(0.1) 
    If NoTres == False
       RiftenBlackBriarManor.SetActorOwner(Game.GetPlayer().GetActorBase())
    Endif 
    If MavenRef.GetRelationshipRank(PlayerRef) < 4
       MavenRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(MavenRef, 4)
    Endif
    If MaulRef.GetRelationshipRank(PlayerRef) < 4
       MaulRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(MaulRef, 4)
    Endif
    If IngunRef.GetRelationshipRank(PlayerRef) < 4
       IngunRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(IngunRef, 4)
    Endif
    If HemmingRef.GetRelationshipRank(PlayerRef) < 4
       HemmingRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(HemmingRef, 4)
    Endif    
    If _T_NoCasual.GetValue() == 0
       _T_NoCasual.SetValue(1)
       _T_RestoreCasual.SetValue(1)
    Endif               
EndFunction

Function SlavePotionCheck()
    If _T_NoCasual.GetValue() == 0
       _T_NoCasual.SetValue(1)
       _T_RestoreCasual.SetValue(1)
    Endif
    If _T_PlayerWhore.GetValue() == 1
       _T_PlayerWhore.SetValue(0)
       _T_RestoreWhore.SetValue(1)
    Endif 
    _T_Whoreing.SetValue(0)
EndFunction   

Function SlaveRadCheck()
    Actor Lisa = Endarie.GetReference() as Actor
    Actor Lori = Taarie.GetReference() as Actor
    Bool NoTres = SolitudeRadiantRaiment.GetActorOwner() == Game.GetPlayer().GetActorBase()
    Utility.Wait(0.1) 
    If Lisa == None 
       Endarie.ForceRefIfEmpty(EndarieRef)
       Debug.Notification("Mistress Endarie Added")
    Endif 
    If Lori == None 
       Taarie.ForceRefIfEmpty(TaarieRef)
       Debug.Notification("Mistress Taarrie Added")
    Endif
    Utility.Wait(0.1) 
    If NoTres == False
       SolitudeRadiantRaiment.SetActorOwner(Game.GetPlayer().GetActorBase())
    Endif
    If EndarieRef.GetRelationshipRank(PlayerRef) < 4
       EndarieRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(EndarieRef, 4)
    Endif
    If TaarieRef.GetRelationshipRank(PlayerRef) < 4
       TaarieRef.SetRelationshipRank(PlayerRef, 4)
       PlayerRef.SetRelationshipRank(TaarieRef, 4)
    Endif
    If _T_NoCasual.GetValue() == 0
       _T_NoCasual.SetValue(1)
       _T_RestoreCasual.SetValue(1)
    Endif                     
EndFunction

Function SlaveNudeCheck()
   Armor A = PlayerRef.GetWornForm(0x00000010) As Armor
   Armor B = PlayerRef.GetWornForm(0x00000080) As Armor
   Armor C = PlayerRef.GetWornForm(0x00000004) As Armor
   Armor H = PlayerRef.GetWornForm(0x00001000) As Armor
   Armor G = PlayerRef.GetWornForm(0x00000008) As Armor
    Utility.Wait(0.1) 
    If A != None || B != None || C != None || H != None || G != None
      If _T_Disobedience.GetValue() < 5
         Debug.Notification("You're breaking the rules + 1 Disobedience")
         _T_Disobedience.Mod(1)
      Endif   
    Endif                   
EndFunction

Function SlaveWuunCheck()
    Actor Gramps = Wuunferth.GetReference() as Actor
    Utility.Wait(0.1) 
    If Gramps == None 
       Wuunferth.ForceRefIfEmpty(WuunferthRef)
       Debug.Notification("Master Wuunferth Added")
    Endif 
    If _T_NoCasual.GetValue() == 0
       _T_NoCasual.SetValue(1)
       _T_RestoreCasual.SetValue(1)
    Endif   
EndFunction 

 

 

It honestly amazes me that this monstrosity works, and works surprisingly well. This could undoubtedly be done much more eficciently by a better coder but I am still proud of it.

Edited by Tentacus
Posted (edited)

I am completely insane. I just added bespoke player slave sex dialogue for the Black-Briars/Maul and Bryling's housecarl. Previously they just reused the rape dialogue from the player-whore dialogue set. Which was vague enough to work for the most part. This would be bad enough but I also added a lot of the bells and whistles that were previously only in the Player-whore consensual dialogue like asking for lube and so on...  Worst of all is I've already playtested all of the Maven route so this won't really be tested before release (I will spot check) which is just asking for it :D 

 

For those wondering the current dialogue count is: 12664

Edited by Tentacus
Posted (edited)

This is basically what I spent 4 hrs working on yesterday... lol.

 

Right.jpg.bcdf14a0c98a9cfa64680748309e1338.jpg   ElfSex.jpg.75ebb6a4adb350de9009bbe7d9f3c998.jpg

 

but now the goddamn actual Master/Mistress slave sex dialogue feels lacking by comparison so I will have to retool that too. This never ends.

 

Ack.Gif.e112e182b6ab23dc45e7fcf3bd05a89b.Gif

 

 

Edited by Tentacus
Posted

Tentacus,  you have poured your heart and soul into creating this master piece.  Your continued diligence has shaped an idea into a tangible dream.  I cant wait to see your next stable release.

 

Thank you sir for all your hardwork in overcoming each and every obstacle in order to deliver excellence! 

Posted

I hate being that guy, especially when you have already done so much, but is there any chance that this could be converted to LE? I just can't navigate  the SE enviroment with all those different version and get address library to work so I'm limited to LE but this mod seems great.

Posted (edited)
6 minutes ago, ASDASDASD_Smasher said:

I hate being that guy, especially when you have already done so much, but is there any chance that this could be converted to LE? I just can't navigate  the SE enviroment with all those different version and get address library to work so I'm limited to LE but this mod seems great.

 

If someone else can help you to get this working in LE, great, Some people seem to be able to do it, but personally I don't even test this mod in SE as I play Skyrim in VR exclusively these days so as for direct support for Oldrim... no.

 

Search the thread you might find what you need. I think it's a matter of patching The Notice Board or something.

Edited by Tentacus
Posted

The line count is over 13000 now and my burnout is about to redline. I really need to get this testing done and stop "improving" shit.

giph.gif.883cb3c469a71cbc8a3909fcc30e6f63.gif

Posted
On 4/24/2023 at 10:08 AM, erynyes said:

Last update been out for a while now, still haven't found out who the secret girl are, any chance of a spoiler? ?

 

 

BTW: I neglected to mention that you might have to sleep with these characters more than once to get the option. I was just reminded of that myself because the way my playthrough resolved was my Elf falling in love with Erdi and running off with her to be whores together as soon as Bryling released her from slavery.

 

Love.jpg.e0d414596c789c754a259005e935dd1b.jpg

 

 

Posted

I decided I will do Arcadia on the same character, continuing on from them leaving Solitude... It'll let me test several things at once as well as test the mechanics of having a Player whore who is pimping another whore as they make their way to whiterun. *sigh* I added way way too many mechanics in this update.

Posted

Got a weird question here, apologies if it was already answered but I couldn't find it with the search function:
Is there any way to remove the ex-prisoner flag from an NPC? Wanted to have Haelga just using her regular dialogue, as it's faster than going through the hoops of having her join me as a companion and and all that.

Posted (edited)
6 hours ago, CyborgNinja said:

Got a weird question here, apologies if it was already answered but I couldn't find it with the search function:
Is there any way to remove the ex-prisoner flag from an NPC? Wanted to have Haelga just using her regular dialogue, as it's faster than going through the hoops of having her join me as a companion and and all that.

 

That feature exists in the debug ring but I fucked up and didn't include the dialogue to use it in the current version so don't try (It'll set a global that will fuck up other scripts! If you did attempt it already type Set _T_NMS_Reset to 0 in the console).

 

Instead for now you could click on Haelga and remove her from the faction _T_HistoryFaction (History Faction) You'll have to use help to look up the faction id. You'll need to do that for any other dialogue factions she might be in like _T_CasualSexFaction (Casual sex faction) as well if you want. This feature will be fixed in the final version.

 

I am a little curious why this is necessary though Her unhired dialogue is all just top level... It doesn't block any of her vanilla dialogue. Is it just cause it's unimmersive? Also an even easier solution is just to use the console to set compatibility mode (Pretty sure that clears the unhired dialogue too)

 

Set _T_NMS_CompatMode To 1 Then set it back to 0 when you're done.

Edited by Tentacus
Posted (edited)

Hmmm... it seems like I made it so there is no option to offer a happy whore to your companion. (despite the fact that the dialogue for "You gonna want a turn?" does exist for them). This is an oversight and I will add the appropriate dialogue. This is probably also the case for offering them to beggars... I'll have to look into that.

 

Edit: Weirdly enough, this wasn't the case for the current TNB rescue.

Edited by Tentacus
Posted
11 hours ago, Tentacus said:

 

That feature exists in the debug ring but I fucked up and didn't include the dialogue to use it in the current version so don't try (It'll set a global that will fuck up other scripts! If you did attempt it already type Set _T_NMS_Reset to 0 in the console).

 

Instead for now you could click on Haelga and remove her from the faction _T_HistoryFaction (History Faction) You'll have to use help to look up the faction id. You'll need to do that for any other dialogue factions she might be in like _T_CasualSexFaction (Casual sex faction) as well if you want. This feature will be fixed in the final version.

 

I am a little curious why this is necessary though Her unhired dialogue is all just top level... It doesn't block any of her vanilla dialogue. Is it just cause it's unimmersive? Also an even easier solution is just to use the console to set compatibility mode (Pretty sure that clears the unhired dialogue too)

 

Set _T_NMS_CompatMode To 1 Then set it back to 0 when you're done.


Thanks for the info! Yeah I didn't wanna mess with anything until I heard back from yourself or someone that had done this already. I figured messing something up with the scripts could fuck up something at the global level. As for why its necessary, it really isn't. Just more of a convenience for me, as there's less dialogue trees involved when all I wanna do is shack up with an NPC. In my experience it also seems like NPCs are more prone to accept sex requests through the standard dialogue tree than the follower/ex-prisoner one. I actually find the companion dialogue tree more realistic with Haelga, since she usually brings up something related to Dibella worship through sex. Not sure if she does with the non-prisoner one as I never got to try it out.

But again, thank you for the help with this. Like I said, it's just a laziness thing for me. Should be able to easily pull up the faction IDs.

Posted

I really wasn't sure if Arcadia would work the way I wrote her for the love potion scenario... Bothela was very straight forward, she's just a wicked witch who gets off on controlling people... straight forward... With Arcadia I took some swings and so far it's REALLY fun. Especially in the context of playing on the same character who had already been Bryling's slave, and had made a good life for herself after.

Posted

Ya know what? I think Arcadia's the scariest Mistress. The personality I wrote really matches the looks of the replacer I'm using Total accident as I didn't even remember what Arcadia looked like when I wrote it other than kind of average.

Posted
32 minutes ago, EdtheNord said:

why dont make them into separate mods? the content is more than enough

 

To avoid reinventing the wheel. Being able to use the existing systems I created, makes everything work together better for a wholistic RP experience. For instance in my current testing session, when the love potion from Arcadia wore off I got revenge on her using the ring of subjugation... and now my disillusioned and ruined little elf is out to make the world suffer for all she's been through.

 

Fun fact as soon as you kill Arcadia, Nazeem's wife INSTANTLY appears downstairs and takes over the shop... scared the absolute piss out of me when I heard footsteps. Can't have witnesses though so now Nazeem's wife is my elf's helpless captive :D 

 

You would think Bethesda would put like a 24 hr wait on replacing dead shopkeepers... lol.

Posted (edited)

I am pretty confident I can get the update out next week. I only have to do a full playthrough of the radiant sisters and a few spot checks elsewhere and I already roughed out the text for the new description.

 

Badmommy.jpg.22da5a51ca2dd59be51f058b7a631dca.jpg

Edited by Tentacus

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...