But...this will:
void main()
{
object oPC = GetLastKiller();
while (GetIsObjectValid(GetMaster(oPC)))
{
oPC=GetMaster(oPC);
}
if (!GetIsPC(oPC)) return;
object oTarget;
object oSpawn;
location lTarget;
oTarget = oPC;
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_ITEM, "rb_dagger", lTarget);
oTarget = oSpawn;
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), GetLocation(oTarget)));
}
Put this in the module, and either #include it to the OnDeath, or replace the OnDeath script of any boss with this. It will create the appropriate item beside the PC. Note that you will have to change the OBJECT_TYPE_ITEM resref call to the appropriate item's resref.
|