generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
44
_module/nss/cavedooropen2.nss
Normal file
44
_module/nss/cavedooropen2.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
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 OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetItemPossessedBy(oPC, "VistaniCharm")== OBJECT_INVALID)
|
||||
{
|
||||
sDeny="The charm does its work as the magic barrier dissipates...";
|
||||
|
||||
SendMessageToPC(oPC, sDeny);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetObjectByTag("wolftemple");
|
||||
|
||||
SetLocked(oTarget, FALSE);
|
||||
|
||||
AssignCommand(oTarget, ActionOpenDoor(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));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user