generated from Jaysyn/ModuleTemplate
39 lines
909 B
Plaintext
39 lines
909 B
Plaintext
string sDeny;
|
|
/* Script generated by
|
|
Lilac Soul's NWN Script Generator, v. 1.6
|
|
|
|
For download info, please visit:
|
|
http://www.lilacsoul.revility.com */
|
|
|
|
//Put this OnOpen
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetLastOpenedBy();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
if (GetItemPossessedBy(oPC, "VistaniCharm")== OBJECT_INVALID)
|
|
{
|
|
sDeny="The invisible barrier that barred your entry dissipates in the presence of the charm... ";
|
|
|
|
SendMessageToPC(oPC, sDeny);
|
|
|
|
return;
|
|
}
|
|
|
|
object oTarget;
|
|
oTarget = OBJECT_SELF;
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//apply to the WP's location instead
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DISPEL_GREATER), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DISPEL_GREATER), GetLocation(oTarget));
|
|
|
|
}
|
|
|