Horsefly Swamp update
Creatures & encounter tables to support Horsefly swamp expansion.
This commit is contained in:
41
_module/nss/summon_skelies.nss
Normal file
41
_module/nss/summon_skelies.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "x0_i0_position"
|
||||
|
||||
void summonFX(location lLoc)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eVis,lLoc);
|
||||
|
||||
}
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
float fOrient = GetFacing(oCaster);
|
||||
object oArea = GetArea(oCaster);
|
||||
location lNewSummon;
|
||||
vector vNewSpot;
|
||||
object oSummon;
|
||||
int nType = d2();
|
||||
string sRef;
|
||||
int nNum;
|
||||
if ( nType == 1 )
|
||||
{
|
||||
sRef = "summonedyoungadu";
|
||||
nNum = d2(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
sRef = "summonedtrollske";
|
||||
nNum = d2(3);
|
||||
}
|
||||
while ( nNum > 0 )
|
||||
{
|
||||
vNewSpot = GetPosition(oCaster);
|
||||
vNewSpot = GetChangedPosition(vNewSpot,5.0,IntToFloat(Random(360)));
|
||||
lNewSummon = Location(oArea,vNewSpot,fOrient);
|
||||
oSummon = CreateObject(OBJECT_TYPE_CREATURE,sRef,lNewSummon);
|
||||
ChangeFaction(oSummon,oCaster);
|
||||
lNewSummon = GetLocation(oSummon);
|
||||
DelayCommand(1.0,summonFX(lNewSummon));
|
||||
nNum--;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user