134 lines
4.1 KiB
Plaintext
134 lines
4.1 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
|||
|
//:: Zombies feed! 1.2 zombie_feed.nss
|
|||
|
//:: by Lupin III
|
|||
|
//:: lupin_3rd@hotmail.com
|
|||
|
//:://////////////////////////////////////////////
|
|||
|
/*
|
|||
|
<EFBFBD> Zombies will move over to the nearest corpse and start
|
|||
|
<EFBFBD> diggin' in. This version requires Shadows of Undrentide.
|
|||
|
|
|||
|
To use place the following line in the OnSpawn script
|
|||
|
of a creature before the final }
|
|||
|
|
|||
|
ExecuteScript("zombie_feed", OBJECT_SELF);
|
|||
|
|
|||
|
*/
|
|||
|
//:://////////////////////////////////////////////
|
|||
|
#include "x0_i0_corpses"
|
|||
|
|
|||
|
void main ()
|
|||
|
{
|
|||
|
int nRandom = d20(1);
|
|||
|
object oZombieFood;
|
|||
|
object oCampCorpse = GetNearestObjectByTag("POA_CORPSE");
|
|||
|
oZombieFood = oCampCorpse;
|
|||
|
|
|||
|
if (oCampCorpse == OBJECT_INVALID)
|
|||
|
{
|
|||
|
oZombieFood = GetNearestCorpse();
|
|||
|
}
|
|||
|
|
|||
|
location llocation = GetLocation(oZombieFood);
|
|||
|
//effect eRegen = EffectRegenerate(1, 4.0);
|
|||
|
effect eZombieFeed = EffectVisualEffect(VFX_COM_CHUNK_RED_SMALL);
|
|||
|
|
|||
|
if (oZombieFood == OBJECT_INVALID)
|
|||
|
{
|
|||
|
switch (d6())
|
|||
|
{
|
|||
|
<EFBFBD><EFBFBD><EFBFBD> case 1:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(5.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombtyr_bat1");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 2:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombwar_bat1");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SpeakString("..the.. hunger..."); //comment this line if you don't want random zombie one liners
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(6.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 3:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(4.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_atk1");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SpeakString("...need flesh"); //comment this line if you don't want random zombie one liners
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(2.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 4:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_atk2");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(10.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 5:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(8.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_atk3");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 6:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(1.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_slct");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(2.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SpeakString("unghh.."); //comment this line if you don't want random zombie one liners
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
}
|
|||
|
|
|||
|
ActionRandomWalk();
|
|||
|
DelayCommand(19.5, ClearAllActions());
|
|||
|
if (nRandom<=10){DelayCommand(20.0, ExecuteScript("zombie_feed", OBJECT_SELF));}
|
|||
|
if (nRandom>=11){DelayCommand(25.0, ExecuteScript("zombie_feed", OBJECT_SELF));}
|
|||
|
}
|
|||
|
|
|||
|
else
|
|||
|
if(GetIsDead(OBJECT_SELF) == FALSE)
|
|||
|
<EFBFBD> {
|
|||
|
<EFBFBD> ActionForceMoveToObject(oZombieFood, FALSE, 1.0f, 30.0f);
|
|||
|
SetFacingPoint(GetPosition(oZombieFood));
|
|||
|
if (nRandom==2) {DelayCommand(15.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eZombieFeed, oZombieFood, 1.0));} //comment this line if you don't like the visual effects
|
|||
|
if (nRandom==6) {DelayCommand(10.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eZombieFeed, oZombieFood, 1.0));} //comment this line if you don't like the visual effects
|
|||
|
if (nRandom<=13){ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0,19.0f);}
|
|||
|
//if (nRandom<=13){ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRegen, OBJECT_SELF, 16.0);}
|
|||
|
if (nRandom>=18){ActionRandomWalk();}
|
|||
|
|
|||
|
switch (d6())
|
|||
|
{
|
|||
|
case 1:
|
|||
|
ActionWait(5.0);
|
|||
|
if (nRandom<=14){PlaySound("c_zombtyr_bat1");}
|
|||
|
break;
|
|||
|
|
|||
|
case 2:
|
|||
|
if (nRandom<=14){PlaySound("c_zombwar_bat1");}
|
|||
|
SpeakString("..braaiinss.."); //comment this line if you don't want random zombie one liners
|
|||
|
ActionWait(6.0);
|
|||
|
break;
|
|||
|
|
|||
|
case 3:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(4.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_atk1");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SpeakString("..fleesshh"); //comment this line if you don't want random zombie one liners
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(2.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 4:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_atk2");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(10.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 5:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(8.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_atk3");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case 6:
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(1.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> if (nRandom<=14){PlaySound("c_zombie_slct");}
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActionWait(2.0);
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SpeakString("mnauhh..."); //comment this line if you don't want random zombie one liners
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> break;
|
|||
|
<EFBFBD><EFBFBD><EFBFBD> }
|
|||
|
|
|||
|
DelayCommand(19.5, ClearAllActions());
|
|||
|
if (nRandom<=10){DelayCommand(20.0, ExecuteScript("zombie_feed", OBJECT_SELF));}
|
|||
|
if (nRandom>=11){DelayCommand(25.0, ExecuteScript("zombie_feed", OBJECT_SELF));}
|
|||
|
<EFBFBD> }
|
|||
|
}
|