/* * 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); } }