;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 13
Scriptname QF_BaboFollowerCLQ04_070E741D Extends Quest Hidden

;BEGIN ALIAS PROPERTY MarkarthJarl
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_MarkarthJarl Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY BaboFollowerRef01
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_BaboFollowerRef01 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Location
;ALIAS PROPERTY TYPE LocationAlias
LocationAlias Property Alias_Location Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY FoeRef01
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_FoeRef01 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY FoeRef02
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_FoeRef02 Auto
;END ALIAS PROPERTY

;BEGIN FRAGMENT Fragment_5
Function Fragment_5()
;BEGIN CODE
BaboFollowerCLQ04Scene02.start()
(Alias_BaboFollowerRef01.getref() as actor).EvaluatePackage()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_1
Function Fragment_1()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
BaboFollowerCLQ04Scene01.stop()
(Alias_BaboFollowerRef01.getref() as actor).EvaluatePackage()
kmyQuest.GoStateFirst()
kmyQuest.RegisterUpdate(24)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_6
Function Fragment_6()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
(BaboFollowerCLQ04DoorRef01 as BaboDefaultLockedDoorScript).ResetTrigger()
CLQ04SceneTriggerRef01.Enable()
Utility.wait(1.0)
(CLQ04SceneTriggerRef01 as BaboFollowerSceneTriggerScript).ResetTrigger()
Utility.wait(1.0)
CLQ04SceneTriggerRef01.Disable()

kmyQuest.SwitchXmarker(BaboFollowerCLQ04DMarker, BaboFollowerCLQ04EMarker)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_2
Function Fragment_2()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
kmyQuest.SwitchXmarker(BaboFollowerCLQ04EMarker, BaboFollowerCLQ04DMarker)
kmyQuest.DSlaveFaction((Alias_BaboFollowerRef01.getref() as actor))
kmyQuest.MovetoSpot((Alias_BaboFollowerRef01.getref() as actor), BaboFollowerCLQ04Marker03)
(Alias_BaboFollowerRef01.getref() as actor).EvaluatePackage()
kmyQuest.Getnaked((Alias_BaboFollowerRef01.getref() as actor), 2)
kmyQuest.SpawnEnemies(BaboForswornMelee, BaboFollowerCLQ04Marker04, 4, Alias_FoeRef01)
kmyQuest.SpawnEnemies(BaboForswornMelee, BaboFollowerCLQ04Marker05, 3, Alias_FoeRef02)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_7
Function Fragment_7()
;BEGIN CODE
;Standingby
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_8
Function Fragment_8()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
kmyQuest.DRunawayFaction((Alias_BaboFollowerRef01.getref() as actor))
(Alias_BaboFollowerRef01.getref() as actor).EvaluatePackage()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_3
Function Fragment_3()
;BEGIN CODE
;Standingby
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_4
Function Fragment_4()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
BaboFollowerCLQ04Scene02.stop()
kmyQuest.DReleasedFaction((Alias_BaboFollowerRef01.getref() as actor))
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
;Debug.Trace("BaboFollowerCLQ04 Started")
kmyQuest.SpawnFolloweratPlace(BaboFollowerCLQ04Marker01, 1)
Utility.Wait(1.0)
(Alias_BaboFollowerRef01.getref() as actor).EvaluatePackage()
CLQ04SceneTriggerRef01.Enable()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_12
Function Fragment_12()
;BEGIN CODE
Game.getplayer().additem(BaboFollowerGift04, 1)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_10
Function Fragment_10()
;BEGIN CODE
;Decision Time
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_11
Function Fragment_11()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
kmyQuest.SwitchXmarker(BaboFollowerCLQ04DMarker, BaboFollowerCLQ04EMarker)
kmyQuest.DFollowerFaction((Alias_BaboFollowerRef01.getref() as actor))
(Alias_BaboFollowerRef01.getref() as actor).EvaluatePackage()
Alias_FoeRef01.GetReference().DeleteWhenAble()
Alias_FoeRef02.GetReference().DeleteWhenAble()
Alias_FoeRef01.Clear()
Alias_FoeRef02.Clear()
CLQ04SceneTriggerRef01.Disable()
SendModEvent("OnPlusRescueCount")
Utility.wait(5.0)
BFollowerCLQ04Switch.setvalue(1)
;Stop()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_9
Function Fragment_9()
;BEGIN AUTOCAST TYPE BaboFollowerMasterScript
Quest __temp = self as Quest
BaboFollowerMasterScript kmyQuest = __temp as BaboFollowerMasterScript
;END AUTOCAST
;BEGIN CODE
kmyQuest.GetBasic((Alias_BaboFollowerRef01.getref() as actor), 1)
;END CODE
EndFunction
;END FRAGMENT

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

ObjectReference Property CLQ04SceneTriggerRef01  Auto  

ObjectReference Property BaboFollowerCLQ04Marker01  Auto  

ObjectReference Property BaboFollowerCLQ04Marker02  Auto  

Scene Property BaboFollowerCLQ04Scene01  Auto  

ObjectReference Property BaboFollowerCLQ04EMarker  Auto  

ObjectReference Property BaboFollowerCLQ04DMarker  Auto  

ObjectReference Property BaboFollowerCLQ04Marker03  Auto  

ObjectReference Property BaboFollowerCLQ04DoorRef01  Auto  

Scene Property BaboFollowerCLQ04Scene02  Auto  

GlobalVariable Property BFollowerCLQ04Switch  Auto  

ObjectReference Property BaboFollowerCLQ04Marker04  Auto  

ObjectReference Property BaboFollowerCLQ04Marker05  Auto  

ActorBase Property BaboForswornMelee  Auto  

LeveledItem Property BaboFollowerGift04  Auto  
