Compare commits
No commits in common. "92d518309e2c550316ab46ae20a8e516e670509c" and "a04013a5495d6ba4a4f47c682c1248cf8dbfb1f6" have entirely different histories.
92d518309e
...
a04013a549
11 changed files with 107 additions and 163 deletions
BIN
ConjurableMaid.esp
(Stored with Git LFS)
BIN
ConjurableMaid.esp
(Stored with Git LFS)
Binary file not shown.
BIN
Scripts/FCMConjurableMaidScript.pex
(Stored with Git LFS)
BIN
Scripts/FCMConjurableMaidScript.pex
(Stored with Git LFS)
Binary file not shown.
BIN
Scripts/FCMMaidArmedScript.pex
(Stored with Git LFS)
BIN
Scripts/FCMMaidArmedScript.pex
(Stored with Git LFS)
Binary file not shown.
BIN
Scripts/FCMSpectralMaidScript.pex
(Stored with Git LFS)
BIN
Scripts/FCMSpectralMaidScript.pex
(Stored with Git LFS)
Binary file not shown.
BIN
Scripts/FCMSummonMaidScript.pex
(Stored with Git LFS)
BIN
Scripts/FCMSummonMaidScript.pex
(Stored with Git LFS)
Binary file not shown.
BIN
Scripts/TIF__05011623.pex
(Stored with Git LFS)
BIN
Scripts/TIF__05011623.pex
(Stored with Git LFS)
Binary file not shown.
|
@ -1,70 +0,0 @@
|
|||
Scriptname FCMConjurableMaidScript extends Actor
|
||||
|
||||
ObjectReference Property pMaidHomeMarker Auto
|
||||
|
||||
EffectShader Property ConjureEffect Auto
|
||||
|
||||
Activator property ConjureEffectActivator Auto
|
||||
ImageSpaceModifier property ConjureImageSpace Auto
|
||||
|
||||
SPELL Property ConjureMaidSpell AUTO
|
||||
SPELL PROPERTY ConjureSpectralMaidSpell AUTO
|
||||
SPELL PROPERTY ConjureArmedMaidSpell AUTO
|
||||
SPELL Property ConjurePermanentMaidSpell AUTO
|
||||
|
||||
Bool Function TryDispelPlayer()
|
||||
Actor player = Game.GetPlayer()
|
||||
return player.DispelSpell(ConjureMaidSpell) || player.DispelSpell(ConjureSpectralMaidSpell) || player.DIspelSpell(ConjureArmedMaidSpell) || player.DispelSpell(ConjurePermanentMaidSpell)
|
||||
EndFunction
|
||||
|
||||
Bool Function TryConjure()
|
||||
if (isNearPlayer())
|
||||
PlayConjureEffect()
|
||||
return False
|
||||
EndIf
|
||||
return TryMoveto(game.GetPlayer())
|
||||
EndFunction
|
||||
|
||||
Bool Function TryReturn()
|
||||
return tryDispelPlayer() && TryMoveTo(pMaidHomeMarker)
|
||||
|
||||
EndFunction
|
||||
|
||||
Bool Function TryMoveTo(ObjectReference target)
|
||||
Disappear()
|
||||
Moveto(target)
|
||||
Appear()
|
||||
EndFunction
|
||||
|
||||
Function PlayConjureEffect()
|
||||
ConjureEffect.Play(Self, 1)
|
||||
EndFunction
|
||||
|
||||
Function Appear()
|
||||
StopCombat()
|
||||
Enable()
|
||||
If(IsNearPlayer())
|
||||
placeAtMe(ConjureEffectActivator)
|
||||
ConjureImageSpace.Apply()
|
||||
ConjureEffect.Play(Self, 1)
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
Function Disappear()
|
||||
If(IsNearPlayer())
|
||||
ConjureEffect.Play(Self, 1)
|
||||
Disable(true)
|
||||
utility.wait(1)
|
||||
Else
|
||||
Disable(True)
|
||||
EndIf
|
||||
StopCombat()
|
||||
EndFunction
|
||||
|
||||
EVENT onLoad()
|
||||
SetPlayerTeammate()
|
||||
ENDEVENT
|
||||
|
||||
EVENT OnDying(Actor killer)
|
||||
TryReturn()
|
||||
ENDEVENT
|
|
@ -1,53 +0,0 @@
|
|||
Scriptname FCMMaidArmedScript extends Actor
|
||||
|
||||
WEAPON Property BoundBow Auto
|
||||
|
||||
WEAPON Property BoundBattleAxe Auto
|
||||
|
||||
Ammo Property boundArrow Auto
|
||||
|
||||
GlobalVariable Property ArmedFlag Auto
|
||||
|
||||
Location Property HomeLocation Auto
|
||||
|
||||
Bool Function TryAddBoundWeapons()
|
||||
ArmedFlag.SetValue(1)
|
||||
If(HasBoundWeapons())
|
||||
return False
|
||||
Else
|
||||
AddItem(BoundBow, 1)
|
||||
AddItem(BoundBattleAxe, 1)
|
||||
AddItem(BoundArrow, 1)
|
||||
return True
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
Bool Function TryRemoveBoundWeapons()
|
||||
ArmedFlag.SetValue(0)
|
||||
If(HasBoundWeapons())
|
||||
RemoveItem(BoundBow, 1)
|
||||
RemoveItem(BoundBattleAxe, 1)
|
||||
RemoveItem(BoundArrow, 1)
|
||||
return True
|
||||
Else
|
||||
return False
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
Bool Function HasBoundWeapons()
|
||||
return GetItemCount(BoundBow)
|
||||
EndFunction
|
||||
|
||||
Function SetIsArmed(Bool b)
|
||||
if(b)
|
||||
TryAddBoundWeapons()
|
||||
else
|
||||
TryRemoveBoundWeapons()
|
||||
endif
|
||||
EndFunction
|
||||
|
||||
Event OnLocationChange(Location oldLoc, Location newLoc)
|
||||
If(newLoc == HomeLocation)
|
||||
SetIsArmed(False)
|
||||
EndIf
|
||||
EndEvent
|
|
@ -4,16 +4,43 @@ SPELL PROPERTY pGhostAbilityNew AUTO
|
|||
SPELL PROPERTY pGhostResistsAbility AUTO
|
||||
|
||||
GlobalVariable Property pMaidSpectralFlag Auto
|
||||
Location Property HomeLocation Auto
|
||||
GlobalVariable Property pMaidMovingFlag Auto
|
||||
ObjectReference Property pMaidHomeMarker Auto
|
||||
|
||||
EffectShader Property ConjureEffect Auto
|
||||
|
||||
Activator property ConjureEffectActivator Auto
|
||||
ImageSpaceModifier property ConjureImageSpace Auto
|
||||
|
||||
SPELL Property pConjureMaidSpell AUTO
|
||||
SPELL PROPERTY pConjureSpectralMaidSpell AUTO
|
||||
|
||||
Bool Function TryDispelPlayer()
|
||||
Actor player = Game.GetPlayer()
|
||||
return player.DispelSpell(pConjureMaidSpell) || player.DispelSpell(pConjureSpectralMaidSpell)
|
||||
EndFunction
|
||||
|
||||
Bool Function TryConjure(Bool isSpectral)
|
||||
if (isNearPlayer())
|
||||
return False
|
||||
EndIf
|
||||
if (IsSpectral)
|
||||
SetIsSpectral(True)
|
||||
endif
|
||||
return TryMoveto(game.GetPlayer())
|
||||
EndFunction
|
||||
|
||||
Bool Function TryReturn()
|
||||
|
||||
return tryDispelPlayer() && TryMoveTo(pMaidHomeMarker)
|
||||
|
||||
EndFunction
|
||||
|
||||
Function SetIsSpectral(Bool b)
|
||||
if (b)
|
||||
pMaidSpectralFlag.SetValue(1)
|
||||
AddSpectralAbilities()
|
||||
else
|
||||
pMaidSpectralFlag.SetValue(0)
|
||||
RemoveSpectralAbilities()
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
|
@ -25,30 +52,79 @@ Bool Function GetIsSpectral()
|
|||
endIF
|
||||
EndFunction
|
||||
|
||||
Function AddSpectralAbilities()
|
||||
addSpell(pGhostAbilityNew)
|
||||
addSpell(pGhostResistsAbility)
|
||||
EndFunction
|
||||
Function RemoveSpectralAbilities()
|
||||
removeSpell(pGhostAbilityNew)
|
||||
removeSpell(pGhostResistsAbility)
|
||||
Bool Function GetIsMoving()
|
||||
if (pMaidMovingFlag.getValue() == 1)
|
||||
return True
|
||||
Else
|
||||
Return False
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
FUNCTION RestoreSpectralAbilities()
|
||||
if (GetIsSpectral())
|
||||
AddSpectralAbilities()
|
||||
Function SetIsMoving(Bool b)
|
||||
If (b)
|
||||
pMaidMovingFlag.SetValue(1)
|
||||
Else
|
||||
RemoveSpectralAbilities()
|
||||
Endif
|
||||
pMaidMovingFlag.SetValue(0)
|
||||
endIf
|
||||
EndFunction
|
||||
|
||||
|
||||
Bool Function TryMoveTo(ObjectReference target)
|
||||
If(GetIsMoving())
|
||||
return False
|
||||
Else
|
||||
SetIsMoving(True)
|
||||
Disappear()
|
||||
Moveto(target)
|
||||
Appear()
|
||||
SetIsMoving(False)
|
||||
Return True
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
Function Appear()
|
||||
StopCombat()
|
||||
Enable()
|
||||
If(IsNearPlayer())
|
||||
placeAtMe(ConjureEffectActivator)
|
||||
ConjureImageSpace.Apply()
|
||||
ConjureEffect.Play(Self, 1)
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
Function DisAppear()
|
||||
SetIsSpectral(false)
|
||||
If(IsNearPlayer())
|
||||
ConjureEffect.Play(Self, 1)
|
||||
Disable(true)
|
||||
utility.wait(1)
|
||||
Else
|
||||
Disable(True)
|
||||
EndIf
|
||||
StopCombat()
|
||||
EndFunction
|
||||
|
||||
FUNCTION UpdateSpectralAbilities()
|
||||
if (pMaidSpectralFlag.getValue() == 1)
|
||||
SELF.addSpell(pGhostAbilityNew)
|
||||
SELF.addSpell(pGhostResistsAbility)
|
||||
else
|
||||
SELF.removeSpell(pGhostAbilityNew)
|
||||
SELF.removeSpell(pGhostResistsAbility)
|
||||
endIF
|
||||
EndFUNCTION
|
||||
|
||||
|
||||
EVENT onLoad()
|
||||
RestoreSpectralAbilities()
|
||||
SetPlayerTeammate()
|
||||
updateSpectralAbilities()
|
||||
SetIsMoving(False)
|
||||
ENDEVENT
|
||||
|
||||
EVENT onLocationChange(Location akOldLoc, Location akNewLoc)
|
||||
If(akNewLoc == HomeLocation)
|
||||
SetIsSpectral(0)
|
||||
EndIf
|
||||
ENDEVENT
|
||||
updateSpectralAbilities()
|
||||
ENDEVENT
|
||||
|
||||
EVENT OnDying(Actor killer)
|
||||
TryReturn()
|
||||
ENDEVENT
|
||||
|
|
|
@ -2,13 +2,10 @@ Scriptname FCMSummonMaidScript extends activemagiceffect
|
|||
|
||||
ObjectReference Property pMaidRef Auto
|
||||
Bool Property pIsSpectral Auto
|
||||
Bool Property pIsArmed Auto
|
||||
Keyword Property pSummonMaidMagicKeyword Auto
|
||||
|
||||
Event OnEffectStart(actor akTarget, actor akCaster)
|
||||
(pMaidRef as FCMSpectralMaidScript).SetIsSpectral(pIsSpectral)
|
||||
(pMaidRef as FCMMaidArmedScript).SetIsArmed(pIsArmed)
|
||||
(pMaidRef as FCMConjurableMaidScript).TryConjure()
|
||||
(pMaidRef as FCMSpectralMaidScript).TryConjure(pIsSpectral)
|
||||
EndEvent
|
||||
|
||||
|
||||
|
@ -17,6 +14,6 @@ Event OnEffectFinish(actor akTarget, actor akCaster)
|
|||
Debug.Trace("Player still have return magic effect")
|
||||
else
|
||||
Debug.Trace("Start Returning")
|
||||
(pMaidRef as FCMConjurableMaidScript).TryReturn()
|
||||
(pMaidRef as FCMSpectralMaidScript).TryReturn()
|
||||
endif
|
||||
endEvent
|
|
@ -6,7 +6,7 @@ Scriptname TIF__05011623 Extends TopicInfo Hidden
|
|||
Function Fragment_0(ObjectReference akSpeakerRef)
|
||||
Actor akSpeaker = akSpeakerRef as Actor
|
||||
;BEGIN CODE
|
||||
(akSpeaker as FCMConjurableMaidScript).TryReturn()
|
||||
(GetOwningQuest() as FCMMaidDialogueScript).TryReturn()
|
||||
;END CODE
|
||||
EndFunction
|
||||
;END FRAGMENT
|
||||
|
|
Loading…
Add table
Reference in a new issue