I have this script to cancel dialogs between all players with this specific npc but its not really working and not sure why. its for tfs 1.0
LUA:
local player = Player(cid)
local people = Game.getSpectators(player:getPosition(), false, true, 6, 6, 5, 5)
for i = 1, #people do
if npcHandler:isFocused(people[i].cid) then
npcHandler:releaseFocus(people[i].cid)
end
end