Scriptname BaboImmersiveSlave_Main extends Quest  

Import Debug

Quest Property SexSlavesQuest Auto
BaboSlaveRescueScript Property RescueQuest Auto hidden
Bool property BaboDialogue auto

Keyword Property ZazKeyword Auto

Faction Property BIS_AdventurerFaction Auto
Faction Property BIS_SlavesforPlayer Auto
Faction Property BIS_SlavesFaction Auto
Faction Property BIS_SlavesReleasedFaction Auto
Faction Property BIS_SlavesRunAwayFaction Auto
Faction Property BIS_CapturedKnightFaction Auto
Faction Property BIS_SlavesCutieFaction Auto
Faction Property BIS_SlavesCutieReleasedFaction Auto 
Faction Property BIS_SpecialBanditFaction Auto
Faction Property BIS_CapturedKnightFactionAfterRelease  Auto  
Faction Property BanditFriendFaction  Auto  


Package Property BIS_DefaultWait Auto
Package Property BISSlaveDisappearing01 Auto
Package Property BISSlaveDisappearing02 Auto
Package Property BISSlaveDisappearing03 Auto
Package Property BISSlaveFolllow Auto

Package Property BISSlaveRunningPointFalkreath Auto
Package Property BISSlaveRunningPointWindhelm Auto
Package Property BISSlaveRunningPointWhiterun Auto
Package Property BISSlaveRunningPointWinterhold Auto
Package Property BISSlaveRunningPointRiften Auto
Package Property BISSlaveRunningPointReach Auto
Package Property BISSlaveRunningPointMorthal Auto
Package Property BISSlaveRunningPointDawnstar Auto
Package Property BISSlaveRunningPointSolitude Auto

Faction Property CreatureFaction Auto 
Faction Property DraugrFaction Auto 
Faction Property weplayerenemy Auto
Faction Property BanditFaction Auto
Faction Property FalmerFaction Auto
Faction Property SpiderFaction Auto
Faction Property SkeletonFaction Auto
Faction Property SkeeverFaction Auto
Faction Property NecromancerFaction Auto
Faction Property ChaurusFaction Auto
Faction Property ForswornFaction Auto
Faction Property GiantFaction Auto
Faction Property MammothFaction Auto
Faction Property DunPlayerAllyFaction Auto
Faction Property DLC2RieklingFaction Auto
Faction Property DLC2MoragTongFaction Auto
Faction Property HagravenFaction Auto
Faction Property dunBlackreachFalmerServantFaction Auto
Faction Property VampireFaction Auto
Faction Property VampireThrallFaction Auto
Faction Property WarlockFaction Auto
Faction Property Potentialfollowerfaction auto
Faction Property PotentialMarriageFaction auto



Faction Property BIS_FalkreathCaptives Auto
Faction Property BIS_WindhelmCaptives Auto
Faction Property BIS_WhiterunCaptives Auto
Faction Property BIS_RiftenCaptives Auto
Faction Property BIS_SolitudeCaptives Auto
Faction Property BIS_WinterholdCaptives Auto
Faction Property BIS_DawnstarCaptives Auto
Faction Property BIS_MorthalCaptives Auto
Faction Property BIS_ReachCaptives Auto

FormList Property BIS_FalkreathLetterList  Auto  
FormList Property BIS_ReachLetterList  Auto  
FormList Property BIS_RiftenLetterList  Auto  
FormList Property BIS_SolitudeLetterList  Auto  
FormList Property BIS_WhiterunLetterList  Auto  
FormList Property BIS_WindhelmLetterList  Auto  
FormList Property BIS_WinterholdLetterList  Auto  
FormList Property BIS_DawnstarLetterList  Auto  
FormList Property BIS_MorthalLetterList  Auto  

FormList Property BIS_FalkreathRescueList  Auto  
FormList Property BIS_WindhelmRescueList  Auto  
FormList Property BIS_ReachRescueList  Auto  
FormList Property BIS_RiftenRescueList  Auto  
FormList Property BIS_SolitudeRescueList  Auto  
FormList Property BIS_WhiterunRescueList  Auto  
FormList Property BIS_WinterholdRescueList  Auto  
FormList Property BIS_DawnstarRescueList  Auto  
FormList Property BIS_MorthalRescueList  Auto  

Outfit Property BISRescuedFollowerBasicoutfit01 Auto





Event OnInit()
	SexSlavesQuest.Start()
	FactionSet()
EndEvent

Function CreateRandomItem(Formlist aklist, objectreference akContainer)

int n = aklist.GetSize() - 1
n = utility.RandomInt(0, n)

akContainer.AddItem(aklist.GetAt(n), 1)

aklist.RemoveAddedform(aklist.GetAt(n))

EndFunction


Function RetreiveIdle(Actor Target)
Debug.SendAnimationEvent(Target, "IdleForceDefaultState")
EndFunction

Form[] Function FindRestraints(Actor target, Actor Receiver)
Form[] wornForms = new Form[30]
int index
int slotsChecked
slotsChecked += 0x00100000
slotsChecked += 0x00200000 ;ignore reserved slots
slotsChecked += 0x80000000
 
int thisSlot = 0x01
	while (thisSlot < 0x80000000)
	if (Math.LogicalAnd(slotsChecked, thisSlot) != thisSlot) ;only check slots we haven't found anything equipped on already
	Armor thisArmor = target.GetWornForm(thisSlot) as Armor
	if (thisArmor)
		if (thisArmor.HasKeyword(ZazKeyword)) ;check for ZazKeyword
                    Target.UnequipItem(thisArmor)
			Target.RemoveItem(thisArmor, 1, false, Receiver as objectreference)
			EndIf
		else ;no armor was found on this slot
			slotsChecked += thisSlot
	endif
	endif
		thisSlot *= 2 ;double the number to move on to the next slot
	endWhile
	return wornForms
EndFunction

Function RescueCountAdding()
if BaboDialogue
	RescueQuest = Quest.GetQuest("BaboRescuingSlavesScript") As BaboSlaveRescueScript
	RescueQuest.PlusRescueCount(1)
endif
EndFunction

Function KillCountAdding()
if BaboDialogue
	RescueQuest = Quest.GetQuest("BaboRescuingSlavesScript") As BaboSlaveRescueScript
	RescueQuest.MinusRescueCount(1)
endif
EndFunction

Function SoliloquyEnd(Bool Rescue)
int RD = Utility.Randomint(1, 3)

if Rescue

If RD == 1
	Notification("It looks like there is no slave left here.")
elseif RD == 2
	Notification("This must be the last one...")
else
	Notification("Finally, I rescued them all. This is inhumane... How can a man do something like this?")	
endif

Else

If RD == 1
	Notification("Another poor soul has gone...")
elseif RD == 2
	Notification("At least this one is no longer in pain...")
else
	Notification("Sorry I couldn't save you sooner.")	
endif

Endif
EndFunction


Function appointKnight(actor akactor)

(akactor.getactorbase()).SetOutfit(BISRescuedFollowerBasicoutfit01, false)
akactor.removeFromFaction(BIS_SlavesforPlayer)
akactor.addtoFaction(Potentialfollowerfaction)
akactor.addtoFaction(PotentialMarriageFaction)
akactor.addtoFaction(BIS_CapturedKnightFactionAfterRelease)
akactor.evaluatepackage()

EndFunction

Function TemporaryFollower(Actor akactor)
akactor.removeFromFaction(BIS_CapturedKnightFaction)
akactor.removeFromFaction(BIS_SlavesCutieFaction)
akactor.addtoFaction(BIS_SlavesforPlayer)
RetreiveIdle(akactor)
FindRestraints(akactor, Game.getplayer())
Weapon AW = akactor.AddItem(BISListWeaponLVLItem, 1)
akactor.EquipItem(AW)
akactor.evaluatePackage()

endfunction

Function FreeSlave(Actor akactor)
if akactor.isinfaction(BIS_CapturedKnightFaction)
	akactor.removeFromFaction(BIS_Slavesfaction)
	;akactor.removeFromFaction(BIS_SlavesCutieFaction)
else
	akactor.removeFromFaction(BIS_Slavesfaction)
	akactor.removeFromFaction(BIS_SlavesCutieFaction)
	akactor.addToFaction(BIS_SlavesReleasedFaction)
	FollowPlayer(akactor)
endif
endfunction

Function FollowPlayer(actor akactor)

ActorUtil.ClearPackageOverride(akactor)
ActorUtil.AddPackageOverride(akactor, BISSlaveFolllow, 100)
akactor.evaluatePackage()

EndFunction

Function ReleaseKnight(Actor akactor)
RescueCountAdding()

	akactor.removeFromFaction(BanditFriendFaction)
	akactor.removeFromFaction(BIS_SlavesforPlayer)
	akactor.removeFromFaction(BIS_SlavesReleasedFaction)
	akactor.removeFromFaction(BIS_SlavesCutieFaction)
	akactor.addToFaction(BIS_SlavesRunawayFaction)
	ActorUtil.ClearPackageOverride(akactor)
	DesignateRunningPoint(akactor)
	
	akactor.SetRelationshipRank(Game.GetPlayer(), 2)

EndFunction

Function ReleaseSlave(Actor akactor)
RescueCountAdding()

if akactor.isinfaction(BIS_CapturedKnightFaction)
	return
endif

	RetreiveIdle(akactor)
	akactor.removeFromFaction(BanditFriendFaction)
	akactor.removeFromFaction(BIS_SlavesforPlayer)
	akactor.removeFromFaction(BIS_SlavesReleasedFaction)
	akactor.addToFaction(BIS_SlavesRunawayFaction)
	ActorUtil.ClearPackageOverride(akactor)
	DesignateRunningPoint(akactor)
	
	akactor.SetRelationshipRank(Game.GetPlayer(), 2)

EndFunction


Function DesignateRunningPoint(actor akactor)

	if akactor.isinfaction(BIS_FalkreathCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointFalkreath, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_WhiterunCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointWhiterun, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_WindhelmCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointWindhelm, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_RiftenCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointRiften, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_ReachCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointReach, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_MorthalCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointMorthal, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_DawnstarCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointDawnstar, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_WinterholdCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointWinterhold, 100)
		akactor.evaluatePackage()
		Return
	elseif akactor.isinfaction(BIS_SolitudeCaptives)
		ActorUtil.AddPackageOverride(akactor, BISSlaveRunningPointSolitude, 100)
		akactor.evaluatePackage()
		Return
	endif

int RD = Utility.Randomint(1,3)

	if RD == 1
		ActorUtil.AddPackageOverride(akactor, BISSlaveDisappearing01, 100)
	elseif RD == 2
		ActorUtil.AddPackageOverride(akactor, BISSlaveDisappearing02, 100)
	else
		ActorUtil.AddPackageOverride(akactor, BISSlaveDisappearing03, 100)
	endif

	akactor.evaluatePackage()
	akactor.DeleteWhenAble()
	
	Return
EndFunction

Function ReachGoal(actor akactor); When slaves reached their goals
	ActorUtil.ClearPackageOverride(akactor)
	akactor.removeFromFaction(BIS_SlavesReleasedFaction)
	akactor.removeFromFaction(BIS_SlavesRunawayFaction)
	akactor.removeFromFaction(BIS_SlavesforPlayer)
	ActorUtil.AddPackageOverride(akactor, BIS_DefaultWait, 100)
	akactor.evaluatePackage()
	
	if akactor.isinfaction(BIS_FalkreathCaptives) ; Falkreath
		BIS_FalkreathRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_WhiterunCaptives) ; Whiterun
		BIS_WhiterunRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_WindhelmCaptives) ; Windhelm
		BIS_WindhelmRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_RiftenCaptives) ; Riften
		BIS_RiftenRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_ReachCaptives) ; Reach
		BIS_ReachRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_MorthalCaptives) ; Morthal
		BIS_MorthalRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_DawnstarCaptives) ; Dawnstar
		BIS_DawnstarRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_WinterholdCaptives) ; Winterhold
		BIS_WinterholdRescueList.addform(akactor)
	elseif akactor.isinfaction(BIS_SolitudeCaptives) ; Solitude
		BIS_SolitudeRescueList.addform(akactor)
	endif
	
EndFunction

Function FactionSet()
Warlockfaction.setally(BIS_SlavesFaction, true, true)
Warlockfaction.setally(BIS_SlavesCutieFaction, true, true)
Warlockfaction.setally(BIS_SpecialBanditFaction, true, true)
Warlockfaction.setally(BIS_CapturedKnightFaction, true, true)
Warlockfaction.setenemy(BIS_SlavesReleasedFaction)
Warlockfaction.setenemy(BIS_SlavesCutieReleasedFaction)
Warlockfaction.setenemy(BIS_SlavesforPlayer)
Warlockfaction.setenemy(BIS_SlavesRunAwayFaction)
; skyrim factions
banditfaction.setally(BIS_SlavesFaction, true, true)
banditfaction.setally(BIS_SlavesCutieFaction, true, true)
banditfaction.setally(BIS_SpecialBanditFaction, true, true)
banditfaction.setally(BIS_CapturedKnightFaction, true, true)
banditfaction.setenemy(BIS_SlavesReleasedFaction)
banditfaction.setenemy(BIS_SlavesCutieReleasedFaction)
banditfaction.setenemy(BIS_SlavesforPlayer)
banditfaction.setenemy(BIS_SlavesRunAwayFaction)
;
CreatureFaction.setally(BIS_SlavesFaction, true, true)
CreatureFaction.setally(BIS_SlavesCutieFaction, true, true)
CreatureFaction.setally(BIS_CapturedKnightFaction, true, true)
CreatureFaction.setenemy(BIS_SlavesReleasedFaction)
CreatureFaction.setenemy(BIS_SlavesCutieReleasedFaction)
CreatureFaction.setenemy(BIS_SlavesforPlayer)
CreatureFaction.setenemy(BIS_SlavesRunAwayFaction)
;
DraugrFaction.setally(BIS_SlavesFaction, true, true)
DraugrFaction.setally(BIS_SlavesCutieFaction, true, true)
DraugrFaction.setally(BIS_CapturedKnightFaction, true, true)
DraugrFaction.setenemy(BIS_SlavesReleasedFaction)
DraugrFaction.setenemy(BIS_SlavesCutieReleasedFaction)
DraugrFaction.setenemy(BIS_SlavesforPlayer)
DraugrFaction.setenemy(BIS_SlavesRunAwayFaction)
;
Vampirefaction.setally(BIS_SlavesFaction, true, true)
Vampirefaction.setally(BIS_SlavesCutieFaction, true, true)
Vampirefaction.setally(BIS_SpecialBanditFaction, true, true)
Vampirefaction.setally(BIS_CapturedKnightFaction, true, true)
Vampirefaction.setenemy(BIS_SlavesReleasedFaction)
Vampirefaction.setenemy(BIS_SlavesCutieReleasedFaction)
Vampirefaction.setenemy(BIS_SlavesforPlayer)
Vampirefaction.setenemy(BIS_SlavesRunAwayFaction)
;
FalmerFaction.setally(BIS_SlavesFaction, true, true)
FalmerFaction.setally(BIS_SlavesCutieFaction, true, true)
FalmerFaction.setally(BIS_SpecialBanditFaction, true, true)
FalmerFaction.setally(BIS_CapturedKnightFaction, true, true)
FalmerFaction.setenemy(BIS_SlavesReleasedFaction)
FalmerFaction.setenemy(BIS_SlavesCutieReleasedFaction)
FalmerFaction.setenemy(BIS_SlavesforPlayer)
FalmerFaction.setenemy(BIS_SlavesRunAwayFaction)
;
SpiderFaction.setally(BIS_SlavesFaction, true, true)
SpiderFaction.setally(BIS_SlavesCutieFaction, true, true)
SpiderFaction.setally(BIS_SpecialBanditFaction, true, true)
SpiderFaction.setally(BIS_CapturedKnightFaction, true, true)
SpiderFaction.setenemy(BIS_SlavesReleasedFaction)
SpiderFaction.setenemy(BIS_SlavesCutieReleasedFaction)
SpiderFaction.setenemy(BIS_SlavesforPlayer)
SpiderFaction.setenemy(BIS_SlavesRunAwayFaction)
;
SkeletonFaction.setally(BIS_SlavesFaction, true, true)
SkeletonFaction.setally(BIS_SlavesCutieFaction, true, true)
SkeletonFaction.setally(BIS_SpecialBanditFaction, true, true)
SkeletonFaction.setally(BIS_CapturedKnightFaction, true, true)
SkeletonFaction.setenemy(BIS_SlavesReleasedFaction)
SkeletonFaction.setenemy(BIS_SlavesCutieReleasedFaction)
SkeletonFaction.setenemy(BIS_SlavesforPlayer)
SkeletonFaction.setenemy(BIS_SlavesRunAwayFaction)
;
VampireThrallFaction.setally(BIS_SlavesFaction, true, true)
VampireThrallFaction.setally(BIS_SlavesCutieFaction, true, true)
VampireThrallFaction.setally(BIS_SpecialBanditFaction, true, true)
VampireThrallFaction.setally(BIS_CapturedKnightFaction, true, true)
VampireThrallFaction.setenemy(BIS_SlavesReleasedFaction)
VampireThrallFaction.setenemy(BIS_SlavesCutieReleasedFaction)
VampireThrallFaction.setenemy(BIS_SlavesforPlayer)
VampireThrallFaction.setenemy(BIS_SlavesRunAwayFaction)
;
SkeeverFaction.setally(BIS_SlavesFaction, true, true)
SkeeverFaction.setally(BIS_SlavesCutieFaction, true, true)
SkeeverFaction.setally(BIS_SpecialBanditFaction, true, true)
SkeeverFaction.setally(BIS_CapturedKnightFaction, true, true)
SkeeverFaction.setenemy(BIS_SlavesReleasedFaction)
SkeeverFaction.setenemy(BIS_SlavesCutieReleasedFaction)
SkeeverFaction.setenemy(BIS_SlavesforPlayer)
SkeeverFaction.setenemy(BIS_SlavesRunAwayFaction)
;
NecromancerFaction.setally(BIS_SlavesFaction, true, true)
NecromancerFaction.setally(BIS_SlavesCutieFaction, true, true)
NecromancerFaction.setally(BIS_SpecialBanditFaction, true, true)
NecromancerFaction.setally(BIS_CapturedKnightFaction, true, true)
NecromancerFaction.setenemy(BIS_SlavesReleasedFaction)
NecromancerFaction.setenemy(BIS_SlavesCutieReleasedFaction)
NecromancerFaction.setenemy(BIS_SlavesforPlayer)
NecromancerFaction.setenemy(BIS_SlavesRunAwayFaction)
;
ChaurusFaction.setally(BIS_SlavesFaction, true, true)
ChaurusFaction.setally(BIS_SlavesCutieFaction, true, true)
ChaurusFaction.setally(BIS_SpecialBanditFaction, true, true)
ChaurusFaction.setally(BIS_CapturedKnightFaction, true, true)
ChaurusFaction.setenemy(BIS_SlavesReleasedFaction)
ChaurusFaction.setenemy(BIS_SlavesCutieReleasedFaction)
ChaurusFaction.setenemy(BIS_SlavesforPlayer)
ChaurusFaction.setenemy(BIS_SlavesRunAwayFaction)
;
ForswornFaction.setally(BIS_SlavesFaction, true, true)
ForswornFaction.setally(BIS_SlavesCutieFaction, true, true)
ForswornFaction.setally(BIS_SpecialBanditFaction, true, true)
ForswornFaction.setally(BIS_CapturedKnightFaction, true, true)
ForswornFaction.setenemy(BIS_SlavesReleasedFaction)
ForswornFaction.setenemy(BIS_SlavesCutieReleasedFaction)
ForswornFaction.setenemy(BIS_SlavesforPlayer)
ForswornFaction.setenemy(BIS_SlavesRunAwayFaction)
;
GiantFaction.setally(BIS_SlavesFaction, true, true)
GiantFaction.setally(BIS_SlavesCutieFaction, true, true)
GiantFaction.setally(BIS_SpecialBanditFaction, true, true)
GiantFaction.setally(BIS_CapturedKnightFaction, true, true)
GiantFaction.setenemy(BIS_SlavesReleasedFaction)
GiantFaction.setenemy(BIS_SlavesCutieReleasedFaction)
GiantFaction.setenemy(BIS_SlavesforPlayer)
GiantFaction.setenemy(BIS_SlavesRunAwayFaction)
;
MammothFaction.setally(BIS_SlavesFaction, true, true)
MammothFaction.setally(BIS_SlavesCutieFaction, true, true)
MammothFaction.setally(BIS_SpecialBanditFaction, true, true)
MammothFaction.setally(BIS_CapturedKnightFaction, true, true)
MammothFaction.setenemy(BIS_SlavesReleasedFaction)
MammothFaction.setenemy(BIS_SlavesCutieReleasedFaction)
MammothFaction.setenemy(BIS_SlavesforPlayer)
MammothFaction.setenemy(BIS_SlavesRunAwayFaction)
;
DunPlayerAllyFaction.setally(BIS_SlavesFaction, true, true)
DunPlayerAllyFaction.setally(BIS_SlavesCutieFaction, true, true)
DunPlayerAllyFaction.setally(BIS_SpecialBanditFaction, true, true)
DunPlayerAllyFaction.setally(BIS_CapturedKnightFaction, true, true)
DunPlayerAllyFaction.setally(BIS_SlavesReleasedFaction, true, true)
DunPlayerAllyFaction.setally(BIS_SlavesCutieReleasedFaction, true, true)
DunPlayerAllyFaction.setally(BIS_SlavesforPlayer)
DunPlayerAllyFaction.setally(BIS_SlavesRunAwayFaction, true, true)
;
dunBlackreachFalmerServantFaction.setally(BIS_SlavesFaction, true, true)
dunBlackreachFalmerServantFaction.setally(BIS_SlavesCutieFaction, true, true)
dunBlackreachFalmerServantFaction.setally(BIS_SpecialBanditFaction, true, true)
dunBlackreachFalmerServantFaction.setally(BIS_CapturedKnightFaction, true, true)
dunBlackreachFalmerServantFaction.setenemy(BIS_SlavesReleasedFaction)
dunBlackreachFalmerServantFaction.setenemy(BIS_SlavesCutieReleasedFaction)
dunBlackreachFalmerServantFaction.setenemy(BIS_SlavesforPlayer)
dunBlackreachFalmerServantFaction.setenemy(BIS_SlavesRunAwayFaction)
;
DLC2RieklingFaction.setally(BIS_SlavesFaction, true, true)
DLC2RieklingFaction.setally(BIS_SlavesCutieFaction, true, true)
DLC2RieklingFaction.setally(BIS_SpecialBanditFaction, true, true)
DLC2RieklingFaction.setally(BIS_CapturedKnightFaction, true, true)
DLC2RieklingFaction.setenemy(BIS_SlavesReleasedFaction)
DLC2RieklingFaction.setenemy(BIS_SlavesCutieReleasedFaction)
DLC2RieklingFaction.setenemy(BIS_SlavesforPlayer)
DLC2RieklingFaction.setenemy(BIS_SlavesRunAwayFaction)
;
DLC2MoragTongFaction.setally(BIS_SlavesFaction, true, true)
DLC2MoragTongFaction.setally(BIS_SlavesCutieFaction, true, true)
DLC2MoragTongFaction.setally(BIS_SpecialBanditFaction, true, true)
DLC2MoragTongFaction.setally(BIS_CapturedKnightFaction, true, true)
DLC2MoragTongFaction.setenemy(BIS_SlavesReleasedFaction)
DLC2MoragTongFaction.setenemy(BIS_SlavesCutieReleasedFaction)
DLC2MoragTongFaction.setenemy(BIS_SlavesforPlayer)
DLC2MoragTongFaction.setenemy(BIS_SlavesRunAwayFaction)
;
HagravenFaction.setally(BIS_SlavesFaction, true, true)
HagravenFaction.setally(BIS_SlavesCutieFaction, true, true)
HagravenFaction.setally(BIS_SpecialBanditFaction, true, true)
HagravenFaction.setally(BIS_CapturedKnightFaction, true, true)
HagravenFaction.setenemy(BIS_SlavesReleasedFaction)
HagravenFaction.setenemy(BIS_SlavesCutieReleasedFaction)
HagravenFaction.setenemy(BIS_SlavesforPlayer)
HagravenFaction.setenemy(BIS_SlavesRunAwayFaction)
endfunction




LeveledItem Property BISListWeaponLVLItem  Auto  
