91 lines
2.3 KiB
Plaintext
91 lines
2.3 KiB
Plaintext
#include "nw_i0_tool"
|
|
/* Script generated by
|
|
Lilac Soul's NWN Script Generator, v. 1.6
|
|
|
|
For download info, please visit:
|
|
http://www.lilacsoul.revility.com */
|
|
|
|
void main()
|
|
{
|
|
object oPC;
|
|
|
|
oPC = GetItemActivator();
|
|
|
|
RewardPartyXP(150, oPC, FALSE);
|
|
|
|
object oTarget;
|
|
oTarget = GetItemActivatedTarget();
|
|
|
|
|
|
// *** visual effect stuff from tara *** //
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_S), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_S), GetLocation(oTarget));
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//the VFX will be applied to the WP's location instead
|
|
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
effect eEffect2;
|
|
eEffect2 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
|
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT)
|
|
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect2, oTarget));
|
|
else
|
|
DelayCommand(0.1, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, GetLocation(oTarget)));
|
|
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT)
|
|
DelayCommand(6.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect2, oTarget));
|
|
else
|
|
DelayCommand(6.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, GetLocation(oTarget)));
|
|
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT)
|
|
DelayCommand(12.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect2, oTarget));
|
|
else
|
|
DelayCommand(12.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, GetLocation(oTarget)));
|
|
|
|
|
|
|
|
// *** End of visual stuff *** //
|
|
|
|
|
|
|
|
effect eEffect;
|
|
eEffect = EffectHeal(200);
|
|
|
|
if ( GetItemPossessedBy(oPC, "potioncrystal2") != OBJECT_INVALID )
|
|
{
|
|
eEffect = EffectHeal(300);
|
|
}
|
|
|
|
// *** Fokus Token in action *** //
|
|
|
|
if (GetItemPossessedBy(oPC, "potioncrystal6")!= OBJECT_INVALID)
|
|
{
|
|
|
|
if (d100()<=25)
|
|
{
|
|
CreateItemOnObject("keheal3", oPC);
|
|
|
|
FloatingTextStringOnCreature("The Focus Stone emits a brief radiance as it restores your potion", oPC);
|
|
|
|
}
|
|
}
|
|
|
|
// *** End of focus Token *** //
|
|
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
DelayCommand(6.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget));
|
|
DelayCommand(12.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget));
|
|
|
|
}
|
|
|