BioWare Forums: View Post For Code Display


You are viewing a single post. Please do not take this post out of context.
Read the full topic: Post Working Scripts Here

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

This post taken from the BioWare Forums
Powered by BioBoards Version 2.05.010
Please read our Copyright and Trademark Information