This should work for the 1st script:
void main()
{
object oNPC = GetObjectByTag("NPC_TAG");
object oPC = GetEnteringObject();
//This checks for a variable on the player called LOCAL_INT_TAG1
//If it is set to TRUE, because you already spoke to the NPC, then quit
if( GetLocalInt(oPC, "LOCAL_INT_TAG1") == TRUE ) return;
if(GetIsPC(oPC) && !IsInConversation(oNPC))
{
AssignCommand(oPC,ClearAllActions());
AssignCommand(oNPC,ClearAllActions());
AssignCommand(oNPC,ActionMoveToObject(oPC));
AssignCommand(oNPC,ActionStartConversation(oPC));
}
SetLocalInt(GetPCSpeaker(), "LOCAL_INT_TAG1", TRUE);
}
For both of these, you'll have to make sure that the TAGs of the NPCs match what is in the script or vice versa. If they don't match exactly, the script will attempt to locate something that doesn't exist and it will appear that nothing is happening. The same goes for the variable names in the GetLocalInt() and SetLocalInt() functions
Good luck.
Modifié par Terrorble, 26 mai 2011 - 03:58 .