Alright, I've managed to get my above script to compile by making it like this:
Code:
void main()
{
object oPC=GetFirstPC();
object oNPC=GetObjectByTag("dt_comm");
int nEvent = GetUserDefinedEventNumber();
int bRun=TRUE;
if(
(nEvent == 1002) &&
GetGlobalBoolean("DT_CHECK1") == FALSE)
{
if(GetDistanceBetween(oNPC, oPC) <= 6.0){
ActionDoCommand(SetCommandable(TRUE, oNPC));
AssignCommand (oNPC, ActionMoveToObject(oPC, bRun));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}
}
}
I'll edit this post to tell if it works in-game or not.