Scriptname __BeginningQuest02Script extends Quest  Conditional

Int Property PlugsFound Auto Hidden Conditional
Quest Property ThisQuest Auto
Actor Property PlayerRef Auto
Int Property FriendsLucia Auto Hidden Conditional
Int Property TalkedLucia Auto Hidden Conditional
GlobalVariable Property ButtplugsCraftable Auto
SexLabFramework Property SexLab Auto
ReferenceAlias Property Guard Auto
Actor Property Mila Auto
Actor Property Dagny Auto
ObjectReference Property DagnyMarker Auto

ReferenceAlias Property BjornRA Auto
ReferenceAlias Property NicoletteRA AUto
ReferenceAlias Property BjornActorRA Auto
ReferenceAlias Property NicoletteActorRA Auto


Function PlayerPrepareCry()
Utility.Wait(2.0)
debug.messagebox("I... can feel tears welling up into my eyes. I need to find a place alone before I burst into tears...!")
EndFunction

;Shes too slow
Function MoveDagny()
Dagny.MoveTo(DagnyMarker)
EndFunction


Function GetBjornNicolette()
BjornRA.ForceRefTo(BjornActorRA.GetActorReference())
NicoletteRA.ForceRefTo(NicoletteActorRA.GetActorReference())
EndFunction


Function ModLuciaFriendship(int value)
FriendsLucia = value
TalkedLucia = 1
; 1 is friends, -1 is not friends, 0 is unchosen
EndFunction

Function MakeFriend(actor akActor)
akActor.SetRelationshipRank(PlayerRef,1)
EndFunction

Function MakePlugsCraftable()
debug.notification("Buttplugs are now craftable at any forge")
ButtplugsCraftable.SetValue(1)
EndFunction

Message Property M1 Auto
Message Property M2 Auto
Message Property M3 Auto
Message Property M4 Auto
Message Property M5 Auto
Message Property M6 Auto
Message Property M7 Auto
Message Property M8 Auto
Message Property M9 Auto
Message Property M10 Auto
Message Property M11 Auto
Message Property M12 Auto
Message Property M13 Auto
Message Property M14 Auto
Message Property M15 Auto
Message Property M16 Auto
Message Property M17 Auto
Message Property M18 Auto
Message Property M19 Auto
Message Property M20 Auto
Message Property M21 Auto
Message Property M22 Auto



Function PlayerCry()
M1.Show()
M2.Show()
M3.Show()
;debug.messagebox("Sniffle... I think this would be a pretty private place to cry...!")
;debug.messagebox(" *sniffle* Aggghhhh...! How could I let her steal that from me?")
;debug.messagebox("Why? Why? Why? Aughhhh....!!! Mmmmmpppphhhh....!")
BeginningQuest02.SetStage(27)
EndFunction
Quest Property BeginningQuest02  Auto  

Function JustGotSatchel()
M4.Show()
;debug.messagebox("I've got some time before I need to be home. I should play with some other kids in town before I head back.")
RegisterForSingleUpdateGameTime(30)
EndFunction

Function Stage37Thoughts()
M5.Show()
;debug.messagebox("Up to her bedroom with her? I wonder...")
EndFunction

Function Stage40Thoughts()
M6.Show()
M7.Show()
;debug.messagebox("Once she leaves, maybe I can look around her room and see if I can find anything.")
;debug.messagebox("Her diary might be a good place to start")
EndFunction

Function Stage47Thoughts()
M8.Show()
M9.Show()
M10.Show()
utility.wait(1.5)
M11.Show()
M12.Show()
;debug.messagebox("What... is this? Is this what dad had me pick up from Belethor's?")
;debug.messagebox("It must be important to dad somehow. Dagny's journal said that she hid the other ones around dragonsreach.")
;debug.messagebox("Agh...! I think I hear someone just outside the room!")
;utility.wait(1.5)
;debug.messagebox("If they think I stole something, they'll check my pockets for sure! I need to hide this somewhere they won't look...!")
;debug.messagebox("I... think I know where I can hide it. But it's going to hurt...")
EndFunction

Function Stage49Thoughts()
M13.Show()
M14.Show()
;debug.messagebox("(You slowly slide the plug between your soft cheeks and in further. With a little effort, you get it in. It stretches you in a way you've never felt before)")
;debug.messagebox("Ouch...! This thing hurts! Ugh, I'd better keep calm, at least until I get out of here...!")
EndFunction

Function Stage50Thoughts()
M15.Show()
M16.Show()
M17.Show()
;debug.messagebox("Phew... that was close! I would have been in serious trouble for sure if they found out...!")
;debug.messagebox("Ow... this thing still hurts. But it also kind of feels good. Maybe I'll leave it in for a bit longer.")
;debug.messagebox("Dagny's journal said that she hid the other ones around dragonsreach. I should look for them.")
EndFunction

Function Stage55Thoughts()
M18.Show()
M19.Show()
;debug.messagebox("I've found 4 so far. I don't think there are any more. I should head back home.")
;debug.messagebox("These guards will probably get suspicious if I keep hanging around. Or Dagny will try to order me around more...")
EndFunction


Function FoundPlug()
PlugsFound = PlugsFound + 1
if PlugsFound == 1
M20.Show()
;debug.messagebox("Yay! Found one. I guess Dagny wasn't too good at hiding these after all!")
elseif PlugsFound == 2
;debug.messagebox("Two down! Yay!")
M21.Show()
elseif PlugsFound >= 3
;debug.messagebox("Third one. Woo! This one definitely smells like Dagny's butt. I guess she did use it after all?")
M22.Show()
ThisQuest.SetStage(55)
endif
EndFunction

Function GuardBlowjob()
SexLab.QuickStart(PlayerRef,Guard.GetActorRef(),none,none,none,none,"MyHook","blowjob")
RegisterForModEvent("AnimationEnding_MyHook","SexAnimEnded")
EndFunction

Function MilaFeelup()
sexLab.QuickStart(PlayerRef,Mila,none,none,none,none,"MilaTouch","kiss")
RegisterForModEvent("AnimationEnding_MilaTouch","MilaTouched")
EndFunction

Event MilaTouched(string eventname, string argstring, float argnum, form sender)
ThisQuest.SetStage(29)
EndEvent

Function DagnySex()
SexLab.QuickStart(Dagny,PlayerRef,none,none,none,none,"DagnyScene","cunnilingus")
RegisterForModEvent("AnimationEnding_DagnyScene","DagnyEnded")
EndFunction

Event DagnyEnded(string eventname, string argstring, float argnum, form sender)
ThisQuest.SetStage(39)
EndEvent

Event SexAnimEnded(string eventname, string argstring, float argnum, form sender)
ThisQuest.SetStage(50)
EndEvent

Event OnUpdateGameTime()
int thisStage = ThisQuest.GetStage()
if thisStage == 10 && thisStage < 20
ThisQuest.SetObjectiveDisplayed(7)
endif
EndEvent