Trigger(REGION_ENTER_AND_STOP_TRIGGER,"region name","FName")
Where FName is the name of the function. And before that, what the function should actually do:
function FName(heroname)
if GetObjectOwner(heroname)==1 then
SetObjectiveState("quest name", OBJECTIVE_COMPLETED)
Trigger(REGION_ENTER_AND_STOP_TRIGGER,"region name",nil)
end;
end;
Inside the function, we first check the condition that heroname belongs to the first player (if the human player is the first, of course). Secondly, if the condition is met, we mark the quest as completed and cancel the trigger action so that it is no longer triggered.