enderalse/source/scripts/tsc_throwingweapons_ammoscript.psc

24 lines
632 B
Plaintext

Scriptname Tsc_ThrowingWeapons_AmmoScript extends activemagiceffect
Event OnEffectStart(Actor akTarget, Actor akCaster)
mySelf = akTarget
endEvent
Event OnDying(Actor akKiller)
int size = dummyList.GetSize()
int numItems = mySelf.GetItemCount(dummyList)
if (numItems > 0)
While (size > 0)
size -= 1
numItems = mySelf.GetItemCount(dummyList.GetAt(size))
if (numItems > 0)
mySelf.AddItem(ScrollList.GetAt(size), numItems, true)
mySelf.RemoveItem(dummyList.GetAt(size), numItems, true)
endIf
endWhile
endIf
endEvent
Actor mySelf
FormList Property ScrollList Auto
FormList Property dummyList Auto