EpicValor c369af5071 I figured out why commoner types weren't using civilized animations
Most changes were due to that and other behaviors I wanted ambient npcs to do.
2023-09-09 19:56:22 -05:00

35 lines
853 B
Plaintext

/*
* Script generated by LS Script Generator, v.TK.0
*
* For download info, please visit:
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
*/
// Put this OnHeartbeat.
// Will abort (do nothing) if fighting or talking or if no PCs are in the area.
#include "NW_I0_GENERIC"
#include "x0_i0_anims"
void main()
{
// If running the lowest AI, abort for performance reasons.
if ( GetAILevel() == AI_LEVEL_VERY_LOW )
return;
// If busy with combat or conversation, skip this heartbeat.
if ( IsInConversation(OBJECT_SELF) || GetIsInCombat() )
return;
// Abort if failed a 5% chance.
if ( Random(100) >= 30 )
return;
object oBud = GetRandomFriend(5.0);
// If we found one, start talking to them.
if(OBJECT_INVALID != oBud)
{
AnimActionStartTalking(oBud);
}
}