enderalse/scripts/source/boundjavelineffectscript.psc

24 lines
848 B
Plaintext

Scriptname BoundJavelinEffectScript extends ActiveMagicEffect
Ammo Property boundJavelin Auto
MagicEffect Property _B03EnchBoundJavelinFX Auto
EVENT OnEffectStart(Actor Target, Actor Caster)
; debug.trace("Bound Javelin - Effect Starting - add and equip bound javelins")
caster.additem(boundJavelin,20,TRUE)
caster.equipItem(boundJavelin, TRUE, TRUE)
endEVENT
EVENT onLoad()
; debug.trace("Bound Javelin caught Cell Attach")
if !(getCasterActor().hasMagicEffect(_B03EnchBoundJavelinFX ))
; debug.trace("Bound Javelin - Cell Attached, script active, but effect not found on "+getCasterActor())
dispel()
endif
endEVENT
EVENT OnEffectFinish(Actor Target, Actor Caster)
; debug.trace("Bound Javelin - Effect Finishing, remove any bound javelins")
caster.removeitem(boundJavelin,caster.getItemCount(boundJavelin),TRUE)
endEVENT