vats_task: type: task definitions: __player debug: false settings: ##ОТВЕЧАЕТ ЗА РАДИУС ПОИСКА ЭНТИТИ ОТ КУРСОРА ИГРОКА find: 1 ##ОТВЕЧАЕТ ЗА СКОРОСТЬ ПОВОРОТА look: 20 ##ОТВЕЧАЕТ ЗА ДАЛЬНОСТЬ ЛУЧА range: 30 ##ДИСТАНЦИЯ ДО ЭНТИТИ НА КОТОРОЙ ВЫКЛЮЧАЕТСЯ ВАТС distance: 30 script: - flag vats - announce start - while and : - define find - if : - define trg ;range=;raysize=<[find]>]||null> - if <[trg].is_living||false> and <[trg].equals[].not||true>: - playsound sound:block.copper_bulb.turn_on - glow false for: if: - flag vats.select_ent:<[trg]> - glow true for: <[trg]> - else: - run smooth_face_to_entity def:| if: - if or ].is_more_than[]||false>: - while stop - wait 1t - announce stop - glow false for: if: - flag vats:! vats_cmd: type: command name: vats description: Does something usage: /vats permission: op script: - if : - glow false for: if: - flag vats:! - else: - run vats_task smooth_face_to_entity: type: task definitions: __player|ent debug: false script: - define face ]> - define op <[face].pitch.sub[]> - define oy <[face].yaw.sub[]> - define oy:+:360 if:<[oy].is_less_than[-180]> - define oy:-:360 if:<[oy].is_more_than[180]> - define div - define new_p ]>]> - define new_y ]>]> - look yaw:<[new_y]> pitch:<[new_p]> offthread_repeat:5