Since some liked that here is my kitty cat:
#include "NW_I0_GENERIC"
void main()
{
object oPC = GetLastPerceived();
object oSpawn = OBJECT_SELF;
object oArea = GetArea(oSpawn);
object oEnemy = GetNearestObjectByTag("Mouse");
effect eRegenerate = EffectRegenerate(1, 8.0);
float fDistance = GetDistanceToObject(oEnemy);
location lWP1 = GetLocation(GetNearestObjectByTag("CatHouse"));
if (d100()>66)
return;
if (IsInConversation(OBJECT_SELF) || GetIsInCombat())
return;
ClearAllActions();
if (fDistance < 10.0)
{
DelayCommand (0.4,ActionForceFollowObject(oEnemy,0.5));
DelayCommand (3.5, ActionAttack(oEnemy));
return;
}
if (GetIsDay())
{
DelayCommand (10.0, ActionForceMoveToLocation(lWP1,FALSE));
DelayCommand (20.0,ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 4.0f, 200.0f));
//sleeping
DelayCommand (22.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRegenerate, oSpawn, 30.0));
return;
}
string sSoundName = ("as_an_catmeow" + IntToString(Random(4)+1));
string sWPTag1 = "wp_random";//seed tag of wp. wp's must be placed.
string sRan = IntToString(d6()); //change dsize for more wp
string sWPTag = sWPTag1 + sRan; //selects wp_random1-10
location lWP = GetLocation(GetNearestObjectByTag(sWPTag));
switch( d6())
{
case 1: ActionForceFollowObject(oPC,3.0);break;
case 2: PlaySound(sSoundName); break;
case 3: DelayCommand (2.0,ActionMoveToLocation(lWP1,FALSE));
case 4: PlaySound(sSoundName); break;
case 5: PlaySound(sSoundName); break;
case 6: DelayCommand (3.0,ActionMoveToLocation(lWP,TRUE));
}
}
I used the invisible creature panther L_020 20% of size. You can also use the appearance 2da on the vault which gets rid of the annoying glow, can't remember what's it's called. You want to spawn some mice I think it's rats S_40 and tag them mouse of course, and a Cat House wp where you want him to lay down.
And a must have for all scaled creatures is Monkey_Magics glow killer:
http://nwvault.ign.c....Detail&id=1374
Modifié par ffbj, 22 juillet 2011 - 11:15 .