59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
////////////////////////////////////////////
 | 
						|
//
 | 
						|
// Green Guardian Gargoyle Hold Attack
 | 
						|
//
 | 
						|
// CR_CLAW_GGG_R
 | 
						|
//
 | 
						|
// Keeps track of when the right claw hits
 | 
						|
// and applies the paralysis.
 | 
						|
//
 | 
						|
////////////////////////////////////////////
 | 
						|
 | 
						|
#include "NW_I0_SPELLS"
 | 
						|
#include "prc_inc_combmove"
 | 
						|
#include "prc_misc_const"
 | 
						|
 | 
						|
 | 
						|
void main()
 | 
						|
{
 | 
						|
 | 
						|
    object oGGG = OBJECT_SELF;
 | 
						|
    object oItem = GetSpellCastItem();
 | 
						|
    object oTarget = GetSpellTargetObject();
 | 
						|
    string sID = GetObjectUUID(oGGG);
 | 
						|
	int nDuration = 4;
 | 
						|
	
 | 
						|
	effect eVis = EffectVisualEffect(VFX_IMP_STUN);
 | 
						|
	effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED);
 | 
						|
	effect ePara = EffectParalyze();
 | 
						|
	effect eLink = EffectLinkEffects(ePara, eDur);
 | 
						|
	
 | 
						|
    string sRight =  sID + "RightClaw";
 | 
						|
	string sLeft =  sID + "LeftClaw";
 | 
						|
 | 
						|
    SetLocalInt(oTarget, sRight, 1);
 | 
						|
	
 | 
						|
	GetLocalInt(oTarget, sLeft);
 | 
						|
	
 | 
						|
	int iRight = GetLocalInt(oTarget, sRight);
 | 
						|
	int iLeft = GetLocalInt(oTarget, sLeft);
 | 
						|
	
 | 
						|
	if ((iRight + iLeft > 2) ||
 | 
						|
		(iRight + iLeft < 2))
 | 
						|
	{	
 | 
						|
		SetLocalInt(oTarget, sRight, 0);
 | 
						|
		SetLocalInt(oTarget, sLeft, 0);
 | 
						|
		return;
 | 
						|
	}
 | 
						|
	
 | 
						|
	if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 16, SAVING_THROW_TYPE_NONE))
 | 
						|
		{
 | 
						|
		//Apply the VFX impact and effects
 | 
						|
			ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
 | 
						|
			ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
 | 
						|
			
 | 
						|
			SetLocalInt(oTarget, sRight, 0);
 | 
						|
			SetLocalInt(oTarget, sLeft, 0);	
 | 
						|
		}		
 | 
						|
		
 | 
						|
} |