Battledale_PRC8/_module/nss/jw_song_urn_hb.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

49 lines
1.0 KiB
Plaintext

void main()
{
int nDone=0;
float fDist;
float fSearchDist=15.0;
int nCount = 1;
if (GetLocalInt(OBJECT_SELF,"active")==1)
{
object oidNearestCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
while ( ( nDone == 0 ) &&
( oidNearestCreature != OBJECT_INVALID )
)
{
fDist = GetDistanceBetween(OBJECT_SELF,oidNearestCreature);
if ( fDist > fSearchDist )
{
nDone = 1;
}
else
{
if (WillSave(oidNearestCreature,20,SAVING_THROW_TYPE_SONIC)==0)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectDeaf(),oidNearestCreature,90.0);
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_BLINDDEAF),oidNearestCreature);
}
}
nCount = nCount +1;
oidNearestCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF ,nCount);
}
}
}