33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
void main()
|
|
{
|
|
|
|
object oPC = GetItemActivator();
|
|
object oTarget = GetItemActivatedTarget();
|
|
string sName= GetName(oPC);
|
|
location lTarget = GetLocation(oTarget);
|
|
|
|
if(GetIsObjectValid(GetItemPossessedBy(oPC, "Sapphire")))
|
|
{
|
|
|
|
object oItemToTake1;
|
|
oItemToTake1 = GetItemPossessedBy(oPC, "Sapphire");
|
|
|
|
if (GetItemStackSize(oItemToTake1) > 1)
|
|
{
|
|
SetItemStackSize(oItemToTake1, GetItemStackSize(oItemToTake1)-1);
|
|
}
|
|
else
|
|
{
|
|
DestroyObject(oItemToTake1);
|
|
}
|
|
|
|
effect eExplode = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
|
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectResurrection(), oTarget));
|
|
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectStunned(), oTarget, 2.0));
|
|
|
|
}
|
|
else FloatingTextStringOnCreature(sName + " has no Sapphire", oPC);
|
|
|
|
}
|