function capture_town(prev_owner, cur_owner, hero, town) if cur_owner == 1 then Win(1) end end Trigger(OBJECT_CAPTURE_TRIGGER, 'скриптовое_имя_города', 'capture_town')