Added PnP Dire Rat.

Added PnP Dire Rat.
This commit is contained in:
Jaysyn904
2021-07-21 17:48:43 -04:00
parent 552f1686c8
commit b01c5cc7db
10849 changed files with 171143 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
void ActionCreate(string sCreature, location lLoc);
void main()
{
if (GetLocalInt(OBJECT_SELF, "Timer") >= 180)
{
object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
if (GetIsObjectValid(oCreature) == TRUE && GetDistanceToObject(oCreature) < 10.0)
{
effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
string sCreature = "ZOMBIE002";
// * 10% chance of a Ghoul instead
if (Random(100) > 90)
{
sCreature = "GHOUL001";
}
location lLoc = GetLocation(OBJECT_SELF);
DelayCommand(0.3, ActionCreate(sCreature, lLoc));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, lLoc);
SetLocalInt(OBJECT_SELF, "Timer", 0);
}
}
else
{
SetLocalInt(OBJECT_SELF, "Timer", GetLocalInt(OBJECT_SELF, "Timer") + 6);
}
}
void ActionCreate(string sCreature, location lLoc)
{
CreateObject(OBJECT_TYPE_CREATURE, sCreature, lLoc);
}