Fix script about conjure/return

This commit is contained in:
fluo10 2025-03-14 09:34:25 +09:00
parent 1faacce0dc
commit a04013a549
9 changed files with 40 additions and 10 deletions

BIN
ConjurableMaid.esp (Stored with Git LFS)

Binary file not shown.

BIN
Scripts/FCMMaidDialogueScript.pex (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Scripts/FCMSummonMaidScript.pex (Stored with Git LFS)

Binary file not shown.

BIN
Scripts/FCMSummonMaidStaffScript.pex (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Scripts/TIF__05011623.pex (Stored with Git LFS)

Binary file not shown.

View file

@ -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

View file

@ -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
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

View file

@ -0,0 +1,7 @@
Scriptname FCMSummonMaidStaffScript extends activemagiceffect
Spell Property pConjureMaidSpell AUTO
EVENT OnEffectStart(actor akTarget, actor akCaster)
pConjureMaidSpell.Cast(akCaster, akTarget)
EndEvent

View file

@ -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