Author Sticky: Post Working Scripts Here
Sephiroth Jenova Posted: Sunday, 21 July 12:09AM
NWScript:
// NPC talks to PC's automatically only ONCE.

// Original Script by: Cyber_Bruno

// Modified by: Sephiroth Jenova(sephiroth_j@hotmail.com)

void main()

{

string sTag = "Pathal";

object oNPC = GetObjectByTag("Pathal");

object oPC = GetLastPerceived();

if(GetIsPC(oPC) &&

GetLocalInt( oPC, "SR_Init" + GetTag(oNPC)) == FALSE &&

IsInConversation(oNPC) == FALSE &&

GetLocalInt( oPC, "PathalDoOnce") == 0)

{

AssignCommand(oPC, ClearAllActions());

AssignCommand(oNPC, ClearAllActions());

AssignCommand(oNPC, ActionMoveToObject(oPC));

AssignCommand(oNPC, ActionStartConversation(oPC));

SetLocalInt(oPC, "PathalDoOnce", 1);

}

}



I got tired of seeing 1,000,000scripts for an NPC talking to someone only once and none of them working. I have confirmed that this one makes the NPC talk to PLAYERS only ONCE. Doesnt talk to NPC's, only does it once.

Sephiroth Jenova
sephiroth_j@hotmail.com

Addendum to my previous message above:
Place this script in the onPercieve area of the NPC you wish to approach the player. "Pathal" that appears in the script is the tag of the NPC it is being used on. While "PathalDoOnce" is the variable name you wish to use to check against to see if this approach/conversation has happened yet.