2025-03-09 13:23:53 +09:00
|
|
|
Scriptname FCMSpectralMaidScript extends Actor
|
|
|
|
|
|
|
|
SPELL PROPERTY pGhostAbilityNew AUTO
|
|
|
|
SPELL PROPERTY pGhostResistsAbility AUTO
|
|
|
|
|
|
|
|
GlobalVariable Property pMaidSpectralFlag Auto
|
2025-03-14 21:55:41 +09:00
|
|
|
Location Property HomeLocation Auto
|
2025-03-09 13:23:53 +09:00
|
|
|
|
2025-03-11 07:17:10 +09:00
|
|
|
|
|
|
|
Function SetIsSpectral(Bool b)
|
|
|
|
if (b)
|
|
|
|
pMaidSpectralFlag.SetValue(1)
|
2025-03-14 21:55:41 +09:00
|
|
|
AddSpectralAbilities()
|
2025-03-11 07:17:10 +09:00
|
|
|
else
|
|
|
|
pMaidSpectralFlag.SetValue(0)
|
2025-03-14 21:55:41 +09:00
|
|
|
RemoveSpectralAbilities()
|
2025-03-11 07:17:10 +09:00
|
|
|
EndIf
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Bool Function GetIsSpectral()
|
|
|
|
if (pMaidSpectralFlag.getValue() == 1)
|
|
|
|
return True
|
|
|
|
Else
|
|
|
|
Return False
|
|
|
|
endIF
|
|
|
|
EndFunction
|
|
|
|
|
2025-03-14 21:55:41 +09:00
|
|
|
Function AddSpectralAbilities()
|
|
|
|
addSpell(pGhostAbilityNew)
|
|
|
|
addSpell(pGhostResistsAbility)
|
2025-03-11 07:17:10 +09:00
|
|
|
EndFunction
|
2025-03-14 21:55:41 +09:00
|
|
|
Function RemoveSpectralAbilities()
|
|
|
|
removeSpell(pGhostAbilityNew)
|
|
|
|
removeSpell(pGhostResistsAbility)
|
2025-03-11 07:17:10 +09:00
|
|
|
EndFunction
|
|
|
|
|
2025-03-14 21:55:41 +09:00
|
|
|
FUNCTION RestoreSpectralAbilities()
|
|
|
|
if (GetIsSpectral())
|
|
|
|
AddSpectralAbilities()
|
2025-03-11 07:17:10 +09:00
|
|
|
Else
|
2025-03-14 21:55:41 +09:00
|
|
|
RemoveSpectralAbilities()
|
|
|
|
Endif
|
2025-03-11 07:17:10 +09:00
|
|
|
EndFunction
|
|
|
|
|
2025-03-09 13:23:53 +09:00
|
|
|
|
|
|
|
EVENT onLoad()
|
2025-03-14 21:55:41 +09:00
|
|
|
RestoreSpectralAbilities()
|
2025-03-09 13:23:53 +09:00
|
|
|
ENDEVENT
|
|
|
|
|
|
|
|
EVENT onLocationChange(Location akOldLoc, Location akNewLoc)
|
2025-03-14 21:55:41 +09:00
|
|
|
If(akNewLoc == HomeLocation)
|
|
|
|
SetIsSpectral(0)
|
|
|
|
EndIf
|
|
|
|
ENDEVENT
|