Initial module commit
Initial module commit.
This commit is contained in:
28
_module/nss/stonebat.nss
Normal file
28
_module/nss/stonebat.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
// Petrify any nearby statues
|
||||
|
||||
void main()
|
||||
{
|
||||
object oStatue = GetNearestObjectByTag("NW_BAT");
|
||||
effect eStone = EffectPetrify();
|
||||
int n = 1;
|
||||
float fDistance;
|
||||
while(oStatue != OBJECT_INVALID)
|
||||
{
|
||||
fDistance = GetDistanceBetween(OBJECT_SELF, oStatue);
|
||||
if(fDistance >= 35.0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(GetLocalInt(oStatue, "IMMUNE") == 0)
|
||||
{
|
||||
SetAILevel(oStatue, AI_LEVEL_HIGH);
|
||||
SetLocalInt(oStatue, "X1_L_IMMUNE_TO_DISPEL", 10);
|
||||
AssignCommand(oStatue, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1));
|
||||
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eStone, oStatue));
|
||||
DelayCommand(2.5, SetAILevel(oStatue, AI_LEVEL_VERY_LOW));
|
||||
//SetPlotFlag(oStatue, TRUE);
|
||||
}
|
||||
n++;
|
||||
oStatue = GetNearestObjectByTag("NW_BAT", OBJECT_SELF, n);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user