Author Sticky: Post Working Scripts Here
Cyber_Bruno Posted: Tuesday, 25 June 08:13AM
Eryk, here’s that script you wanted:

NWScript:
void main()

{

object oNPC = GetObjectByTag("Pathal");

int nRunOnce = GetLocalInt(oNPC, "RunOnce");

SetLocalInt(oNPC, "RunOnce", nRunOnce + 1);

if (nRunOnce = nRunOnce + 1)

     {

      object oPC = GetLastPerceived();

      SetLocalInt(oNPC, "nRunOnce", 0);

      ClearAllActions();

      AssignCommand(oPC, ClearAllActions());

      ActionMoveToObject(oPC);

      ActionStartConversation(oPC);

     }

}



Really sorry for the wait. And I have to give credit to Michal and mindtakerr. I was stumped on your request, and I stumbled onto their thread on making a script run once. I took the original script Michal had and the workings from mindtakerr’s example (it was a rest script) and tweaked around with them. Thank guys. I tested this script myself and it was fine (I even tried going out of perception range and going stealth). Just replace the entire old script with this one. I also kept the tag as Pathal. Enjoy.

Cyber_Bruno