diff --git a/ConjurableMaid.esp b/ConjurableMaid.esp index 5fa18d1..495a0c9 100644 --- a/ConjurableMaid.esp +++ b/ConjurableMaid.esp @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a89f6623d14dbfd9a771508c4b5553f375dac7ff3882130d2722f2f6a2b19e51 -size 69165 +oid sha256:fb651097fa215a7d06ee16ced242b48c252e0cff4db362e4f2446358d4981aaa +size 68531 diff --git a/Scripts/FCMMaidDialogueScript.pex b/Scripts/FCMMaidDialogueScript.pex new file mode 100644 index 0000000..313e84c --- /dev/null +++ b/Scripts/FCMMaidDialogueScript.pex @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d12ea18b5dd28481b7df1b45a8c6ecfdce37d8c683f13e5cfeba4530d9dbd0d +size 971 diff --git a/Scripts/FCMSummonMaidScript.pex b/Scripts/FCMSummonMaidScript.pex index 2e590a3..0b03f9b 100644 --- a/Scripts/FCMSummonMaidScript.pex +++ b/Scripts/FCMSummonMaidScript.pex @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2643060012cb2ab2f064dd064973290cb0d4b37f14e92d98e24f8cadf51c8dd3 -size 904 +oid sha256:67e438a173d614cdb430fb3495a716404b2c6a0f5b3fcc76ef47706a70595488 +size 1206 diff --git a/Scripts/FCMSummonMaidStaffScript.pex b/Scripts/FCMSummonMaidStaffScript.pex new file mode 100644 index 0000000..6dd5328 --- /dev/null +++ b/Scripts/FCMSummonMaidStaffScript.pex @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05aad4f36cd7ea4a16c563beab290f032e1fe1966aaa7ccd1e75ba53b4b0627c +size 718 diff --git a/Scripts/TIF__05011623.pex b/Scripts/TIF__05011623.pex index d6f4cfb..0ffb903 100644 --- a/Scripts/TIF__05011623.pex +++ b/Scripts/TIF__05011623.pex @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:102a2283c9131769a7c666d6478e249a5b7c78874c13a044bf54fe45281a1a60 -size 663 +oid sha256:3ebc5d2a44174b99a242bd104f9eebb31dcbabb8746b778ea25f0dde914ba0cc +size 716 diff --git a/Source/Scripts/FCMMaidDialogueScript.psc b/Source/Scripts/FCMMaidDialogueScript.psc new file mode 100644 index 0000000..a0203b0 --- /dev/null +++ b/Source/Scripts/FCMMaidDialogueScript.psc @@ -0,0 +1,8 @@ +Scriptname FCMMaidDialogueScript extends Quest +Spell Property ConjureMaidSpell Auto +Spell Property ConjurePermanentMaidSpell Auto +Spell Property ConjureSpectralMaidSpell Auto +Bool Function TryReturn() + Actor player = Game.GetPlayer() + return player.DispelSpell(ConjureMaidSpell) || player.DispelSpell(ConjurePermanentMaidSpell) || player.DispelSpell(ConjureSpectralMaidSpell) +EndFunction \ No newline at end of file diff --git a/Source/Scripts/FCMSummonMaidScript.psc b/Source/Scripts/FCMSummonMaidScript.psc index 703917e..4f0c3dc 100644 --- a/Source/Scripts/FCMSummonMaidScript.psc +++ b/Source/Scripts/FCMSummonMaidScript.psc @@ -2,9 +2,18 @@ Scriptname FCMSummonMaidScript extends activemagiceffect ObjectReference Property pMaidRef Auto Bool Property pIsSpectral Auto -Spell Property pReturnMaidSpell auto +Keyword Property pSummonMaidMagicKeyword Auto Event OnEffectStart(actor akTarget, actor akCaster) (pMaidRef as FCMSpectralMaidScript).TryConjure(pIsSpectral) - pReturnMaidSpell.Cast(akCaster, akCaster) -EndEvent \ No newline at end of file +EndEvent + + +Event OnEffectFinish(actor akTarget, actor akCaster) + if (Game.GetPlayer().hasMagicEffectWithKeyword(pSummonMaidMagicKeyword)) + Debug.Trace("Player still have return magic effect") + else + Debug.Trace("Start Returning") + (pMaidRef as FCMSpectralMaidScript).TryReturn() + endif +endEvent \ No newline at end of file diff --git a/Source/Scripts/FCMSummonMaidStaffScript.psc b/Source/Scripts/FCMSummonMaidStaffScript.psc new file mode 100644 index 0000000..12e5e9e --- /dev/null +++ b/Source/Scripts/FCMSummonMaidStaffScript.psc @@ -0,0 +1,7 @@ +Scriptname FCMSummonMaidStaffScript extends activemagiceffect + +Spell Property pConjureMaidSpell AUTO + +EVENT OnEffectStart(actor akTarget, actor akCaster) + pConjureMaidSpell.Cast(akCaster, akTarget) +EndEvent diff --git a/Source/Scripts/TIF__05011623.psc b/Source/Scripts/TIF__05011623.psc index 608877c..8d52be2 100644 --- a/Source/Scripts/TIF__05011623.psc +++ b/Source/Scripts/TIF__05011623.psc @@ -6,7 +6,7 @@ Scriptname TIF__05011623 Extends TopicInfo Hidden Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE -(akSpeaker as FCMSpectralMaidScript).TryReturn() +(GetOwningQuest() as FCMMaidDialogueScript).TryReturn() ;END CODE EndFunction ;END FRAGMENT