enderalse/scripts/source/_00e_fs_mesmerizesc.psc

46 lines
1.3 KiB
Plaintext

Scriptname _00E_FS_MesmerizeSC extends ActiveMagicEffect
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster)
if PlayerREF.IsDetectedBy(akTarget)
_00E_FS_MesmerizeDetected.Show()
Faction crimeFaction = akTarget.GetCrimeFaction()
if crimeFaction != none
crimeFaction.ModCrimeGold(20, False)
endIf
akTarget.SendAssaultAlarm()
Else
PlayerREF.AddPerk(_00E_FS_MesmerizePerk)
float fBuff = ((PlayerREF.GetAV("Illusion")/6 as Int) + Self.GetMagnitude())/100
_00E_FS_MesmerizePerk.SetNthEntryValue(0, 0, (1.0-fBuff))
_00E_FS_MesmerizePerk.SetNthEntryValue(1, 0, (1.0+fBuff))
EndIf
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
PlayerREF.RemovePerk(_00E_FS_MesmerizePerk)
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
Actor Property PlayerREF Auto
Perk Property _00E_FS_MesmerizePerk Auto
Message Property _00E_FS_MesmerizeDetected Auto