enderalse/source/scripts/_00e_theriantrophist_transformsc.psc

62 lines
2.1 KiB
Plaintext
Raw Normal View History

Scriptname _00E_Theriantrophist_TransformSC extends _00E_Theriantrophist_WerewolfPotion
_FS_TheriantrophistControlQuest Property controlQuest Auto
Message Property _00E_Theriantrophist_CannotDrinkPotion Auto
Message Property _00E_Theriantrophist_ForceTransformBackMessage Auto
Perk Property _00E_Class_Theriantrophist_P01_StrongBlood Auto
Spell Property _00E_Theriantrophist_PoisonOnWerewolfPotion Auto
GlobalVariable Property _00E_FS_Theriantrophist_AllowTemporaryTransform Auto
Actor Property _00E_MC_JesparREF Auto
Actor Property _00E_MC_CaliaREF Auto
Topic Property JesparDialogue_ForgottenStories_Theriantrophist_CommentsTopic Auto
Topic Property CaliaDialogue_ForgottenStories_Theriantrophist_CommentsTopic Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
if akTarget == Game.GetPlayer()
if !akTarget.HasPerk(_00E_Class_Theriantrophist_P01_StrongBlood)
_00E_Theriantrophist_CannotDrinkPotion.Show()
_00E_Theriantrophist_PoisonOnWerewolfPotion.Cast(akTarget)
self.dispel()
return
Endif
_00E_Theriantrophist_PlayerAsWerewolf playerWhileTransformedAlias = controlQuest.playerWhileTransformed
if _00E_FS_Theriantrophist_AllowTemporaryTransform.GetValueInt() == 0
if !playerWhileTransformedAlias.CanBeTransformed(akTarget.getCurrentLocation())
if EnderalLib.IsDLLLoaded()
Debug.Notification(_00E_Theriantrophist_ForceTransformBackMessage.getName())
_RestorePotion()
else
; TODO: Replace the string with a localizable message.
Debug.Notification("You cannot transform here.")
endif
self.dispel()
return
Endif
endif
if (!playerWhileTransformedAlias.IsTransformed())
_AddArcaneFever()
playerWhileTransformedAlias.ForceRefTo(akTarget)
playerWhileTransformedAlias.Transform(self.getDuration() as int)
Endif
If _00E_MC_CaliaREF.GetDistance(Game.GetPlayer()) <= 700
_00E_MC_CaliaREF.Say(CaliaDialogue_ForgottenStories_Theriantrophist_CommentsTopic)
ElseIf _00E_MC_JesparREF.GetDistance(Game.GetPlayer()) <= 700
_00E_MC_JesparREF.Say(JesparDialogue_ForgottenStories_Theriantrophist_CommentsTopic)
endif
self.dispel()
endif
Endevent