Updated Release Archive
Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
This commit is contained in:
70
nwn/trunk/spells/nw_s0_knock.nss
Normal file
70
nwn/trunk/spells/nw_s0_knock.nss
Normal file
@@ -0,0 +1,70 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Knock
|
||||
//:: NW_S0_Knock
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Opens doors not locked by magical means.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Georg 2003/07/31 - Added signal event and custom door flags
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
object oTarget;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
float fDelay;
|
||||
int nResist;
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
SignalEvent(oTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId()));
|
||||
fDelay = PRCGetRandomDelay(0.5, 2.5);
|
||||
if(!GetPlotFlag(oTarget) && GetLocked(oTarget))
|
||||
{
|
||||
nResist = GetDoorFlag(oTarget,DOOR_FLAG_RESIST_KNOCK);
|
||||
if (nResist == 0)
|
||||
{
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
AssignCommand(oTarget, ActionUnlockObject(oTarget));
|
||||
}
|
||||
else if (nResist == 1)
|
||||
{
|
||||
FloatingTextStrRefOnCreature(83887,OBJECT_SELF); //
|
||||
}
|
||||
}
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
Reference in New Issue
Block a user