Initial Commit

Initial Commit [v1.32PRC8]
This commit is contained in:
Jaysyn904
2025-04-03 13:38:45 -04:00
parent 1213977d8c
commit b464d8da05
6922 changed files with 6176025 additions and 2 deletions

60
_module/nss/nh_ambush.nss Normal file
View File

@@ -0,0 +1,60 @@
#include "rd_spawnzones"
void main()
{
object oPC;
vector vPC;
vector vNew;
location lLoc;
int iRndX;
int iRndY;
int iLevel;
string sTag;
oPC = GetEnteringObject();
if (GetIsPC(oPC))
{
if (GetLocalInt(OBJECT_SELF,"Triggered") == 0)
{
if (Random(4) == 0)
{
SendMessageToPC(oPC,"You hear a twig snap...");
iLevel = GetHitDice(oPC);
SetLocalInt(OBJECT_SELF,"Triggered",1);
vPC = GetPosition(oPC);
iRndX = Random(6) + 4;
iRndY = Random(6) + 4;
if (Random(2) == 1) iRndX=iRndX * -1;
if (Random(2) == 1) iRndY=iRndY * -1;
vNew = vPC + Vector( iRndX/1.0, iRndY/1.0, 0.0 );
lLoc = Location(GetArea(oPC), vNew, VectorToAngle( -1.0 * vNew ) );
if (iLevel>25)
sTag = "fiend";
else if (iLevel>10)
sTag = "merc";
else
sTag = "bandit";
GetRaceCreatures(sTag,lLoc,iLevel,3);
vPC = GetPosition(oPC);
iRndX = Random(6) + 4;
iRndY = Random(6) + 4;
if (Random(2) == 1) iRndX=iRndX * -1;
if (Random(2) == 1) iRndY=iRndY * -1;
vNew = vPC + Vector( iRndX/1.0, iRndY/1.0, 0.0 );
lLoc = Location(GetArea(oPC), vNew, VectorToAngle( -1.0 * vNew ) );
GetRaceCreatures(sTag,lLoc,iLevel,3);
}
}
//This is to make the ambush spot a try-once-only spot
SetLocalInt(OBJECT_SELF,"Triggered",1);
}
}