Repository: wdragondragon/ApexRecoils
Branch: master
Commit: 43225f3cf697
Files: 96
Total size: 342.4 KB
Directory structure:
gitextract_ixgpo6y_/
├── .gitignore
├── HidTable.h
├── LICENSE
├── MergeData.py
├── README.md
├── auth/
│ └── check_run.pyi
├── client.py
├── config/
│ ├── 5aas20v2.json
│ ├── ReaSnowGun.json
│ ├── ReaSnowGun_s21.json
│ ├── ReaSnowGun_s21_v2.json
│ ├── ReaSnowGun_s21_v2_xb.json
│ ├── ReaSnowGun_s22.json
│ ├── ReaSnowGun_v2.json
│ ├── ReaSnowGun_xc_v12.json
│ ├── log.json
│ ├── m2.txt
│ ├── ref/
│ │ ├── client.json
│ │ ├── client_bk.json
│ │ └── server.json
│ └── specs.json
├── core/
│ ├── Config.py
│ ├── GameWindowsStatus.py
│ ├── KeyAndMouseListener.py
│ ├── ReaSnowSelectGun.py
│ ├── RecoildsCore.py
│ ├── SelectGun.py
│ ├── ShakeGun.py
│ ├── __init__.py
│ ├── image_comparator/
│ │ ├── DynamicSizeImageComparator.py
│ │ ├── ImageComparator.py
│ │ ├── ImageComparatorFactory.py
│ │ ├── LocalImageComparator.py
│ │ └── __init__.py
│ ├── joy_listener/
│ │ ├── JoyListener.py
│ │ ├── JoyToKey.py
│ │ ├── RockerMonitor.py
│ │ ├── S1SwitchMonitor.py
│ │ └── __init__.py
│ ├── kmnet_listener/
│ │ ├── KmBoxNetListener.py
│ │ ├── ToggleKeyListener.py
│ │ └── __init__.py
│ └── screentaker/
│ ├── CapScreenTaker.py
│ ├── LocalMssScreenTaker.py
│ ├── LocalScreenTaker.py
│ ├── ScreenTaker.py
│ ├── ScreenTakerFactory.py
│ └── __init__.py
├── demo.py
├── images/
│ ├── 1920x1080/
│ │ └── list.txt
│ ├── 1920x1200/
│ │ └── list.txt
│ ├── 2048x1152/
│ │ └── list.txt
│ ├── 2560x1440/
│ │ └── list.txt
│ ├── hop_up/
│ │ ├── 1920x1080/
│ │ │ └── list.txt
│ │ └── 2560x1440/
│ │ └── list.txt
│ └── scope/
│ ├── 1920x1080/
│ │ └── list.txt
│ └── 2560x1440/
│ └── list.txt
├── log/
│ ├── LogFactory.py
│ ├── LogWindow.py
│ ├── Logger.py
│ └── __init__.py
├── mouse_mover/
│ ├── FeiMover.py
│ ├── GHubMover.py
│ ├── IntentManager.py
│ ├── KmBoxMover.py
│ ├── KmBoxNetMover.py
│ ├── MouseMover.py
│ ├── MoverFactory.py
│ ├── PanNiMover.py
│ ├── Win32ApiMover.py
│ ├── WuYaMover.py
│ └── __init__.py
├── net/
│ ├── __init__.py
│ └── socket/
│ ├── Client.py
│ ├── NetImageComparator.py
│ ├── ReaSnowSelectGunSocket.py
│ ├── Server.py
│ ├── SocketImageComparator.py
│ ├── SocketMouseMover.py
│ ├── SocketScreenTaker.py
│ ├── SocketUtil.py
│ └── __init__.py
├── requirements.txt
├── server.py
├── test/
│ ├── __init__.py
│ ├── cap_test.py
│ ├── fei_test.py
│ ├── image_match/
│ │ ├── __init__.py
│ │ └── image_match.py
│ └── test.py
├── tools/
│ ├── Tools.py
│ ├── __init__.py
│ ├── image_tool.conf
│ └── image_tool.py
└── windows/
├── SystemTrayApp.py
└── __init__.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
================================================
FILE: HidTable.h
================================================
#ifndef __keyboard__table__
#define __keyboard__table__
#define KEY_NONE 0x00
#define KEY_ERRORROLLOVER 0x01
#define KEY_POSTFAIL 0x02
#define KEY_ERRORUNDEFINED 0x03
#define KEY_A 0x04
#define KEY_B 0x05
#define KEY_C 0x06
#define KEY_D 0x07
#define KEY_E 0x08
#define KEY_F 0x09
#define KEY_G 0x0A
#define KEY_H 0x0B
#define KEY_I 0x0C
#define KEY_J 0x0D
#define KEY_K 0x0E
#define KEY_L 0x0F
#define KEY_M 0x10
#define KEY_N 0x11
#define KEY_O 0x12
#define KEY_P 0x13
#define KEY_Q 0x14
#define KEY_R 0x15
#define KEY_S 0x16
#define KEY_T 0x17
#define KEY_U 0x18
#define KEY_V 0x19
#define KEY_W 0x1A
#define KEY_X 0x1B
#define KEY_Y 0x1C
#define KEY_Z 0x1D
#define KEY_1_EXCLAMATION_MARK 0x1E
#define KEY_2_AT 0x1F
#define KEY_3_NUMBER_SIGN 0x20
#define KEY_4_DOLLAR 0x21
#define KEY_5_PERCENT 0x22
#define KEY_6_CARET 0x23
#define KEY_7_AMPERSAND 0x24
#define KEY_8_ASTERISK 0x25
#define KEY_9_OPARENTHESIS 0x26
#define KEY_0_CPARENTHESIS 0x27
#define KEY_ENTER 0x28
#define KEY_ESCAPE 0x29
#define KEY_BACKSPACE 0x2A
#define KEY_TAB 0x2B
#define KEY_SPACEBAR 0x2C
#define KEY_MINUS_UNDERSCORE 0x2D
#define KEY_EQUAL_PLUS 0x2E
#define KEY_OBRACKET_AND_OBRACE 0x2F
#define KEY_CBRACKET_AND_CBRACE 0x30
#define KEY_BACKSLASH_VERTICAL_BAR 0x31
#define KEY_NONUS_NUMBER_SIGN_TILDE 0x32
#define KEY_SEMICOLON_COLON 0x33
#define KEY_SINGLE_AND_DOUBLE_QUOTE 0x34
#define KEY_GRAVE ACCENT AND TILDE 0x35
#define KEY_COMMA_AND_LESS 0x36
#define KEY_DOT_GREATER 0x37
#define KEY_SLASH_QUESTION 0x38
#define KEY_CAPS LOCK 0x39
#define KEY_F1 0x3A
#define KEY_F2 0x3B
#define KEY_F3 0x3C
#define KEY_F4 0x3D
#define KEY_F5 0x3E
#define KEY_F6 0x3F
#define KEY_F7 0x40
#define KEY_F8 0x41
#define KEY_F9 0x42
#define KEY_F10 0x43
#define KEY_F11 0x44
#define KEY_F12 0x45
#define KEY_PRINTSCREEN 0x46
#define KEY_SCROLL LOCK 0x47
#define KEY_PAUSE 0x48
#define KEY_INSERT 0x49
#define KEY_HOME 0x4A
#define KEY_PAGEUP 0x4B
#define KEY_DELETE 0x4C
#define KEY_END1 0x4D
#define KEY_PAGEDOWN 0x4E
#define KEY_RIGHTARROW 0x4F
#define KEY_LEFTARROW 0x50
#define KEY_DOWNARROW 0x51
#define KEY_UPARROW 0x52
#define KEY_KEYPAD_NUM_LOCK_AND_CLEAR 0x53
#define KEY_KEYPAD_SLASH 0x54
#define KEY_KEYPAD_ASTERIKS 0x55
#define KEY_KEYPAD_MINUS 0x56
#define KEY_KEYPAD_PLUS 0x57
#define KEY_KEYPAD_ENTER 0x58
#define KEY_KEYPAD_1_END 0x59
#define KEY_KEYPAD_2_DOWN_ARROW 0x5A
#define KEY_KEYPAD_3_PAGEDN 0x5B
#define KEY_KEYPAD_4_LEFT_ARROW 0x5C
#define KEY_KEYPAD_5 0x5D
#define KEY_KEYPAD_6_RIGHT_ARROW 0x5E
#define KEY_KEYPAD_7_HOME 0x5F
#define KEY_KEYPAD_8_UP_ARROW 0x60
#define KEY_KEYPAD_9_PAGEUP 0x61
#define KEY_KEYPAD_0_INSERT 0x62
#define KEY_KEYPAD_DECIMAL_SEPARATOR_DELETE 0x63
#define KEY_NONUS_BACK_SLASH_VERTICAL_BAR 0x64
#define KEY_APPLICATION 0x65
#define KEY_POWER 0x66
#define KEY_KEYPAD_EQUAL 0x67
#define KEY_F13 0x68
#define KEY_F14 0x69
#define KEY_F15 0x6A
#define KEY_F16 0x6B
#define KEY_F17 0x6C
#define KEY_F18 0x6D
#define KEY_F19 0x6E
#define KEY_F20 0x6F
#define KEY_F21 0x70
#define KEY_F22 0x71
#define KEY_F23 0x72
#define KEY_F24 0x73
#define KEY_EXECUTE 0x74
#define KEY_HELP 0x75
#define KEY_MENU 0x76
#define KEY_SELECT 0x77
#define KEY_STOP 0x78
#define KEY_AGAIN 0x79
#define KEY_UNDO 0x7A
#define KEY_CUT 0x7B
#define KEY_COPY 0x7C
#define KEY_PASTE 0x7D
#define KEY_FIND 0x7E
#define KEY_MUTE 0x7F
#define KEY_VOLUME_UP 0x80
#define KEY_VOLUME_DOWN 0x81
#define KEY_LOCKING_CAPS_LOCK 0x82
#define KEY_LOCKING_NUM_LOCK 0x83
#define KEY_LOCKING_SCROLL_LOCK 0x84
#define KEY_KEYPAD_COMMA 0x85
#define KEY_KEYPAD_EQUAL_SIGN 0x86
#define KEY_INTERNATIONAL1 0x87
#define KEY_INTERNATIONAL2 0x88
#define KEY_INTERNATIONAL3 0x89
#define KEY_INTERNATIONAL4 0x8A
#define KEY_INTERNATIONAL5 0x8B
#define KEY_INTERNATIONAL6 0x8C
#define KEY_INTERNATIONAL7 0x8D
#define KEY_INTERNATIONAL8 0x8E
#define KEY_INTERNATIONAL9 0x8F
#define KEY_LANG1 0x90
#define KEY_LANG2 0x91
#define KEY_LANG3 0x92
#define KEY_LANG4 0x93
#define KEY_LANG5 0x94
#define KEY_LANG6 0x95
#define KEY_LANG7 0x96
#define KEY_LANG8 0x97
#define KEY_LANG9 0x98
#define KEY_ALTERNATE_ERASE 0x99
#define KEY_SYSREQ 0x9A
#define KEY_CANCEL 0x9B
#define KEY_CLEAR 0x9C
#define KEY_PRIOR 0x9D
#define KEY_RETURN 0x9E
#define KEY_SEPARATOR 0x9F
#define KEY_OUT 0xA0
#define KEY_OPER 0xA1
#define KEY_CLEAR_AGAIN 0xA2
#define KEY_CRSEL 0xA3
#define KEY_EXSEL 0xA4
#define KEY_KEYPAD_00 0xB0
#define KEY_KEYPAD_000 0xB1
#define KEY_THOUSANDS_SEPARATOR 0xB2
#define KEY_DECIMAL_SEPARATOR 0xB3
#define KEY_CURRENCY_UNIT 0xB4
#define KEY_CURRENCY_SUB_UNIT 0xB5
#define KEY_KEYPAD_OPARENTHESIS 0xB6
#define KEY_KEYPAD_CPARENTHESIS 0xB7
#define KEY_KEYPAD_OBRACE 0xB8
#define KEY_KEYPAD_CBRACE 0xB9
#define KEY_KEYPAD_TAB 0xBA
#define KEY_KEYPAD_BACKSPACE 0xBB
#define KEY_KEYPAD_A 0xBC
#define KEY_KEYPAD_B 0xBD
#define KEY_KEYPAD_C 0xBE
#define KEY_KEYPAD_D 0xBF
#define KEY_KEYPAD_E 0xC0
#define KEY_KEYPAD_F 0xC1
#define KEY_KEYPAD_XOR 0xC2
#define KEY_KEYPAD_CARET 0xC3
#define KEY_KEYPAD_PERCENT 0xC4
#define KEY_KEYPAD_LESS 0xC5
#define KEY_KEYPAD_GREATER 0xC6
#define KEY_KEYPAD_AMPERSAND 0xC7
#define KEY_KEYPAD_LOGICAL_AND 0xC8
#define KEY_KEYPAD_VERTICAL_BAR 0xC9
#define KEY_KEYPAD_LOGIACL_OR 0xCA
#define KEY_KEYPAD_COLON 0xCB
#define KEY_KEYPAD_NUMBER_SIGN 0xCC
#define KEY_KEYPAD_SPACE 0xCD
#define KEY_KEYPAD_AT 0xCE
#define KEY_KEYPAD_EXCLAMATION_MARK 0xCF
#define KEY_KEYPAD_MEMORY_STORE 0xD0
#define KEY_KEYPAD_MEMORY_RECALL 0xD1
#define KEY_KEYPAD_MEMORY_CLEAR 0xD2
#define KEY_KEYPAD_MEMORY_ADD 0xD3
#define KEY_KEYPAD_MEMORY_SUBTRACT 0xD4
#define KEY_KEYPAD_MEMORY_MULTIPLY 0xD5
#define KEY_KEYPAD_MEMORY_DIVIDE 0xD6
#define KEY_KEYPAD_PLUSMINUS 0xD7
#define KEY_KEYPAD_CLEAR 0xD8
#define KEY_KEYPAD_CLEAR_ENTRY 0xD9
#define KEY_KEYPAD_BINARY 0xDA
#define KEY_KEYPAD_OCTAL 0xDB
#define KEY_KEYPAD_DECIMAL 0xDC
#define KEY_KEYPAD_HEXADECIMAL 0xDD
#define KEY_LEFTCONTROL 0xE0
#define KEY_LEFTSHIFT 0xE1
#define KEY_LEFTALT 0xE2
#define KEY_LEFT_GUI 0xE3
#define KEY_RIGHTCONTROL 0xE4
#define KEY_RIGHTSHIFT 0xE5
#define KEY_RIGHTALT 0xE6
#define KEY_RIGHT_GUI 0xE7
#define BIT0 0X01
#define BIT1 0X02
#define BIT2 0X04
#define BIT3 0X08
#define BIT4 0X10
#define BIT5 0X20
#define BIT6 0X40
#define BIT7 0X80
#endif
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
.
================================================
FILE: MergeData.py
================================================
def merge(time_points, x, y, step):
current_step = 0
current_step_num = current_step * step
time_points_merge = []
x_merge = []
y_merge = []
for i, time_point in enumerate(time_points):
if time_point >= current_step_num:
time_points_merge.append(current_step_num)
x_merge.append(0)
y_merge.append(0)
current_step += 1
current_step_num = current_step * step
x_merge[current_step - 1] = x_merge[current_step - 1] + x[i]
y_merge[current_step - 1] = y_merge[current_step - 1] + y[i]
print(x_merge)
print(y_merge)
print(time_points_merge)
def merge_x_y(x, y, time_points_x, time_points_y):
new_x = []
new_y = []
new_time_points = []
x_length = len(time_points_x)
y_length = len(time_points_y)
xi = 0
yi = 0
while xi < x_length or yi < y_length:
if xi >= x_length:
new_y.append(y[yi])
new_x.append(0)
new_time_points.append(time_points_y[yi])
yi += 1
continue
if yi >= y_length:
new_x.append(x[xi])
new_y.append(0)
new_time_points.append(time_points_x[xi])
xi += 1
continue
if time_points_x[xi] == time_points_y[yi]:
new_x.append(x[xi])
new_y.append(y[yi])
new_time_points.append(time_points_x[xi])
xi += 1
yi += 1
elif time_points_x[xi] < time_points_y[yi]:
new_x.append(x[xi])
new_y.append(0)
new_time_points.append(time_points_x[xi])
xi += 1
elif time_points_x[xi] > time_points_y[yi]:
new_y.append(y[yi])
new_x.append(0)
new_time_points.append(time_points_y[yi])
yi += 1
print(new_time_points)
print(new_x)
print(new_y)
return new_time_points, new_x, new_y
time_points = [0, 3, 12, 16, 25, 28, 35, 41, 47, 58, 60, 67, 77, 82, 92, 99, 104, 112, 118, 129, 132, 142, 149, 154,
162, 167, 171, 180, 185, 191, 197, 207, 216, 220, 233, 240, 244, 257, 264, 268, 277, 290, 295, 307, 313,
319, 329, 337, 343, 354, 361, 375, 380, 387, 395, 404, 408, 417, 425, 434, 446, 450, 460, 466, 475, 490,
494, 500, 514, 518, 528, 537, 542, 554, 561, 565, 575, 578, 586, 597, 601, 613, 623, 628, 635, 645, 654,
658, 669, 678, 683, 695, 707, 718, 723, 733, 744, 747, 760, 770, 774, 785, 794, 802, 811, 819, 829, 835,
848, 854, 871, 883, 890, 897, 913, 923, 928, 944, 954, 958, 972, 975, 988, 993, 1002, 1011, 1017, 1029,
1036, 1041, 1054, 1060, 1068, 1082, 1087, 1094, 1106, 1121, 1123, 1129, 1143, 1160, 1164, 1170, 1179,
1187, 1193, 1206, 1207, 1219, 1222, 1230, 1241, 1245, 1256, 1260, 1269, 1283, 1290, 1294, 1305, 1317,
1331, 1346, 1351, 1357, 1361, 1372, 1383, 1388, 1396, 1402, 1412, 1418, 1428, 1430, 1448, 1451, 1462,
1466, 1472, 1484, 1488, 1503, 1508, 1519, 1527, 1530, 1546, 1555, 1563, 1568, 1578, 1589, 1602, 1619,
1637, 1638, 1660, 1669]
x = [-1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -2, 1, 1, 1, 0, 2, 0, 1, 0, 0, 2, 1, 2, 1, 1, 2, 1, -1, 1, -3, 1, -2, -4, -2,
-2, -2, -1, -1, -3, -2, -1, -1, -2, 0, -1, 0, -1, -1, -2, -1, -2, -2, -2, -2, -2, 0, -1, 0, 0, -2, -2, 2, -2, 4,
-1, 5, 1, 2, 3, 2, 1, 4, 2, 2, 3, 2, 3, 2, 1, 3, 2, 2, 3, -1, 3, 1, -4, -1, -2, -5, -2, -2, -2, 2, -5, 2, 2, 3, 2,
2, 2, -1, 1, -2, -2, -2, -3, -2, -2, -2, -2, -2, -2, 0, 0, 3, 1, 0, 3, -1, -2, 4, -2, 5, 1, 5, 2, 3, 6, 3, 4, 2, 3,
2, -2, 1, -1, 2, 0, 2, 2, 2, -1, 4, 4, -2, 5, 1, 0, -2, 1, -1, -3, 0, -1, -6, -1, -2, -5, -2, -2, -2, -1, -5, -2,
-4, -3, -4, -5, -3, 0, -3, -2, -2, -1, -2, -2, -1, -2, 0, -2, -2, -2, -2, 0, -2, 3, -2, -1, 1, 4, 1, 2, 2, 1, -1,
-2, -2, -2, 1]
y = [-1, 0, -1, 3, -1, 7, 1, 7, 2, 2, 6, 2, 5, 2, 2, 6, 3, 2, 2, 2, 0, 2, 4, 2, 2, 3, 2, 1, 2, 6, 2, 4, 6, 4, 4, 2, 6,
4, 12, 6, 6, 10, 6, 5, 3, 8, 6, 9, 6, 5, 6, 6, 3, 6, 5, 3, 4, 4, 3, 3, 4, 3, 5, -2, 6, 6, 4, 5, 6, 6, 5, 5, 5, 6,
3, 6, -1, 6, 4, 3, 4, 4, 3, -2, 3, 2, 4, 2, 2, 2, 2, 2, 2, 3, 2, 3, 5, 4, 3, 3, 3, 4, -1, 4, -6, 3, -8, 3, -8, 3,
3, -6, 3, 3, 3, -2, 3, 2, -1, 2, 2, -4, 2, 4, 2, 5, 2, 2, 3, 2, 1, -6, 1, 0, -8, 0, 0, 0, -4, 0, 0, 0, -2, 1, 1, 0,
1, 1, 3, 2, 1, 1, 2, 1, 1, 0, 2, 1, 0, 1, 1, 1, 0, -2, 1, -4, 1, 1, -4, 2, -4, 0, -4, -1, -1, 0, 3, -1, 0, 4, -1,
-1, 0, 0, -2, -2, -2, -2, -2, -2, -3, -2, -1, -2, 3, 4, -1, 4, 2, -2]
# merge(time_points, x, y, 27.5)
t_x = [1, 3, 6]
x = [1, 3, 4]
t_y = []
y = []
# merge_x_y(x, y, t_x, t_y)
================================================
FILE: README.md
================================================
### Apex Recoils
apex自动识别枪械压枪宏
进度:
update(2024-03-01): 本项目已从键鼠反冲压枪重心转到对接s1自动识别(包含jtk触发罗技抖枪实现等),mnk数据开发将会无限期延后。
update(2024-04-10): 本项目重启mnk数据开发。
update(2024-04-18): mnk压枪数据开发基本完成。
开源交流群新建于2024-04-25,群号:206666041,入群前请贡献出你的star。
进群细则:请具有一定代码基础的人再进群,本群各管理都不会对一些过于基础的问题进行回答(但你可以抱有希望来问其他群友),并不会从零开始手把手教你如何使用,只提供代码上实现思路或环境安装上的帮助疑惑。只保证代码能够运行,不负责处理因为个人安装所产生的差异导致无法运行的环境问。
release包中所产生bug可能并不能及时的修复,所以请不要逮着群主问围绕着release版本或使用方面的问题,请自行拉取最新代码编译运行。
以上所有细款视心情生效,请不要进群没人回答就开始不耐烦,人生攻击。另外,不接受任何形式的付款“请教”,请您有钱就去买挂玩,谢谢。
[](https://star-history.com/#wdragondragon/ApexRecoils&Date)
### 功能清单
- [x] 自动识别枪械
- [x] 支持识别不同倍镜,涡轮增压器
- [x] 适配截图方案:
- [x] PIL
- [x] Mss
- [x] capture 视频采集卡
- [x] 鼠标平滑移动
- [x] 适配多种键鼠盒子
- [x] km_box A
- [x] km_box net
- [x] 无涯键鼠
- [x] 飞易来
- [x] 支持保存配置,多配置切换
- [x] 枪械数据开发中,现基于腰射灵敏1.6 ads全0.9倍率的基础上开发:
- [x] CAR
- [x] R99
- [x] R301
- [x] 平行步枪
- [x] 电冲
- [x] 转换者
- [x] re45
- [x] 暴走
- [x] L星
- [x] 哈沃克(涡轮)
- [x] 专注(涡轮)
- [x] 喷火
- [x] 哈沃克
- [x] 专注
- [x] 猎兽
- [x] 汗洛
- [X] 复仇女神
- [x] 支持抖枪,大小写开关
- [x] 自动识别支持ReaSnow s1转换器按键(需要串联km_box net,使用km_box_net的键鼠模式下生效)
- 实现jtk
- [x] axis转鼠标
- [x] 自定义时长长按切换切换模式(弥补s1的长按无法自定义时长的短板)
- [x] 自动识别的分布式(截图在client,识别与发送键盘指令在server)
### 使用说明
运行main.py
### 参与开发说明
#### 文件结构
```
.
├─config 启动配置文件
│ ├─ref 运行配置文件
│ ├─ReaSnowGun.json 转换器切换宏按键数据
│ └─specs.json 压枪数据
├─core 核心代码
│ ├─Config.py 读取配置类
│ ├─KeyAndMouseListner.py 鼠标和键盘监听
│ ├─RecoildsCore.py 压枪数据处理,并与鼠标意图移动交互
│ ├─SelectGun.py 枪械识别
│ ├─ReaSnowSelectGun.py S1转换器切换宏
│ ├─KmBoxNetListener.py kmbox net键鼠监听
│ └─ShakeGun.py 抖枪
├─images 存放各分辨率枪械图色图片
│ ├─1920x1080
│ ├─………………
│ ├─2560x1440
│ ├─hop_up 存放即用配件图片
│ └─scope 存放瞄准镜图片
├─log 打印日志的窗体定义
├─mouse_mover 各类移动鼠标的实现
└─tools 各类工具
```
#### 枪械数据开发
脚手架大概已开发完成,原理为:在开镜开枪时记时,当达到time_point时间(豪秒),会根据相同下标寻找x和y,将鼠标移动到相应位置达到压枪的效果。
由于apex特殊性,枪械在不同弹匣容量的情况下,其实是共享弹道的,所以只需要写出一条曲线即可。
对于有畜力的枪械,后续需要在mods中做其他模式的适配(待开发)
主要的工作量体现在调试开枪持续时间和鼠标移动的数据开发。 示例数据格式:
```json
[
{
"name": "R99",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [],
"x": [],
"y": []
},
"aim": {
"time_points": [],
"x": [],
"y": []
}
}
},
{
"name": "猎兽",
"type": "intermittent",
"recoils": {
"aim": [
{
"index": 0,
"time_points": [],
"x": [],
"y": []
},
{
"index": 1,
"time_points": [],
"x": [],
"y": []
}
],
"un_aim": []
}
},
{
"name": "哈沃克",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [],
"x": [],
"y": []
},
"aim": {
"time_points": [],
"x": [],
"y": []
},
"turbocharger": {
"un_aim": {
"time_points": [],
"x": [],
"y": []
},
"aim": {
"time_points": [],
"x": [],
"y": []
}
}
}
}
]
```
字段描述:
- name: 枪械名称,需要与识别图片名相同
- type: 枪械类型(全自动serial,连发枪intermittent)
- recoils: 压枪数据
- turbocharger(携带涡轮状态下的数据)
- aim/un_aim: 瞄准状态时使用的数据 / 腰射状态时使用的数据,该数据针对枪械类型会有不同的形态 (全自动枪械时为单对象):(连发枪时为数组,数组的单个对象为每点一下的压枪数据)
- time_points: 执行时间点,以ms为单位
- x: 执行时间点x轴偏移
- y: 执行时间点y轴偏移
#### 源码开发
项目中主要构建在对键鼠与手柄的监听与函数注册,具体看图和源码。

#### 自动识别如何对接s1转换器
对接s1时的整体架构:

注意配置文件[ReaSnowGun.json](config%2FReaSnowGun.json)。
该json字典中,第一层key值为枪械名称,与枪械图片名称对应。识别到哪个就是使用哪个图片的名称来找value
第二层,是枪械对应倍镜为key,需要按下的触发键键值为value。
第三层(选填),若专注,哈沃克等枪,拥有hot-up配件。可填入turbocharger(涡轮增压器)对应触发的键值。
另外需要注意的是,该枪械未设定多个倍镜的宏时,并且拥有一个该枪械的任意倍镜通用宏,可增加一个键值为0的触发键。
[绑定按键参考km box net的头文件](HidTable.h)
以下为示例:
```json
{
"p2020": {
"0": "0x2D"
},
"R-301": {
"1": "0x3A",
"2": "0x3B",
"3": "0x3C",
"4": "0x3D"
},
"平行步枪": {
"1": "0x3E",
"2": "0x3F",
"3": "0x40",
"4": "0x41"
},
"哈沃克": {
"1": "0x0C",
"2": "0x12",
"3": "0x13",
"4": "0x2F",
"turbocharger": {
"1": "0x30",
"2": "0x0D",
"3": "0x31",
"4": "0x0E"
}
},
"专注": {
"1": "0x61",
"2": "0x54",
"3": "0x55",
"4": "0x56",
"turbocharger": {
"1": "0x63",
"2": "0x57",
"3": "0x56",
"4": "0x63"
}
}
}
```
2K分辨率下图片已新增在项目中,需要新增其他分辨率的需要新增图片类别:
- `hop_up`:暂时只有涡轮增压[]
- `scope`下不同镜子图片:
- 1xClassic.png
- 1xHolo.png
- 1xDigitalThreat.png
- 1x-2xVariableHolo.png
- 2xBruiser.png
- 3xRanger.png
- 4xVariableAOG.png
如何新增,首先在Config.py中,新增你需要分辨率对应的镜子和涡轮增压器的截图位置。
镜子的位置一共有三处,第1,2,3格,涡轮增压器的位置一共有两格,第4,5格。
```python
scope_screenshot_resolution = {
(2560, 1440): [(2034, 1338, 2059, 1363), (2069, 1338, 2094, 1363), (2106, 1338, 2131, 1363)]
}
hop_up_screenshot_resolution = {
(2560, 1440): [(2142, 1338, 2167, 1363), (2180, 1338, 2205, 1363)]
}
```
注意:每个位置之间截图出来的图片大小应该一致。并且文件夹中的图片大小不能与截图位置大小计算出的大小不一致,否则会出错。本代码中2K分辨率截图为25*
25。其他分辨率中图片大小可能有变动,仅供参考。
### 加入我们
欢迎加入我们,共同完善已有代码,优化已有数据或提供建议。我们将资源完全共享。因为加我的人员较多,暂只接收提供贡献的好友位,使用分享请加Q群。

================================================
FILE: auth/check_run.pyi
================================================
def check(validate_type) -> None:
"""
监权
"""
...
def open_check(val_type=None):
...
def auth(func):
...
================================================
FILE: client.py
================================================
import sys
import threading
import pynput
from PyQt5.QtWidgets import QApplication
from auth.check_run import open_check
from core.Config import Config
from core.GameWindowsStatus import GameWindowsStatus
from core.KeyAndMouseListener import MouseListener, KeyListener
from core.ReaSnowSelectGun import ReaSnowSelectGun
from core.RecoildsCore import RecoilsListener, RecoilsConfig
from core.SelectGun import SelectGun
from core.image_comparator import ImageComparatorFactory
from core.image_comparator.DynamicSizeImageComparator import DynamicSizeImageComparator
from core.joy_listener.JoyListener import JoyListener
from core.joy_listener.JoyToKey import JoyToKey
from core.joy_listener.RockerMonitor import RockerMonitor
from core.joy_listener.S1SwitchMonitor import S1SwitchMonitor
from core.screentaker import ScreenTakerFactory
from log import LogFactory
from mouse_mover import MoverFactory
from mouse_mover.IntentManager import IntentManager
from mouse_mover.MouseMover import MouseMover
from windows.SystemTrayApp import SystemTrayApp
# @open_check("apex_recoils")
def main():
"""
main
"""
app = QApplication(sys.argv)
config = Config(default_ref_config_name="client")
apex_mouse_listener = MouseListener()
apex_key_listener = KeyListener()
game_windows_status = GameWindowsStatus()
image_comparator = ImageComparatorFactory.get_image_comparator(comparator_mode=config.comparator_mode,
config=config)
screen_taker = ScreenTakerFactory.get_screen_taker(config)
select_gun = SelectGun(bbox=config.select_gun_bbox,
image_path=config.image_path,
scope_bbox=config.select_scope_bbox,
scope_path=config.scope_path,
refresh_buttons=config.refresh_buttons,
has_turbocharger=config.has_turbocharger,
hop_up_bbox=config.select_hop_up_bbox,
hop_up_path=config.hop_up_path,
image_comparator=image_comparator,
screen_taker=screen_taker, game_windows_status=game_windows_status,
delay_refresh_buttons=config.delay_refresh_buttons)
mouse_listener = pynput.mouse.Listener(on_click=apex_mouse_listener.on_click)
keyboard_listener = pynput.keyboard.Listener(on_press=apex_key_listener.on_press,
on_release=apex_key_listener.on_release)
mouse_listener_thread = threading.Thread(target=mouse_listener.start)
keyboard_listener_thread = threading.Thread(target=keyboard_listener.start)
mouse_listener_thread.start()
keyboard_listener_thread.start()
mouse_mover: MouseMover = MoverFactory.get_mover(mouse_listener=apex_mouse_listener,
game_windows_status=game_windows_status,
config=config)
intent_manager = IntentManager(mouse_mover=mouse_mover)
intent_manager_thread = threading.Thread(target=intent_manager.start)
intent_manager_thread.start()
# 如果需要对接s1
# 1. 识别触发s1按键,使用rea_snow_mouse_mover
# 2. s1的切换逻辑层的按键保持,使用rea_snow_mouse_mover
# 3. jtk,根据key_trigger_mode来选择 mouse_mover的配置还是固定的distributed_c1
if config.rea_snow_gun_config_name != '':
# 判断c1透传
if config.rea_snow_mouse_mover == config.mouse_mover:
rea_snow_mouse_mover = mouse_mover
else:
rea_snow_mouse_mover: MouseMover = MoverFactory.get_mover(mouse_listener=apex_mouse_listener,
config=config,
mouse_model=config.rea_snow_mouse_mover,
c1_mover=mouse_mover,
game_windows_status=game_windows_status)
rea_snow_select_gun = ReaSnowSelectGun(mouse_mover=rea_snow_mouse_mover,
config_name=config.rea_snow_gun_config_name)
select_gun.connect(rea_snow_select_gun.trigger_button)
if config.key_trigger_mode == 'local':
c1_mover: MouseMover = mouse_mover
else:
c1_mover: MouseMover = MoverFactory.get_mover(config=config, mouse_model="distributed_c1")
joy_listener = JoyListener()
dynamic_size_image_comparator = DynamicSizeImageComparator(base_path=config.image_base_path,
screen_taker=screen_taker,
base_image_comparator=image_comparator)
s1_switch_monitor = S1SwitchMonitor(joy_listener=joy_listener,
licking_state_path=config.licking_state_path,
licking_state_bbox=config.licking_state_bbox,
mouser_mover=rea_snow_mouse_mover,
dynamic_size_image_comparator=dynamic_size_image_comparator,
s1_switch_hold_map=config.s1_switch_hold_map,
rea_snow_select_gun=rea_snow_select_gun)
# jtk启动
jtk = JoyToKey(joy_to_key_map=config.joy_to_key_map, c1_mouse_mover=c1_mover,
game_windows_status=game_windows_status)
jtk.reg_toggle_func(lambda: len(s1_switch_monitor.down_key_time) == 0)
joy_listener.connect_axis(jtk.axis_to_key)
rocker_monitor = RockerMonitor(joy_listener=joy_listener, select_gun=select_gun)
joy_listener.start(None)
else:
# 压枪
recoils_config = RecoilsConfig()
recoils_listener = RecoilsListener(recoils_config=recoils_config,
mouse_listener=apex_mouse_listener,
select_gun=select_gun,
intent_manager=intent_manager,
game_windows_status=game_windows_status)
recoils_listener_thread = threading.Thread(target=recoils_listener.start)
recoils_listener_thread.start()
system_tray_app = SystemTrayApp("client")
# 自动识别启动
threading.Thread(target=select_gun.test).start()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
================================================
FILE: config/5aas20v2.json
================================================
{
"p2020": {
"0": "0x2F"
},
"G7": {
"0": "0x2F"
},
"re-45": {
"0": "0x36"
},
"R-301": {
"0": "0x3A"
},
"平行步枪": {
"0": "0x3B"
},
"car": {
"0": "0x24"
},
"电能": {
"0": "0x23"
},
"转换者": {
"0": "0x25"
},
"哈沃克": {
"0": "0x52",
"turbocharger": {
"0": "0x3C"
}
},
"专注": {
"0": "0x0F",
"turbocharger": {
"0": "0x3E"
}
},
"lstart": {
"0": "0x3D"
},
"复仇女神": {
"0": "0x42"
},
"R99": {
"0": "0x22"
},
"猎兽": {
"0": "0x30"
},
"喷火": {
"0": "0x3F"
},
"汗洛": {
"0": "0x50"
},
"close_key": "0x35",
"no_found_click_close_key": false
}
================================================
FILE: config/ReaSnowGun.json
================================================
{
"p2020": {
"0": "45",
"caps": false
},
"G7": {
"0": "45",
"caps": false
},
"re-45": {
"1": "36",
"2": "37"
},
"R-301": {
"1": "58",
"2": "59",
"3": "60",
"4": "61"
},
"平行步枪": {
"1": "62",
"2": "63",
"3": "64",
"4": "65"
},
"car": {
"1": "68",
"2": "69"
},
"电能": {
"1": "39",
"2": "70"
},
"转换者": {
"1": "71",
"2": "72"
},
"哈沃克": {
"1": "12",
"2": "18",
"3": "19",
"4": "47",
"turbocharger": {
"1": "48",
"2": "13",
"3": "49",
"4": "14"
}
},
"专注": {
"1": "97",
"2": "84",
"3": "85",
"4": "86",
"turbocharger": {
"1": "99",
"2": "87",
"3": "86",
"4": "99"
}
},
"lstart": {
"1": "46",
"2": "82",
"3": "81",
"4": "80"
},
"复仇女神": {
"1": "15",
"2": "51",
"3": "52",
"4": "54"
},
"R99": {
"1": "66",
"2": "67"
},
"猎兽": {
"1": "28",
"2": "24"
},
"喷火": {
"1": "79",
"2": "95",
"3": "96",
"4": "97"
},
"汗洛": {
"1": "73",
"2": "76",
"3": "75",
"4": "78"
},
"波塞克": {
"0": "53",
"caps": false
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/ReaSnowGun_s21.json
================================================
{
"p2020": {
"0": "45",
"caps": false
},
"re-45": {
"1": "95",
"2": "96"
},
"R-301": {
"1": "58",
"2": "59",
"3": "60",
"4": "61"
},
"平行步枪": {
"1": "62",
"2": "63",
"3": "64",
"4": "65"
},
"car": {
"1": "68",
"2": "69"
},
"电能": {
"1": "39",
"2": "70"
},
"转换者": {
"1": "71",
"2": "72"
},
"哈沃克": {
"1": "12",
"2": "18",
"3": "19",
"4": "47",
"turbocharger": {
"1": "48",
"2": "49",
"3": "13",
"4": "14"
}
},
"专注": {
"1": "83",
"2": "84",
"3": "85",
"4": "86",
"turbocharger": {
"1": "55",
"2": "55",
"3": "99",
"4": "99"
}
},
"lstart": {
"1": "46",
"2": "82",
"3": "81",
"4": "80"
},
"复仇女神": {
"1": "51",
"2": "15",
"3": "52",
"4": "54"
},
"R99": {
"1": "66",
"2": "67"
},
"猎兽": {
"1": "28",
"2": "97"
},
"喷火": {
"0": "79"
},
"汗洛": {
"1": "73",
"2": "76",
"3": "75",
"4": "78"
},
"波塞克": {
"0": "53",
"caps": false
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/ReaSnowGun_s21_v2.json
================================================
{
"R-301": {
"0": "58"
},
"平行步枪": {
"0": "59"
},
"哈沃克": {
"0": "82",
"turbocharger": {
"0": "60"
}
},
"lstart": {
"0": "61"
},
"专注": {
"0": "15",
"turbocharger": {
"0": "62"
}
},
"喷火": {
"0": "63"
},
"复仇女神": {
"0": "66"
},
"R99": {
"0": "34"
},
"电能": {
"0": "35"
},
"car": {
"0": "36"
},
"转换者": {
"0": "37"
},
"p2020": {
"0": "47",
"caps": false
},
"猎兽": {
"0": "48"
},
"re-45": {
"0": "55"
},
"汗洛": {
"0": "80"
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/ReaSnowGun_s21_v2_xb.json
================================================
{
"R-301": {
"0": "58"
},
"平行步枪": {
"0": "59"
},
"哈沃克": {
"0": "82",
"turbocharger": {
"0": "60"
}
},
"lstart": {
"0": "61"
},
"专注": {
"0": "15",
"turbocharger": {
"0": "62"
}
},
"喷火": {
"0": "63"
},
"复仇女神": {
"0": "66"
},
"R99": {
"0": "34"
},
"电能": {
"0": "35"
},
"car": {
"0": "36"
},
"转换者": {
"0": "37"
},
"p2020": {
"0": "53",
"caps": false
},
"猎兽": {
"0": "53"
},
"re-45": {
"0": "55"
},
"汗洛": {
"0": "80"
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/ReaSnowGun_s22.json
================================================
{
"R-301": {
"0": "58"
},
"平行步枪": {
"0": "59"
},
"哈沃克": {
"0": "79",
"turbocharger": {
"0": "60"
}
},
"lstart": {
"0": "61"
},
"专注": {
"0": "15",
"turbocharger": {
"0": "62"
}
},
"喷火": {
"0": "63"
},
"复仇女神": {
"0": "66"
},
"R99": {
"0": "34"
},
"电能": {
"0": "35"
},
"car": {
"0": "36"
},
"转换者": {
"0": "37"
},
"p2020": {
"0": "47",
"caps": false
},
"猎兽": {
"0": "48"
},
"re-45": {
"0": "55"
},
"汗洛": {
"0": "80"
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/ReaSnowGun_v2.json
================================================
{
"p2020": {
"0": "45",
"caps": false
},
"G7": {
"0": "45",
"caps": false
},
"re-45": {
"1": "95",
"2": "96"
},
"R-301": {
"1": "58",
"2": "59",
"3": "60",
"4": "61"
},
"平行步枪": {
"1": "62",
"2": "63",
"3": "64",
"4": "65"
},
"car": {
"1": "68",
"2": "69"
},
"电能": {
"1": "39",
"2": "70"
},
"转换者": {
"1": "71",
"2": "72"
},
"哈沃克": {
"1": "12",
"2": "18",
"3": "19",
"4": "47",
"turbocharger": {
"1": "48",
"2": "49",
"3": "13",
"4": "14"
}
},
"专注": {
"1": "83",
"2": "84",
"3": "85",
"4": "86",
"turbocharger": {
"1": "54",
"2": "54",
"3": "99",
"4": "99"
}
},
"lstart": {
"1": "46",
"2": "82",
"3": "81",
"4": "80"
},
"复仇女神": {
"1": "15",
"2": "51",
"3": "52",
"4": "54"
},
"R99": {
"1": "66",
"2": "67"
},
"猎兽": {
"1": "28",
"2": "24"
},
"喷火": {
"1": "79",
"2": "95",
"3": "96",
"4": "97"
},
"汗洛": {
"1": "73",
"2": "75",
"3": "76",
"4": "78"
},
"波塞克": {
"0": "53",
"caps": false
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/ReaSnowGun_xc_v12.json
================================================
{
"p2020": {
"0": "45",
"caps": false
},
"re-45": {
"1": "95",
"2": "96"
},
"R-301": {
"1": "58",
"2": "59",
"3": "60",
"4": "61"
},
"平行步枪": {
"1": "62",
"2": "63",
"3": "64",
"4": "65"
},
"car": {
"1": "68",
"2": "69"
},
"电能": {
"1": "39",
"2": "70"
},
"转换者": {
"1": "71",
"2": "72"
},
"哈沃克": {
"1": "12",
"2": "18",
"3": "19",
"4": "47",
"turbocharger": {
"1": "48",
"2": "49",
"3": "13",
"4": "14"
}
},
"专注": {
"1": "83",
"2": "84",
"3": "85",
"4": "86",
"turbocharger": {
"1": "55",
"2": "55",
"3": "99",
"4": "99"
}
},
"lstart": {
"1": "46",
"2": "82",
"3": "81",
"4": "80"
},
"复仇女神": {
"1": "51",
"2": "15",
"3": "52",
"4": "54"
},
"R99": {
"1": "66",
"2": "67"
},
"猎兽": {
"1": "28",
"2": "97"
},
"喷火": {
"0": "79"
},
"汗洛": {
"1": "73",
"2": "76",
"3": "75",
"4": "78"
},
"波塞克": {
"0": "53",
"caps": false
},
"close_key": "53",
"no_found_click_close_key": true
}
================================================
FILE: config/log.json
================================================
{
"log_mode": "console",
"core.image_comparator": "图片对比",
"net.socket.NetImageComparator": "图片对比",
"core.joy_listener": "手柄监听",
"core.screentaker": "截图",
"core.RecoildsCore": "键鼠压枪",
"core.ReaSnowSelectGun": "枪械识别",
"core.SelectGun": "枪械识别",
"core.joy_listener.S1SwitchMonitor": "按住切层",
"mouse_mover": "键鼠触发器",
"net.socket.Server": "连接监听"
}
================================================
FILE: config/m2.txt
================================================
r301 f1 f2 f3 f4
平行 f5 f6 f7 f8
r99 f9 f10
car f11 f12
电冲 0 prt
转换者 scr pau
哈沃克 i o p [
哈沃克涡轮 ] j \ K
re45 7 8
p2020 -
专注 pad\ pad\ pad* pad-
专注涡轮 pad. pad+ pad- pad.
猎兽 Y U
lstar = up down right
复仇 L ; ' ,
汗洛 ins del pageUp pageDown
喷火 left pad7 pad8 pad9
V2
r301 f1 f2 f3 f4 58 59 60 61
平行 f5 f6 f7 f8 62 63 64 65
r99 f9 f10 66 67
car f11 f12 68 69
电冲 0 prt 39 70
转换者 scr pau 71 72
哈沃克 i o p [ 12 18 19 47
哈沃克涡轮 ] \ j K 48 49 13 14
re45 pad7 pad8 95 96
p2020 - 45
专注 num_lock pad\ pad* pad- 83 84 85 86
专注涡轮 . . pad. pad. 55 99
猎兽 Y U 28 24
lstar = up down left 46 82 81 80
复仇 L ; ' , 15 51 52 54
汗洛 ins pageUp del pageDown 73 75 76 78
喷火 right pad7 pad8 pad9 79 95 96 97
V21
r301 f1 f2 f3 f4 58 59 60 61
平行 f5 f6 f7 f8 62 63 64 65
r99 f9 f10 66 67
car f11 f12 68 69
电冲 0 prt 39 70
转换者 scr pau 71 72
哈沃克 i o p [ 12 18 19 47
哈沃克涡轮 ] \ j K 48 49 13 14
re45 pad7 pad8 95 96
p2020 - 45
专注 num_lock pad\ pad* pad- 83 84 85 86
专注涡轮 . . pad. pad. 55 99
猎兽 Y pad9 28 97
lstar = up down left 46 82 81 80
复仇 ; L ' , 51 15 52 54
汗洛 ins del pageUp pageDown 73 76 75 78
喷火 right
V21 V2
R301 F1 58
平行 F2 59
哈沃克涡轮 F3 60
L-STAR F4 61
专注涡轮 F5 62
喷火 F6 63
复仇女神 F9 66
R99 5 34
电充 6 35
car 7 36
转换者 8 37
p2020 [ 47
猎兽 ] 48
专注无涡轮 L 15
re45 . 55
哈沃克无涡轮 Up 82
汗洛 Left 80
星辰v10 s21
R301 pad1 F2 F3 F4
r99 F9
电冲 0 Prtsc
喷火 Right pad7 pad8
平行 F5 F6 F7 F8
car F11 F12
汗洛 insert delete pgup pgdn
哈沃克无涡轮 i o p
哈沃克涡轮 ] \
复仇 L ; ' ,
lstar = Up Down
转换者 ScrLk
专注空投
s22
R301 F1
平行 F2
哈沃克涡轮 F3
lstar F4
专注涡轮 F5
喷火 F6
复仇 F9
r99 5
电冲 6
car 7
转换者 8
汗洛 Left
哈沃克无涡轮 Right
专注无涡轮 L
p2020 [
猎兽 ]
re45 .
星辰v12 s22
R301 pad1 F2 F3 F4
r99 F9
电冲 0 Prtsc
喷火 Right pad7 pad8 pad9
平行 F5 F6 F7 F8
car F11 F12
汗洛 insert delete pgup pgdn
哈沃克无涡轮 i o p
哈沃克涡轮 ] \ j
复仇 L ; ' ,
lstar = Up Down
转换者 ScrLk
专注空投
暴走 pad2 pad3 pad4
================================================
FILE: config/ref/client.json
================================================
{
"refresh_buttons": [
"1",
"2",
"f",
"F"
],
"mouse_mover": "win32api",
"rea_snow_mouse_mover": "distributed",
"server_mouse_mover": "fei_yi_lai",
"mouse_mover_params": {
"win32api": {},
"km_box": {
"VID/PID": "66882021"
},
"wu_ya": {
"VID/PID": "26121701"
},
"fei_yi_lai": {
"VID/PID": "C2160102"
},
"km_box_net": {
"ip": "192.168.2.188",
"port": "35368",
"uuid": "8A6E5C53"
},
"distributed": {
"ip": "127.0.0.1",
"port": 12345
},
"distributed_c1": {
"ip": "127.0.0.1",
"port": 12345
}
},
"log_model": "window",
"shake_gun_toggle": "false",
"shake_gun_toggle_button": [
[
"right"
],
[
"left",
"x2"
]
],
"shake_gun_trigger_button": "caps_lock",
"has_turbocharger": [
"专注",
"哈沃克"
],
"comparator_mode": "local",
"read_image_mode": "local",
"key_trigger_mode": "distributed",
"delayed_activation_key_list": {
},
"joy_to_key_map": {
"axis": {
"5": {
"key_type": "mouse",
"key": "left"
},
"4": {
"key_type": "mouse",
"key": "right"
}
}
},
"s1_switch_hold_map": {
"box": {
"key": {
"2": {
"delay": 550,
"detect_time": 250,
"skip_detect": false
}
},
"toggle_key": "29"
},
"bag": {
"key": {
"7": {
"delay": 0,
"detect_time": 350,
"skip_detect": true,
"skip_delay": 100
}
},
"toggle_key": "29"
},
"change_legend": {
"key": {
"6": {
"delay": 0,
"detect_time": 250,
"skip_detect": false
}
},
"toggle_key": "29"
}
},
"rea_snow_gun_config_name": "ReaSnowGun_s22",
"screen_taker": "local"
}
================================================
FILE: config/ref/client_bk.json
================================================
{
"refresh_buttons": [
"1",
"2",
"f",
"F"
],
"mouse_mover": "win32api",
"rea_snow_mouse_mover": "distributed",
"server_mouse_mover": "fei_yi_lai",
"mouse_mover_params": {
"win32api": {},
"km_box": {
"VID/PID": "66882021"
},
"wu_ya": {
"VID/PID": "26121701"
},
"fei_yi_lai": {
"VID/PID": "C2160102"
},
"km_box_net": {
"ip": "192.168.2.188",
"port": "35368",
"uuid": "8A6E5C53"
},
"distributed": {
"ip": "127.0.0.1",
"port": 12345
},
"distributed_c1": {
"ip": "127.0.0.1",
"port": 12345
}
},
"log_model": "window",
"shake_gun_toggle": "false",
"shake_gun_toggle_button": [
[
"right"
],
[
"left",
"x2"
]
],
"shake_gun_trigger_button": "caps_lock",
"has_turbocharger": [
"专注",
"哈沃克"
],
"comparator_mode": "net",
"read_image_mode": "net",
"key_trigger_mode": "distributed",
"delayed_activation_key_list": {
},
"joy_to_key_map": {
"axis": {
"5": {
"key_type": "mouse",
"key": "left"
},
"4": {
"key_type": "mouse",
"key": "right"
}
}
},
"s1_switch_hold_map": {
"box": {
"key": {
"2": {
"delay": 550,
"detect_time": 250,
"skip_detect": false
}
},
"toggle_key": "29"
},
"bag": {
"key": {
"7": {
"delay": 0,
"detect_time": 350,
"skip_detect": true,
"skip_delay": 100
}
},
"toggle_key": "29"
},
"change_legend": {
"key": {
"6": {
"delay": 0,
"detect_time": 250,
"skip_detect": false
}
},
"toggle_key": "29"
}
},
"rea_snow_gun_config_name": "ReaSnowGun_s22",
"screen_taker": "cap"
}
================================================
FILE: config/ref/server.json
================================================
{
"mouse_mover": "win32api",
"server_mouse_mover": "fei_yi_lai",
"mouse_mover_params": {
"win32api": {},
"km_box": {
"VID/PID": "66882021"
},
"wu_ya": {
"VID/PID": "26121701"
},
"fei_yi_lai": {
"VID/PID": "C2160102"
},
"km_box_net": {
"ip": "192.168.2.188",
"port": "35368",
"uuid": "8A6E5C53"
},
"distributed": {
"ip": "127.0.0.1",
"port": 12345
},
"distributed_c1": {
"ip": "127.0.0.1",
"port": 12345
}
},
"log_model": "window",
"read_image_mode": "local",
"rea_snow_gun_config_name": "ReaSnowGun_s22"
}
================================================
FILE: config/specs.json
================================================
[
{
"name": "复仇女神",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [],
"x": [],
"y": []
},
"aim": {
"time_points": [0, 18, 34, 47, 60, 79, 96, 136, 149, 161, 184, 197, 214, 233, 253, 269, 309, 379, 397, 410, 429, 448, 465, 484, 504, 517, 532, 545, 563, 576, 584, 600, 613, 631, 651, 666, 679, 692, 711, 730, 748, 766, 779, 798, 815, 830, 848, 866, 884, 901, 919, 933, 948, 962, 975, 992, 1005, 1020, 1033, 1046, 1059, 1076, 1093, 1111, 1131, 1149, 1166, 1184, 1197, 1209, 1221, 1233, 1244, 1260, 1278, 1293, 1308, 1328, 1346, 1363, 1382, 1390, 1402, 1418, 1431, 1442, 1453, 1468, 1484, 1502, 1519, 1537, 1553, 1572, 1587, 1599, 1612, 1628, 1636, 1647, 1664, 1683, 1702, 1725, 1739, 1756, 1770, 1784, 1800, 1817, 1831, 1846, 1861, 1870, 1887, 1905, 1920, 1932, 1948, 1966, 1985, 2002, 2012, 2029, 2046, 2056, 2067, 2079, 2101, 2115, 2134, 2149, 2164, 2181, 2199, 2212, 2220, 2234, 2246, 2261, 2280, 2300, 2317, 2336, 2350, 2366, 2382, 2396, 2412, 2426, 2438, 2450, 2462, 2476, 2495, 2511, 2532, 2553, 2570, 2587, 2606, 2623, 2632, 2644, 2660, 2675, 2691],
"x": [-2, -2, -1, -1, -1, 0, -1, -2, -3, -3, -1, 1, 0, 1, 1, 0, -1, -1, -1, -1, -1, 1, 3, 3, 4, 3, 3, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 2, 2, 1, 0, 0, -1, -1, -2, -2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, -1, -3, -2, -3, -3, -2, -1, -2, -1, -1, -1, -1, -2, -2, -3, -1, -1, 1, 0, 0, 0, 0, -1, -1, -1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 3, 3, 2, 1, 0, -1, -1, -1, 0, 0, 0, 3, 3, 3, 1, 3, 3, 3, 3, 3, 2, 1, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, -3, -3, -3, -1, -1, -1, -2, -1, -2, -1, 0, -1, -3, -3, -2, -3, -1, -1, -1, -1, -1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 2, 2, 2, 2, 1, 1],
"y": [0, 0, 6, 9, 9, 3, 4, 2, 8, 9, 6, 5, 7, 4, 1, 0, -1, 4, 6, 4, 2, 6, 8, 4, 6, 5, 6, 3, 2, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, 3, 4, 3, 1, 4, 6, 4, 9, 10, 8, 8, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 3, 4, 3, 5, 4, 2, 6, 7, 8, 6, 2, 1, 1, 0, 0, 1, -1, -1, 0, 0, 0, 0, 3, 5, 7, 5, 1, 4, 6, 6, 4, 4, 3, 4, 5, 5, 3, 1, -1, -3, -3, -2, 0, 0, 0, 1, 1, -1, -1, 1, 1, 1, -1, 4, 5, 4, 10, 8, 4, 2, 0, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 1, 2, 3, 2, 1, 4, 3, 3, 2, 4, 4, 1, 2, 1, -1, -1, -1, -2, -1, 0, 1, 4, 4, 3, 8, 8, 4, 4, 4, 3, 3, 4, 3, 0]
}
}
},
{
"name": "猎兽",
"type": "intermittent",
"recoils": {
"aim": [
{
"index": 0,
"time_points": [0, 18, 34, 48, 60, 71, 85, 104, 114, 128, 140, 152, 165, 183, 195, 208, 223, 239, 256, 268, 279],
"x": [1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1, -1, -2, -1, -1, -1],
"y": [5, 8, 12, 9, 10, 10, 8, 3, 3, 5, 5, 3, 4, 5, 3, 4, 4, 3, 1, 1, 1]
},
{
"index": 1,
"time_points": [0, 12, 25, 34, 49, 68, 86, 99, 113, 128, 138, 151, 166, 179, 196, 209, 221, 234, 246, 258, 269, 282, 292],
"x": [-1, 0, 0, 0, 0, -1, -1, -1, 2, 2, 3, 1, 1, -1, 0, 1, 2, 1, 1, 1, 1, 1, 1],
"y": [-1, -1, -1, 0, 1, 6, 6, 3, 8, 8, 8, 3, 5, 2, 1, 3, 3, 3, 3, 3, 1, 1, -2]
},
{
"index": 2,
"time_points": [0, 18, 30, 42, 52, 68, 85, 97, 109, 124, 140, 157, 170, 183, 195, 207, 219, 232, 248],
"x": [-1, 0, 0, 0, 0, 0, 1, 0, 1, 4, 5, 3, 2, 2, 1, 0, -1, 1, 2],
"y": [0, 0, -1, 0, 0, 1, 2, 1, 1, 3, 3, 3, 3, 3, 3, 2, 3, 3, 1]
},
{
"index": 3,
"time_points": [0, 23, 43, 60, 71, 83, 96, 106, 119, 134, 149, 161, 173, 188, 201, 214, 229, 245],
"x": [5, 5, 1, 0, 0, 0, 1, 1, 0, -2, -5, -3, -5, -1, 0, 1, 1, 1],
"y": [3, 3, 3, 1, 1, 2, 3, 3, 2, 1, 0, -1, 1, 2, 3, 3, 3, 2]
},
{
"index": 4,
"time_points": [0, 12, 24, 33, 45, 61, 70, 82, 97, 110, 123, 140, 159, 171, 189, 200, 214, 226, 239, 251, 263],
"x": [1, 0, 0, -5, -6, -7, -3, -6, -3, -1, 0, -2, -2, -3, -2, -1, -1, -1, -2, -1, -1],
"y": [1, 1, 1, 2, 2, 3, 2, 3, 1, 1, 0, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1]
},
{
"index": 5,
"time_points": [0, 12, 27, 39, 54, 67, 80, 91, 103, 116, 134, 147, 155, 171, 183, 193, 206, 220],
"x": [1, 1, -1, -1, -2, -1, -3, -7, -8, -6, 1, 3, 3, 1, -1, -5, -6, -6],
"y": [1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 0, -1, -1]
},
{
"index": 6,
"time_points": [0, 19, 36, 55, 73, 85, 95, 111, 125, 137, 153, 172, 191, 205, 221],
"x": [-1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 1, 1, -1, -1],
"y": [1, 0, -2, -1, 3, 3, 3, 3, 3, 2, 2, 1, 0, 2, 3]
}
],
"un_aim": [
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
}
]
}
},
{
"name": "汗洛",
"type": "intermittent",
"recoils": {
"aim": [
{
"index": 0,
"time_points": [0, 10, 26, 37, 47, 61, 75, 85, 99, 112, 123, 132, 148, 159, 174, 191, 200, 212, 228, 240],
"x": [-5, -5, -3, 1, 1, 3, 3, 3, 0, -1, -3, -3, -2, 3, 3, 3, 3, 3, 1, 0],
"y": [-5, -5, 1, 7, 13, 16, 9, 0, 0, -5, -3, -3, 0, 6, 14, 14, 2, 4, -4, -5]
},
{
"index": 1,
"time_points": [0, 18, 29, 38, 54, 65, 76, 91, 104, 121, 133, 146, 158, 171, 188, 206, 217, 227, 243, 256, 265],
"x": [-1, -1, 0, 1, 1, 1, 0, -1, 3, 4, 2, 3, 0, 1, 1, -1, -1, -1, -2, -3, -1],
"y": [-1, -1, 4, 6, 8, 6, 2, -2, 4, 9, 6, 7, 1, 6, 6, 4, 0, 0, -3, -3, -3]
},
{
"index": 2,
"time_points": [0, 12, 26, 37, 51, 69, 82, 95, 109, 123, 137, 150, 168, 183, 195, 208, 222, 234, 245],
"x": [2, 2, 3, 3, 2, -1, -2, 2, 5, 4, 3, 0, -1, 1, 2, 2, 1, -1, -2],
"y": [1, 2, 7, 10, 11, 0, -2, 4, 9, 9, 11, 3, -3, -1, 0, 0, 0, 3, 4]
},
{
"index": 3,
"time_points": [0, 19, 32, 48, 67, 85, 98, 115, 128, 140, 151, 162, 177, 190, 202, 218, 228, 242],
"x": [-1, -1, 3, 5, 4, 0, -1, 0, 1, 0, -1, -3, -3, -3, -1, 1, 0, -1],
"y": [-1, -1, 5, 6, 4, 0, 4, 6, 5, 6, 2, 5, 3, 2, -1, -2, -1, -2]
},
{
"index": 4,
"time_points": [0, 15, 29, 45, 57, 71, 88, 97, 112, 121, 136, 150, 158, 173, 186, 198, 210],
"x": [1, 0, 0, -1, -1, -3, -5, -3, -3, -1, 3, 1, 1, -1, -1, -3, -3],
"y": [0, 6, 9, 6, 6, 2, -1, -1, 1, 2, 0, 6, 9, 9, 6, 0, -3]
},
{
"index": 5,
"time_points": [0, 18, 35, 44, 56, 72, 81, 97, 105, 119, 134, 143, 158, 168, 184, 201, 211],
"x": [3, 3, 1, 0, 0, -1, -2, -1, 1, 3, 3, 3, 0, 5, 3, 0, -1],
"y": [-3, -3, 5, 8, 9, 6, 0, 0, -1, 0, 0, 2, 4, 6, 6, -2, -4]
},
{
"index": 6,
"time_points": [0, 18, 32, 46, 61, 73, 86, 98, 108, 119, 135, 148, 166],
"x": [-1, -1, 3, 5, 5, 3, -11, 1, -1, 3, 3, 3, 3],
"y": [-2, -2, 1, 5, 4, 5, 0, 2, 3, 4, 3, 1, 6]
},
{
"time_points": [0, 14, 26, 39, 49, 59, 75, 88, 100, 111, 125, 133, 145, 161, 173, 187],
"x": [-1, -1, 3, 5, 5, 3, 1, 1, -1, 0, 1, 1, 1, -1, 0, -1],
"y": [3, 2, 6, 6, 6, 0, -4, -3, -1, 2, 4, 6, 7, 4, 6, 0]
},
{
"index": 8,
"time_points": [0, 12, 24, 36, 48, 62, 81, 98, 116, 127, 140, 153, 165],
"x": [-2, -2, -2, -1, -1, -1, 1, -2, -1, -1, -1, -5, -5],
"y": [-5, -5, -2, 1, 4, 4, 0, 4, 6, 4, 4, 2, -1]
},
{
"index": 9,
"time_points": [0, 12, 24, 37, 47, 59, 72, 94, 110, 130, 144, 159, 172, 190, 200, 212],
"x": [-1, 0, -2, -1, 0, 1, 1, 2, 3, 1, 0, 3, 4, 5, -1, 0],
"y": [-5, -5, -1, 5, 7, 9, 6, -1, -2, -1, 1, 4, 6, 2, -2, -1]
}
],
"un_aim": [
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
},
{
"time_points": [],
"x": [],
"y": []
}
]
}
},
{
"name": "喷火",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 13, 25, 52, 67, 84, 106, 122, 145, 158, 170, 188, 206, 217, 235, 249, 266, 275, 290, 321,
339, 353, 369, 387, 430, 445, 466, 484, 504, 528, 545, 563, 583, 600, 617, 645, 656, 674,
692, 703, 715, 729, 746, 765, 783, 797, 808, 827, 844, 862, 875, 885, 904, 917, 935, 954,
966, 975, 997, 1007, 1024, 1044, 1061, 1080, 1093, 1111, 1124, 1141, 1154, 1171, 1189, 1207,
1223, 1250, 1267, 1282, 1300, 1317, 1335, 1348, 1365, 1383, 1439, 1452, 1474, 1490, 1502,
1535, 1553, 1572, 1584, 1598, 1655, 1670, 1682, 1695, 1707, 1740, 1755, 1767, 1779, 1793,
1808, 1821, 1839, 1868, 1880, 1891, 1904, 1915, 1939, 1951, 1992, 2011, 2024, 2043, 2060,
2072, 2095, 2105, 2122, 2132, 2151, 2169, 2187, 2200, 2217, 2236, 2249, 2266, 2283, 2302,
2320, 2339, 2355, 2371, 2387, 2400, 2412, 2430, 2443, 2460, 2473, 2485, 2503, 2522, 2541,
2553, 2568, 2578, 2595, 2613, 2629, 2643, 2660, 2673, 2686, 2703, 2719, 2739, 2753, 2762,
2779, 2796, 2807, 2819, 2832, 2849, 2863, 2875, 2887, 2903, 2919, 2934, 2944, 2964, 2981,
2996, 3013, 3025, 3043, 3056, 3069, 3086, 3099, 3115, 3126, 3141, 3152, 3169, 3184, 3198,
3209, 3216, 3231, 3249, 3265, 3287, 3314, 3328, 3336, 3352, 3366, 3377, 3394, 3412, 3424,
3442, 3458, 3472, 3486, 3502, 3516, 3528, 3540, 3553, 3564, 3576, 3589, 3605, 3616, 3635,
3647, 3661, 3673, 3684, 3698, 3715, 3728, 3740, 3757, 3767, 3785, 3800, 3814, 3829, 3862,
3876, 3892, 3905, 3922, 3939, 3968, 3982, 4000, 4018, 4033, 4039, 4068, 4082, 4100, 4111,
4123, 4136, 4154, 4167, 4180, 4193, 4211, 4228, 4250, 4268, 4294, 4312, 4320, 4340, 4355,
4372, 4384, 4397, 4414, 4427, 4446, 4457, 4470, 4488, 4507, 4518, 4536, 4549, 4568, 4584,
4600, 4613, 4623, 4640, 4658, 4670, 4688, 4702, 4718, 4736, 4754, 4768, 4790, 4810, 4824,
4840, 4859, 4876, 4889, 4901, 4919, 4936, 4950, 4974, 4998, 5010, 5023, 5039, 5052, 5063,
5104, 5114, 5135, 5153, 5195, 5210, 5227, 5245, 5262, 5277, 5293, 5316, 5336, 5353, 5372,
5390, 5408, 5420, 5438, 5448, 5464, 5480, 5494, 5505, 5518, 5536],
"x": [13, 13, 11, -12, -6, -6, -4, 12, -12, -5, -3, -1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 5,
3, 2, 1, 1, 1, 2, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -1, -2, -2,
-1, -1, 0, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 3, 1,
1, 1, 1, 3, 2, 3, 3, 2, 3, 4, 1, 1, 1, 1, 0, 1, 2, 1, 0, 0, 0, 0, 0, 3, 0, -1, -1, 0, 1, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 0, 0, 0, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -2, -2, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -1, -1, -2, -2,
-2, -2, -2, -2, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0, 0, 2, 2, 3, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 0, 0, 1,
1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 1, 1,
1, 2, 1, 3, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -2, -2, 0, -1, -1, 0, -1, -2, -1, -1,
-3, -3, -3, -2, -2, -1, -2, -1, -1, -2],
"y": [2, 1, 2, 4, 7, 7, 7, 3, 4, 4, 5, 4, 3, 2, 2, 2, 3, 3, 5, 2, 3, 2, 2, 2, 5, 3, 3, 4, 6, 5, 5, 3, 2, 3,
4, 7, 4, 4, 3, 3, 3, 3, 3, 3, 1, 1, 0, 1, 1, 6, -1, -1, -1, -2, -1, -1, -1, 0, -1, -2, -2, 0, 1, 1, 1,
1, 0, 1, 1, 2, 3, 2, 2, 2, 2, 6, 5, 2, 1, 0, 1, 4, 0, 0, 0, 2, 3, 0, 0, 0, 2, 1, -1, -1, -1, 0, 2, 2,
1, 0, 0, 0, 1, 2, 5, 3, 2, 2, 1, 1, 2, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0,
0, 0, 0, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 3, 3, 2, 0, 0, 1, 2, 3, 3, 2, 1, 1, 1, 1,
2, 2, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 0, 2, 6, 3, 1, 0, 0, -1, 1, 2, 3, 22, 1, -4, -4, -4, -3, -2,
3, 6, 3, 3, 2, 1, 1, 2, 2, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 3,
3, 3, 3, 2, 2, 2, 3, 4, 1, 1, 1, 0, 2, 3, 6, 2, 1, 1, 1, 5, 20, 0, -5, -5, -5, -3, -1, 6, 2, -1, -3,
-4, -2, 0, 3, -1, -1, -1, 0, 1, 3, 3, 3, 1, 1, 1, 2, 3, 7, 5, 3, 1, 1, 1, 1, 1, 2, 2, 1, 0, 0, 1, 1,
1, 1, 0, 0, 0, 1, 2, 2, 0, 0, 0, 2, 1, 3, 4, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1]
},
"aim": {
"time_points": [0, 16, 127, 145, 233, 250, 268, 343, 372, 389, 441, 456, 483, 502, 520, 535, 547, 577, 595, 614, 631, 650, 665, 680, 699, 717, 735, 754, 772, 791, 809, 828, 847, 865, 883, 902, 920, 934, 952, 970, 987, 1007, 1025, 1043, 1060, 1079, 1098, 1117, 1135, 1150, 1166, 1185, 1199, 1215, 1233, 1251, 1271, 1288, 1308, 1326, 1344, 1363, 1387, 1405, 1420, 1435, 1454, 1472, 1492, 1510, 1531, 1547, 1565, 1589, 1608, 1627, 1643, 1657, 1677, 1695, 1709, 1731, 1749, 1765, 1783, 1798, 1817, 1833, 1848, 1867, 1885, 1903, 1920, 1935, 1959, 1986, 2002, 2021, 2038, 2059, 2076, 2095, 2114, 2131, 2148, 2167, 2181, 2200, 2217, 2235, 2250, 2266, 2285, 2303, 2323, 2340, 2358, 2378, 2396, 2415, 2433, 2451, 2465, 2486, 2501, 2519, 2537, 2566, 2583, 2602, 2619, 2640, 2656, 2674, 2688, 2705, 2723, 2752, 2771, 2789, 2815, 2834, 2852, 2870, 2887, 2903, 2923, 2942, 2960, 2981, 2997, 3014, 3033, 3051, 3069, 3088, 3105, 3124, 3143, 3161, 3179, 3197, 3217, 3234, 3253, 3271, 3287, 3302, 3318, 3331, 3346, 3362, 3378, 3395, 3411, 3428, 3445, 3463, 3483, 3500, 3518, 3537, 3555, 3574, 3614, 3630, 3644, 3660, 3680, 3697, 3715, 3731, 3746, 3765, 3784, 3802, 3821, 3839, 3856, 3869, 3889, 3907, 3925, 3944, 3963, 3983, 4000, 4018, 4037, 4053, 4063, 4079, 4098, 4117, 4135, 4149, 4165, 4184, 4203, 4219, 4234, 4252, 4271, 4288, 4307, 4325, 4344, 4359, 4371, 4384, 4398, 4418, 4436, 4455, 4473, 4492, 4510, 4529, 4549, 4565, 4585, 4603, 4620, 4637, 4652, 4670, 4688, 4706, 4726, 4744, 4762, 4780, 4799, 4814, 4830, 4850, 4866, 4885, 4902, 4914, 4929, 4946, 4966, 4984, 5009, 5027, 5051, 5070, 5085, 5100, 5118, 5137, 5156, 5175, 5192, 5211, 5229, 5247, 5266, 5282, 5297, 5316, 5364],
"x": [-1, -2, -3, -2, 3, 5, 3, 3, 4, 4, 2, 3, 3, 1, 0, 0, 1, 0, 1, 0, -1, -1, -1, -1, -1, -1, -1, -2, -3, -3, -2, -1, 0, -1, -1, -1, -1, -1, 0, -1, 0, 1, 1, 1, 0, -1, -1, -2, -1, -1, -1, 0, 2, 2, 1, 1, 1, 1, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 0, 1, 3, 1, 3, 3, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -3, -3, -3, -1, -1, -1, -3, -3, -1, 0, -1, -1, -1, -1, 0, 1, 0, -1, -2, -1, -1, -1, 1, 1, 2, 1, 1, 1, -1, -3, -5, -3, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, 1, 2, 1, 1, 1, -1, 1, 2, 3, 2, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 1, 2, 1, -1, 0, 1, 1, 1, -1, -1, 0, 0, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, 2, 2, 1, 1, -1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -3, -3, -2, -1, -1, -1, -3, -4, -3, -2, -1, -1, -1, -3, -3],
"y": [9, 14, 14, 10, 4, 9, 5, 7, 5, 6, 5, 12, 7, 4, 2, 4, 4, 9, 4, 2, 1, 1, 5, 4, 1, 0, 0, 0, 0, 1, 0, -1, -2, -1, 1, 4, 0, -2, -2, 0, 2, 4, 3, 2, 0, 2, 4, 11, 4, 0, 1, 0, 2, 3, 2, 0, 0, 0, 2, 3, 3, 1, 0, 0, 2, 4, 0, 0, 0, 0, 0, 9, 0, -2, -3, -2, 0, 6, 0, -2, -2, -2, 2, 4, 7, 2, 0, 0, 2, 5, 3, 2, 0, 0, 1, 7, 3, 0, -2, 0, 0, 11, 0, -2, -2, -2, -2, 7, 1, -3, -3, -3, 0, 4, 5, 2, 0, 0, 1, 2, 2, 0, 0, 0, 1, 3, 6, 1, -1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 0, -2, -2, -2, -2, 4, 0, -1, 0, 0, 4, 5, 4, 2, 2, 0, 2, 4, 1, 0, 0, 0, 0, 2, 0, -2, -2, -2, -2, 0, 6, 0, -3, -3, -3, -1, 1, 0, 0, 0, 0, 2, 6, 4, 2, 2, 0, 0, 7, 1, -2, -2, 0, 2, 4, 3, 2, 0, 0, 0, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 3, 5, 7, 5, 1, -1, 2, 4, 5, 5, 5, 2, 0, 0, 2, 2, 1, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 2, 2, 5, 4, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 2, 2, 2, 0, 2, 3, 11, 2, -1, -2, 0, 2, 7, 0, -2, -2, -1, -1, 0]
}
}
},
{
"name": "re-45",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [26, 33, 42, 54, 61, 72, 80, 90, 102, 109, 122, 129, 139, 147, 158, 166, 172, 182, 194,
200, 209, 218, 232, 244, 255, 263, 273, 280, 287, 295, 305, 317, 324, 336, 348, 360,
372, 380, 390, 401, 410, 421, 433, 452, 459, 470, 477, 489, 501, 508, 519, 528, 537,
546, 555, 565, 573, 587, 595, 605, 613, 624, 631, 642, 654, 667, 679, 686, 693, 704,
716, 724, 734, 742, 753, 760, 770, 778, 790, 798, 808, 820, 833, 844, 851, 862, 871,
882, 890, 900, 906, 918, 929, 937, 948, 957, 967, 979, 988, 998, 1009, 1019, 1029, 1038,
1047, 1055, 1066, 1077, 1086, 1097, 1108, 1119, 1127, 1137, 1142, 1152, 1163, 1171,
1178, 1188, 1197, 1206, 1218, 1225, 1237, 1249, 1261, 1273, 1281, 1290, 1299, 1310,
1324, 1334, 1347, 1355, 1371, 1384, 1391, 1402, 1410, 1420, 1427, 1439, 1450, 1457,
1467, 1473, 1483, 1494, 1506, 1514, 1522, 1531, 1543, 1554, 1561, 1574, 1584, 1593,
1605, 1611, 1623, 1635, 1647, 1654, 1666, 1674, 1685, 1697, 1707, 1716, 1724, 1733,
1743, 1752, 1759, 1770, 1782, 1793, 1800, 1813, 1820, 1831, 1844, 1851, 1862, 1874,
1886, 1894, 1902, 1912, 1923, 1931],
"x": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2,
-2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
-3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5,
-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -2, -1, -1, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, -1, 0,
-2, -2, -2, -3, -3, -3, -2, -2, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, -1, -1, -2, -2, -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1,
-1, 12, -1, -2, -4, -4, -4, -4, -4],
"y": [0, 1, 2, 2, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 5, 6, 6, 7, 6, 6, 6, 6, 5,
5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3,
3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, 2, 1, -1, -2, -2, -2, -2]
},
"aim": {
"time_points": [0, 11, 24, 37, 51, 66, 78, 91, 101, 116, 132, 146, 158, 171, 189, 197, 210, 225, 234, 251, 262, 275, 283, 299, 312, 324, 336, 351, 367, 379, 389, 399, 416, 428, 440, 449, 465, 473, 490, 508, 520, 534, 546, 562, 572, 584, 597, 612, 625, 642, 651, 667, 678, 689, 700, 717, 728, 740, 751, 765, 776, 789, 798, 810, 825, 839, 851, 864, 875, 883, 900, 919, 927, 943, 960, 974, 982, 998, 1010, 1019, 1031, 1046, 1059, 1072, 1080, 1094, 1109, 1122, 1136, 1151, 1160, 1173, 1188, 1206, 1217, 1231, 1243, 1254, 1269, 1286, 1305, 1324, 1340, 1354, 1363, 1379, 1387, 1404, 1421, 1430, 1442, 1458, 1467, 1482, 1493, 1507, 1515, 1530, 1541, 1555, 1568, 1581, 1593, 1611, 1624, 1636, 1648, 1666, 1678, 1694, 1706, 1717, 1730, 1745, 1758, 1770, 1781, 1791, 1804, 1819, 1838, 1856, 1874, 1887, 1904, 1914],
"x": [-4, -6, -5, -2, 3, 3, 3, 2, 1, -3, -4, -1, -1, 0, -7, -12, -12, -7, 4, 8, 6, 3, 0, -3, -4, -3, -5, 1, 2, 4, 3, -2, -7, -10, -8, -3, 1, 5, 3, 1, -1, -1, 1, -8, -10, -12, -7, 1, 8, 1, -8, -9, -10, -3, 1, 1, 1, -1, -2, -1, -3, -3, -2, 1, 3, 5, 4, 1, -1, -2, -3, 1, 1, -3, -3, -1, -1, 1, -3, -7, -7, -6, 1, 2, 3, -1, -1, -2, 0, 1, 1, 3, 3, 1, -1, -3, -8, -10, -7, 3, 5, 1, 0, -1, -1, -3, -7, -8, -1, 4, 4, 7, 6, 4, 2, 0, -2, -3, -5, -3, -1, 0, 2, -1, -7, -10, -9, 1, 6, -1, -6, -7, -6, -1, 1, 0, 0, -1, -1, -1, -5, -6, -3, 6, 8, -1, -1],
"y": [0, 0, 0, 8, 15, 9, 10, 1, -2, 5, 9, 8, 8, 1, -1, 2, 3, 4, 3, 1, 6, 9, 10, 5, -2, -8, -1, 8, 11, 10, 2, -2, -4, -4, -2, -1, 0, 2, 6, 5, 0, -3, -3, -1, 2, 2, 3, 1, 1, 0, -1, -1, -1, -1, 3, 7, 9, 7, 1, -1, -1, 1, 3, 5, 3, 2, 2, 6, 6, 6, 1, -4, -1, 6, 10, 6, 6, 0, 2, 0, 1, 0, 0, 0, 3, 3, 5, 3, -1, -2, 5, 8, 12, 2, -2, 1, 6, 8, 8, -1, -5, -4, -2, -1, -1, -1, -1, -1, 1, 1, 1, 1, 3, 3, 2, 1, -1, -1, -2, -1, -1, -1, -1, 3, 10, 11, 9, -2, -5, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 2, -6, -6]}
}
},
{
"name": "转换者",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 12, 16, 31, 41, 50, 61, 70, 81, 92, 105, 115, 124, 136, 143, 151, 162, 173, 185, 195,
203, 215, 228, 240, 251, 263, 271, 282, 295, 303, 314, 326, 337, 347, 356, 369, 381,
393, 401, 412, 423, 435, 448, 460, 466, 479, 492, 503, 515, 523, 533, 546, 554, 561,
577, 590, 602, 639, 651, 663, 672, 680, 694, 708, 718, 737, 749, 762, 773, 784, 797,
809, 817, 830, 838, 848, 859, 872, 883, 897, 909, 920, 929, 939, 951, 961, 969, 982,
990, 1000, 1012, 1021, 1031, 1043, 1055, 1062, 1073, 1081, 1093, 1104, 1116, 1128, 1141,
1153, 1164, 1178, 1186, 1197, 1209, 1220, 1233, 1243, 1257, 1269, 1276, 1289, 1300,
1312, 1326, 1334, 1345, 1356, 1365, 1377, 1386, 1398, 1408, 1417, 1429, 1442, 1453,
1465, 1478, 1491, 1503, 1515, 1527, 1541, 1552, 1565, 1577, 1589, 1600, 1612, 1625,
1633, 1643, 1652, 1662, 1670, 1681, 1692, 1701, 1711, 1723, 1733, 1742, 1753, 1763,
1772, 1784, 1795, 1800, 1809, 1822, 1833, 1841, 1851, 1863, 1871, 1881, 1890, 1901,
1909, 1917, 1931, 1942, 1950, 1955, 1969, 1981, 1993, 2007, 2018, 2029, 2038, 2048,
2061, 2074, 2085, 2099, 2111, 2123, 2134, 2147, 2158, 2170, 2183, 2197, 2208, 2220,
2233, 2245, 2258, 2269, 2281, 2293, 2302, 2312, 2325, 2337, 2349, 2361, 2373, 2385,
2399, 2411, 2423, 2434, 2448, 2460, 2472, 2481, 2496, 2509, 2527, 2539, 2551, 2563,
2575, 2587, 2597, 2606, 2618, 2629, 2636, 2649, 2661, 2668, 2679, 2690, 2698, 2709,
2718, 2729, 2741, 2752, 2761, 2771, 2779, 2790, 2801, 2810, 2820, 2832, 2840, 2851,
2859, 2868, 2878, 2887, 2899, 2908, 2918, 2930, 2937, 2948, 2956, 2968, 2980, 2992,
3004, 3014, 3022, 3029],
"x": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 1, 0, 1, 1, -7, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0,
1, 0, 0, -1, -1, -1, -1, -1, -2, -2, -2, -2, -1, 0, 0, 1, 1, 1, 1, 1, 15, 0, 0, -1, -3, -3, -3,
-3, -3, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0,
0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 10, 0, 1, -2, -2, -2, -2, -1,
-1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 0, -1, -2, -2, -2, -2, -2, -1, 0, 1, 2, 1, 2, 2, 2, 2, 1,
1, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1,
2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 14, 0, 0, 0, -2, -2, -2, -2, -2, -2,
-2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, 14, -1, -1, -1, -3, -3, -3,
-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -2],
"y": [1, 1, 0, 1, 2, 3, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 5, 4, 4, 4, 4, 4,
4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 5, 5, 4, 4, 4, 3, 5, 5, 4, 4, 4, 4, 4, 3, 3, 4, 4, 5, 4, 4, 4, 4, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 2, -21, 2, 3, 3, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3,
3, 3, 3, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2,
2, 2, 2, 2, 2, 4, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, -1, 1, 1, 1, 2, 2, 2, 2, 2,
2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, -23, 1,
1, 1, 3, 4, 4, 3, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 21, -1, -2, -3,
-5, -5, -6, -6, -5, -5, -5, -5, -5, -4, -4, -4, -3, -3, -2, -3]
},
"aim": {
"time_points": [0, 92, 128, 141, 156, 184, 221, 233, 246, 263, 276, 291, 307, 325, 338, 387, 405, 423, 436, 462, 478, 490, 509, 524, 540, 560, 577, 595, 615, 630, 645, 662, 682, 700, 721, 737, 756, 773, 792, 810, 829, 847, 860, 876, 892, 909, 928, 947, 964, 977, 996, 1014, 1029, 1042, 1054, 1069, 1089, 1106, 1121, 1137, 1155, 1174, 1193, 1207, 1222, 1239, 1255, 1272, 1290, 1309, 1327, 1343, 1358, 1378, 1395, 1413, 1432, 1450, 1469, 1484, 1499, 1511, 1527, 1543, 1558, 1573, 1591, 1610, 1629, 1643, 1663, 1679, 1697, 1714, 1730, 1746, 1758, 1777, 1795, 1809, 1826, 1844, 1862, 1881, 1896, 1913, 1930, 1943, 1958, 1969, 1986, 2008, 2022, 2041, 2059, 2078, 2096, 2114, 2135, 2153, 2174, 2187],
"x": [-1, -1, -3, -4, -5, -1, 0, 1, 1, 1, 0, -1, -2, -3, -1, 0, 1, 2, 3, 1, -1, -1, -3, -3, -1, -2, 1, 5, 5, 3, 3, -1, -3, -3, -3, -3, -1, 1, 2, 4, 3, 3, -1, -3, -5, -4, -3, -1, 1, 3, 4, 3, 3, 1, -1, -2, -3, -3, -3, -3, -1, 1, 0, -1, 0, 1, -1, -2, -3, -1, -1, 1, 2, 3, 3, 5, 3, -1, -3, -3, -1, -1, -3, 1, 5, 5, 4, 2, 1, -1, -2, -3, -3, -1, -2, 3, 5, 6, 5, 5, 1, -1, -1, -3, -1, -1, 1, 3, 5, 5, 6, 1, 0, 0, -1, -2, -2, -1, 1, 3, 3, 2],
"y": [4, 10, 12, 14, 9, 2, 4, 5, 7, 3, 1, 4, 7, 10, 6, 11, 14, 13, 5, 1, 3, 5, 9, 7, 4, 0, 4, 11, 13, 8, 6, 0, 0, 4, 2, 0, 0, 4, 7, 9, 6, 2, 2, 4, 5, 4, 4, 1, 4, 6, 7, 7, 1, 0, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 5, 4, 2, 3, 4, 5, 6, 5, 2, 3, 4, 5, 4, 4, 1, 0, 0, 1, 0, 0, 0, 2, 4, 6, 5, 4, 1, 0, 1, 0, 2, 1, 0, 0, 2, 4, 2, 1, 0, 0, 0, 1, 0, 0, 0, 4, 5, 4, 3, 1, 0, 1, 2, -1]
}
}
},
{
"name": "暴走",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 12, 24, 55, 66, 82, 96, 108, 116, 127, 139, 150, 163, 176, 184, 194, 206, 219, 234,
245, 256, 267, 278, 288, 298, 310, 322, 330, 340, 353, 365, 378, 385, 396, 409, 421,
433, 443, 452, 464, 489, 500, 513, 526, 538, 547, 562, 570, 581, 592, 605, 613, 623,
635, 643, 652, 698, 709, 722, 733, 746, 757, 770, 783, 795, 807, 819, 831, 844, 857,
869, 880, 889, 899, 911, 920, 930, 940, 954, 966, 978, 990, 997, 1009, 1019, 1028, 1038,
1048, 1059, 1071, 1083, 1096, 1108, 1119, 1130, 1143, 1151, 1163, 1172, 1182, 1193,
1205, 1217, 1229, 1242, 1254, 1264, 1273, 1283, 1293, 1304, 1315, 1325, 1335, 1346,
1359, 1371, 1383, 1395, 1407, 1416, 1426, 1438, 1450, 1462, 1470, 1478, 1488, 1497,
1509, 1521, 1531, 1543, 1552, 1566, 1579, 1592, 1605, 1616, 1629, 1640, 1653, 1665,
1695, 1704, 1713, 1723, 1732, 1744, 1756, 1767, 1775, 1789, 1800, 1809, 1823, 1831,
1843, 1851, 1859, 1873, 1910, 1922, 1929, 1940, 1953, 1965, 1973, 1984, 1996, 2008,
2021, 2032, 2044, 2058, 2075, 2088, 2096, 2107, 2119, 2130, 2138, 2147, 2155, 2167,
2175, 2186, 2198, 2207, 2217, 2229, 2243, 2253, 2276, 2284, 2296, 2306, 2316, 2327,
2339, 2352, 2363, 2375, 2388, 2396, 2406, 2416, 2425, 2438, 2449, 2457, 2468, 2476,
2486, 2498, 2506, 2517, 2528, 2541, 2549, 2560, 2567, 2578, 2590, 2598, 2608, 2621,
2629, 2639, 2649, 2658, 2666, 2682, 2694, 2707, 2717, 2725, 2737, 2750, 2760, 2769,
2780, 2792, 2805, 2816, 2828, 2841, 2853, 2865, 2873, 2884, 2896, 2907, 2915, 2926,
2938, 2945, 2958, 2970, 2982, 2995, 3007, 3018, 3027, 3037, 3049, 3058, 3068, 3079,
3089, 3098, 3112, 3122, 3135, 3143, 3154, 3165, 3177, 3191, 3203, 3214, 3226, 3241,
3253, 3264, 3276, 3288, 3301, 3313, 3325, 3338, 3350, 3362, 3374, 3386, 3399, 3411,
3422, 3435, 3447, 3460, 3473, 3481, 3492, 3503, 3515, 3527, 3540, 3552, 3564, 3577,
3589, 3600, 3613, 3625, 3638, 3650, 3662, 3674, 3684, 3699, 3713, 3724, 3736, 3748,
3761, 3774, 3785, 3798, 3810, 3822, 3834, 3846, 3859, 3870, 3884, 3895, 3907, 3915,
3925, 3938, 3944, 3956, 3969, 3980, 3988, 4000, 4015, 4025, 4036, 4048, 4056, 4067,
4078, 4091, 4098, 4110, 4122, 4134, 4145, 4154, 4164, 4176, 4184, 4197, 4208, 4219,
4231, 4245, 4257, 4266, 4280, 4293, 4301, 4312, 4324, 4336, 4348, 4360, 4368, 4379,
4387, 4397, 4409, 4417, 4425, 4434, 4445, 4458, 4470, 4478, 4489, 4502, 4513, 4522,
4533, 4544, 4552, 4563, 4574, 4587, 4594, 4605, 4617, 4629, 4642, 4650, 4661, 4673,
4682, 4691, 4699, 4710, 4722, 4733, 4746, 4754, 4764, 4777, 4790, 4800, 4813, 4824,
4832, 4844, 4852, 4863, 4876, 4888, 4899, 4908, 4918, 4926, 4937, 4944, 4955, 4967,
4980, 4990, 5003, 5011, 5022, 5034, 5047, 5060, 5074, 5083, 5095, 5104, 5117, 5127,
5139, 5150, 5161, 5170, 5180, 5190, 5200, 5207, 5219, 5230, 5243, 5261, 5286, 5298,
5310, 5318, 5328, 5338, 5353, 5365, 5373, 5384, 5395, 5407, 5415, 5427, 5439, 5450,
5462, 5474, 5483, 5493, 5508, 5519, 5530, 5542, 5549, 5562, 5573, 5585, 5593, 5605,
5617, 5630, 5641, 5655, 5665, 5677, 5690, 5698, 5708, 5722, 5733, 5745, 5758, 5770,
5782, 5794, 5802, 5813, 5826, 5837, 5847, 5857, 5867, 5880, 5891, 5899, 5910, 5918,
5929, 5937, 5948, 5961, 5972, 5984, 5997, 6009, 6016, 6027, 6040, 6050, 6060, 6094,
6101, 6113, 6125, 6137, 6146, 6156, 6168, 6180, 6192, 6200, 6210, 6222, 6230, 6242,
6253, 6265, 6278, 6286, 6297, 6310, 6318, 6327, 6340, 6353, 6365, 6376, 6388, 6400,
6408, 6420, 6431, 6443, 6451, 6463, 6474, 6496, 6507, 6517, 6529, 6542, 6552, 6561,
6573, 6585, 6593, 6604, 6616, 6623, 6633, 6646, 6659, 6677, 6695, 6707, 6716, 6727,
6739, 6750, 6763, 6775, 6788, 6800, 6812, 6822, 6830, 6842, 6850, 6892, 6905, 6912,
6923, 6934, 6946, 6957, 6965, 6977, 6989, 6997, 7009, 7020, 7033, 7045, 7055, 7064,
7075, 7088, 7100, 7112, 7124, 7139, 7151, 7164, 7174, 7186, 7199, 7212, 7223, 7234,
7247, 7255, 7266, 7278, 7290, 7302, 7312, 7320, 7333, 7345, 7357, 7370, 7382, 7394,
7407, 7419, 7430, 7443, 7450, 7462, 7474, 7486, 7494, 7506, 7517, 7529, 7540, 7554,
7566, 7573, 7586, 7597, 7610, 7622, 7634, 7647, 7659, 7671, 7689, 7700, 7713, 7726,
7734, 7745, 7757, 7766, 7776, 7788, 7799, 7810, 7819, 7830, 7843, 7850, 7860, 7872,
7880, 7892, 7908, 7916, 7926, 7936, 7947, 7959, 7972, 7984, 7995, 8008, 8021, 8033,
8045, 8057, 8070, 8082, 8094, 8106, 8114, 8125, 8137, 8149, 8167, 8192, 8204, 8213,
8225, 8235, 8240, 8253, 8263, 8273, 8284, 8296],
"x": [0, 0, 0, 2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
0, 0, 0, 0, 1, 2, 2, 14, 14, 1, 0, -1, -1, -2, -2, -1, -1, -1, -1, -1, -1, 1, 1, 2, 1, 1, 1, 0, 1,
0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 2, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2,
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
0, 0, 1, 2, 3, 13, 13, 3, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1, -1, 1, 1, 2, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 2, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 2,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 2, 3, 14, 3, 1, 0, -1, -1, -1, -1, -1,
-1, -1, -1, 0, 0, 1, 0, 2, 2, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 6, 13, 13,
6, 1, -2, -3, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 1, 3, 2, 2, 2, 1, 0, 0, 0, 0, -1, -1, -1, 0,
0, 0, 0, 1, 5, 5, 2, 2, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 3, 2, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 14, 13, 3, 0, 0, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0,
1, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2],
"y": [7, 7, 7, -2, -3, -3, -3, -2, -2, -2, -2, -1, 3, 6, 7, 7, 6, 6, -3, -4, -4, -3, -3, -2, -3, -2, -2,
-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1,
0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1,
-1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0,
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1,
1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -2, -2, -1, -2, -1, -2]
},
"aim": {
"time_points": [0, 12, 21, 30, 43, 53, 62, 73, 85, 93, 103, 112, 122, 134, 141, 154, 165, 178, 190, 202,
214,
227, 239, 250, 259, 269, 281, 294, 306, 318, 330, 338, 351, 362, 374, 386, 398, 411,
422, 432,
442, 454, 466, 478, 490, 502, 514, 527, 538, 551, 564, 572, 583, 595, 606, 618, 631,
644, 655,
668, 675, 687, 698, 708, 718, 730, 742, 754, 766, 778, 790, 803, 815, 828, 840, 852,
864, 877,
888, 901, 913, 925, 938, 951, 963, 974, 986, 1000, 1012, 1023, 1035, 1048, 1060, 1070,
1078,
1090, 1100, 1115, 1127, 1140, 1151, 1165, 1177, 1188, 1201, 1213, 1225, 1238, 1251,
1262, 1274,
1287, 1298, 1311, 1323, 1336, 1348, 1361, 1372, 1386, 1397, 1410, 1421, 1435, 1449,
1458, 1471,
1484, 1497, 1508, 1520, 1532, 1545, 1557, 1569, 1581, 1594, 1606, 1619, 1632, 1643,
1655, 1673,
1686, 1698, 1710, 1722, 1735, 1747, 1758, 1771, 1784, 1796, 1806, 1820, 1833, 1846,
1857, 1870,
1881, 1895, 1907, 1918, 1930, 1942, 1955, 1967, 1979, 1991, 2004, 2017, 2028, 2042,
2053, 2065,
2078, 2089, 2103, 2115, 2127, 2139, 2152, 2163, 2176, 2188, 2201, 2210, 2221, 2232,
2244, 2256,
2267, 2280, 2292, 2303, 2316, 2329, 2340, 2354, 2366, 2395, 2421, 2435, 2448, 2459,
2467, 2478,
2489, 2502, 2514, 2526, 2538, 2552, 2564, 2577, 2589, 2601, 2615, 2631, 2646, 2656,
2669, 2683,
2694, 2706, 2718, 2732, 2744, 2757, 2770, 2782, 2793, 2805, 2818, 2831, 2843, 2862,
2875, 2892,
2904, 2917, 2930, 2943, 2954, 2966, 2978, 2989, 2997, 3009, 3023, 3035, 3046, 3057,
3070, 3082,
3094, 3106, 3118, 3131, 3143, 3155, 3168, 3181, 3193, 3205, 3217, 3230, 3241, 3254,
3265, 3278,
3290, 3303, 3315, 3322, 3333, 3346, 3358, 3370, 3382, 3395, 3407, 3420, 3432, 3443,
3455, 3467,
3480, 3492, 3505, 3516, 3529, 3541, 3553, 3566, 3578, 3588, 3597, 3609, 3621, 3634,
3646, 3657,
3670, 3683, 3696, 3707, 3719, 3731, 3743, 3756, 3768, 3781, 3792, 3805, 3817, 3829,
3842, 3850,
3857, 3868, 3879, 3891, 3903, 3916, 3928, 3940, 3952, 3964, 3977, 3989, 4002, 4014,
4026, 4038,
4050, 4062, 4074, 4087, 4099, 4112, 4123, 4136, 4148, 4160, 4173, 4185, 4198, 4210,
4222, 4235,
4247, 4260, 4272, 4283, 4296, 4308, 4320, 4333, 4346, 4358, 4370, 4382, 4395, 4406,
4418, 4432,
4444, 4455, 4467, 4480, 4492, 4505, 4522, 4534, 4545, 4554, 4566, 4578, 4590, 4602,
4615, 4624,
4635, 4646, 4655, 4663, 4676, 4689, 4701, 4713, 4725, 4738, 4750, 4762, 4774, 4787,
4799, 4812,
4823, 4836, 4848, 4863, 4873, 4885, 4901, 4912, 4923, 4935, 4948, 4961, 4978, 4988,
4997, 5007,
5015, 5027, 5039, 5051, 5058, 5069, 5082, 5095, 5107, 5120, 5131, 5144, 5156, 5168,
5180, 5192,
5204, 5217, 5230, 5241, 5254, 5264, 5278, 5288, 5297, 5310, 5321, 5334, 5346, 5357,
5370, 5382,
5395, 5406, 5418, 5431, 5443, 5455, 5468, 5481, 5492, 5505, 5516, 5525, 5535, 5547,
5559, 5571,
5583, 5596, 5608, 5618, 5633, 5640, 5653, 5664, 5675, 5688, 5700, 5712, 5725, 5737,
5748, 5761,
5773, 5786, 5798, 5810, 5822, 5834, 5842, 5854, 5867, 5878, 5890, 5904, 5919, 5928,
5940, 5952,
5965, 5976, 5985, 5995, 6007, 6019, 6031, 6039, 6051, 6062, 6074, 6087, 6100, 6111,
6123, 6136,
6148, 6156, 6167, 6179, 6191, 6204, 6216, 6228, 6240, 6253, 6265, 6275, 6289, 6301,
6315, 6328,
6338, 6348, 6362, 6375, 6387, 6399, 6412, 6424, 6436, 6448, 6461, 6473, 6487, 6498,
6511, 6523,
6536, 6549, 6567, 6579, 6590, 6602, 6617, 6628, 6639, 6653, 6664, 6677, 6688, 6701,
6714, 6725,
6738, 6750, 6763, 6775, 6787, 6799, 6807, 6818, 6827, 6849, 6858, 6873, 6886, 6898,
6910, 6922,
6935, 6943, 6954, 6966, 6978, 6991, 7004, 7014, 7022, 7034, 7046, 7058, 7069, 7082,
7096, 7107,
7118, 7131, 7143, 7156, 7168, 7176, 7186, 7198, 7207, 7217, 7229, 7243, 7254, 7267,
7284, 7297,
7309, 7321, 7334, 7346, 7359, 7370, 7382, 7394, 7406, 7418, 7427, 7437, 7450, 7461,
7474, 7487,
7498, 7512, 7523, 7534, 7548, 7560, 7572, 7585, 7597, 7609, 7616, 7627, 7639, 7651,
7664, 7677,
7688, 7700, 7708, 7720, 7732, 7744, 7756, 7768, 7776, 7787, 7799, 7812, 7823, 7836,
7848, 7860,
7873, 7886, 7897, 7928, 7940, 7951, 7964, 7972, 7982, 7994, 8002, 8014, 8026, 8038,
8051, 8064,
8076, 8088, 8145, 8161],
"x": [0, 0, 0, -3, -3, -7, -3, -4, -3, 0, 0, -1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, 4, 9, 10, 11, 7, 0,
-4, -5,
-5, -4, -4, -3, -4, -3, -2, -1, 1, 2, 3, 3, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2,
-5, -6,
-4, -3, -1, -1, 1, 2, 2, 2, 1, 1, 1, -1, -1, -2, -1, -2, 0, -1, 0, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0,
-1, -2,
-3, -5, -6, -3, 2, 1, 1, 2, 2, 2, 1, 1, -1, -2, -2, -2, -3, -2, -2, -1, -1, -3, -2, -1, 0, 0, 0,
0, 0, 0,
0, 0, -3, -5, -7, -7, -3, 1, 0, 2, 2, 2, 1, 1, 0, 0, 0, -1, -2, -2, -4, -3, -3, -4, 0, 2, 2, 2, 1,
1, 1,
0, 0, 0, -1, -1, -2, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 4, 6, 6, 3, -1, 0, 0, 0, 0, -1,
-1, -1,
-1, 0, 0, -1, 2, 6, 6, 6, 5, 2, -1, -4, -3, -3, -3, -1, -1, 0, -1, 0, 5, 6, 6, 3, 0, -1, -1, -2,
-1, -1,
-1, -1, -1, 0, 2, 4, 6, 5, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 4, 5, 6, 3, 1, 0, -1, -1,
-1, -1,
-1, -1, 0, -1, 2, 6, 7, 8, 6, 0, 1, -1, -1, -1, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 1, 1, 1, 0, 0,
-1, -1,
0, 0, 0, 0, 0, 0, -1, -1, -3, -2, -3, -2, 0, 2, 2, 2, 2, 2, 1, 1, 1, 0, 2, 2, 1, 3, 2, 1, 1, -1,
-1, 0,
-1, 0, 0, 0, 1, 0, -1, -1, -2, -1, -2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 2,
1, 1,
0, 0, -2, -1, -1, -1, 3, 6, 8, 5, 1, 2, -3, -2, -2, -2, -1, -1, -1, 0, 1, 0, 0, -2, -1, -1, 1, 1,
1, 2, 2,
1, 1, 0, 0, 0, 0, 2, 4, 4, 5, 2, 1, -2, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 3, 4, 3, 2, 1, 0,
0, 0, 0,
-1, 0, 0, 0, 0, 0, 0, -1, -2, -3, -2, 2, 2, 2, 3, 2, 2, 1, 1, 0, -1, -1, -1, 0, 3, 6, 7, 4, 3, -2,
-2, -2,
-2, -2, -1, -1, 1, 1, 1, 1, 4, 4, 6, 3, 1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 2, 3, 2, 4, 1,
0, -1,
-1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, -1, -2, -2, -2, -2,
-1, 2,
2, 2, 2, 2, 1, 1, 0, 0, 0, 1, 2, 3, 4, 2, 1, -2, -1, -1, -1, -2, -1, -1, 1, 1, 1, 1, -1, -1, -2,
-2, -2,
1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 1, 2, 3, 4, 3, 1, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 2, 4, 5, 3,
2, -1,
-1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -2, -2, -2, 0, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0, -1, -2, 0, 2,
3, 4,
3, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 3, 4, 4, 2, -1, -1, -1, -1, -1, -1, -1, 0, 0,
0, 0,
-1, -1, -2, -2, -3, -2, -1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 1, 3, 4, 6, 6, 3, 0, -1, -1, -3, -3, -3,
-2, -1,
-1, -1, -1, -7, -5, -5, 2, 2, 6, 5, 3, -2, -3, -7, -12, -11, -9, -6, -1, 5, 5, 4, -2, -2],
"y": [3, 3, 3, 8, 10, 10, 5, 5, 1, -3, -1, -2, -2, -1, -2, -2, -2, 0, 1, 3, 3, 2, 4, 3, 3, 4, 6, 3, 1,
1, 0, 0,
0, 0, 0, 1, 0, 1, 4, 12, 28, 28, 28, 3, -7, -12, -13, -11, -8, -7, -5, -3, -3, -2, -1, 3, 10, 30,
28, 3,
-4, -3, -7, -8, -7, -7, -6, -4, -3, -1, 0, 1, 7, 14, 28, 24, 3, -2, -7, -7, -6, -6, -4, -3, -2,
-1, -1, 0,
3, 7, 24, 22, 3, -5, -8, -7, -11, -10, -6, -4, -2, 0, 0, 0, 0, 2, 6, 8, 8, 3, 3, 0, -1, -2, -3,
-2, -1,
-1, -1, -1, -1, 1, 9, 24, 21, 1, -4, -4, -8, -7, -7, -7, -4, -3, -1, -1, -1, 1, 5, 9, 8, 4, 3, -2,
-3, -4,
-4, -3, -3, -2, -1, -1, -1, 2, 5, 11, 11, 5, -1, -1, -5, -5, -4, -4, -3, -2, -2, -2, -1, 1, 3, 4,
4, 1,
-1, -2, -2, -2, -3, -4, -3, -2, 0, 0, 0, 3, 8, 24, 25, 21, 0, -5, -13, -13, -12, -10, -7, -5, -4,
-3, -2,
8, 13, 11, 3, -2, -4, -4, -4, -4, -3, -2, -2, -1, -1, 1, 1, 2, 7, 0, -1, -3, -3, -3, -3, -3, -2,
-1, -1,
0, 1, 6, 24, 22, 3, -5, -5, -8, -8, -7, -7, -6, -5, -4, -3, 0, 2, 4, 5, 6, 1, 0, -2, -3, -3, -3,
-4, -3,
-2, 0, 1, 0, 3, 9, 24, 8, 8, -5, -6, -7, -7, -6, -5, -3, -3, -3, -1, -1, 2, 6, 10, 10, 1, 1, -1,
-3, -3,
-4, -3, -3, -2, -1, -1, -1, 2, 21, 23, 9, 6, -2, -6, -9, -8, -7, -8, -5, -3, -4, -3, -1, 2, 4, 6,
5, 1, 0,
0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 3, 5, 6, 5, -1, -2, -2, -2, -1, -2, -2, -1, 0, 1, 1, 1, 4,
3, 4, 7,
4, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 10, 26, 9, 0, -4, -4, -5, -5, -4, -4, -2, -1, -1, 0, 2, 4,
6, 7, 4,
1, -1, -2, -2, -2, -1, -1, -1, 0, 0, 1, 1, 2, 3, 9, 6, 3, 1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1,
2, 7, 10,
11, 4, -1, -2, -2, -3, -3, -3, -4, -1, -1, 1, 1, 2, 4, 6, 7, 3, 1, 2, 0, 1, 0, 1, 0, 1, 1, 1, 1,
1, 1, 4,
5, 11, 9, 3, -1, -2, -3, -2, -2, -1, -1, 0, 0, 1, 1, 4, 24, 24, 25, 2, -6, -11, -11, -9, -7, -7,
-4, -4,
-2, -1, 0, 3, 7, 9, 9, 4, 0, -1, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 3, 9, 22, 9, 4, 0, -7, -7,
-7, -7,
-6, -7, -2, -1, 0, 1, 3, 5, 6, 10, 2, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 21, 8, 4, -2, -4,
-4, -4,
-3, -2, -2, -2, -1, -1, -1, -1, 1, 3, 9, 10, 4, 2, -3, -3, -4, -4, -4, -3, -2, -2, -1, -1, 2, 6,
24, 21,
5, -4, -7, -7, -7, -8, -6, -6, -5, -3, -1, -1, 0, 5, 5, 7, 4, -2, -1, -2, -3, -2, -3, -4, -3, -2,
-1, 1,
1, 2, 3, 3, 5, 3, 0, -1, -2, -2, -3, -2, -2, -2, -1, -1, -1, 0, 1, 3, 8, 7, 1, -2, -3, -3, -3, -3,
-3, -2,
-1, -1, -1, -1, 1, 6, 10, 6, 1, -2, -3, -4, -3, -3, -3, -2, -2, -1, -1, -1, 1, 3, 22, 10, 8, 7,
-4, -5,
-7, -8, -8, -8, -7, -5, -2, -1, -1, 2, 2, 4, 2, -3, -5, -6, -5, 0, 0, 4, 7, 5, 3, -1, -5, -8, -7,
-5, 1,
0]
}
}
},
{
"name": "专注",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [32, 45, 62, 76, 88, 105, 124, 140, 155, 173, 190, 207, 221, 239, 257, 270, 288, 300, 320, 333, 349, 366, 383, 399, 415, 434, 448, 469, 488, 503, 508, 531, 546, 561, 577, 583, 603, 617, 628, 646, 661, 671, 688, 707, 717, 736, 751, 768, 781, 798, 816, 830, 847, 856, 872, 885, 904, 913, 933, 949, 964, 986, 999, 1017, 1033, 1049, 1066, 1085, 1096, 1114, 1132, 1149, 1162, 1184, 1194, 1214, 1224, 1241, 1259, 1277, 1290, 1308, 1321, 1339, 1356, 1374, 1387, 1401, 1417, 1430, 1447, 1459, 1478, 1496, 1514, 1527, 1545, 1562, 1580, 1594, 1612, 1629, 1647, 1666, 1685, 1699, 1721, 1739, 1753, 1770, 1782, 1800, 1817, 1834, 1855, 1867, 1885, 1898, 1915, 1928, 1939, 1953, 1970, 1988, 2001, 2020, 2036, 2056, 2068, 2085, 2098, 2116, 2133, 2152, 2169, 2188, 2207, 2229, 2250, 2269, 2292, 2311, 2334, 2354, 2376, 2400, 2418, 2445, 2461, 2480, 2498, 2517, 2530, 2554, 2574, 2604, 2627, 2641, 2657, 2675, 2695, 2711, 2732, 2750, 2771, 2786, 2803, 2823, 2838, 2859, 2872, 2882, 2896, 2913, 2925, 2942, 2955, 2973, 2991, 3004, 3022, 3036, 3053, 3066, 3083, 3095, 3112, 3125, 3142, 3151, 3168, 3186, 3199, 3216, 3234, 3249, 3254, 3281, 3286, 3309, 3319, 3338, 3357, 3369, 3383, 3404, 3419, 3435, 3447, 3466, 3482, 3501, 3519, 3539, 3553, 3568, 3585, 3598, 3611, 3634, 3647, 3665, 3689, 3709, 3721, 3738, 3751, 3764, 3776, 3792, 3811],
"x": [-1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -2, -1, -2, -2, -2, -1, -2, -2, -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
"y": [2, 4, 6, 7, 6, 4, 2, 2, 2, 2, 2, 2, 4, 5, 6, 6, 5, 6, 5, 5, 4, 4, 3, 6, 5, 5, 5, 4, 3, 3, 4, 5, 6, 5, 5, 4, 5, 4, 4, 6, 5, 5, 5, 4, 5, 4, 4, 4, 3, 4, 4, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 4, 4, 2, 2, 3, 3, 2, 3, 3, 3, 4, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 5, 3, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 1, 1, 1, 1]
},
"aim": {
"time_points": [0, 13, 24, 37, 56, 73, 85, 98, 110, 118, 151, 177, 190, 206, 220, 234, 262, 280, 301, 315, 332, 345, 357, 366, 381, 399, 412, 430, 443, 459, 472, 490, 508, 521, 538, 557, 570, 586, 604, 622, 637, 649, 666, 675, 696, 708, 722, 740, 755, 770, 783, 794, 806, 819, 835, 852, 868, 884, 899, 909, 922, 938, 952, 969, 982, 998, 1010, 1025, 1036, 1050, 1066, 1080, 1092, 1104, 1118, 1133, 1152, 1171, 1182, 1199, 1214, 1232, 1244, 1267, 1275, 1292, 1314, 1318, 1335, 1352, 1365, 1382, 1396, 1414, 1432, 1444, 1463, 1494, 1513, 1534, 1564, 1584, 1602, 1616, 1632, 1646, 1658, 1677, 1693, 1716, 1743, 1768, 1783, 1799, 1813, 1831, 1848, 1865, 1881, 1897, 1915, 1925, 1946, 1965, 1982, 2001, 2017, 2032, 2046, 2056, 2074, 2088, 2105, 2118, 2134, 2142, 2165, 2184, 2200, 2218, 2237, 2256, 2268, 2287, 2305, 2317, 2335, 2352, 2367, 2384, 2391, 2408, 2421, 2437, 2454, 2469, 2485, 2504, 2519, 2530, 2547, 2560, 2571, 2586, 2601, 2619, 2638, 2655, 2674, 2694, 2711, 2725, 2747, 2766, 2784, 2802, 2820, 2839, 2856, 2870, 2886, 2904, 2918, 2935, 2955, 2967, 2986, 2998, 3021, 3038, 3056, 3070, 3087, 3106, 3120, 3136, 3154, 3168, 3185, 3202, 3216, 3241, 3256, 3274, 3299, 3315, 3329, 3346, 3353, 3371, 3389, 3407, 3419, 3439, 3455, 3467, 3486, 3505, 3517, 3535, 3582, 3595, 3608, 3637, 3655, 3669, 3686, 3700, 3718],
"x": [0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 2, 3, 3, 4, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 4, 3, 2, 4, 3, 2, 2, 2, 2, 1, 3, 4, 3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, -1, -2, -2, -1, -1, -1, -1, -1, -3, -3, -3, -2, -2, -3, -3, -3, -3, -3, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -3, -2, -1, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -3, -2, -2, -3, -2, -1, -1, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 4, 3, 5, 4, 5, 1, 1],
"y": [-1, -1, 2, 5, 7, 6, 8, 8, 5, 6, 3, 3, 3, 3, 4, 6, 7, 7, 9, 9, 8, 4, 4, 2, 2, 3, 4, 4, 4, 4, 3, 4, 3, 4, 5, 5, 4, 3, 4, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3, 5, 6, 4, 4, 3, 3, 2, 3, 4, 4, 4, 4, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 2, 1, 1, 3, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 2, 2, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 2, 3, 3, 4, 2, 2, 3, 3, 2, 3, 3, 3, 2, 1, 1, 1, 2, 0, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 0, 0, 0, 1, 0, -1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 3]
},
"turbocharger": {
"un_aim": {
"time_points": [44, 59, 69, 80, 92, 101, 109, 121, 132, 140, 152, 163, 171, 201, 210, 246, 257, 287,
295, 390, 405, 412, 423, 431, 442, 452, 465, 513, 523, 533, 545, 557, 565, 575, 587,
612, 625, 636, 649, 662, 674, 686, 698, 711, 722, 735, 748, 760, 771, 784, 797, 809,
822, 833, 845, 860, 871, 883, 896, 908, 919, 931, 944, 956, 968, 981, 993, 1006, 1017,
1031, 1043, 1056, 1067, 1079, 1093, 1104, 1116, 1128, 1141, 1152, 1165, 1179, 1191,
1206, 1220, 1232, 1244, 1256, 1268, 1277, 1288, 1300, 1312, 1325, 1337, 1349, 1361,
1367, 1379, 1387, 1399, 1410, 1418, 1428, 1437, 1448, 1459, 1467, 1478, 1490, 1503,
1516, 1528, 1539, 1555, 1566, 1580, 1589, 1601, 1612, 1620, 1631, 1643, 1651, 1662,
1675, 1686, 1698, 1711, 1719, 1729, 1742, 1754, 1765, 1778, 1790, 1803, 1814, 1827,
1839, 1848, 1859, 1871, 1883, 1896, 1907, 1919, 1931, 1944, 1951, 1963, 1975, 1986,
1999, 2007, 2015, 2026, 2037, 2048, 2060, 2068, 2079, 2088, 2098, 2110, 2118, 2129,
2140, 2151, 2159, 2173, 2184, 2195, 2208, 2216, 2227, 2236, 2247, 2257, 2267, 2275,
2288, 2300, 2312, 2324, 2337, 2349, 2361, 2374, 2386, 2398, 2410, 2418, 2429, 2437,
2448, 2459, 2472, 2484, 2493, 2503, 2513, 2522, 2533, 2545, 2558, 2569, 2578, 2588,
2598, 2608, 2618, 2631, 2639, 2649, 2662, 2669, 2681, 2690, 2699, 2711, 2719, 2730,
2743, 2755, 2767, 2779, 2791, 2799, 2810, 2822, 2835, 2846, 2857, 2865, 2876, 2884,
2901, 2910, 2921, 2933, 2945, 2958, 2969, 2981, 2994, 3003, 3012, 3021, 3031, 3044,
3055, 3068, 3080, 3092, 3101, 3111, 3119, 3130, 3142, 3154, 3166, 3179, 3191, 3205,
3215, 3228, 3241, 3256, 3264, 3277, 3289, 3301, 3313, 3325, 3337, 3345, 3357, 3368,
3380, 3393, 3401, 3411, 3424, 3435, 3448, 3460, 3473, 3484, 3497, 3509, 3522, 3533,
3545, 3558, 3570, 3581, 3589, 3601, 3609, 3619, 3628, 3638, 3650, 3658, 3666, 3676,
3686, 3698, 3711, 3719, 3730, 3742, 3754, 3767, 3779, 3791, 3800, 3810, 3817, 3830,
3840, 3851, 3864, 3874, 3883],
"x": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,
-1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, -2, -2, -2, 12, -2, 12, 12, 11, -3, -4, -6, -7],
"y": [3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 5, 6, 5, 5, 5, 6, 6, 8, 7, 7, 7, 8, 8, 7, 6, 7, 7, 6, 6, 6,
6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 5, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 2, 4, 4,
4, 4, 3, 4, 3, 3, 3, 3, 3, 2, 3, 4, 3, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 25, 0, 0, -4, -4, -5, 29, -4, 29, 30, 24, -8, -15, -22,
-25]
},
"aim": {
"time_points": [0, 8, 19, 30, 42, 54, 62, 74, 86, 95, 104, 116, 127, 140, 153, 165, 177, 190, 197, 209,
220,
232, 244, 254, 263, 273, 287, 298, 308, 321, 330, 341, 355, 368, 379, 391, 404, 417,
428, 441,
453, 464, 477, 488, 497, 507, 520, 528, 538, 546, 557, 569, 581, 594, 605, 617, 630,
642, 655,
672, 679, 691, 704, 716, 728, 740, 752, 766, 777, 790, 802, 815, 827, 839, 851, 863,
875, 888,
900, 912, 924, 937, 950, 961, 973, 985, 1000, 1010, 1023, 1035, 1047, 1059, 1071, 1083,
1096,
1108, 1120, 1131, 1140, 1152, 1163, 1175, 1188, 1196, 1209, 1220, 1231, 1244, 1256,
1268, 1280,
1292, 1305, 1317, 1328, 1341, 1354, 1366, 1378, 1390, 1403, 1415, 1427, 1440, 1452,
1464, 1477,
1492, 1500, 1512, 1534, 1543, 1557, 1569, 1582, 1594, 1607, 1619, 1630, 1643, 1656,
1668, 1679,
1691, 1703, 1715, 1728, 1739, 1752, 1767, 1784, 1796, 1809, 1821, 1834, 1845, 1858,
1868, 1882,
1894, 1906, 1918, 1930, 1939, 1950, 1962, 1974, 1987, 1996, 2006, 2017, 2029, 2040,
2053, 2066,
2077, 2090, 2103, 2114, 2126, 2140, 2152, 2164, 2176, 2188, 2200, 2212, 2226, 2239,
2249, 2261,
2273, 2287, 2299, 2310, 2323, 2340, 2354, 2366, 2377, 2390, 2402, 2415, 2427, 2439,
2452, 2463,
2476, 2488, 2501, 2513, 2525, 2537, 2551, 2563, 2580, 2592, 2606, 2624, 2636, 2648,
2660, 2672,
2684, 2697, 2706, 2721, 2734, 2745, 2758, 2771, 2784, 2793, 2802, 2814, 2826, 2840,
2852, 2863,
2875, 2887, 2900, 2912, 2925, 2937, 2949, 2961, 2973, 2986, 2998, 3010, 3022, 3034,
3044, 3054,
3066, 3077, 3090, 3102, 3115, 3127, 3144, 3153, 3163, 3175, 3189, 3202, 3212, 3225,
3238, 3252,
3262, 3274, 3286, 3299, 3311, 3323, 3336, 3350, 3362, 3378, 3391, 3403, 3418, 3431,
3446, 3459,
3471, 3483, 3490, 3502, 3515, 3526, 3538, 3546, 3555, 3569, 3581, 3594, 3605, 3618,
3630, 3642],
"x": [0, 0, 0, 0, 3, 3, 4, 4, 3, 2, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, -1, -1,
-1, 0,
-1, -1, 0, -1, -1, 0, 0, 0, -1, -1, -1, 1, 2, 2, 2, 2, 1, 2, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1,
1, 2, 2, 2, 1, 3, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 3, 4, 1, 0, 1, 1, 1, 1, 1, 2,
3, 4,
4, 3, 2, 3, 3, 2, 3, 2, 1, 3, 3, 2, 1, 1, 1, 2, 2, 2, 1, 1, -1, -1, -1, -2, -1, -1, -1, -1, -1,
-1, -1,
-1, -1, -1, -2, -1, -1, -1, -1, -2, -3, -3, -3, -3, -1, -3, -3, -3, -2, -1, -3, -4, -4, -4, -1,
-2, -1, 0,
0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -1, -1, 0, 0, 0, 0, -1, -1, -2, -1, -1, -1, -1, -2,
-2, -1,
-3, -3, -3, -4, -3, -4, -3, -2, -3, -1, -3, -2, -3, -1, -1, -2, -3, -4, -3, -4, -3, -1, 0, 1, 1,
1, -1,
-1, -2, -3, -2, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2, -1, -1, -1, -2, -3, -3,
-2, -2,
-1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 5,
2, 2, 4,
2, 1, 2, 1, 4, 3, 2, 3, -5, 0, -2, -2, 1, 0, 1, 1, 1, 1, 1, 0, -1, -1, -1, 0, 0, 0],
"y": [0, 0, 0, 0, 10, 14, 18, 19, 16, 11, 0, 0, -3, -6, -5, -5, 2, 8, 12, 12, 12, 11, 6, -1, -3, -3, -3,
1, 6,
6, 8, 8, 8, 3, 0, -1, 6, 9, 11, 10, 11, 6, 2, 2, 3, 4, 4, 5, 3, 3, 1, 0, 3, 3, 4, 3, 3, 1, 3, 4,
6, 6, 6,
3, 1, 0, 0, 0, 0, -1, 1, 2, 3, 2, 3, 1, 3, 3, 3, 2, 2, 5, 4, 5, 6, 4, 2, 1, 0, 0, 0, -1, 1, 2, 2,
2, 2, 2,
2, 2, 3, 2, 1, 0, 0, -1, -1, 0, 0, -1, -1, -2, -1, -1, 0, 0, 1, 1, 1, 2, 1, 1, 1, 0, 2, 3, 4, 4,
3, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 2, 2, 3, 1, 3, 4, 2, 1, 1, 0, 0, 0, 0,
0, 0,
2, 3, 4, 3, 4, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 0, 0, -1, -1, -1, -3, -3, -3, -3,
-2, 0, 0,
1, 1, 1, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 3, 3, 3, 3, 1, 0, 0, 0, -1, 0, -1, 0,
0, 0, 0,
0, 0, 0, 0, 2, 3, 4, 3, 1, 0, 0, -2, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 2, 4, 4, 4, 4,
1, 0, -1,
0, 0, 0, 1, 2, 2, 2, 1, 1, 0, 0, 0, 2, 2, 2, 1, 0, -2, -1, -1, -1, 0, 1, 2, 2, 2, 2, 2, 0, 0, -1,
0, -1,
0]
}
}
}
},
{
"name": "哈沃克",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [438, 449, 466, 480, 494, 504, 516, 534, 546, 577, 584, 600, 618, 636, 655, 668, 680, 698, 715, 729, 742, 759, 776, 794, 808, 819, 837, 855, 867, 886, 899, 911, 931, 942, 954, 972, 990, 1002, 1019, 1033, 1045, 1058, 1074, 1093, 1111, 1129, 1145, 1159, 1172, 1189, 1200, 1216, 1232, 1246, 1263, 1281, 1294, 1310, 1323, 1338, 1354, 1366, 1379, 1391, 1404, 1416, 1432, 1450, 1463, 1480, 1511, 1529, 1543, 1560, 1573, 1585, 1602, 1616, 1629, 1645, 1653, 1677, 1689, 1710, 1729, 1744, 1759, 1773, 1792, 1810, 1822, 1836, 1853, 1870, 1888, 1898, 1925, 1943, 1960, 1975, 1988, 1993, 2016, 2034, 2052, 2066, 2083, 2097, 2114, 2136, 2166, 2182, 2212, 2234, 2249, 2267, 2284, 2302, 2316, 2333, 2350, 2369, 2382, 2396, 2413, 2430, 2448, 2466, 2484, 2503, 2515, 2534, 2550, 2569, 2583, 2599, 2619, 2636, 2654, 2668, 2686, 2704, 2721, 2735, 2752, 2771, 2783, 2800, 2820, 2838, 2850, 2863, 2875, 2892, 2905, 2922, 2935, 2953, 2969, 2988, 3002, 3018, 3032, 3044, 3061, 3079, 3098, 3112, 3128, 3136, 3158, 3171, 3186, 3200, 3219, 3234, 3245, 3256, 3268, 3285, 3303, 3315, 3331, 3348, 3364, 3376, 3395, 3412, 3431, 3450, 3468, 3486, 3499, 3516, 3534],
"x": [-1, -2, -2, -2, -2, -1, -2, -2, -2, -1, -1, -1, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 0, 0, 0, -1, 0, -1, -1, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -3, -4, -4, -3, -4, -5, -5, -4, -4, -3, -3, -3, -3, -4, -3, -3, -2, -2, -1, -1, -1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 3, 2, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 3, 3, 2, 2, 2, 2, 4, 9, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, 0, 0, -2, -2, -2, -2, -1, -3, -3, -4, -3, -3, -2],
"y": [3, 4, 4, 3, 4, 2, 4, 5, 5, 3, 4, 4, 6, 6, 6, 6, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 5, 7, 7, 4, 4, 4, 4, 3, 3, 2, 1, 3, 4, 4, 4, 3, 2, 2, 3, 3, 3, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 3, 1, 0, 0, -2, -2, -3, -2, -4, -1, -1, 0, 0, 3, 4, 4, 3, 4, 3, 2, 2, 1, 2, 1, 0, 0, 1, 0, 1, 2, 2, 2, 2, 1, 0, 0, 0, -1, -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 3, 3, 6, 6, 5, 4, 3, 2, 3, 5, 4, 4, 4, 5, 3, 3, 4, 6, 6, 6, 5, 6, 8, 8, 6, 5, 5, 7, 7, 7, 4, 3, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 2, 3, 4, 5, 4, 3, 2, 4, 5, 5, 5, 5, 3, 4, 4, 5, 4, 2, 4, 4, 4, 3, 3, 2]
},
"aim": {
"time_points": [0, 14, 25, 41, 51, 63, 75, 89, 104, 122, 133, 149, 166, 174, 190, 203, 219, 237, 252, 264, 274, 286, 300, 316, 334, 346, 360, 379, 390, 407, 419, 438, 457, 473, 485, 501, 514, 529, 547, 566, 573, 589, 604, 620, 638, 653, 671, 686, 705, 724, 737, 754, 773, 791, 803, 815, 829, 846, 861, 877, 894, 913, 931, 943, 959, 979, 997, 1012, 1027, 1039, 1058, 1071, 1083, 1096, 1107, 1125, 1141, 1155, 1183, 1199, 1219, 1244, 1254, 1277, 1289, 1302, 1319, 1336, 1354, 1374, 1391, 1405, 1423, 1439, 1454, 1471, 1489, 1507, 1526, 1544, 1555, 1571, 1586, 1605, 1618, 1635, 1651, 1663, 1683, 1696, 1715, 1734, 1752, 1765, 1791, 1819, 1842, 1854, 1873, 1896, 1909, 1921, 1938, 1952, 1970, 1983, 1999, 2018, 2053, 2068, 2080, 2101, 2113, 2133, 2145, 2165, 2182, 2197, 2221, 2248, 2265, 2287, 2301, 2321, 2341, 2356, 2382, 2403, 2418, 2437, 2457, 2469, 2479, 2503, 2523, 2541, 2554, 2571, 2589, 2607, 2624, 2639, 2654, 2674, 2685, 2706, 2722, 2740, 2754, 2771, 2789, 2806, 2824, 2845, 2856, 2874, 2896, 2906, 2919, 2940, 2954, 2966, 2983, 3002, 3019, 3036, 3056, 3069, 3081, 3099, 3116, 3136, 3153, 3170, 3181, 3201, 3221, 3228, 3252, 3264, 3287, 3304, 3318, 3353, 3367, 3380, 3387, 3409, 3427, 3447, 3457, 3473, 3488, 3506, 3518, 3530, 3542, 3555],
"x": [-1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -2, -2, -2, -1, -1, -2, -2, -2, -2, -2, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 2, 1, 1, 0, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -3, -3, -3, -2, -2, -3, -4, -3, -2, -2, -3, -3, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 3, 3, 2, 2, 3, 2, 2, 1, 1, 1, 3, 3, 3, 3, 4, 3, 3, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, -1, -2, -2, -2],
"y": [0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 4, 4, 4, 2, 2, 6, 7, 7, 7, 6, 6, 7, 7, 7, 4, 4, 5, 5, 4, 3, 5, 5, 6, 4, 3, 2, 4, 4, 3, 3, 2, 4, 4, 5, 4, 2, 4, 4, 4, 4, 2, 2, 2, 2, 3, 2, 2, 2, 4, 5, 5, 3, 4, 3, 3, 2, 1, 1, 2, 2, 2, 2, 2, 0, -2, -2, -1, -1, -2, -2, -2, -1, -1, 1, 2, 4, 3, 4, 2, 2, 4, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 2, 2, 1, 0, 0, 0, 1, 2, 3, 2, 2, 3, 3, 2, 2, 3, 4, 4, 3, 4, 6, 6, 5, 5, 4, 4, 3, 2, 2, 3, 4, 3, 4, 3, 3, 3, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 4, 4, 3, 2, 3, 4, 4, 4, 3, 2, 4, 4, 4, 4, 4, 4, 4, 2, 1, 4, 4, 4, 3, 2, 0, 0, -2]
},
"turbocharger": {
"un_aim": {
"time_points": [0, 10, 24, 34, 46, 55, 65, 78, 85, 96, 108, 116, 127, 139, 152, 160, 170, 181, 192, 200,
213, 224, 238, 247, 261, 273, 281, 293, 304, 316, 327, 335, 347, 359, 372, 383, 397,
409, 421, 433, 445, 452, 464, 476, 488, 499, 508, 519, 530, 543, 556, 567, 579, 588,
598, 610, 618, 628, 641, 650, 661, 672, 681, 694, 702, 714, 726, 734, 745, 757, 768,
776, 788, 800, 810, 819, 830, 843, 855, 868, 880, 892, 905, 917, 928, 941, 953, 964,
974, 983, 996, 1011, 1023, 1032, 1043, 1052, 1064, 1072, 1081, 1092, 1101, 1113, 1125,
1135, 1144, 1156, 1169, 1180, 1192, 1199, 1212, 1224, 1236, 1248, 1260, 1272, 1285,
1297, 1309, 1321, 1331, 1340, 1349, 1359, 1370, 1382, 1395, 1407, 1415, 1426, 1438,
1449, 1461, 1474, 1482, 1493, 1505, 1518, 1529, 1541, 1549, 1561, 1573, 1585, 1596,
1608, 1621, 1629, 1636, 1647, 1658, 1671, 1683, 1695, 1706, 1719, 1727, 1738, 1750,
1761, 1773, 1780, 1793, 1805, 1813, 1823, 1835, 1846, 1854, 1862, 1873, 1884, 1897,
1905, 1916, 1926, 1935, 1946, 1957, 1965, 1977, 1985, 1995, 2007, 2018, 2027, 2039,
2051, 2062, 2071, 2081, 2094, 2101, 2112, 2117, 2131, 2143, 2155, 2166, 2174, 2185,
2198, 2211, 2224, 2236, 2247, 2260, 2272, 2283, 2291, 2301, 2310, 2320, 2332, 2344,
2352, 2364, 2375, 2387, 2400, 2412, 2424, 2436, 2449, 2457, 2467, 2475, 2485, 2497,
2509, 2518, 2530, 2541, 2553, 2565, 2577, 2584, 2596, 2608, 2616, 2628, 2640, 2647,
2658, 2669, 2678, 2688, 2696, 2707, 2718, 2731, 2742, 2750, 2762, 2775, 2787, 2798,
2810, 2824, 2835, 2842, 2854, 2865, 2878, 2890, 2902, 2914, 2927, 2934, 2945, 2958,
2971, 2983, 2994, 3006, 3015, 3025, 3038, 3050, 3062, 3074, 3086, 3094, 3104, 3116,
3127, 3135, 3148, 3162, 3172, 3185, 3196, 3209, 3221, 3234, 3246, 3271, 3278, 3290,
3296, 3315, 3326, 3338, 3350, 3362, 3370, 3381, 3393, 3405, 3417, 3430, 3436, 3448,
3460, 3468, 3479, 3491, 3502, 3510, 3521, 3533, 3543],
"x": [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0,
0, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -1, -1, -2, -1, -1, -2, -1, -1, -1, -2, -2, -3,
-3, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2,
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, -2, -3, -3, -3, -3, -3],
"y": [0, 0, 0, 0, 1, 2, 2, 3, 3, 3, 3, 2, 2, 3, 4, 3, 3, 3, 3, 3, 2, 2, 4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 4,
4, 4, 2, 2, 3, 3, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 4, 4, 4,
3, 2, 2, 2, 3, 3, 4, 4, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 4, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 2,
2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0,
0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 4, 4, 4, 3,
2, 2, 3, 4, 4, 4, 3, 4, 3, 2, 2, 3, 3, 2, 3, 2, 2, 2, 1, 2, 3, 3, 2, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2,
2, 1, 2, 3, 3, 3, 3, 2, 2, 1, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 3, 3, 2,
2, 1, 1, 1, 0, 0, -1, -2, -3, -4, -4, -4, -4, -2, -2, -1, 0, 0, 1, 2, 1, 1, 2, 2, 2, 2]
},
"aim": {
"time_points": [0, 12, 23, 32, 44, 56, 66, 79, 87, 97, 105, 116, 129, 137, 148, 159, 171, 183, 195, 204,
220,
232, 243, 252, 263, 275, 283, 296, 305, 317, 328, 340, 349, 361, 371, 382, 392, 403,
416, 428,
440, 452, 463, 471, 484, 495, 505, 514, 527, 538, 550, 563, 576, 586, 600, 613, 630,
638, 649,
663, 677, 683, 696, 705, 717, 729, 737, 748, 760, 771, 783, 795, 806, 815, 826, 838,
851, 860,
870, 882, 895, 908, 920, 932, 943, 955, 966, 981, 993, 1005, 1017, 1029, 1041, 1048,
1060, 1071,
1084, 1096, 1108, 1120, 1133, 1145, 1158, 1170, 1183, 1195, 1206, 1216, 1230, 1236,
1251, 1264,
1276, 1287, 1300, 1313, 1325, 1336, 1349, 1361, 1373, 1386, 1398, 1412, 1422, 1434,
1447, 1459,
1472, 1484, 1496, 1509, 1521, 1533, 1545, 1558, 1570, 1582, 1595, 1607, 1619, 1631,
1644, 1656,
1668, 1681, 1693, 1705, 1717, 1730, 1743, 1755, 1768, 1779, 1792, 1803, 1817, 1829,
1840, 1852,
1865, 1876, 1886, 1896, 1906, 1920, 1931, 1943, 1952, 1963, 1970, 1981, 1993, 2005,
2014, 2024,
2036, 2048, 2061, 2073, 2084, 2098, 2111, 2122, 2133, 2146, 2158, 2170, 2183, 2196,
2208, 2220,
2233, 2244, 2257, 2269, 2281, 2294, 2305, 2318, 2330, 2343, 2354, 2367, 2379, 2391,
2403, 2416,
2426, 2432, 2446, 2455, 2466, 2478, 2489, 2501, 2513, 2522, 2533, 2545, 2557, 2569,
2581, 2589,
2600, 2612, 2624, 2634, 2643, 2654, 2667, 2679, 2692, 2703, 2716, 2727, 2741, 2754,
2766, 2779,
2790, 2802, 2817, 2829, 2840, 2853, 2865, 2877, 2888, 2901, 2913, 2926, 2938, 2950,
2962, 2975,
2986, 3000, 3013, 3024, 3036, 3048, 3062, 3073, 3086, 3098, 3111, 3122, 3134, 3150,
3159, 3171,
3184, 3208, 3219, 3231, 3242, 3256, 3268, 3281, 3293, 3306, 3318, 3330, 3343, 3355,
3369, 3386,
3401, 3412, 3425, 3436],
"x": [-1, -1, -1, -2, -2, -2, -3, -2, -1, -1, 0, 0, -1, -2, -2, -2, -2, -2, -1, 0, 1, 1, 2, 2, 2, 2, 1,
1, -1,
-1, -2, -2, -2, -2, -1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3,
2, 2,
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -2, -2, -1, -2, -1, -1, -2, -3, -3, -3, -3, -2, 0, -1,
-2, -4,
-4, -4, -2, -2, 0, -1, -2, -2, -2, -1, -1, 0, -1, -2, -2, -2, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1,
1, 1,
1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
1, 1, 0,
0, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 2, 3, 3, 3, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
1, 2,
1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, -1, -2, -2, -2, -2, -1, -1, 0, -1, -1, -1, -1, -1, -1, 0, 0,
1, 0, 1,
0, 1, 0, -1, -2, -2, -2, -2, -2, 0, -2, -2, -3, -3, -2, -2, 2, 3, 4, 4, -3, 0, -1, 0, 0, 0, -1,
-1, -2,
-3, -3, -3, -3, -2, -3, -3, -3, -3, -4],
"y": [0, 0, 0, 2, 5, 7, 10, 10, 8, 4, 2, 0, 2, 4, 4, 5, 5, 6, 6, 2, 5, 5, 6, 5, 5, 3, 1, 0, 5, 6, 7, 7,
6, 6, 3,
0, 0, 1, 1, 2, 1, 1, 1, 2, 3, 3, 3, 2, 2, 1, 0, 1, 2, 4, 5, 5, 6, 3, 2, 1, 0, 0, 0, 0, 0, 1, 5, 5,
5, 6,
1, 0, -1, 0, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, -1, -1,
-1, 0, 0,
-1, -1, -2, -2, -1, 0, 0, 4, 6, 6, 6, 5, 0, 2, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 0,
0, -1, -2, -3, -3, -2, -1, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 2, 3, 2, 1, 1, 2, 2, 3, 4, 3, 3, 1, 1, 2,
2, 3,
3, 2, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 1, 0, 2, 5, 5, 5, 3, 3, 0, 1, 0, 1, 1, 1, 1, 1,
3, 3,
3, 2, 1, 0, 0, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 0, 1, 1, 3, 3, 2,
1, 1,
0, 2, 3, 5, 5, 5, 3, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 2, 1, 2, 3, 4, 4, 2, 3, 3, 0, -1, -1,
-6, -7,
-8, -8, -8, -6, -2, 0, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3, 4]
}
}
}
},
{
"name": "lstart",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 12, 32, 49, 61, 79, 92, 110, 129, 147, 156, 171, 183, 227, 242, 255, 267, 282, 300, 313, 324, 337, 349, 362, 380, 398, 429, 447, 466, 478, 509, 521, 531, 546, 564, 575, 586, 602, 632, 646, 663, 676, 693, 706, 718, 731, 748, 761, 779, 793, 810, 828, 847, 857, 871, 914, 927, 945, 957, 976, 994, 1013, 1031, 1050, 1068, 1086, 1098, 1117, 1135, 1149, 1166, 1174, 1190, 1276, 1295, 1313, 1337, 1356, 1374, 1386, 1402, 1417, 1430, 1445, 1460, 1479, 1497, 1516, 1534, 1546, 1564, 1576, 1596, 1614, 1632, 1644, 1653, 1670, 1687, 1718, 1730, 1743, 1761, 1780, 1797, 1819, 1832, 1844, 1860, 1878, 1896, 1914, 1923, 1934, 1953, 1994, 2013, 2028, 2043, 2058, 2072, 2086, 2098, 2111, 2129, 2147, 2159, 2171, 2181, 2217, 2234, 2246, 2277, 2296, 2311, 2322, 2349, 2363, 2381, 2399, 2411, 2424, 2436, 2447, 2461, 2480, 2497, 2517, 2534, 2548, 2565, 2577, 2597, 2611, 2622, 2636, 2647, 2663, 2682, 2700, 2719, 2731, 2743, 2762, 2780, 2789, 2805, 2823, 2838, 2854, 2870, 2885, 2903, 2917, 2930, 2947, 2958, 2970, 2982, 2995, 3008, 3020, 3032, 3041, 3054, 3083, 3101],
"x": [1, 1, 1, 1, 2, 2, 1, 1, 1, 3, 4, 5, 3, 1, 5, 5, 6, 5, 3, 4, 3, 1, -1, -2, -3, -1, -1, -3, -6, -6, -1, -2, -2, -2, -1, -1, -2, -1, -1, -1, 0, 1, 3, 3, 2, 1, -2, -4, -6, -5, -3, -1, 1, 3, 2, 1, 2, 0, -1, 2, 2, 0, -1, 0, 1, 0, 0, 1, -1, -5, -6, -7, -1, -1, -1, 0, 1, 1, 1, -1, -2, -1, -1, -3, -3, -3, -3, -3, -3, -1, 3, 2, 3, 1, -1, -1, -2, -2, -1, -1, -1, 1, 3, 3, 3, 4, 3, 3, 2, 0, 0, 0, 0, -1, -3, -4, -5, -3, -1, 1, 3, 2, 1, 1, -1, -3, -4, -4, -5, -1, -2, -3, -2, -2, -2, -1, -1, -1, -1, -1, 0, -1, 1, 3, 5, 3, 1, 1, 2, 2, 1, -1, -1, 0, 0, -1, -3, -6, -7, -6, -3, -1, 1, 3, 3, 3, 4, 3, 1, 0, 0, -1, 0, 1, -2, -3, -5, -5, -6, -3, -2, 1, 1, 3, 2, 1, -1],
"y": [-2, -2, 0, 3, 4, 4, 4, 4, 3, 3, 2, 3, 2, 0, 2, 5, 5, 5, 5, 2, 2, 3, 4, 4, 4, 8, 2, 4, 4, 8, 4, 1, 2, 2, 3, 3, 4, 4, 1, 4, 4, 4, 4, 0, 0, 0, 4, 5, 4, 10, 4, 1, 1, 2, 2, 6, 1, 3, 4, 8, 2, 2, 1, 5, 7, 7, 5, 4, 6, 9, 9, 9, 7, 12, 19, 12, 6, 5, 7, 7, 14, 8, 4, 2, 3, 4, 15, 4, -1, 0, 4, 8, 9, 3, 7, 4, 5, 11, 5, 0, -1, 2, 4, 12, 15, 4, -2, -3, -3, 0, 4, 2, 2, 2, 2, 4, 4, 2, 4, 5, 5, 6, 5, 5, 2, 4, 4, 5, 15, 17, 2, 4, 0, 8, 2, -1, 2, 3, 4, 7, 4, 4, 2, 4, 4, 0, 0, 1, 4, 25, 4, 11, 6, -3, -3, -3, 2, 4, 5, 15, 5, 2, 4, 5, 4, 5, 13, 2, 3, 4, 5, 7, 5, 4, 7, 5, 7, 5, 48, 5, 2, -14, -17, -23, -19, -2, 3]
},
"aim": {
"time_points": [0, 10, 24, 44, 61, 71, 86, 102, 116, 129, 137, 150, 164, 178, 188, 201, 211, 226, 235, 251, 270, 288, 299, 313, 325, 336, 351, 368, 380, 398, 411, 424, 441, 451, 466, 484, 502, 511, 527, 536, 551, 564, 581, 595, 606, 615, 627, 644, 661, 670, 692, 701, 713, 726, 740, 750, 761, 778, 791, 809, 822, 839, 858, 870, 882, 895, 912, 925, 944, 956, 976, 992, 1003, 1015, 1026, 1042, 1061, 1079, 1098, 1117, 1134, 1147, 1164, 1179, 1196, 1212, 1223, 1235, 1247, 1263, 1278, 1294, 1313, 1331, 1346, 1359, 1373, 1385, 1396, 1411, 1429, 1446, 1460, 1479, 1496, 1508, 1516, 1532, 1544, 1553, 1567, 1578, 1594, 1605, 1617, 1631, 1644, 1661, 1686, 1696, 1710, 1723, 1738, 1754, 1766, 1778, 1790, 1803, 1811, 1827, 1840, 1851, 1860, 1876, 1885, 1900, 1909, 1925, 1935, 1949, 1962, 1971, 1987, 1998, 2011, 2021, 2035, 2045, 2060, 2068, 2082, 2096, 2109, 2121, 2133, 2145, 2158, 2167, 2179, 2194, 2207, 2215, 2227, 2244, 2253, 2264, 2276, 2293, 2306, 2314, 2330, 2341, 2351, 2364, 2379, 2390, 2400, 2411, 2428, 2439, 2453, 2464, 2478, 2495, 2513, 2526, 2544, 2557, 2575, 2593, 2606, 2624, 2634, 2646, 2660, 2671, 2685, 2697, 2710, 2721, 2734, 2746, 2755, 2772, 2785, 2801, 2814, 2826, 2839, 2858, 2876, 2893, 2903, 2916, 2927, 2942, 2951, 2968, 2981],
"x": [1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 2, 3, 5, 3, 1, 0, -1, 3, 3, 5, 5, 3, 3, 0, -1, -3, -1, -1, 0, -1, -1, -3, -4, -5, 0, 1, 0, 0, -1, -1, -1, 2, 1, -1, -1, -2, 0, 1, 5, 4, 1, 0, -2, -5, -6, -1, -3, 0, -1, -1, 0, 1, 3, 3, 1, 1, 2, -2, -2, 1, 1, -1, 0, -1, -1, -1, 1, 1, 2, -1, -4, -4, -5, -3, -1, 1, 3, 5, 5, 5, 2, 1, -1, -3, -3, 1, -1, -1, -1, -1, -4, -3, 1, 1, -1, -1, -1, 1, 1, 5, 3, 3, 1, -1, -1, -1, -3, -2, -1, -2, -1, 1, 1, 1, 3, 3, 2, 0, 1, 1, 1, -1, 1, 1, 0, -1, -2, -3, -3, -3, -1, -1, 0, -1, -1, 0, -1, 0, 1, 1, 0, 1, -1, -1, -3, -3, -1, -1, -1, 1, -1, 0, -2, -1, 2, 1, -1, -1, -3, -3, -2, -1, 1, 3, 3, 3, 0, 0, 1, 1, 1, 2, 0, -1, 0, 1, -1, 1, 1, 1, -1, 3, 1, -6, -8, -8, -3, -1, -1, 1, 2, 3, 5, 5, 0, 1, -2, -1, -2, 1, 1, -1, -3, -3, 5, -5, -3, -3],
"y": [6, 6, 6, 6, 7, 5, 5, -2, -1, -3, 1, 4, 6, 5, 4, 0, -2, -4, 0, 5, 6, 6, 2, 4, 1, 5, 7, 2, 3, 0, 0, 0, 4, 5, 7, 2, -3, -3, -3, 4, 7, 8, 2, 0, 1, 2, 2, 1, 0, -3, -2, 0, 0, 4, 7, 8, 4, 2, 1, -1, -1, -1, 2, 0, 0, 0, 0, 0, 6, 7, 4, 2, 3, 4, 4, 5, 5, 3, 0, 0, 6, 7, 7, 4, 2, -1, 0, 4, 6, 8, 4, -1, -2, 19, 6, -1, -2, -5, -4, -3, 4, 7, 7, 4, 4, 1, 2, 4, 6, 7, 3, 0, -3, -2, 0, 11, 6, 4, 0, -1, -1, 0, 4, 4, 6, 2, 2, -3, -2, -2, 1, 4, 6, 3, 2, 0, -1, -1, 2, 4, 4, 0, 0, -2, 0, 0, 6, 9, 9, 9, 4, -2, -1, -5, 0, 2, 6, 4, 4, -1, -1, -3, 0, 4, 6, 4, 3, 2, 0, -1, -1, 2, 4, 6, 3, 2, 0, -1, -1, 2, 5, 5, 4, -1, -2, -1, 4, 8, 6, 2, 0, 0, 18, -18, 7, -5, 4, 2, 4, 6, 11, 6, 6, -3, -5, -5, -1, 0, 6, 8, 5, 2, 2, 0, 0, 0, 4, 4, 1]
}
}
},
{
"name": "R-301",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 6, 18, 25, 35, 45, 55, 67, 75, 87, 99, 110, 122, 129, 140, 149, 159, 171, 180, 189,
201, 209, 220, 233, 244, 259, 267, 276, 288, 300, 308, 320, 343, 355, 362, 374, 386,
398, 423, 453, 465, 477, 503, 514, 521, 532, 541, 557, 571, 582, 601, 620, 630, 653,
661, 695, 729, 739, 772, 785, 797, 806, 839, 882, 889, 901, 912, 926, 938, 949, 961,
969, 980, 988, 1010, 1022, 1036, 1048, 1059, 1072, 1080, 1090, 1102, 1113, 1121, 1134,
1146, 1157, 1169, 1182, 1192, 1195, 1206, 1219, 1232, 1241, 1250, 1259, 1269, 1279,
1288, 1299, 1305, 1317, 1329, 1337, 1347, 1356, 1366, 1378, 1386, 1395, 1407, 1416,
1426, 1435, 1442, 1452, 1464, 1470, 1483, 1494, 1506, 1517, 1526, 1538, 1564, 1574,
1586, 1593, 1604, 1622, 1636, 1648, 1660, 1672, 1685, 1696, 1704, 1715, 1727, 1739,
1751, 1759, 1770, 1776, 1789, 1799, 1806, 1819, 1826, 1838, 1845, 1854, 1862, 1875,
1888, 1899, 1914, 1924, 1935, 1944, 1958, 1968, 1978, 1990, 2003, 2011, 2021, 2034,
2041, 2052, 2066, 2078, 2087, 2096, 2103, 2110, 2120, 2132, 2140, 2150, 2159, 2169,
2191, 2200, 2211, 2224, 2236, 2248, 2257, 2266, 2275, 2285, 2292, 2303, 2315, 2322,
2330, 2340, 2348, 2359, 2371, 2384, 2396, 2403],
"x": [0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, 0,
0, 0, 0, 0, 0, 0, -1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1,
-1, -2, -2, -2, -1, -1, -2, 1, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -1, -1, -2, -1,
-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, -1, -1, -1],
"y": [0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 4, 5, 5, 5, 6, 5, 5, 5, 4, 5, 5, 4, 4, 4, 6, 5, 5, 6, 6, 5, 5,
19, 8, 8, 7, 4, 3, 3, 3, 3, 3, 5, 4, 4, 5, 4, 8, 5, 3, 2, 1, 2, 4, 1, 1, 5, 5, -1, 0, 0, -1, 0, 5,
3, 3, 3, 18, 18, 9, 4, -1, -1, -3, 4, 3, 3, 0, -1, -1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 0, 0, -1, 2, 1, 1, 0, 0, 0, 3, 3, 3, 2, 1, 0, 0, 0, 4, 4, 1,
-3, -3, 0, 0, 3, 0, -1, -1, 0, 3, 3, 1, 1, 1, 0, 2, 0, 0, 0, -1, -1, -1, 3, 5, 2, 1, 0, -1, -1,
-1, 5, 3, 2, 2, 2, 1, 4, 4, 3, 1, 1, -1, -1, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-1, -1, -2, -3, -4, -4, -4, -5, -5, -5, -6, -5, -5, -6, -5, -6, -7, -7, -8]
},
"aim": {
"time_points": [0, 7, 18, 37, 43, 55, 67, 74, 86, 94, 105, 117, 172, 191, 202, 215, 234, 245, 257, 280,
291,
300, 312, 319, 333, 346, 357, 366, 374, 387, 399, 410, 419, 429, 440, 454, 461, 472,
483, 491,
503, 515, 523, 534, 546, 558, 570, 578, 588, 601, 613, 620, 632, 643, 655, 662, 674,
686, 694,
705, 718, 729, 742, 754, 766, 778, 786, 797, 809, 822, 834, 845, 854, 865, 873, 889,
900, 909,
919, 927, 938, 945, 956, 968, 976, 988, 1000, 1007, 1017, 1025, 1036, 1044, 1054, 1066,
1078,
1087, 1097, 1110, 1122, 1134, 1141, 1154, 1165, 1176, 1185, 1194, 1203, 1215, 1225,
1238, 1246,
1257, 1269, 1277, 1288, 1299, 1307, 1318, 1326, 1336, 1349, 1362, 1373, 1385, 1404,
1411, 1422,
1434, 1441, 1452, 1460, 1472, 1483, 1495, 1503, 1514, 1533, 1541, 1550, 1562, 1570,
1580, 1592,
1606, 1613, 1624, 1633, 1642, 1653, 1661, 1672, 1681, 1692, 1704, 1712, 1722, 1734,
1762, 1772,
1779, 1789, 1797, 1807, 1857, 1887, 1918, 1925, 1936, 1944, 1954, 1982, 1992, 2004,
2012, 2022,
2034, 2042, 2052, 2060, 2071, 2079, 2087, 2098, 2109, 2122, 2134, 2145, 2157, 2169,
2178, 2188,
2201, 2213, 2225, 2237, 2250, 2262, 2272, 2280, 2292, 2300, 2310],
"x": [0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, -1, -1, -2, -2, -2, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0,
0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 1, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, 0, -1,
-2, -1,
-2, -2, -2, -2, -1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 3, 4, 4, 3, 2, 1, 0, 1, 1, 1, 1, 2, 2, 1,
2, 1, 1,
1, 0, 0, 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -2, -1, -1, 0,
-1, 0,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -1, -1, -2, -2, -2, -2, -1,
-1, -1,
-1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, 1, 1, 2, 2, 2, 1, 1, -1, -1, 0, 0, 1, 1, -2, -1, -2,
-2, -2,
0, 4, 2, 1, 1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 0, 0],
"y": [-1, -1, -1, 2, 5, 6, 7, 4, 4, 3, 3, 3, 2, 6, 6, 8, 4, 4, 4, 4, 3, 2, 2, 2, 2, 5, 4, 3, 2, 1, 2, 1,
1, 1,
1, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1,
1, 1, 1,
1, 2, 5, 5, 4, 3, 2, 1, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1,
-1, -1,
-1, -1, -1, -1, -1, -1, 1, 1, 0, 0, 0, 1, 3, 4, 3, 3, 2, 2, 2, 3, 2, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 2,
1, 1, 0, 0, -1, 0, -1, -2, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -2, 0, -1, -1, -1, -1,
3, 2, 2,
1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -1, -1, 0, 2, 1, 2, 3, 1, -2, -4, -6, -7, -7, -7,
-5, -5,
-5, -6, -6, -7, -8, -9, -9]
}
}
},
{
"name": "电能",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [31, 38, 48, 61, 73, 81, 91, 102, 112, 119, 133, 146, 161, 173, 185, 197, 210, 221, 232,
242, 252, 265, 277, 288, 296, 307, 315, 326, 337, 346, 356, 367, 372, 381, 394, 405,
413, 424, 432, 442, 450, 461, 485, 493, 503, 515, 523, 535, 547, 557, 565, 575, 585,
595, 608, 618, 627, 638, 647, 657, 668, 682, 693, 706, 719, 730, 742, 754, 765, 773,
783, 792, 803, 816, 826, 833, 845, 853, 865, 877, 885, 896, 903, 913, 921, 932, 944,
952, 963, 971, 981, 989, 1000, 1012, 1024, 1032, 1043, 1054, 1062, 1070, 1080, 1092,
1103, 1112, 1119, 1130, 1142, 1153, 1165, 1172, 1185, 1196, 1204, 1214, 1222, 1233,
1241, 1248, 1263, 1269, 1283, 1295, 1306, 1318, 1326, 1337, 1348, 1355, 1368, 1375,
1387, 1398, 1410, 1418, 1429, 1441, 1449, 1460, 1472, 1484, 1496, 1504, 1515, 1527,
1535, 1546, 1559, 1569, 1576, 1588, 1598, 1606, 1613, 1625, 1632, 1644, 1655, 1667,
1680, 1691, 1698, 1710, 1718, 1729, 1740, 1748, 1760, 1772, 1783, 1795, 1803, 1814,
1822, 1833, 1845, 1856, 1864, 1876, 1887, 1896, 1906, 1914, 1920, 1931, 1943, 1955,
1969, 1980, 1988, 1998, 2016, 2023, 2036, 2047, 2060, 2072, 2083, 2092, 2099, 2109,
2117, 2127, 2135, 2147, 2158, 2169, 2182, 2190, 2200, 2212, 2220, 2231, 2239, 2250,
2258, 2268, 2280, 2288, 2299, 2311, 2322, 2335, 2348, 2360, 2368, 2378, 2385, 2397,
2408, 2416, 2427, 2435, 2446, 2454, 2463, 2476],
"x": [-2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1,
-1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1,
-1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2,
2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 3, 2,
2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -4, -4, -4, -3, -3, -3,
-2, -2, -2, -2],
"y": [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 4, 5, 5, 5, 3, 2, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 5, 5, 5, 4, 3, 3, 4,
5, 5, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 4, 5, 5,
4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,
1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2,
-2, -2, -2, -2, -2, -2, -2, -2]
},
"aim": {
"time_points": [0, 12, 30, 44, 61, 69, 85, 99, 116, 134, 145, 159, 173, 187, 198, 216, 233, 248, 263, 282, 294, 314, 332, 349, 364, 381, 399, 417, 430, 447, 465, 478, 497, 516, 534, 550, 566, 583, 598, 615, 628, 645, 664, 681, 700, 718, 734, 750, 767, 783, 800, 817, 835, 847, 862, 878, 890, 905, 917, 934, 952, 970, 988, 1003, 1018, 1031, 1046, 1060, 1075, 1092, 1104, 1117, 1129, 1138, 1150, 1166, 1179, 1197, 1217, 1234, 1246, 1265, 1283, 1292, 1303, 1319, 1337, 1350, 1365, 1382, 1399, 1411, 1430, 1438, 1453, 1465, 1479, 1492, 1511, 1527, 1540, 1571, 1614, 1629, 1641, 1657, 1676, 1694, 1713, 1730, 1749, 1765, 1776, 1792, 1811, 1819, 1833, 1843, 1857, 1872, 1890, 1910, 1928, 1943, 1955, 1967, 1981, 1994, 2008, 2020, 2037, 2048, 2068, 2080, 2097, 2108],
"x": [-1, -1, -3, -4, -3, -3, -1, 1, 2, 1, 0, 0, -1, 1, 1, 1, 1, 0, -1, -5, -5, -3, -1, 1, 1, 1, 1, 1, -1, -6, -6, -3, -1, 1, -1, -1, -2, -1, 1, 1, 2, 3, 2, 1, -3, -5, -3, -1, 1, 1, 1, -1, 0, -1, 4, 5, 6, 2, 1, 1, 3, 3, 3, 1, 2, 4, 3, 2, 2, -1, -1, 1, 2, 3, 3, 1, 1, -3, -5, -4, -3, -1, -2, -4, -3, -3, 1, 1, -1, -3, -2, -1, 1, 1, 0, 0, -1, -1, -1, 0, 1, 3, 3, 5, 3, 5, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, -2, -2, -3, -2, 2, 3, 3, 3, 0, -1, -1, 3],
"y": [-2, -3, 4, 7, 7, 16, 7, -3, -1, 2, 2, 2, 1, 0, 7, 10, 7, 4, 2, 5, 6, 5, 2, 0, 7, 10, 7, 4, 2, 5, 5, 4, 2, 0, 7, 9, 7, 5, 0, 2, 7, 9, 5, 3, 5, 5, 5, 2, 1, 5, 6, 5, 3, 2, 3, 2, 3, 2, 0, 0, -1, 0, 1, 1, 0, 1, 3, 2, 3, 1, 0, 2, 3, 4, 2, 1, 0, 2, 2, 2, 2, 0, -2, -2, -1, 0, 0, 0, -1, 0, 0, 2, 0, -2, 2, 2, 4, 3, 2, 0, 0, -1, 1, 0, 0, 0, 0, -1, 1, 2, 2, 0, 0, -1, 0, 0, 0, 0, 0, 2, 2, 1, 0, 2, 2, 3, 2, 2, 0, 0, 0, 1, 0, 0, 1, 0]
}
}
},
{
"name": "平行步枪",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [42, 53, 61, 73, 80, 90, 100, 109, 118, 128, 140, 153, 160, 171, 185, 195, 203, 214, 223,
233, 244, 256, 270, 280, 288, 297, 305, 318, 326, 342, 356, 368, 379, 392, 405, 419,
428, 441, 453, 468, 478, 490, 501, 508, 520, 527, 539, 558, 581, 589, 600, 612, 618,
630, 642, 651, 661, 673, 682, 693, 704, 712, 722, 735, 743, 754, 762, 772, 780, 790,
802, 809, 821, 833, 841, 857, 868, 876, 887, 900, 908, 918, 927, 936, 955, 967, 975,
986, 998, 1010, 1018, 1028, 1040, 1052, 1059, 1071, 1084, 1096, 1105, 1115, 1124, 1135,
1145, 1157, 1169, 1177, 1188, 1200, 1212, 1223, 1231, 1243, 1255, 1265, 1275, 1286,
1294, 1304, 1317, 1329, 1337, 1347, 1359, 1367, 1376, 1385, 1392, 1403, 1410, 1421,
1432, 1441, 1452, 1464, 1475, 1488, 1499, 1512, 1521, 1530, 1538, 1549, 1560, 1568,
1580, 1593, 1604, 1617, 1628, 1640, 1648, 1660, 1671, 1685, 1696, 1703, 1714, 1726,
1739, 1751, 1763, 1775, 1786, 1794, 1806, 1815, 1826, 1837, 1849, 1860, 1869, 1881,
1891, 1900, 1907, 1917, 1929, 1941, 1954, 1967, 1977, 1989, 1997, 2008, 2020, 2033,
2040, 2052, 2063, 2075, 2086, 2095, 2106, 2118, 2124, 2135, 2144, 2155, 2167, 2175,
2186, 2198, 2206, 2217, 2228, 2236, 2247, 2259, 2267, 2278, 2290, 2303, 2315, 2326,
2339, 2347, 2357, 2371, 2383, 2394, 2407, 2418, 2425, 2438, 2450, 2462, 2474, 2486,
2498, 2511, 2523, 2536, 2548, 2566, 2575, 2585, 2596, 2608, 2616, 2627, 2645, 2657,
2670, 2682, 2689, 2700, 2712, 2720, 2732, 2743, 2751, 2761, 2774, 2786, 2794, 2805,
2816, 2831, 2865, 2875, 2884, 2897, 2908, 2921, 2934, 2957, 2970, 2977, 2988, 3001,
3008, 3020, 3031, 3038, 3051, 3062, 3070, 3080, 3093, 3099, 3113, 3123, 3130, 3142,
3155, 3168, 3180, 3191, 3231, 3240, 3260, 3271, 3284],
"x": [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3,
2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1,
-1, -3, -4, -5, -5, -4, -3, -2, -2, -1, 0, 0, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1,
1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 2, 2, 3, 3, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -1, -1, -2, -2, -3, -4, -4, -4, -3, -2, -2,
-2, -2, -1, -2, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -1, -1, 0, 0, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -24, -24, 0, 4, 8],
"y": [1, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 2, 2, 2, 1, 4, 6, 4, 2,
3, 2, 1, 1, 2, 4, 5, 3, 2, 2, 2, 2, 1, 1, 4, 4, 3, 3, 3, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, -1, -1, 3, 2, 0, -1, -1, -1, -1, -1, -1, 11, 3, 2, -1, -1, -1, -2, -2, -2, -1,
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0,
-1, -1, -1, 0, 0, 0, 1, 3, 2, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 2, 3, 4, 2, 2, 1, 1, 1,
1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 1, 1, 1, 0, 0, 0, 10, 4, 0, -1, -2, -3, -2, -2, -2, 0, 0,
2, 0, 0, 0, 0, 0, 0, 3, 1, 2, 1, 1, 1, 1, 7, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -2,
-2, -4, -4, -5, -7, 10, 10, -12, -13, -16]
},
"aim": {
"time_points": [1, 13, 25, 43, 61, 74, 104, 121, 140, 152, 166, 182, 200, 219, 238, 250, 268, 286, 303,
323,
336, 352, 370, 384, 401, 414, 422, 442, 461, 474, 493, 506, 522, 536, 547, 564, 574,
587, 602,
621, 639, 651, 663, 676, 694, 701, 730, 746, 760, 772, 789, 798, 816, 833, 851, 868,
881, 894,
912, 919, 936, 950, 961, 973, 985, 998, 1033, 1046, 1063, 1070, 1090, 1143, 1155, 1167,
1179,
1190, 1204, 1221, 1233, 1247, 1269, 1278, 1294, 1337, 1374, 1391, 1399, 1415, 1428,
1439, 1452,
1470, 1478, 1493, 1502, 1519, 1526, 1543, 1560, 1573, 1582, 1598, 1611, 1623, 1640,
1653, 1660,
1682, 1694, 1703, 1719, 1733, 1749, 1762, 1774, 1791, 1810, 1828, 1835, 1848, 1866,
1877, 1890,
1901, 1914, 1930, 1944, 1957, 1974, 1998, 2006, 2022, 2041, 2066, 2079, 2121, 2151,
2169, 2180,
2190, 2205, 2217, 2230, 2247, 2261, 2282, 2291, 2307, 2393, 2405, 2413, 2429, 2442,
2454, 2466,
2483, 2496, 2557, 2570, 2586, 2599, 2611, 2624, 2641, 2659, 2672, 2684, 2698, 2705,
2720, 2733,
2750, 2763, 2776, 2787, 2796, 2811, 2825, 2837, 2849, 2866, 2875, 2895, 2909, 2920,
2934, 2945,
2957, 2969, 2987, 3001, 3012, 3023, 3038, 3055, 3066, 3078],
"x": [-1, -1, 1, 3, 4, 3, 1, 0, 0, 0, -2, 0, 0, 1, 2, 7, 8, 8, 6, 0, 1, -1, 1, 1, 2, 1, 1, 2, -1, 0, 0,
-1, -1,
-1, 0, 0, 0, 0, 0, 0, -3, -4, -4, -4, -2, 0, 0, -1, -4, -3, -4, -1, 1, 0, 1, 0, -1, -1, 0, 0, 0,
-3, -3,
-4, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 4, 7, 6, -1, 2, 1, 3, 2, 2, 0, 0, 1, 2, 4, 2, 3,
0, -1,
-2, -2, 0, 1, 1, 1, 0, 0, -1, -1, -1, -1, 0, 0, 1, 1, 2, 2, 2, 1, -1, -1, 0, 0, 3, 3, 2, 1, -1, 0,
2, 4,
6, 3, -3, -1, -1, 2, 2, 0, 1, 2, 2, 1, 0, 0, 0, -2, -4, -5, -2, -3, -1, 0, -1, 0, -2, -4, -6, -5,
-2, 0,
-1, -3, -3, -3, -1, 0, -2, -3, -4, -2, 1, 0, 0, -1, -1, -1, -2, -1, -1, 0, -1, -4, -4, -3, -1, 2,
2, 1,
-1, -1, -1, -1, 0, 1, 1, -3, -4, 2, -3],
"y": [2, 2, 11, 15, 16, 8, -1, -4, -3, -1, 1, 3, 2, 0, 3, 5, 6, 5, 3, -1, 4, 4, 5, 4, 3, -2, 3, 4, 5, 5,
4, 0,
-1, 3, 5, 7, 3, 4, 4, -2, -3, -3, -3, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -1, 0, 1, 1, 0, 1, 0, 1,
3, 3, 3,
2, 0, 3, 5, 5, 0, 3, 1, 1, 0, 0, 0, -1, 0, 2, 3, 3, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, -1,
0, 0, 0,
1, 1, 1, 0, 0, -1, 3, 4, 5, 5, 0, 0, -1, 0, 2, 3, 3, 3, 1, -3, -1, 0, 2, 3, 3, 2, 0, -1, -1, -1,
0, 0, 0,
0, 0, 2, 2, -1, 3, 3, 1, 1, 0, -1, -1, 0, 4, 4, 2, 3, 0, 0, 0, 0, 2, 3, 4, 3, 1, 0, -1, -1, 0, 0,
0, 0,
-1, -1, -1, -2, 0, -1, 1, 2, 2, 2, 1, 0, -1, -1, 2, 5, 6, 1, 2, -1, -1, 0, 4, 3, 5, 3, 1, -1, -3,
-5, -1,
0, 0]
}
}
}
, {
"name": "R99",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 9, 26, 37, 46, 60, 74, 87, 99, 111, 123, 143, 154, 170, 185, 193, 206, 221, 234, 242, 258, 271, 290, 308, 320, 329, 344, 357, 366, 380, 394, 412, 431, 449, 464, 480, 492, 505, 516, 535, 553, 562, 577, 590, 601, 612, 627, 639, 657, 677, 694, 704, 719, 737, 755, 767, 776, 788, 804, 814, 824, 838, 852, 866, 883, 893, 906, 918, 929, 946, 958, 966, 983, 1001, 1015, 1027, 1044, 1063, 1080, 1093, 1105, 1114, 1129, 1139, 1154, 1162, 1175, 1190, 1203, 1211, 1224, 1240, 1258, 1267, 1279, 1295, 1308, 1322, 1338, 1347, 1361, 1374, 1387, 1396, 1408, 1424, 1436, 1449, 1466, 1485, 1493, 1506],
"x": [-1, -1, -1, -2, -2, -1, -1, -1, -1, 0, 0, -1, 1, 1, 1, 3, 1, 2, 0, -2, -3, -4, -6, -6, -3, -3, -2, -4, -2, -3, -3, -5, -5, -3, -3, -4, -2, -3, -3, 3, 5, 5, 6, 5, 2, 2, -2, -6, 3, 3, 6, 3, 1, -3, -1, -4, -3, -3, -3, -3, -2, -3, -1, -2, 2, 1, 3, -3, -3, -3, -4, -2, 1, 3, 3, 5, 10, 8, 6, 5, 8, 6, 3, 10, 0, 1, -1, -1, 1, 1, 2, 3, 1, -1, -1, -1, -2, -3, -6, -6, -5, -5, -3, -3, -1, -3, -2, -3, -3, -3, -1, -1],
"y": [3, 3, 3, 4, 5, 5, 5, 6, 8, 8, 6, 5, 5, 5, 5, 5, 10, 14, 15, 12, 10, 14, 12, 8, 12, 18, 19, 12, 12, 11, 10, 6, 6, 7, 7, 6, 15, 15, 17, 8, 8, 7, 7, 6, 7, 6, 6, 5, 6, 9, 6, 6, 13, 15, 9, 5, 5, 5, 1, 1, 1, 1, 3, 2, 1, 3, 1, 0, 1, 1, 3, 3, 3, 8, 7, 6, 4, 2, 1, 1, 3, 3, 3, 2, 3, 3, 3, 3, 4, 5, 9, 10, 3, -4, -4, -7, -6, 3, 6, 6, 5, 1, -3, -6, -6, -6, -6, -4, 2, 2, 1, 1]
},
"aim": {
"time_points": [0, 12, 27, 38, 54, 63, 80, 97, 109, 120, 134, 148, 164, 174, 189, 201, 210, 222, 238, 250, 262, 270, 284, 300, 312, 323, 337, 346, 361, 370, 383, 395, 407, 418, 434, 443, 454, 469, 479, 510, 538, 547, 560, 575, 590, 607, 621, 633, 649, 661, 670, 711, 722, 731, 744, 759, 768, 782, 809, 817, 833, 847, 864, 894, 909, 921, 937, 951, 968, 989, 1005, 1017, 1048, 1057, 1069, 1084, 1109, 1125, 1136, 1148, 1161, 1173, 1188, 1201, 1220, 1237, 1249, 1262, 1277, 1289, 1384, 1397, 1409, 1433, 1445, 1458, 1470, 1483],
"x": [0, 0, -1, -1, -1, -1, -1, 1, 0, 1, 1, 3, 1, 1, 1, -1, -2, -1, -1, -2, -3, -1, -3, -1, -4, -4, -3, 0, -3, -4, -3, -3, 1, -4, -2, -3, 1, 1, 1, 1, 2, 2, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, -1, 0, -1, -1, -5, -6, -6, -3, 1, 1, -3, -3, -5, -3, 1, 4, 3, 3, 3, 3, 3, 3, 1, 1, 3, 3, 4, 2, 1, 5, 5, 3, -1, -1, -3, -3, -12, -12, -12, -3, 1, 1, 1, 0],
"y": [-3, -3, 1, 5, 5, 4, 3, 5, 5, 4, 4, 2, 0, -1, 2, 7, 8, 9, 4, 7, 12, 16, 12, 7, 11, 11, 7, 3, 2, 4, 5, 4, 2, 4, 7, 5, 4, 2, 5, 4, 10, 11, 9, 5, 6, 7, 4, 4, 10, 9, 8, 6, 6, 6, 7, 9, 7, 4, -3, -5, -5, -5, 2, 4, 3, 2, 2, 2, 2, 3, 2, 3, -2, -2, -3, -1, 0, 1, 4, 4, 4, 2, 0, 2, 2, 2, 2, 4, 3, 2, -2, -2, -2, 0, 2, 2, -5, -7]
}
}
},
{
"name": "car",
"type": "serial",
"recoils": {
"un_aim": {
"time_points": [0, 16, 29, 47, 65, 80, 96, 113, 127, 143, 156, 170, 187, 199, 218, 237, 249, 267, 284,
298, 304, 321, 338, 348, 364, 376, 388, 400, 416, 434, 452, 466, 478, 489, 503, 520,
538, 550, 568, 581, 589, 606, 623, 642, 655, 667, 679, 696, 709, 716, 738, 746, 763,
776, 794, 806, 818, 831, 843, 854, 872, 891, 903, 921, 939, 951, 965, 981, 994, 1007,
1024, 1036, 1049, 1061, 1069, 1091, 1104, 1116, 1133, 1146, 1163, 1183, 1199, 1214,
1230, 1242, 1255, 1274, 1292, 1315, 1339, 1354, 1371, 1390, 1403, 1419, 1433, 1452,
1468, 1481, 1498, 1516, 1535, 1553, 1571, 1589, 1602, 1619, 1639, 1655, 1669, 1687,
1701, 1718, 1736, 1748, 1764, 1774, 1797, 1814, 1830, 1850, 1869, 1882, 1893, 1905,
1919],
"x": [2, 2, 7, -11, -3, 1, 1, 3, 3, 3, 2, 1, 0, -1, -1, 1, 2, 3, 1, 2, 1, 2, -1, 1, 0, 1, 1, 1, 2, 2, 2,
1, 2, 1, 0, 0, -2, -3, -3, -3, -3, -3, 0, 0, 1, 1, -2, -1, -3, -3, -3, -3, -3, -3, -3, -4, -5, -5,
-5, -4, -3, -1, 1, 1, 0, 1, 2, 2, 2, 4, 4, 2, 2, 3, 3, 3, 1, 1, 0, -1, -2, -2, -3, -3, -3, -2, -3,
-2, -2, -2, -2, -4, -5, -5, -4, -4, -3, -2, 0, 1, -1, 0, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 0, 0,
0, 0, 0, 1, 2, 1, 2, 2, 2, 1, 0],
"y": [-2, -2, 1, 4, 6, 5, 8, 7, 8, 8, 6, 7, 4, 5, 4, 6, 8, 9, 7, 10, 11, 11, 9, 8, 7, 8, 6, 6, 6, 6, 4,
4, 5, 6, 7, 6, 4, 5, 6, 6, 6, 4, 6, 7, 7, 7, 6, 6, 4, 4, 3, 0, 0, -1, -2, -1, -1, 0, 1, 1, 2, 2,
3, 3, 2, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 1, 2, 2, 3, 3, 1, 1, 1, 0, -2, -2, -2,
-2, -1, -1, 1, 1, 2, 3, 2, 2, 3, 2, 2, 2, 3, 3, 1, 2, 3, 3, 2, 1, 1, 0, 0, 0, -1, -2, -2, -4, -5,
-6, -8, -8, -8]
},
"aim": {
"time_points": [1, 11, 20, 30, 42, 49, 60, 69, 79, 88, 109, 118, 128, 140, 148, 158, 170, 177, 189, 198,
209, 221, 233, 244, 253, 263, 274, 285, 293, 302, 311, 323, 336, 349, 361, 372, 385,
392, 403, 416, 428, 439, 453, 461, 468, 478, 489, 501, 510, 520, 531, 539, 550, 558,
569, 580, 589, 600, 610, 618, 630, 643, 655, 667, 679, 686, 698, 709, 722, 728, 740,
752, 759, 771, 783, 794, 801, 813, 821, 833, 844, 857, 866, 882, 893, 905, 918, 931,
943, 956, 968, 980, 992, 1004, 1017, 1028, 1041, 1053, 1066, 1078, 1089, 1102, 1111,
1121, 1133, 1145, 1157, 1169, 1182, 1194, 1206, 1220, 1233, 1243, 1255, 1268, 1281,
1292, 1304, 1316, 1329, 1338, 1348, 1360, 1372, 1384, 1396, 1405, 1416, 1428, 1440,
1451, 1464, 1476, 1487, 1506, 1531, 1543, 1555, 1562, 1574, 1594, 1605, 1618, 1622,
1636, 1643, 1654, 1666, 1674, 1685, 1692, 1704, 1715, 1725, 1734, 1746, 1754, 1764,
1776, 1784, 1795, 1807, 1819, 1831, 1839, 1851, 1862, 1871, 1881],
"x": [0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0,
1, 2, 3, 3, 2, 2, 3, 2, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -3, -3, -4, -4, -3, -2, -2, -1, 0, 1,
1, -1, -2, -3, -3, -3, -3, -3, -2, -2, -2, -1, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, -1, -1, 1, 2, 3, 2,
2, 2, 3, 3, 3, 2, 1, 2, 3, 3, 2, 2, -2, -3, -3, -4, -3, -4, -5, -4, -4, -2, -2, 0, 0, -1, -1, -3,
-3, -3, -2, -2, -1, -2, -2, -2, -2, -1, -2, -2, -2, -1, -1, 0, 2, 3, 4, 2, 2, 2, 2, 1, -1, -1, -1,
-1, -1, 0, 0, 0, 1, 1, 1, 6, 6, 5, 4, 4, 1, -1, -1, -2, -3, -2, -1, 0, 1, 2, 2, 2, 2],
"y": [-1, -1, -1, 0, 3, 3, 4, 4, 3, 3, 5, 5, 5, 5, 3, 4, 5, 4, 4, 3, 2, 1, 4, 5, 6, 7, 5, 5, 4, 5, 3, 2,
2, 2, 5, 6, 6, 5, 5, 6, 7, 5, 3, 2, 2, 2, 3, 4, 4, 4, 2, 5, 5, 5, 5, 3, 2, 3, 5, 6, 5, 4, 2, 2, 4,
3, 4, 2, 1, -1, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 1, 0, -1, -1,
-2, 0, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 1, -1, -1, -1, 0, -1, -1, -2, -2, -1, -1, -1, 1,
1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 12, 8, 2, 2, -1, -2, -2, -3, 0, 1, 1,
2, 2, 0, 0, 0, -2, -3, -4, -5, -5, -5, -5, -5, -5, -5]
}
}
}
]
================================================
FILE: core/Config.py
================================================
import json
import os
import os.path as op
import shutil
import jsonpath as jsonpath
from log import LogFactory
from tools.Tools import Tools
screenshot_resolution = {
(1920, 1080): (1542, 959, 1695, 996),
(2560, 1440): (2093, 1281, 2275, 1332),
# (2560, 1440): (1905, 1092, 2087, 1143),
(3440, 1440): (2093, 1281, 2275, 1332),
(1920, 1200): (1539, 1142, 1728, 1142),
(2048, 1152): (1927, 1172, 2089, 1208),
(1680, 1050): (1350, 944, 1503, 979),
(2560, 1600): (2076, 1441, 2276, 1490),
(3840, 2160): (3113, 1920, 3429, 1987),
(3440, 1440): (2952, 1285, 3173, 1329)
}
scope_screenshot_resolution = {
(2560, 1440): [(2034, 1338, 2059, 1363), (2069, 1338, 2094, 1363), (2106, 1338, 2131, 1363)],
(1920, 1080): [(1522, 1002, 1542, 1022), (1551, 1002, 1571, 1022), (1579, 1002, 1599, 1022)],
(2048, 1152): [(1880, 1213, 1901, 1234), (1910, 1213, 1931, 1234), (1940, 1213, 1961, 1234)],
(1680, 1050): [(1333, 982, 1350, 999), (1357, 982, 1374, 999), (1382, 982, 1399, 999)],
(2560, 1600): [(2031, 1495, 2056, 1520), (2069, 1495, 2094, 1520), (2106, 1495, 2131, 1520)],
(3840, 2160): [(3045, 2003, 3084, 2042), (3101, 2003, 3140, 2042), (3157, 2003, 3196, 2042)],
(3440, 1440): [(2910, 1335, 2937, 1362), (2948, 1335, 2975, 1362), (2985, 1335, 3012, 1362)]
}
hop_up_screenshot_resolution = {
(2560, 1440): [(2142, 1338, 2167, 1363), (2180, 1338, 2205, 1363)],
(1920, 1080): [(1607, 1002, 1627, 1022), (1635, 1002, 1655, 1022)],
(2048, 1152): [(1970, 1213, 1991, 1234), (2000, 1213, 2021, 1234)],
(1680, 1050): [(1406, 982, 1423, 999), (1430, 982, 1447, 999)],
(2560, 1600): [(2144, 1495, 2169, 1520), (2181, 1495, 2206, 1520)],
(3840, 2160): [(3213, 2003, 3252, 2042), (3269, 2003, 3308, 2042)],
(3440, 1440): [(3022, 1335, 3049, 1362), (3059, 1335, 3086, 1362)]
}
class Config:
"""
全局配置
"""
def __init__(self, base_path='config\\',
ref_dir='ref\\',
use_ref_name='ref.txt',
default_ref_config_name='global_config'):
self.base_path = None
self.ref_dir = None
self.ref_config_name = None
self.use_ref_name = None
self.config_path = None
self.config_data = None
self.desktop_width = None
self.desktop_height = None
self.game_width = None
self.game_height = None
self.refresh_buttons = []
self.mouse_mover = None
self.rea_snow_mouse_mover = None
self.server_mouse_mover = None
self.log_model = None
self.game_solution = None
self.mouse_mover_params = None
self.select_gun_bbox = None
self.licking_state_bbox = None
self.select_scope_bbox = None
self.select_hop_up_bbox = None
self.image_path = None
self.scope_path = None
self.hop_up_path = None
self.licking_state_path = None
self.shake_gun_toggle = None
self.shake_gun_toggle_button = None
self.shake_gun_trigger_button = None
self.has_turbocharger = None
self.comparator_mode = None
# self.net_images_path = None
# self.local_images_path = None
self.read_image_mode = None
self.image_base_path = None
self.key_trigger_mode = None
self.delayed_activation_key_list = None
self.zen_toggle_key = None
self.mouse_c1_to_key = None
self.joy_to_key_map = None
self.toggle_key = None
self.toggle_hold_key = None
self.distributed_param = None
self.screen_taker = None
self.rea_snow_gun_config_name = None
self.s1_switch_hold_map = None
self.delay_refresh_buttons = None
self.cap_param = {}
self.logger = LogFactory.getLogger(self.__class__)
self.update(base_path, ref_dir, use_ref_name, default_ref_config_name)
def update(self,
base_path='config\\',
ref_dir='ref\\',
use_ref_name='ref.txt',
default_ref_config_name='global_config'):
"""
重新做一次初始化操作,复用init
:param base_path:
:param ref_dir:
:param use_ref_name:
:param default_ref_config_name:
"""
self.base_path = base_path
self.ref_dir = self.base_path + ref_dir
self.ref_config_name = default_ref_config_name
self.use_ref_name = use_ref_name
self.config_data = self.read_config()
self.init()
def init(self):
"""
配置初始化
"""
x, y = Tools.get_resolution()
# 分辨率
self.desktop_width = self.get_config(self.config_data, 'desktop_width', x)
self.desktop_height = self.get_config(self.config_data, 'desktop_height', y)
self.logger.print_log(f"识别到桌面分辨率为:{self.desktop_width}x{self.desktop_height}")
self.game_width = self.get_config(self.config_data, 'screen_width', self.desktop_width)
self.game_height = self.get_config(self.config_data, 'screen_height',
self.desktop_height)
self.game_solution = (self.game_width, self.game_height)
if self.game_solution in screenshot_resolution:
self.select_gun_bbox = screenshot_resolution[
self.game_solution] # 选择枪械的区域
else:
self.select_gun_bbox = screenshot_resolution[(1920, 1080)]
self.licking_state_bbox = [(0, 0, self.desktop_width, self.desktop_height)]
if self.game_solution in scope_screenshot_resolution:
self.select_scope_bbox = scope_screenshot_resolution[self.game_solution]
if self.game_solution in hop_up_screenshot_resolution:
self.select_hop_up_bbox = hop_up_screenshot_resolution[self.game_solution]
self.comparator_mode = self.get_config(self.config_data, 'comparator_mode', "local")
self.read_image_mode = self.get_config(self.config_data, 'read_image_mode', "local")
self.key_trigger_mode = self.get_config(self.config_data, 'key_trigger_mode', "local")
# self.net_images_path = self.get_config(self.config_data, 'net_images_path',
# "https://gitee.com/wdragondragon/apex_images/raw/master/")
# self.local_images_path = self.get_config(self.config_data, 'local_images_path', "images/")
self.image_base_path = "images/" if self.read_image_mode == "local" else "http://1.15.138.227:9000/apex/images/"
self.image_path = '{}x{}/'.format(*self.game_solution) # 枪械图片路径
self.scope_path = 'scope/{}x{}/'.format(*self.game_solution) # 镜子图片路径
self.hop_up_path = 'hop_up/{}x{}/'.format(*self.game_solution) # 镜子图片路径
self.licking_state_path = 'licking/{}x{}/'.format(*self.game_solution)
self.refresh_buttons = self.get_config(self.config_data, 'refresh_buttons', ['1', '2', 'E', 'e'])
self.delay_refresh_buttons = self.get_config(self.config_data, 'delay_refresh_buttons', {})
self.mouse_mover = self.get_config(self.config_data, "mouse_mover", "win32api")
self.rea_snow_mouse_mover = self.get_config(self.config_data, "rea_snow_mouse_mover", "distributed")
self.server_mouse_mover = self.get_config(self.config_data, "server_mouse_mover", "km_box_net")
self.mouse_mover_params = self.get_config(self.config_data, "mouse_mover_params", {
"win32api": {},
"km_box": {
"VID/PID": "66882021"
},
"wu_ya": {
"VID/PID": "26121701"
}
})
self.log_model = self.get_config(self.config_data, "log_model", "window")
self.shake_gun_toggle = self.get_config(self.config_data, "shake_gun_toggle", True)
self.shake_gun_toggle_button = self.get_config(self.config_data, "shake_gun_toggle_button",
[["left"], ["right"]])
self.shake_gun_trigger_button = self.get_config(self.config_data, "shake_gun_trigger_button", "caps_lock")
self.has_turbocharger = self.get_config(self.config_data, "has_turbocharger", [
"专注",
"哈沃克"
])
self.delayed_activation_key_list = self.get_config(self.config_data, "delayed_activation_key_list", {})
self.zen_toggle_key = self.get_config(self.config_data, "zen_toggle_key", "")
self.mouse_c1_to_key = self.get_config(self.config_data, "mouse_c1_to_key", [])
self.joy_to_key_map = self.get_config(self.config_data, "joy_to_key_map", {})
# self.toggle_hold_key = self.get_config(self.config_data, "toggle_hold_key", {})
self.toggle_hold_key = {}
self.distributed_param = self.get_config(self.config_data, "distributed_param", {
"ip": "127.0.0.1",
"port": 12345
})
self.screen_taker = self.get_config(self.config_data, "screen_taker", "local")
self.rea_snow_gun_config_name = self.get_config(self.config_data, "rea_snow_gun_config_name", "ReaSnowGun")
self.s1_switch_hold_map = self.get_config(self.config_data, "s1_switch_hold_map",
{
"key": {},
"toggle_key": ""
})
self.cap_param = self.get_config(self.config_data, "cap_param", {
"width": self.game_width,
"height": self.game_height,
"frame_rate": 144,
"format": "MJPG"
})
def get_config(self, read_config, pattern=None, default=None):
"""
从配置中获取项值
:param read_config:
:param pattern:
:param default:
:return:
"""
if pattern is not None:
value = jsonpath.jsonpath(read_config, pattern)
if value is None or not value:
if default is not None:
read_config[pattern] = default
return default
else:
return False
if isinstance(value, list) and len(value) == 1:
return value[0]
else:
return value
else:
return read_config
def set_config(self, key, value):
"""
配置选项变更
:param key:
:param value:
"""
self.config_data[key] = value
def save_config(self):
"""
保存配置
"""
with open(self.config_path, "w", encoding="utf8") as f:
json.dump(self.config_data, f, ensure_ascii=False, indent=4)
self.logger.print_log("保存配置文件到:{0}".format(self.config_path))
self.init()
def read_config(self):
"""
根据当前配置名读取配置
:return:
"""
all_config_name = self.get_all_config_file_name()
ref_config_name = self.read_config_file_name()
if ref_config_name in all_config_name:
self.logger.print_log("读取预设配置:{0}".format(ref_config_name))
self.ref_config_name = ref_config_name
self.config_path = '{0}{1}.json'.format(self.ref_dir, self.ref_config_name)
if op.exists(self.config_path):
with open(self.config_path, encoding='utf-8') as global_file:
return json.load(global_file)
return {}
def get_all_config_file_name(self):
"""
获取所有配置名
:return:
"""
directory = self.ref_dir
# 获取指定目录下的所有文件和子目录
if not os.path.exists(directory):
os.makedirs(directory, exist_ok=True)
files = os.listdir(directory)
files_name = []
# 遍历所有文件和子目录
for file in files:
# 使用 os.path.join() 构建文件的完整路径
file_path = os.path.join(directory, file)
# 检查是否为文件
if os.path.isfile(file_path):
# 使用 os.path.splitext 分离文件名和扩展名
filename, _ = os.path.splitext(file)
files_name.append(filename)
return files_name
def read_config_file_name(self, default="global_config"):
"""
从当前配置名称中加载配置
:param default:
:return:
"""
file_path = self.base_path + self.use_ref_name
try:
if not os.path.exists(file_path):
return default
# 使用 open 函数打开文件
with open(file_path) as file:
# 读取文件内容
return file.read()
except FileNotFoundError:
self.logger.print_log(f"文件 '{file_path}' 不存在.")
except Exception as e:
self.logger.print_log(f"发生错误: {e}")
def writer_config_file_name(self):
"""
修改当前配置文件名称
"""
file_path = self.base_path + self.use_ref_name
try:
# 使用 open 函数以写入模式打开文件
with open(file_path, 'w') as file:
# 将内容写入文件
file.write(self.ref_config_name)
self.logger.print_log(f"成功写入文件: {file_path}")
except Exception as e:
self.logger.print_log(f"写入文件时发生错误: {e}")
def copy_config(self, target):
"""
复制当前配置文件到目标路径
:param target:
"""
try:
source_path = '{0}{1}.json'.format(self.ref_dir, self.read_config_file_name())
target_path = '{0}{1}.json'.format(self.ref_dir, target)
# 使用 shutil.copy 复制文件
shutil.copy(source_path, target_path)
self.logger.print_log(f"成功复制文件: {source_path} 到 {target_path}")
except Exception as e:
self.logger.print_log(f"复制文件时发生错误: {e}")
================================================
FILE: core/GameWindowsStatus.py
================================================
import threading
import time
from log import LogFactory
from tools.Tools import Tools
class GameWindowsStatus:
"""
游戏窗口状态检测
"""
def __init__(self):
self.status = False
self.logger = LogFactory.getLogger(self.__class__)
self.timing_get_status_thread()
def timing_get_status_thread(self):
"""
新线程检测
"""
threading.Thread(target=self.timing_get_status).start()
def timing_get_status(self):
"""
检测窗口
"""
while True:
status = Tools.is_apex_windows()
if self.status != status:
self.status = status
self.logger.print_log(f"窗口状态切换{self.status}")
time.sleep(2)
def get_game_windows_status(self):
"""
获取状态
"""
return self.status
================================================
FILE: core/KeyAndMouseListener.py
================================================
from log import LogFactory
from tools.Tools import Tools
class KeyListener:
"""
键盘监听器
"""
def __init__(self):
super().__init__()
self.logger = LogFactory.getLogger(self.__class__)
self.press_key = dict()
self.toggle_key_map = []
def on_press(self, key):
"""
键盘按下事件
:param key:
"""
key_name = self.get_key_name(key)
if key_name is not None:
self.press_key[key_name] = Tools.current_milli_time()
if key_name in self.toggle_key_map:
self.toggle_key_map.remove(key_name)
else:
self.toggle_key_map.append(key_name)
for cb in KMCallBack.toggle_call_back:
if cb.key_type == 'k' and cb.key == key_name and cb.is_press:
cb.call_back(cb.key_type, cb.key, True, cb.key in self.toggle_key_map)
# 释放按钮,按esc按键会退出监听
def on_release(self, key):
"""
键盘释放事件
:param key:
"""
key_name = self.get_key_name(key)
if key_name is not None and key_name in self.press_key:
self.press_key.pop(key_name)
for cb in KMCallBack.toggle_call_back:
if cb.key_type == 'k' and cb.key == key_name and not cb.is_press:
cb.call_back(cb.key_type, cb.key, True, cb.key in self.toggle_key_map)
def is_open(self, button):
"""
判断按钮作为开关的开关状态
:param button:
:return:
"""
return button in self.press_key
def get_key_name(self, key):
"""
从key中获取key_name
:param key:
:return:
"""
key_name = None
if not hasattr(key, 'name') and hasattr(key, 'char') and key.char is not None:
key_name = key.char
elif hasattr(key, 'name') and key.name is not None:
key_name = key.name
return key_name
class MouseListener:
"""
鼠标监听器
"""
def __init__(self):
super().__init__()
self.logger = LogFactory.getLogger(self.__class__)
self.on_mouse_key_map = dict()
self.toggle_mouse_key_map = []
def on_move(self, x, y):
"""
鼠标移动监听
:param x:
:param y:
"""
pass
def on_click(self, x, y, button, pressed):
"""
鼠标按下释放监听
:param x:
:param y:
:param button:
:param pressed:`
:return:
"""
if pressed:
if button in self.on_mouse_key_map:
return
self.on_mouse_key_map[button] = Tools.current_milli_time()
if button.name in self.toggle_mouse_key_map:
self.toggle_mouse_key_map.remove(button.name)
else:
self.toggle_mouse_key_map.append(button.name)
for cb in KMCallBack.toggle_call_back:
if cb.key_type == 'm' and cb.key == button.name and cb.is_press:
cb.call_back(cb.key_type, cb.key, pressed, cb.key in self.toggle_mouse_key_map)
elif not pressed:
if button not in self.on_mouse_key_map:
return
self.on_mouse_key_map.pop(button)
for cb in KMCallBack.toggle_call_back:
if cb.key_type == 'm' and cb.key == button.name and not cb.is_press:
cb.call_back(cb.key_type, cb.key, pressed, cb.key in self.toggle_mouse_key_map)
def on_scroll(self, x, y, dx, dy):
"""
鼠标滚轮监听
:param x:
:param y:
:param dx:
:param dy:
"""
pass
def is_press(self, button):
"""
判断鼠标是否处于按下状态
:param button:
:return:
"""
return button in self.on_mouse_key_map
def is_toggle(self, button):
"""
判断鼠标按键作为开关时的开关状态
:param button:
:return:
"""
return button.name in self.toggle_mouse_key_map
def press_time(self, button):
"""
获取鼠标按下时长
:param button:
:return:
"""
if self.is_press(button):
return Tools.current_milli_time() - self.on_mouse_key_map[button]
else:
return 0
class KMCallBack:
"""
注册键盘或鼠标回调事件
"""
toggle_call_back = []
def __init__(self, key_type, key, call_back, is_press=True):
super().__init__()
self.key_type = key_type
self.key = key
self.call_back = call_back
self.is_press = is_press
@staticmethod
def connect(callback):
"""
注册事件
:param callback:
"""
KMCallBack.toggle_call_back.append(callback)
@staticmethod
def remove(key_type, key, is_press=True):
"""
移除事件
:param key_type:
:param key:
:param is_press:
"""
remove_cb = []
for cb in KMCallBack.toggle_call_back:
if cb.key_type == key_type and cb.key == key and cb.is_press == is_press:
remove_cb.append(cb)
for cb in remove_cb:
KMCallBack.toggle_call_back.remove(cb)
================================================
FILE: core/ReaSnowSelectGun.py
================================================
import json
import os.path as op
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
from tools.Tools import Tools
class ReaSnowSelectGun:
"""
转换器自动识别按键宏触发
"""
def __init__(self, mouse_mover: MouseMover, config_name='ReaSnowGun'):
self.logger = LogFactory.getLogger(self.__class__)
self.config_path = f".\\config\\{config_name}.json"
self.mouse_mover = mouse_mover
self.current_gun = None
self.current_scope = None
self.current_hot_pop = None
self.last_scope_data = None
if op.exists(self.config_path):
with open(self.config_path, encoding='utf-8') as global_file:
self.key_dict = json.load(global_file)
if "close_key" in self.key_dict:
self.no_macro_key = self.key_dict["close_key"]
else:
self.no_macro_key = "0x35"
if "no_found_click_close_key" in self.key_dict:
self.no_found_click_close_key = self.key_dict["no_found_click_close_key"]
else:
self.no_found_click_close_key = True
if "auto_caps" in self.key_dict:
self.auto_caps = self.key_dict["auto_caps"]
else:
self.auto_caps = True
self.no_macro_key = Tools.convert_to_decimal(self.no_macro_key)
def trigger_button(self, select_gun, select_scope, hot_pop):
"""
:param select_gun:
:param select_scope:
:param hot_pop:
:return:
"""
if select_gun is None or select_scope is None:
self.logger.print_log(f"未识别到枪械{',关闭宏' if self.no_found_click_close_key else ''}")
if self.no_found_click_close_key:
self.mouse_mover.click_key(self.no_macro_key)
self.mouse_mover.toggle_caps_lock(False)
return
gun_scope_dict = self.key_dict.get(select_gun)
if gun_scope_dict is None:
self.logger.print_log(f"枪械[{select_gun}]没有数据{',关闭宏' if self.no_found_click_close_key else ''}")
if self.no_found_click_close_key:
self.mouse_mover.click_key(self.no_macro_key)
self.mouse_mover.toggle_caps_lock(False)
return
if hot_pop is not None and hot_pop in gun_scope_dict:
gun_scope_dict = gun_scope_dict[hot_pop]
first_char = select_scope[0]
caps_lock = True
if "caps_" + first_char in gun_scope_dict:
caps_lock = gun_scope_dict["caps_" + first_char]
elif "caps" in gun_scope_dict:
caps_lock = gun_scope_dict["caps"]
if first_char in gun_scope_dict:
scope_data = gun_scope_dict[first_char]
else:
scope_data = None
if "0" in gun_scope_dict:
scope_data = gun_scope_dict["0"]
self.logger.print_log(f"枪械[{select_gun}使用通用数据]")
if scope_data is not None:
self.logger.print_log(f"枪械[{select_gun}]按下键位[{scope_data}]切换数据")
self.mouse_mover.click_key(Tools.convert_to_decimal(scope_data))
if self.auto_caps:
self.mouse_mover.toggle_caps_lock(caps_lock)
self.current_gun = select_gun
self.current_scope = select_scope
self.current_hot_pop = hot_pop
self.last_scope_data = scope_data
def close_key(self):
"""
关宏
"""
if self.no_macro_key is not None:
self.mouse_mover.click_key(self.no_macro_key)
def click_current(self):
"""
开最后一个识别的宏
"""
if self.last_scope_data is not None:
self.mouse_mover.click_key(Tools.convert_to_decimal(self.last_scope_data))
================================================
FILE: core/RecoildsCore.py
================================================
import json
import os.path as op
import time
import requests
from pynput.mouse import Button
from core.KeyAndMouseListener import MouseListener
from core.SelectGun import SelectGun
from log import LogFactory
from mouse_mover.IntentManager import IntentManager
class RecoilsConfig:
"""
枪械配置后座力配置
"""
def __init__(self):
self.logger = LogFactory.getLogger(self.__class__)
self.specs_data = []
self.local_specs_data = []
self.load()
def load(self):
"""
加载压枪数据
"""
config_json_str = RecoilsConfig.read_file_from_url("http://1.15.138.227:9000/apex/specs.json")
if config_json_str is not None:
self.specs_data = json.loads(config_json_str)
self.logger.print_log("加载内置配置文件成功")
config_file_path = 'config\\specs.json'
if op.exists(config_file_path):
with open(config_file_path, encoding='utf8') as file:
self.local_specs_data = json.load(file)
self.logger.print_log("加载外部配置文件: {}".format(config_file_path))
def get_config(self, name):
"""
根据枪协名称获取后座力数据
:param name:
:return:
"""
for spec in self.local_specs_data:
if spec['name'] == name:
return spec
for spec in self.specs_data:
if spec['name'] == name:
return spec
return None
@staticmethod
def read_file_from_url(url):
"""
:param url:
:return:
"""
try:
# 发送GET请求获取文件内容
# headers = random.choice(headers_list)
response = requests.get(url)
response.encoding = 'utf-8'
# 检查请求是否成功
if response.status_code == 200:
# 根据换行符切割文件内容并返回列表
text = response.text
return text
else:
print(f"Failed to read file from URL. Status code: {response.status_code}")
return None
except Exception as e:
print(f"An error occurred: {e}")
return None
class RecoilsListener:
"""
压枪监听,监听到开火,将识别到的枪械名称配置读取,然后推送到移动意图管理器中
"""
def __init__(self,
recoils_config: RecoilsConfig,
mouse_listener: MouseListener,
select_gun: SelectGun,
intent_manager: IntentManager, game_windows_status):
self.logger = LogFactory.getLogger(self.__class__)
self.recoils_config = recoils_config
self.mouse_listener = mouse_listener
self.select_gun = select_gun
self.intent_manager = intent_manager
self.game_windows_status = game_windows_status
def start(self):
"""
开始监听
"""
start_time = None
num = 0
sleep_time = 0.001
last_left_press_time = None
last_press_status = None
go_on_num = 0
while True:
if (not self.game_windows_status.get_game_windows_status() or
not self.intent_manager.mouse_mover.is_caps_locked()):
time.sleep(1)
continue
current_gun = self.select_gun.current_gun
left_press = self.mouse_listener.is_press(Button.left)
right_press = self.mouse_listener.is_press(Button.right)
now = time.time()
if last_press_status is not None and not last_press_status and left_press:
if last_left_press_time is not None and now - last_left_press_time < 0.5:
self.logger.print_log(f"继续:{go_on_num}")
else:
go_on_num = 0
if current_gun is not None and left_press:
current_hot_pop = self.select_gun.current_hot_pop
spec = self.recoils_config.get_config(current_gun)
if spec is not None:
last_left_press_time = time.time()
last_press_status = True
recoil_type = spec['type']
spec = spec['recoils']
if current_hot_pop is not None and current_hot_pop in spec:
spec = spec[current_hot_pop]
if start_time is None:
start_time = time.time()
self.logger.print_log("开始压枪")
if right_press:
spec = spec['aim']
else:
spec = spec['un_aim']
if recoil_type == 'serial':
num, sleep_time = self.handle_serial(spec, start_time, num)
else:
go_on_num, sleep_time = self.handle_intermittent(spec, go_on_num)
else:
self.logger.print_log(f"未找到[{current_gun}的压枪数据]")
else:
last_press_status = False
start_time = None
num = 0
sleep_time = 0.01
if sleep_time != 0:
time.sleep(sleep_time)
def handle_serial(self, spec, start_time, num):
"""
全自动枪械处理轨迹
"""
time_points = spec['time_points']
if len(time_points) == 0:
return num, 0.01
if self.move_index_xy(spec=spec, current_index=num, point=(time.time() - start_time) * 1000):
num += 1
return num, 0.001
def handle_intermittent(self, spec, num):
"""
连发枪处理轨迹
"""
spec_len = len(spec)
if spec_len > num:
spec = spec[num]
time_points = spec['time_points']
time_points_len = len(time_points)
if time_points_len == 0:
return num + 1, 0.001
start_time = time.time()
sub_num = 0
while time_points_len > sub_num:
if self.move_index_xy(spec=spec, current_index=sub_num, point=(time.time() - start_time) * 1000):
sub_num += 1
time.sleep(0.001)
return num + 1, 0.001
else:
return num, 0.01
def move_index_xy(self, spec, current_index, point):
"""
真实的移动轨迹方法
"""
time_points = spec['time_points']
# 获取对应下标的x和y
x_values = spec['x']
y_values = spec['y']
index = len(time_points) - 1 if point > time_points[-1] else next(
(i - 1 for i, time_point in enumerate(time_points) if time_point > point),
-1)
if index is not None and index >= 0 and current_index <= index:
if len(x_values) >= current_index + 1:
x_value = x_values[current_index]
y_value = y_values[current_index]
self.logger.print_log(
f'执行时间:[{time_points[current_index]}]<[{point}],正在压第{str(current_index + 1)}步,剩余{str(len(time_points) - (current_index + 1))}步,鼠标移动轨迹为({x_value},{y_value})')
# self.intent_manager.set_intention(x_value, y_value)
self.intent_manager.mouse_mover.move_rp(x_value, y_value)
else:
self.logger.print_log(
f'缺失第[{current_index + 1}个轨迹,时间为{time_points[current_index]}])')
return True
return False
================================================
FILE: core/SelectGun.py
================================================
import threading
import time
import traceback
from core.KeyAndMouseListener import KMCallBack
from core.screentaker.ScreenTaker import ScreenTaker
from log import LogFactory
class SelectGun:
"""
枪械识别
"""
def __init__(self, bbox, image_path, scope_bbox, scope_path, hop_up_bbox, hop_up_path,
refresh_buttons, has_turbocharger, image_comparator, screen_taker: ScreenTaker, game_windows_status,
delay_refresh_buttons=None):
super().__init__()
self.logger = LogFactory.getLogger(self.__class__)
self.on_key_map = dict()
self.bbox = bbox
self.image_path = image_path
self.scope_bbox = scope_bbox
self.scope_path = scope_path
self.select_gun_sign = True
self.current_gun = None
self.current_scope = None
self.current_hot_pop = None
self.refresh_buttons = refresh_buttons
self.has_turbocharger = has_turbocharger
self.hop_up_bbox = hop_up_bbox
self.hop_up_path = hop_up_path
self.call_back = []
self.fail_time = 0
self.image_comparator = image_comparator
self.screen_taker = screen_taker
self.game_windows_status = game_windows_status
self.select_gun_cache = {}
for refresh_button in self.refresh_buttons:
KMCallBack.connect(KMCallBack("k", refresh_button, self.select_gun_threading, False))
if delay_refresh_buttons is None:
delay_refresh_buttons = {}
self.delay_refresh_buttons = delay_refresh_buttons
self.delay_refresh_buttons_map = {}
for refresh_button, delay in self.delay_refresh_buttons.items():
self.delay_refresh_buttons_map[refresh_button] = delay
KMCallBack.connect(KMCallBack("k", refresh_button, self.select_gun_threading, False))
threading.Thread(target=self.timing_execution).start()
def timing_execution(self):
"""
定时识别
"""
while True:
try:
if self.game_windows_status.get_game_windows_status():
self.logger.print_log("定时识别开始")
if self.select_gun_with_sign(None, None, auto=True):
self.fail_time = 0
else:
self.fail_time += 1
self.logger.print_log(f"下一轮定时识别在[{1 + self.fail_time / 5}]秒后")
else:
self.fail_time = 0
except Exception as e:
traceback.print_exc()
pass
time.sleep(1 + self.fail_time / 5)
def select_gun_threading(self, key_type, key, pressed=False, toggle=False):
"""
:param pressed:
:param toggle:
:param key_type:
:param key:
:return:
"""
if self.select_gun_sign:
return
threading.Thread(target=self.select_gun_with_sign, args=(key_type, key, pressed, toggle, False)).start()
def select_gun_with_sign(self, key_type, key, pressed=False, toggle=False, auto=False):
"""
:param pressed:
:param toggle:
:param auto:
:param delay:
:return:
"""
if self.select_gun_sign:
return
delay = 0
if key in self.delay_refresh_buttons_map:
delay = self.delay_refresh_buttons_map[key]
time.sleep(delay / 1000)
self.select_gun_sign = True
start = time.time()
result = self.select_gun(key_type, key, pressed, toggle, auto)
self.logger.print_log(f"该次识别延迟:{delay}ms 耗时:{int((time.time() - start) * 1000)}ms")
self.select_gun_sign = False
return result
def get_images_from_bbox(self, bbox_list):
"""
Get images from specified bounding boxes.
:param bbox_list: List of bounding boxes [(x1, y1, x2, y2), ...]
:return: Generator yielding images
"""
# try:
# return list(ImageGrab.grab(bbox=bbox) for bbox in bbox_list)
# except Exception as e:
# self.logger.print_log(f"Error in get_images_from_bbox: {e}")
return self.screen_taker.get_images_from_bbox(bbox_list)
def select_gun(self, key_type, key, pressed=False, toggle=False, auto=False):
"""
使用图片对比,逐一识别枪械,相似度最高设置为current_gun
:return:
"""
# cache_key = key_type + ":" + key
# if cache_key not in self.select_gun_cache:
#
if not self.game_windows_status.get_game_windows_status():
return False
gun_temp, score_temp = self.image_comparator.compare_with_path(self.image_path,
self.get_images_from_bbox([self.bbox]), 0.9, 0.7)
if gun_temp is None:
self.logger.print_log("未找到枪械")
self.current_gun = None
self.current_scope = None
self.current_hot_pop = None
else:
scope_temp, score_scope_temp = self.image_comparator.compare_with_path(self.scope_path,
self.get_images_from_bbox(
self.scope_bbox), 0.9,
0.4)
if scope_temp is None:
self.logger.print_log("未找到配件,默认为1倍")
scope_temp = '1x'
if gun_temp in self.has_turbocharger:
hop_up_temp, score_hop_up_temp = self.image_comparator.compare_with_path(self.hop_up_path,
self.get_images_from_bbox(
self.hop_up_bbox),
0.9, 0.6)
else:
hop_up_temp = None
score_hop_up_temp = 0
if gun_temp == self.current_gun and scope_temp == self.current_scope and hop_up_temp == self.current_hot_pop:
self.logger.print_log(
"当前枪械搭配已经是: {}-{}-{}".format(self.current_gun, self.current_scope, self.current_hot_pop))
if auto:
return False
else:
self.current_scope = scope_temp
self.current_gun = gun_temp
self.current_hot_pop = hop_up_temp
self.logger.print_log(
"枪械: {},相似: {}-配件: {},相似: {}-hop_up: {},相似: {}".format(self.current_gun, score_temp,
self.current_scope,
score_scope_temp,
self.current_hot_pop,
score_hop_up_temp))
for func in self.call_back:
func(self.current_gun, self.current_scope, self.current_hot_pop)
return self.current_gun is not None
def connect(self, func):
self.call_back.append(func)
def test(self):
self.logger.print_log("自动识别初始化中,请稍后……")
start = time.time()
self.image_comparator.compare_with_path(self.image_path,
self.get_images_from_bbox([self.bbox]), 0.9, 0.7)
self.image_comparator.compare_with_path(self.scope_path,
self.get_images_from_bbox(
self.scope_bbox), 0.9,
0.4)
self.image_comparator.compare_with_path(self.hop_up_path,
self.get_images_from_bbox(
self.hop_up_bbox),
0.9, 0.6)
self.logger.print_log(f"自动识别初始化完毕,耗时[{int((time.time() - start) * 1000)}]")
self.select_gun_sign = False
================================================
FILE: core/ShakeGun.py
================================================
import math
import threading
import time
from core.Config import Config
from core.KeyAndMouseListener import KMCallBack, MouseListener
from core.SelectGun import SelectGun
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class ShakeGun:
"""
抖枪
"""
def __init__(self, config: Config,
mouse_listener: MouseListener,
mouse_mover: MouseMover,
select_gun: SelectGun):
self.logger = LogFactory.getLogger(self.__class__)
self.mouse_listener = mouse_listener
self.mouse_mover = mouse_mover
self.select_gun = select_gun
self.config = config
self.in_shake = False
self.LMD = 3.0
self.pushDown = 6
self.shakeNum = 3
self.ADS = 1.0
self.Level = 5
self.Decline = 9
self.frequency = 11
# self.shake_range = (6 // (self.LMD * self.ADS)) + self.Level - 2
self.shake_range = 17
self.declineRange = (self.Decline + 2) * self.LMD
self.declineTime = 0
self.holdShakeTime = 0
self.lastFreshCasLockTime = time.time()
self.shake_gun_toggle_button = self.config.shake_gun_toggle_button
self.shake_gun_trigger_button = self.config.shake_gun_trigger_button
KMCallBack.connect(KMCallBack("k", self.shake_gun_trigger_button, self.shake_gun_threading))
for button_list in self.shake_gun_toggle_button:
for button in button_list:
KMCallBack.connect(KMCallBack("m", button, self.shake_gun_threading))
def shake_gun_threading(self, key_type, key, pressed, toggled):
if self.in_shake:
return
threading.Thread(target=self.shake_gun).start()
self.in_shake = False
def shake_gun(self):
if self.in_shake:
return
if self.mouse_mover.is_caps_locked() and self.is_press():
self.in_shake = True
self.logger.print_log("开始抖枪")
else:
return
self.clear_time()
while self.mouse_mover.is_caps_locked() and self.in_shake and self.is_press():
self.rock_shake()
self.mouse_relative_by_hold_shake_time()
self.in_shake = False
self.logger.print_log("结束抖枪")
def is_press(self):
# 遍历外层数组,判断与的关系
and_result = True
for and_group in self.shake_gun_toggle_button:
# 遍历内层数组,判断或的关系
or_result = False
for or_button in and_group:
is_button_press = self.mouse_listener.is_press(or_button)
# 如果有一个按钮被按下,则内层结果为 True
or_result = or_result or is_button_press
if or_result:
break
and_result = and_result and or_result
if not and_result:
break
# 如果所有外层结果都为 False,则整体结果为 False
return and_result
def rock_shake(self):
horizontal = self.shake_range
vertical = self.shake_range + 5
for _ in range(self.shakeNum):
self.mouse_mover.move_rp(int(-horizontal), int(-vertical))
self.better_sleep(self.frequency)
self.mouse_mover.move_rp(int(horizontal), int(vertical))
self.better_sleep(self.frequency)
pass
def mouse_relative_by_hold_shake_time(self):
if self.declineTime >= self.declineRange:
relative_time = math.log(self.holdShakeTime / 100, 2)
relative_time = max(relative_time, -1)
relative_time = min(relative_time, 2)
relative_time = math.floor(relative_time)
relative_time = 3 - relative_time
for _ in range(relative_time):
self.mouse_mover.move_rp(0, self.pushDown)
self.declineTime = 0
def clear_time(self):
self.declineTime = 0
self.holdShakeTime = 0
self.lastFreshCasLockTime = time.time()
def better_sleep(self, t):
self.declineTime += t
self.holdShakeTime += t
time.sleep(t / 1000)
================================================
FILE: core/__init__.py
================================================
================================================
FILE: core/image_comparator/DynamicSizeImageComparator.py
================================================
from core.image_comparator.LocalImageComparator import LocalImageComparator
from log import LogFactory
class DynamicSizeImageComparator(LocalImageComparator):
"""
可动态模糊匹配的网络图片对比
"""
def __init__(self, base_path, screen_taker, base_image_comparator):
super().__init__(base_path)
self.image_cache = {}
self.logger = LogFactory.getLogger(self.__class__)
self.base_path = base_path
self.screen_taker = screen_taker
self.base_image_comparator = base_image_comparator
def compare_with_path(self, path, images, lock_score, discard_score):
path = self.base_path + path
image_info_arr = [image_info.split() for image_info in
super().read_file_from_url_and_cache(path, "list.txt")]
select_name, score_temp = self.match_template(path, image_info_arr, threshold=discard_score)
return select_name, score_temp
def match_template(self, path, image_info_arr, threshold=0.8):
for image_info in image_info_arr:
image_path, x, y, w, h = image_info
image_path = path + image_path
box = (int(x), int(y), int(w), int(h))
img = self.screen_taker.get_images_from_bbox([box])[0]
score = super().compare_image(img, image_path)
if score > threshold:
return image_info[0].split(".")[0], score
return "", 0.0
def cache_image(self, base_path, line_content):
arr = line_content.split()
if len(arr) == 5:
image_path, x, y, w, h = arr[0], arr[1], arr[2], arr[3], arr[4]
image_path = base_path + image_path
else:
image_path = line_content
super().cache_image("", image_path)
================================================
FILE: core/image_comparator/ImageComparator.py
================================================
import concurrent.futures
import traceback
from io import BytesIO
import cv2
import numpy as np
from skimage.metrics import structural_similarity
from log import LogFactory
class ImageComparator:
"""
图片对比
"""
def __init__(self, base_path):
# 用于缓存图片
self.image_cache = {}
self.logger = LogFactory.getLogger(self.__class__)
self.base_path = base_path
def compare_image(self, img, path_image):
"""
图片对比
:param img:
:param path_image:
:return:
"""
# 下载图片到内存
try:
downloaded_image = self.get_image_from_cache(path_image)
if downloaded_image:
downloaded_image.seek(0)
image_a = cv2.imdecode(np.frombuffer(downloaded_image.getvalue(), dtype=np.uint8), cv2.IMREAD_COLOR)
downloaded_image.close()
image_b = np.array(img)
gray_a = cv2.cvtColor(image_a, cv2.COLOR_BGR2GRAY)
gray_b = cv2.cvtColor(image_b, cv2.COLOR_BGR2GRAY)
(score, diff) = structural_similarity(gray_a, gray_b, full=True)
return score
else:
# 图片下载失败时的处理
return 0
except Exception as e:
print(e)
traceback.print_exc()
self.logger.print_log(f"对比图片错误:{path_image}")
return 0
def get_image_from_cache(self, url):
"""
缓存获取图片
"""
# 如果图像已经在缓存中,直接返回缓存的图像
url = url.strip()
if url not in self.image_cache:
self.cache_image("", url)
return BytesIO(self.image_cache[url])
def compare_with_path(self, path, images, lock_score, discard_score):
"""
截图范围与文件路径内的所有图片对比
:param path:
:param images:
:param lock_score:
:param discard_score:
:return:
"""
path = self.base_path + path
select_name = ''
score_temp = 0.00000000000000000000
for img in images:
for fileName in self.read_file_from_url_and_cache(path, "list.txt"):
score = self.compare_image(img, path + fileName)
if score > score_temp:
score_temp = score
select_name = fileName.split('.')[0]
if score_temp > lock_score:
break
if score_temp < discard_score:
select_name = None
return select_name, score_temp
def read_file_from_url_and_cache(self, base_path, file_name):
"""
从文件中读取并下载图片
"""
images_path = self.read_file_from_url(base_path + file_name)
if images_path is None:
return None
# 使用线程池
with concurrent.futures.ThreadPoolExecutor() as executor:
# 提交每个下载任务给线程池
futures = [executor.submit(self.cache_image, base_path, image_path) for image_path in images_path]
# 等待所有任务完成
concurrent.futures.wait(futures)
return images_path
def read_file_from_url(self, url):
"""
:param url
"""
return []
def cache_image(self, base_path, url):
"""
:param base_path:
:param url:
:return:
"""
self.logger.print_log("Caching image is no working...")
pass
================================================
FILE: core/image_comparator/ImageComparatorFactory.py
================================================
from core.image_comparator.LocalImageComparator import LocalImageComparator
from net.socket.NetImageComparator import NetImageComparator
from net.socket.SocketImageComparator import SocketImageComparator
def get_image_comparator(comparator_mode, config):
"""
获取图片对比器
:param config:
:param comparator_mode:
:param logger:
:return:
"""
if comparator_mode == "local":
return LocalImageComparator(config.image_base_path)
elif comparator_mode == "net":
return NetImageComparator(config.image_base_path)
elif comparator_mode == "distributed":
# return SocketImageComparator(logger, ("1.15.138.227", 12345))
return SocketImageComparator((config.distributed_param["ip"], config.distributed_param["port"]))
================================================
FILE: core/image_comparator/LocalImageComparator.py
================================================
import os
import re
from core.image_comparator.ImageComparator import ImageComparator
from log import LogFactory
net_file_cache = {}
class LocalImageComparator(ImageComparator):
"""
本地图片对比
"""
def __init__(self, base_path):
super().__init__(base_path)
self.image_cache = {}
self.logger = LogFactory.getLogger(self.__class__)
self.base_path = base_path
def read_file_from_url(self, filepath):
"""
从本地文件读取内容并按行返回
:param filepath: 本地文件路径
:return: 按行分割后的字符串列表,或 None(失败时)
"""
try:
if filepath in net_file_cache:
return net_file_cache[filepath]
if not os.path.isfile(filepath):
print(f"File not found: {filepath}")
return None
with open(filepath, 'r', encoding='utf-8') as f:
text = f.read()
lines = re.split(r'\r\n|\r|\n', text)
net_file_cache[filepath] = lines
return lines
except Exception as e:
print(f"An error occurred while reading local file: {e}")
return None
def cache_image(self, base_path, url):
# 如果图像已经在缓存中,直接返回缓存的图像
url = base_path + url
url = url.strip()
if url in self.image_cache:
return
self.logger.print_log(f"正在加载图片:{url.replace(self.base_path, '')}")
if os.path.exists(url) and os.path.isfile(url):
with open(url, 'rb') as f:
self.image_cache[url] = f.read()
else:
# 如果请求失败,打印错误信息
self.logger.print_log(f"Failed to load image: {url}. check exists")
================================================
FILE: core/image_comparator/__init__.py
================================================
================================================
FILE: core/joy_listener/JoyListener.py
================================================
import threading
import traceback
import pygame
from PyQt5.QtWidgets import QMessageBox
from log import LogFactory
from log.Logger import Logger
rocker_cache = []
exist_rocket_time = []
hold_time = None
class JoyListener:
"""
手柄监听器
"""
def __init__(self):
self.axis = dict()
self.logger = LogFactory.getLogger(self.__class__)
self.run_sign = False
self.axis_list = []
self.call_back_list = []
self.call_back_joystick = {}
self.joy_listener = True
def start(self, main_windows):
"""
开始监听
:param main_windows:
:return:
"""
try:
if self.run_sign:
return
pygame.joystick.init()
pygame.joystick.Joystick(0)
self.logger.print_log("手柄初始化成功")
pygame.joystick.quit()
threading.Thread(target=self.aync).start()
except:
self.logger.print_log("未插手柄")
QMessageBox.warning(main_windows, "错误", "未插手柄,请插入手柄后,重新勾选手柄模式")
return
def aync(self):
"""
监听手柄按键
"""
self.run_sign = True
pygame.init()
pygame.joystick.init()
joystick = pygame.joystick.Joystick(0)
joystick.init()
clock = pygame.time.Clock()
while self.joy_listener:
for event in pygame.event.get(): # User did something
if event.type == pygame.JOYAXISMOTION:
self.axis[event.axis] = event.value
for func in self.axis_list:
try:
func(event.axis, event.value)
except:
traceback.print_exc()
elif event.type == pygame.JOYBUTTONDOWN:
self.logger.print_log(f"检测到按下手柄按键:{event.button}")
for func in self.call_back_list:
try:
func('b' + str(event.button))
except:
traceback.print_exc()
elif event.type == pygame.JOYBUTTONUP:
self.logger.print_log(f"检测到松开手柄按键:{event.button}")
if event.type in self.call_back_joystick:
for func in self.call_back_joystick[event.type]:
try:
func(joystick, event)
except:
traceback.print_exc()
clock.tick(1000)
self.axis.clear()
pygame.joystick.quit()
pygame.quit()
self.run_sign = False
self.logger.print_log("关闭手柄监听")
def is_press(self, value):
"""
判断手柄按键是否按下
:param value:
:return:
"""
if value not in self.axis:
return False
return self.axis[value] > -1.0
def connect_axis(self, func):
"""
连接回调方法
:param func:
"""
self.axis_list.append(func)
def connect_button(self, func):
"""
连接回调方法
:param func:
"""
self.call_back_list.append(func)
def connect_joystick(self, py_type, func):
"""
监听整个joystick
"""
if py_type not in self.call_back_joystick:
self.call_back_joystick[py_type] = [func]
else:
self.call_back_joystick[py_type].append(func)
def stop(self):
"""
销毁
"""
self.joy_listener = False
================================================
FILE: core/joy_listener/JoyToKey.py
================================================
from log import LogFactory
class JoyToKey:
"""
jtk
"""
def __init__(self, joy_to_key_map, c1_mouse_mover, game_windows_status):
self.logger = LogFactory.getLogger(self.__class__)
self.c1_mouse_mover = c1_mouse_mover
self.joy_to_key_map = joy_to_key_map
self.joy_to_key_last_status_map = {}
self.game_windows_status = game_windows_status
self.init_status_map()
self.toggle_func = []
def init_status_map(self):
"""
初始化状态
"""
for joy_to_key in self.joy_to_key_map:
for joy in self.joy_to_key_map[joy_to_key]:
self.joy_to_key_last_status_map[joy_to_key + joy] = False
def axis_to_key(self, axis, value):
"""
:param axis:
:param value:
"""
if not self.game_windows_status.get_game_windows_status():
return
if "axis" not in self.joy_to_key_map:
return
axis = str(axis)
axis_joy_to_key_map = self.joy_to_key_map["axis"]
hold_status = value > -1.0
key = "axis" + axis
if key not in self.joy_to_key_last_status_map:
return
toggle_key_status = self.joy_to_key_last_status_map[key]
joy_to_key = axis_joy_to_key_map[axis]
if not toggle_key_status and hold_status:
self.logger.print_log(f"joy to key [{joy_to_key['key_type']}.{joy_to_key['key']}] down")
if joy_to_key['key_type'] == "mouse" and self.toggle():
self.c1_mouse_mover.mouse_click(joy_to_key['key'], True)
# if self.all_hold(key) and joy_to_key['key_type'] == "mouse":
# self.logger.print_log(f"joy to key all down")
# for values in axis_joy_to_key_map.values():
# self.c1_mouse_mover.mouse_click(values['key'], True)
if toggle_key_status and not hold_status:
self.logger.print_log(f"joy to key [{joy_to_key['key_type']}.{joy_to_key['key']}] up")
if joy_to_key['key_type'] == "mouse":
self.c1_mouse_mover.mouse_click(joy_to_key['key'], False)
# if joy_to_key['key_type'] == "mouse":
# self.logger.print_log(f"joy to key all up")
# for values in axis_joy_to_key_map.values():
# self.c1_mouse_mover.mouse_click(values['key'], False)
self.joy_to_key_last_status_map[key] = hold_status
def all_hold(self, current):
return all(value for key, value in self.joy_to_key_last_status_map.items() if key != current)
def reg_toggle_func(self, func):
self.toggle_func.append(func)
def toggle(self):
for func in self.toggle_func:
if not func():
return False
return True
================================================
FILE: core/joy_listener/RockerMonitor.py
================================================
import time
import pygame
from core.ReaSnowSelectGun import ReaSnowSelectGun
from core.SelectGun import SelectGun
from core.joy_listener.JoyListener import JoyListener
from log import LogFactory
class RockerMonitor:
"""
监听摇杆
"""
def __init__(self, joy_listener: JoyListener, select_gun: SelectGun | ReaSnowSelectGun = None):
self.logger = LogFactory.getLogger(self.__class__)
self.rocker_cache = []
self.exist_rocket_time = []
self.select_gun = select_gun
self.hold_time = None
joy_listener.connect_joystick(pygame.JOYAXISMOTION, self.monitor)
def monitor(self, joystick, event):
"""
:param joystick
"""
left = joystick.get_axis(5)
right = joystick.get_axis(4)
axis_x = joystick.get_axis(2)
axis_y = joystick.get_axis(3)
if axis_x is None:
axis_x = 0
if axis_y is None:
axis_y = 0
if left == -1:
if len(self.rocker_cache) > 0:
log_text = ''
length = len(self.rocker_cache)
log_text += f'-----{self.select_gun.current_gun}-{self.select_gun.current_scope}-{self.select_gun.current_hot_pop}-----\n'
for i, (t_time, xy) in enumerate(self.rocker_cache):
keep_time = 0
if i != length - 1:
next_time, _ = self.rocker_cache[i + 1]
keep_time = next_time - t_time
x, y = xy
# log_text += f'{i + 1},触发时间:{t_time}ms, 摇杆:{round(x * 100, 4)},{-(round(y * 100, 4))} 持续时间:{keep_time}ms\n'
log_text += (f'|{str(i + 1).ljust(3)}|{"{:g}".format(round(x * 100, 4)).ljust(8)}'
f'|{"{:g}".format(-(round(y * 100, 4))).ljust(8)}|{str(keep_time).ljust(4)}|\n')
log_text += '-----压枪摇杆监听结束-----'
self.rocker_cache.clear()
self.exist_rocket_time.clear()
self.hold_time = None
self.logger.print_log(log_text)
elif left > -1:
if self.hold_time is None:
self.hold_time = time.time()
rocket_time = int((time.time() - self.hold_time) * 1000)
if rocket_time not in self.exist_rocket_time:
self.rocker_cache.append((rocket_time, (axis_x, axis_y)))
self.exist_rocket_time.append(rocket_time)
================================================
FILE: core/joy_listener/S1SwitchMonitor.py
================================================
import threading
import time
import pygame
from core.ReaSnowSelectGun import ReaSnowSelectGun
from core.image_comparator.DynamicSizeImageComparator import DynamicSizeImageComparator
from core.joy_listener.JoyListener import JoyListener
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
from tools.Tools import Tools
class S1SwitchMonitor:
"""
监听s1切层
"""
def __init__(self, joy_listener: JoyListener,
licking_state_path,
licking_state_bbox,
dynamic_size_image_comparator: DynamicSizeImageComparator,
mouser_mover: MouseMover, rea_snow_select_gun: ReaSnowSelectGun, s1_switch_hold_map, retry=5):
self.logger = LogFactory.getLogger(self.__class__)
self.dynamic_size_image_comparator = dynamic_size_image_comparator
self.licking_state_path = licking_state_path
self.licking_state_bbox = licking_state_bbox
self.rea_snow_select_gun = rea_snow_select_gun
self.mouser_mover = mouser_mover
# self.click_state = False
# self.threading_state = False
self.threading_state_scene_map = {}
self.retry = retry
self.dict = {
pygame.JOYBUTTONDOWN: "JOYBUTTONDOWN",
pygame.JOYBUTTONUP: "JOYBUTTONUP"
}
self.s1_switch_hold_map = s1_switch_hold_map
# self.hold_key = self.s1_switch_hold_map
# self.toggle_key = self.s1_switch_hold_map["toggle_key"]
self.hole_key_status_map = {}
self.down_key_time = {}
# todo 添加监听手柄按键类型
joy_listener.connect_joystick(pygame.JOYBUTTONUP, self.monitor)
joy_listener.connect_joystick(pygame.JOYBUTTONDOWN, self.monitor)
def monitor(self, joystick, event):
if event.type in self.dict:
if event.type == pygame.JOYBUTTONDOWN:
self.hole_key_status_map[event.button] = time.time()
elif event.type == pygame.JOYBUTTONUP and event.button in self.hole_key_status_map:
self.hole_key_status_map.pop(event.button)
for (scene, key_map) in self.s1_switch_hold_map.items():
if str(event.button) in key_map["key"] and scene not in self.threading_state_scene_map:
self.logger.print_log(f"切换层进入场景{scene}的识别")
self.threading_state_scene_map[scene] = True
threading.Thread(target=self.monitor_thread, args=(joystick, scene, key_map)).start()
def monitor_thread(self, joystick, scene, key_map):
# todo 需要添加监听手柄舔包键长按之后触发识别
retry = 0
# 触发后背包判断后,开始识别,识别到背包中则按下切层,直到未识别到背包则松开并退出循环
# start = time.time()
detect_time = None
skip_detect = False
skip_delay = 0
toggle_key = key_map["toggle_key"]
hold_key = key_map["key"]
click_state = False
down_key_time = time.time()
while True:
for key in hold_key:
if key != "toggle_key" and int(key) in self.hole_key_status_map.keys():
start_time = self.hole_key_status_map[int(key)]
delay = hold_key[key]["delay"]
if self.time_out(start_time, delay):
detect_time = hold_key[key]["detect_time"]
skip_detect = hold_key[key]["skip_detect"]
if skip_detect:
skip_delay = hold_key[key]["skip_delay"]
if toggle_key in self.down_key_time and self.down_key_time[toggle_key]["scene"] != scene:
self.logger.print_log(f"已存在识别中的按键{toggle_key},跳过不识别的检测")
self.finish_scence(scene)
return
self.logger.print_log(f"按下{key}超过{delay}ms,开始识别{detect_time}ms")
break
if detect_time is not None:
break
time.sleep(0.001)
start_time = time.time()
detect_status = False
if skip_delay > 0:
time.sleep(skip_delay / 1000.0)
while True:
if not skip_detect or (skip_detect and click_state):
select_name, score = self.dynamic_size_image_comparator.compare_with_path(
path=self.licking_state_path + scene + "/",
images=None,
lock_score=1,
discard_score=0.6)
if score > 0.0:
detect_status = True
else:
select_name, score = "default", 1
if not click_state:
if score > 0.0:
click_state = True
down_key_time = time.time()
self.down_key_time[toggle_key] = {"down_key_time": down_key_time, "scene": scene}
self.mouser_mover.key_down(Tools.convert_to_decimal(toggle_key))
self.logger.print_log(f"{scene}按下舔包键:{toggle_key}")
self.rea_snow_select_gun.close_key()
else:
retry += 1
self.logger.print_log(f"{scene}未识别到,重试:{retry}")
if self.time_out(start_time, detect_time):
break
elif click_state and score <= 0.0:
if not skip_detect or (skip_detect and (detect_status or self.time_out(start_time, detect_time))):
if down_key_time == self.down_key_time[toggle_key]["down_key_time"]:
self.mouser_mover.key_up(Tools.convert_to_decimal(toggle_key))
self.down_key_time.pop(toggle_key)
self.logger.print_log(f"{scene}松开舔包键:{toggle_key}")
self.rea_snow_select_gun.click_current()
else:
self.logger.print_log(f"{scene}跳过松开舔包键:{toggle_key}")
break
else:
retry += 1
self.logger.print_log(f"{scene}未识别到,重试:{retry}")
self.finish_scence(scene)
def time_out(self, start_time, detect_time):
"""
超时
"""
return int((time.time() - start_time) * 1000) > detect_time
def finish_scence(self, scene):
"""
结束场景
"""
self.threading_state_scene_map.pop(scene)
self.logger.print_log(f"切换层结束场景{scene}的识别")
================================================
FILE: core/joy_listener/__init__.py
================================================
================================================
FILE: core/kmnet_listener/KmBoxNetListener.py
================================================
import time
import traceback
from pynput.mouse import Button
from mouse_mover.KmBoxNetMover import KmBoxNetMover
class KmBoxNetListener:
def __init__(self, km_box_net_mover: KmBoxNetMover, mouse_listener):
import kmNet
self.kmNet = kmNet
self.mouse_listener = mouse_listener
self.km_box_net_mover = km_box_net_mover
self.listener_sign = False
self.down_key_map = []
self.down_mouse_map = []
self.connect_func = []
self.connect_mouse_func = []
kmNet.monitor(10000)
# kmNet.unmask_all()
# kmNet.mask_keyboard(0x06)
def km_box_net_start(self):
self.listener_sign = True
print("km box net 监听启动")
while self.listener_sign:
if self.kmNet.isdown_left():
if "left" not in self.down_mouse_map:
self.down_mouse_map.append("left")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.left, True)
else:
if "left" in self.down_mouse_map:
self.down_mouse_map.remove("left")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.left, False)
if self.kmNet.isdown_right():
if "right" not in self.down_mouse_map:
self.down_mouse_map.append("right")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.right, True)
else:
if "right" in self.down_mouse_map:
self.down_mouse_map.remove("right")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.right, False)
if self.kmNet.isdown_middle():
if "middle" not in self.down_mouse_map:
self.down_mouse_map.append("middle")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.middle, True)
else:
if "middle" in self.down_mouse_map:
self.down_mouse_map.remove("middle")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.middle, False)
if self.kmNet.isdown_side1():
if "x1" not in self.down_mouse_map:
self.down_mouse_map.append("x1")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x1, True)
else:
if "x1" in self.down_mouse_map:
self.down_mouse_map.remove("x1")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x1, False)
if self.kmNet.isdown_side2():
if "x2" not in self.down_mouse_map:
self.down_mouse_map.append("x2")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x2, True)
else:
if "x2" in self.down_mouse_map:
self.down_mouse_map.remove("x2")
self.mouse_listener.on_click(*self.km_box_net_mover.get_position(), Button.x2, False)
for func in self.connect_mouse_func:
func(self.down_mouse_map)
for func in self.connect_func:
try:
func()
except:
traceback.print_exc()
time.sleep(0.01)
print("km box net 监听结束")
def stop(self):
"""
销毁
"""
self.listener_sign = False
self.connect_func.clear()
def connect(self, func):
"""
:param func:
"""
self.connect_func.append(func)
def connect_mouse_listner(self, func):
"""
:param func:
"""
self.connect_mouse_func.append(func)
================================================
FILE: core/kmnet_listener/ToggleKeyListener.py
================================================
import time
from core.kmnet_listener.KmBoxNetListener import KmBoxNetListener
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
from tools.Tools import Tools
class ToggleKeyListener:
"""
监听kmnet 关于辅助开关键的实现
"""
def __init__(self, km_box_net_listener: KmBoxNetListener, delayed_activation_key_list,
mouse_mover: MouseMover, c1_mouse_mover: MouseMover, toggle_hold_key, game_windows_status):
import kmNet
self.kmNet = kmNet
self.logger = LogFactory.getLogger(self.__class__)
self.mouse_mover = mouse_mover
self.c1_mouse_mover = c1_mouse_mover
self.km_box_net_listener = km_box_net_listener
self.game_windows_status = game_windows_status
# 自定义按住延迟转换
self.delayed_activation_key_status_map = {}
self.delayed_activation_key_list = [(Tools.convert_to_decimal(key), value) for key, value in
delayed_activation_key_list.items()]
km_box_net_listener.connect(self.delayed_activation)
# 自定义切换按住键
self.key_status_map = {}
self.toggle_hold_key = toggle_hold_key
self.toggle_close_key = {}
for key in self.toggle_hold_key:
close_keys = self.toggle_hold_key[key]
for close_key in close_keys:
if close_key not in self.toggle_close_key:
self.toggle_close_key[close_key] = []
if Tools.convert_to_decimal(key) is None:
continue
self.toggle_close_key[close_key].append(key)
self.mask_toggle_key()
km_box_net_listener.connect(self.toggle_change)
def mask_toggle_key(self):
self.kmNet.unmask_all()
for key in self.toggle_hold_key:
self.kmNet.mask_keyboard(Tools.convert_to_decimal(key))
self.key_status_map[key] = ToggleKey()
def toggle_change(self):
if not self.game_windows_status.get_game_windows_status():
return
for key in self.toggle_hold_key:
num_key = Tools.convert_to_decimal(key)
if num_key is None:
continue
hold_status = self.kmNet.isdown_keyboard(num_key) == 1
toggle_key_status = self.key_status_map[key]
if not toggle_key_status.last_hold_status and hold_status:
toggle_key_status.toggle()
if toggle_key_status.toggle_status:
self.logger.print_log(f"启动长按" + key)
self.mouse_mover.key_down(num_key)
else:
self.logger.print_log(f"关闭长按" + key)
self.mouse_mover.key_up(num_key)
toggle_key_status.hold(hold_status)
for close_key in self.toggle_close_key:
num_close_key = Tools.convert_to_decimal(close_key)
if num_close_key is None:
continue
hold_status = self.kmNet.isdown_keyboard(num_close_key) == 1
if not hold_status:
continue
keys = self.toggle_close_key[close_key]
for key in keys:
if key not in self.key_status_map:
continue
toggle_key_status = self.key_status_map[key]
if toggle_key_status.toggle_status:
self.logger.print_log(f"关闭长按" + key)
self.mouse_mover.key_up(Tools.convert_to_decimal(key))
toggle_key_status.toggle()
def controller_toggle_hold_change(self, key):
if key in self.toggle_close_key:
keys = self.toggle_close_key[key]
for key in keys:
if key not in self.key_status_map:
continue
toggle_key_status = self.key_status_map[key]
if toggle_key_status.toggle_status:
self.logger.print_log(f"关闭长按" + key)
self.mouse_mover.key_up(Tools.convert_to_decimal(key))
toggle_key_status.toggle()
def delayed_activation(self):
if not self.game_windows_status.get_game_windows_status():
return
for key, delayed_param in self.delayed_activation_key_list:
key_time = delayed_param["delay"] if "delay" in delayed_param else None
up_deactivation = delayed_param["up_deactivation"]
down_deactivation = delayed_param["down_deactivation"]
click_key = delayed_param["click_key"] if "click_key" in delayed_param else None
click_keys = delayed_param["click_keys"] if "click_keys" in delayed_param else None
hold_status = self.kmNet.isdown_keyboard(key) == 1
if hold_status:
if click_keys is None:
if key not in self.delayed_activation_key_status_map:
self.delayed_activation_key_status_map[key] = DelayedActivationKey()
delayed_activation_key_status = self.delayed_activation_key_status_map[key]
if down_deactivation:
if (int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time
and not delayed_activation_key_status.handle):
delayed_activation_key_status.handle = True
self.logger.print_log(f"持续按下{key},{key_time}ms,转换器开关按下:[{click_key}]")
# 转换器切换键
self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))
else:
if down_deactivation:
for click_key_item in click_keys:
key_time = click_key_item["delay"]
click_key = click_key_item["click_key"]
if key not in self.delayed_activation_key_status_map:
self.delayed_activation_key_status_map[key] = DelayedActivationKey()
delayed_activation_key_status = self.delayed_activation_key_status_map[key]
if (int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time
and not delayed_activation_key_status.in_handle_list(key_time)):
delayed_activation_key_status.list_handle(key_time)
self.logger.print_log(f"持续按下{key},{key_time}ms,转换器开关按下:[{click_key}]")
# 转换器切换键
self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))
else:
if key in self.delayed_activation_key_status_map:
if up_deactivation:
delayed_activation_key_status = self.delayed_activation_key_status_map[key]
# 转换器切换键
if delayed_activation_key_status.handle:
self.logger.print_log(f"持续按下{key}后弹起,转换器开关按下:[{click_key}]")
self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))
else:
if click_keys is None:
if int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time:
self.logger.print_log(f"按下{key}开关,转换器开关按下:[{click_key}]")
self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))
else:
click_keys = sorted(click_keys, key=lambda x: x["delay"], reverse=True)
for click_key_item in click_keys:
key_time = click_key_item["delay"]
click_key = click_key_item["click_key"]
if int((time.time() - delayed_activation_key_status.hold_time) * 1000) >= key_time:
if click_key is not None:
self.logger.print_log(
f"符合按键时长{key_time},按下{key}开关,转换器开关按下:[{click_key}]")
self.mouse_mover.click_key(Tools.convert_to_decimal(click_key))
break
self.delayed_activation_key_status_map.pop(key)
def destory(self):
self.kmNet.unmask_all()
class DelayedActivationKey:
"""
开关状态
"""
def __init__(self):
self.hold_time = time.time()
self.handle = False
self.handle_list = dict()
def in_handle_list(self, delay):
return delay in self.handle_list and self.handle_list[delay]
def list_handle(self, delay):
self.handle_list[delay] = True
class ToggleKey:
"""
开关状态
"""
def __init__(self):
self.last_hold_status = False
self.toggle_status = False
def toggle(self):
self.toggle_status = not self.toggle_status
def hold(self, status):
self.last_hold_status = status
================================================
FILE: core/kmnet_listener/__init__.py
================================================
================================================
FILE: core/screentaker/CapScreenTaker.py
================================================
import cv2
from core.screentaker.ScreenTaker import ScreenTaker
from log import LogFactory
class CapScreenTaker(ScreenTaker):
"""
本地截图
"""
def __init__(self, cap_param):
self.logger = LogFactory.getLogger(self.__class__)
self.width = cap_param["width"]
self.height = cap_param["height"]
self.frame_rate = cap_param["frame_rate"]
self.format = cap_param["format"]
self.cap = cv2.VideoCapture(0) # 视频流
# self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
# self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, self.width)
self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, self.height)
self.cap.set(cv2.CAP_PROP_FPS, self.frame_rate)
self.cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*self.format))
self.logger.print_log(f"使用视频采集卡:{cap_param}")
def get_images_from_bbox(self, bbox_list):
frames = []
ret, frame = self.cap.read()
for monitor in bbox_list:
frames.append(frame[monitor[1]: monitor[3], monitor[0]: monitor[2]])
return list(frames)
================================================
FILE: core/screentaker/LocalMssScreenTaker.py
================================================
import mss
from core.screentaker.ScreenTaker import ScreenTaker
from log import LogFactory
class LocalMssScreenTaker(ScreenTaker):
"""
本地截图
"""
def __init__(self):
self.logger = LogFactory.getLogger(self.__class__)
def get_images_from_bbox(self, bbox_list):
"""
Get images from specified bounding boxes.
:param bbox_list: List of bounding boxes [(x1, y1, x2, y2), ...]
:return: Generator yielding images
"""
try:
with mss.mss() as sct:
return list(
sct.grab({'top': bbox[1], 'left': bbox[0], 'width': bbox[2] - bbox[0], 'height': bbox[3] - bbox[1]})
for bbox in bbox_list)
except Exception as e:
self.logger.print_log(f"Error in get_images_from_bbox: {e}")
================================================
FILE: core/screentaker/LocalScreenTaker.py
================================================
from PIL import ImageGrab
from core.screentaker.ScreenTaker import ScreenTaker
from log import LogFactory
class LocalScreenTaker(ScreenTaker):
"""
本地截图
"""
def __init__(self):
self.logger = LogFactory.getLogger(self.__class__)
def get_images_from_bbox(self, bbox_list):
"""
Get images from specified bounding boxes.
:param bbox_list: List of bounding boxes [(x1, y1, x2, y2), ...]
:return: Generator yielding images
"""
try:
return list(ImageGrab.grab(bbox=bbox) for bbox in bbox_list)
except Exception as e:
self.logger.print_log(f"Error in get_images_from_bbox: {e}")
================================================
FILE: core/screentaker/ScreenTaker.py
================================================
class ScreenTaker:
def get_images_from_bbox(self, bbox_list):
"""
截图
"""
pass
================================================
FILE: core/screentaker/ScreenTakerFactory.py
================================================
from core.screentaker.CapScreenTaker import CapScreenTaker
from core.screentaker.LocalMssScreenTaker import LocalMssScreenTaker
from net.socket.SocketScreenTaker import SocketScreenTaker
def get_screen_taker(config):
"""
根据配置获取截图器
"""
screen_taker = config.screen_taker
if screen_taker == "local":
return LocalMssScreenTaker()
elif screen_taker == "distributed":
return SocketScreenTaker((config.distributed_param["ip"], config.distributed_param["port"]))
elif screen_taker == 'cap':
return CapScreenTaker(config.cap_param)
================================================
FILE: core/screentaker/__init__.py
================================================
================================================
FILE: demo.py
================================================
import time
import kmNet
# import time
kmNet.init('192.168.2.188', '35368', '8A6E5C53') # 连接盒子0
time.sleep(1)
kmNet.keydown(78)
kmNet.keyup(78)
# kmNet.unmask_all()/*# kmNet.monitor(10000)-
# while True:
# print(kmNet.isdown_keyboard(0xE0) == 1)+
"""- 0x2D 0x56-
+ 0x2E 0x57
[ 0x2F
] 0x30
\ 0x31
; 0x33
' 0x34
` 0x35
, 0x36
. 0x37 0x63
/ 0x38
CAPS LOCK 0x39
INSERT 0x49
PAGEUP 0x4B
PAGEDN 0x4E+
DELETE 0x4C
UP 0x52
DOWN 0x51
LEFT 0x50
SCRLK 0x47
PAUSE 0x48
"""
================================================
FILE: images/1920x1080/list.txt
================================================
3030.png
car.png
EVA-8.png
G7.png
lstart.png
p2020.png
R99.png
R-301.png
re-45.png
三重.png
专注.png
充能步枪.png
克雷贝尔.png
和平捍卫者.png
哈沃克.png
哨兵.png
喷火.png
复仇女神.png
小帮手.png
平行步枪.png
手刀.png
敖犬.png
暴走.png
汗洛.png
波塞克.png
猎兽.png
电能.png
莫桑比克.png
转换者.png
长弓.png
================================================
FILE: images/1920x1200/list.txt
================================================
3030.jpg
car.jpg
EVA-8.jpg
G7.jpg
lstart.jpg
p2020.jpg
R99.jpg
R-301.jpg
re-45.jpg
三重.jpg
专注.jpg
充能步枪.jpg
克雷贝尔.jpg
和平捍卫者.jpg
哈沃克.jpg
哨兵.jpg
喷火.jpg
复仇女神.jpg
小帮手.jpg
平行步枪.jpg
手刀.jpg
敖犬.jpg
暴走.jpg
汗洛.jpg
波塞克.jpg
猎兽.jpg
电能.jpg
莫桑比克.jpg
转换者.jpg
长弓.jpg
================================================
FILE: images/2048x1152/list.txt
================================================
3030.png
car.png
EVA-8.png
G7.png
lstart.png
p2020.png
R99.png
R-301.png
re-45.png
三重.png
专注.png
充能步枪.png
克雷贝尔.png
和平捍卫者.png
哈沃克.png
哨兵.png
喷火.png
复仇女神.png
小帮手.png
平行步枪.png
手刀.png
敖犬.png
暴走.png
汗洛.png
波塞克.png
猎兽.png
电能.png
莫桑比克.png
转换者.png
长弓.png
================================================
FILE: images/2560x1440/list.txt
================================================
3030.jpg
car.jpg
EVA-8.jpg
G7.jpg
lstart.jpg
p2020.jpg
R99.jpg
R-301.jpg
re-45.jpg
三重.jpg
专注.jpg
充能步枪.jpg
克雷贝尔.jpg
和平捍卫者.jpg
哈沃克.jpg
哨兵.jpg
喷火.jpg
复仇女神.jpg
小帮手.jpg
平行步枪.jpg
手刀.jpg
敖犬.jpg
暴走.jpg
汗洛.jpg
波塞克.jpg
猎兽.jpg
电能.jpg
莫桑比克.jpg
转换者.jpg
长弓.jpg
================================================
FILE: images/hop_up/1920x1080/list.txt
================================================
turbocharger.png
================================================
FILE: images/hop_up/2560x1440/list.txt
================================================
turbocharger.png
================================================
FILE: images/scope/1920x1080/list.txt
================================================
1x-2xVariableHolo.png
1xClassic.png
1xDigitalThreat.png
1xHolo.png
2xBruiser.png
3xRanger.png
4xVariableAOG.png
================================================
FILE: images/scope/2560x1440/list.txt
================================================
1x-2xVariableHolo.png
1xClassic.png
1xDigitalThreat.png
1xHolo.png
2xBruiser.png
3xRanger.png
4xVariableAOG.png
================================================
FILE: log/LogFactory.py
================================================
import json
import os.path
from log.LogWindow import LogWindow
from log.Logger import Logger
current_logger: Logger = None
def init_logger(log_mode="console", windows_name="AG"):
"""
初始化全局日志打印
"""
global current_logger
if "console" == log_mode:
current_logger = Logger()
else:
current_logger = LogWindow(windows_name)
def logger():
"""
获取当前全局日志打印
"""
return current_logger
def getLogger(cls):
"""
获取打印日志实峛
"""
return MultipleLogger(cls)
log_map = {}
log_json = "config/log.json"
if os.path.exists(log_json):
with open(log_json, encoding='utf-8') as file:
log_map = json.load(file)
def prefix_search(full_path):
"""
前缀匹配
"""
longest_prefix = (0, "")
for (key, value) in log_map.items():
if full_path.startswith(key):
max_length, log_type = longest_prefix
length = len(key.split("."))
if length > max_length:
longest_prefix = (length, value)
return longest_prefix
class MultipleLogger(Logger):
def __init__(self, cls):
self.cls = cls
self.full_path = f"{cls.__module__}.{cls.__name__}"
def print_log(self, text, log_type="default"):
if current_logger is None:
init_logger(log_map["log_mode"])
length, search_log_type = prefix_search(self.full_path)
if length != 0:
current_logger.print_log(text, search_log_type)
else:
current_logger.print_log(text, log_type)
================================================
FILE: log/LogWindow.py
================================================
import os
import time
import traceback
from PyQt5.QtCore import Qt, QThread, pyqtSignal
from PyQt5.QtWidgets import QMainWindow, QTextEdit, QVBoxLayout, QWidget, QApplication, QTabWidget
from log.Logger import Logger
from tools.Tools import Tools
class LogWindow(QMainWindow, Logger):
"""
日志窗口
"""
# 类变量用于保存单例实例
_instance = None
def __new__(cls, *args, **kwargs):
if not cls._instance:
cls._instance = super().__new__(cls)
return cls._instance
def __init__(self, windows_name="Apex gun"):
super().__init__()
if not hasattr(self, 'log_text'):
self.tab_widget = None
self.log_texts = {}
self.log_queue = Tools.GetBlockQueue(name='log_queue', maxsize=1000)
self.setWindowTitle(windows_name)
self.init_ui()
# 实例化对象
self.print_log_thread = PrintLogThread(self.log_queue)
# 信号连接到界面显示槽函数
self.print_log_thread.log_signal.connect(self.real_print)
# 多线程开始
self.print_log_thread.start()
self.setWindowFlags(Qt.WindowStaysOnTopHint)
self.show()
def init_ui(self):
"""
初始化UI
"""
self.setGeometry(100, 100, 600, 300)
# 创建 QTextEdit 组件用于显示日志
self.tab_widget = QTabWidget()
# 添加 QTextEdit 组件到主窗口
layout = QVBoxLayout()
layout.addWidget(self.tab_widget)
container = QWidget()
container.setLayout(layout)
self.setCentralWidget(container)
def print_log(self, log, log_type="default"):
"""
打印日志
:param log:
:param log_type:
"""
self.log_queue.put((log, log_type))
def closeEvent(self, event):
"""
关闭事件
:param event:
"""
QApplication.quit()
os._exit(0)
def real_print(self, log_data):
"""
真实打印函数
:param log_data:
"""
log, log_type = log_data
if log_type not in self.log_texts:
self.add_log_tab(log_type)
log_text = self.log_texts[log_type]
log_text.append(log)
log_text.moveCursor(log_text.textCursor().End)
super().print_log(text=log)
def add_log_tab(self, log_type):
"""
添加日志类型标签页
:param log_type:
"""
log_text = QTextEdit()
log_text.document().setMaximumBlockCount(1000)
log_text.setReadOnly(True)
self.tab_widget.addTab(log_text, log_type)
self.log_texts[log_type] = log_text
class PrintLogThread(QThread):
"""
使用信号槽来多线程更新ui
"""
log_signal = pyqtSignal(tuple)
def __init__(self, log_queue: Tools.GetBlockQueue):
super().__init__()
self.log_queue = log_queue
def run(self):
"""
避免多线程影响ui,在一个线程中启动队列消费打印
"""
self.log_signal.emit(("打印日志线程启动", "default"))
while True:
try:
log_data = self.log_queue.get()
self.log_signal.emit(log_data)
except Exception as e:
print(e)
traceback.print_exc()
time.sleep(0.1)
================================================
FILE: log/Logger.py
================================================
import inspect
import os
max_length = 0
class Logger:
"""
日志抽象
"""
def print_log(self, text, log_type="default"):
"""
打印日志
:param text:
:param log_type:
"""
global max_length
# 获取被调用函数所在模块文件名
file_path = inspect.stack()[2][1]
(filepath, file_name) = os.path.split(file_path)
(file_name, extension) = os.path.splitext(file_name)
func_name = inspect.stack()[2][3]
line_num = inspect.stack()[2][2]
text_split = text.split("\n")
log_text = f'[{file_name}:{func_name}][{line_num}]'
max_length = max(max_length, len(log_text))
for content in text_split:
print(str.ljust(log_text, max_length) + content)
================================================
FILE: log/__init__.py
================================================
================================================
FILE: mouse_mover/FeiMover.py
================================================
import ctypes
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class FeiMover(MouseMover):
def __init__(self, mouse_mover_param):
# 进程内注册插件,模块所在的路径按照实际位置修改
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
self.init_dll()
self.dll = self.init_dll()
vid_pid = mouse_mover_param["VID/PID"]
vid = int(vid_pid[:4], 16)
pid = int(vid_pid[4:], 16)
self.hdl = self.dll.M_Open_VidPid(vid, pid)
def move_rp(self, short_x: int, short_y: int):
self.dll.M_MoveR(self.hdl, short_x, short_y)
def move(self, short_x: int, short_y: int):
self.dll.M_MoveR2(self.hdl, short_x, short_y)
def left_click(self):
self.dll.M_LeftClick(self.hdl, 1)
def click_key(self, value):
self.dll.M_KeyPress(self.hdl, value, 1)
def key_down(self, value):
self.dll.M_KeyDown(self.hdl, value)
def key_up(self, value):
self.dll.M_KeyUp(self.hdl, value)
def init_dll(self):
objdll = ctypes.cdll.LoadLibrary(r".\msdk.dll")
# 定义函数原型
M_Open = objdll.M_Open
M_Open.argtypes = [ctypes.c_int]
M_Open.restype = ctypes.c_void_p
M_Open_VidPid = objdll.M_Open_VidPid
M_Open_VidPid.argtypes = [ctypes.c_int, ctypes.c_int]
M_Open_VidPid.restype = ctypes.c_void_p
M_KeyPress = objdll.M_KeyPress
M_KeyPress.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
M_KeyPress.restype = ctypes.c_int
M_KeyDown = objdll.M_KeyDown
M_KeyDown.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_KeyDown.restype = ctypes.c_int
M_KeyUp = objdll.M_KeyUp
M_KeyUp.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_KeyUp.restype = ctypes.c_int
M_LeftClick = objdll.M_LeftClick
M_LeftClick.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_LeftClick.restype = ctypes.c_int
M_LeftDown = objdll.M_LeftDown
M_LeftDown.argtypes = [ctypes.c_void_p]
M_LeftDown.restype = ctypes.c_int
M_LeftUp = objdll.M_LeftUp
M_LeftUp.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_LeftUp.restype = ctypes.c_int
M_RightClick = objdll.M_RightClick
M_RightClick.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_RightClick.restype = ctypes.c_int
M_RightDown = objdll.M_RightDown
M_RightDown.argtypes = [ctypes.c_void_p]
M_RightDown.restype = ctypes.c_int
M_RightUp = objdll.M_RightUp
M_RightUp.argtypes = [ctypes.c_void_p]
M_RightUp.restype = ctypes.c_int
# 拟人移动
M_MoveR2 = objdll.M_MoveR2
M_MoveR2.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
M_MoveR2.restype = ctypes.c_int
# 无拟人移动
M_MoveR = objdll.M_MoveR
M_MoveR.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
M_MoveR.restype = ctypes.c_int
M_Close = objdll.M_Close
M_Close.argtypes = [ctypes.c_void_p]
M_Close.restype = ctypes.c_int
return objdll
================================================
FILE: mouse_mover/GHubMover.py
================================================
from ctypes import CDLL
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class GHubMover(MouseMover):
def __init__(self, mouse_mover_param):
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
try:
self.gm = CDLL(r'./ghub_device.dll')
self.gmok = self.gm.device_open() == 1
if not self.gmok:
print('未安装ghub或者lgs驱动!!!')
else:
print('初始化成功!')
except FileNotFoundError:
print('缺少文件')
def move_rp(self, x: int, y: int, re_cut_size=0):
self.move(x, y)
def move(self, x: int, y: int):
self.gm.moveR(int(x), int(y), False)
def left_click(self):
self.click_mouse_button(1)
def click_mouse_button(self, button):
self.press_mouse_button(button)
self.release_mouse_button(button)
# 按下鼠标按键
def press_mouse_button(self, button):
if self.gmok:
self.gm.mouse_down(button)
# 松开鼠标按键
def release_mouse_button(self, button):
if self.gmok:
self.gm.mouse_up(button)
================================================
FILE: mouse_mover/IntentManager.py
================================================
import threading
import time
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
intention = None
class IntentManager:
"""
意图管理器,负责推送移动意图
"""
def __init__(self, mouse_mover: MouseMover):
self.logger = LogFactory.getLogger(self.__class__)
self.intention = None
self.change_coordinates_num = 0
self.mouse_mover = mouse_mover
self.intention_lock = threading.Lock()
def set_intention(self, x, y):
"""
设置移动意图
:param x:
:param y:
"""
self.intention_lock.acquire()
try:
self.intention = (x, y)
self.change_coordinates_num += 1
finally:
# 释放锁
self.intention_lock.release()
def start(self):
"""
开始读取移动意图并移动
"""
sleep_time = 0.01
while True:
if self.intention is not None:
(x, y) = self.intention
while x != 0 or y != 0:
self.intention_lock.acquire()
try:
(x, y) = self.intention
move_step_temp = 1
move_step_y_temp = 1
move_up = min(move_step_temp, abs(x)) * (1 if x > 0 else -1)
move_down = min(move_step_y_temp, abs(y)) * (1 if y > 0 else -1)
if x == 0:
move_up = 0
elif y == 0:
move_down = 0
x -= move_up
y -= move_down
self.intention = (x, y)
finally:
self.intention_lock.release()
self.mouse_mover.move_rp(int(move_up), int(move_down))
self.intention = None
sleep_time = 0.001
time.sleep(sleep_time)
self.change_coordinates_num = 0
================================================
FILE: mouse_mover/KmBoxMover.py
================================================
import ctypes
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class KmBoxMover(MouseMover):
def __init__(self, mouse_mover_param):
# 初始化
# dll地址
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
vid_pid = mouse_mover_param["VID/PID"]
self.km_box_A = ctypes.cdll.LoadLibrary(r".\kmbox_dll_64bit.dll")
self.km_box_A.KM_init.argtypes = [ctypes.c_ushort, ctypes.c_ushort]
self.km_box_A.KM_init.restype = ctypes.c_ushort
self.km_box_A.KM_move.argtypes = [ctypes.c_short, ctypes.c_short]
self.km_box_A.KM_move.restype = ctypes.c_int
vid = int(vid_pid[:4], 16)
pid = int(vid_pid[4:], 16)
# 连接km_box_VER a
ts = self.km_box_A.KM_init(ctypes.c_ushort(vid), ctypes.c_ushort(pid))
self.logger.print_log("初始化:{}".format(ts))
def left_click(self):
# 左键
self.left(1)
self.left(0)
def left(self, vk_key: int):
"""
鼠标左键控制 0松开 1按下
"""
# 左键
self.km_box_A.KM_left(ctypes.c_char(vk_key))
def move_rp(self, short_x: int, short_y: int):
self.move(short_x, short_y)
def move(self, short_x: int, short_y: int):
"""
鼠标相对移动
x :鼠标X轴方向移动距离
y :鼠标Y轴方向移动距离
返回值:
-1:发送失败\n
0:发送成功\n
"""
self.km_box_A.KM_move(short_x, short_y)
================================================
FILE: mouse_mover/KmBoxNetMover.py
================================================
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class KmBoxNetMover(MouseMover):
def __init__(self, mouse_mover_param):
import kmNet
self.kmNet = kmNet
# 初始化
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
ip = mouse_mover_param["ip"]
port = mouse_mover_param["port"]
uuid = mouse_mover_param["uuid"]
self.kmNet.init(ip, port, uuid) # 连接盒子
self.listener = None
self.toggle_key_listener = None
def left_click(self):
# 左键
self.left(1)
self.left(0)
def left(self, vk_key: int):
"""
鼠标左键控制 0松开 1按下
"""
# 左键
self.kmNet.left(1)
self.kmNet.left(0)
def move_rp(self, short_x: int, short_y: int, re_cut_size=0):
self.kmNet.move(short_x, short_y)
def move(self, short_x: int, short_y: int):
"""
鼠标相对移动
x :鼠标X轴方向移动距离
y :鼠标Y轴方向移动距离
返回值:
-1:发送失败\n
0:发送成功\n
"""
self.kmNet.move_auto(short_x, short_y, int(max(5, short_x / 10, short_y / 10)))
def destroy(self):
"""
销毁
"""
if self.listener is not None:
self.listener.stop()
if self.toggle_key_listener is not None:
self.toggle_key_listener.destory()
def click_key(self, value):
self.kmNet.keydown(value)
self.kmNet.keyup(value)
def key_down(self, value):
self.kmNet.keydown(value)
def key_up(self, value):
self.kmNet.keyup(value)
def show_pic(self, pic_array):
self.kmNet.lcd_picture_bottom(pic_array)
================================================
FILE: mouse_mover/MouseMover.py
================================================
from ctypes import Structure, c_ulong, byref, windll
import win32api
import win32con
class PointAPI(Structure):
"""
坐标API结构体
"""
# PointAPI类型,用于获取鼠标坐标
_fields_ = [("x", c_ulong), ("y", c_ulong)]
class MouseMover:
"""
鼠标移动抽象
"""
def __init__(self, mouse_mover_param):
self.mouse_mover_param = mouse_mover_param
def move_rp(self, x: int, y: int):
"""
鼠标移动,原生移动
:param x:
:param y:
"""
pass
def move(self, x: int, y: int):
"""
鼠标移动,盒子移动
:param x:
:param y:
"""
pass
def left_click(self):
"""
点击按键
:param button:
"""
pass
def mouse_click(self, key, press):
"""
点击鼠标
:param key:
:param press:
"""
if key == "left":
if press:
self.left_down()
else:
self.left_up()
elif key == "right":
if press:
self.right_down()
else:
self.right_up()
def left_down(self):
"""
左键按下
"""
pass
def left_up(self):
"""
左键弹起
"""
pass
def right_down(self):
"""
右键按下
"""
pass
def right_up(self):
"""
右键弹起
"""
pass
def get_position(self):
"""
获取鼠标位置
"""
po = PointAPI()
windll.user32.GetCursorPos(byref(po))
return int(po.x), int(po.y)
def is_num_locked(self):
"""
使用ctypes获取键盘状态信息
0x90 是Num Lock键的虚拟键码
返回值是一个表示键盘状态的整数,最低位bit为1表示Num Lock被锁定
:return:
"""
key_state = windll.user32.GetKeyState(0x90)
# 判断Num Lock键的状态
# 第16位是最低位,如果为1表示Num Lock被锁定,否则未锁定
num_lock_state = key_state & 1
return num_lock_state == 1
def is_caps_locked(self):
"""
使用ctypes获取键盘状态信息
0x14 是Caps Lock键的虚拟键码
返回值是一个表示键盘状态的整数,最低位bit为1表示Caps Lock被锁定
:return:
"""
key_state = windll.user32.GetKeyState(0x14)
# 判断Caps Lock键的状态
# 第16位是最低位,如果为1表示Caps Lock被锁定,否则未锁定
caps_lock_state = key_state & 1
return caps_lock_state == 1
def click_key(self, value):
"""
:param value:
:return:
"""
pass
def key_down(self, value):
"""
按下按键
"""
pass
def key_up(self, value):
"""
松开按键
"""
pass
def toggle_caps_lock(self, lock_status):
"""
切换Caps Lock键的状态
"""
if self.is_caps_locked() ^ lock_status:
# 模拟按下Caps Lock键
win32api.keybd_event(win32con.VK_CAPITAL, 0, win32con.KEYEVENTF_EXTENDEDKEY, 0)
# 模拟释放Caps Lock键
win32api.keybd_event(win32con.VK_CAPITAL, 0, win32con.KEYEVENTF_EXTENDEDKEY | win32con.KEYEVENTF_KEYUP, 0)
================================================
FILE: mouse_mover/MoverFactory.py
================================================
import threading
from core.kmnet_listener.KmBoxNetListener import KmBoxNetListener
from core.kmnet_listener.ToggleKeyListener import ToggleKeyListener
from log import LogFactory
from mouse_mover.FeiMover import FeiMover
from mouse_mover.GHubMover import GHubMover
from mouse_mover.KmBoxMover import KmBoxMover
from mouse_mover.KmBoxNetMover import KmBoxNetMover
from mouse_mover.PanNiMover import PanNiMover
from mouse_mover.Win32ApiMover import Win32ApiMover
from mouse_mover.WuYaMover import WuYaMover
from net.socket.SocketMouseMover import SocketMouseMover
def get_mover(config, mouse_listener=None, mouse_model=None, parent_mover=None, c1_mover=None,
game_windows_status=None):
"""
获取键鼠管理器
"""
if mouse_model is None:
mouse_model = config.mouse_mover
mouse_mover_params = config.mouse_mover_params
mouse_mover_param = mouse_mover_params[mouse_model]
if mouse_mover_param is None:
LogFactory.logger().print_log(f"鼠标模式:[{mouse_model}]不可用")
else:
LogFactory.logger().print_log(f"初始化鼠标模式:[{mouse_model}]")
if mouse_model == 'win32api':
return Win32ApiMover(mouse_mover_param)
elif mouse_model == "km_box":
return KmBoxMover(mouse_mover_param)
elif mouse_model == "wu_ya":
return WuYaMover(mouse_mover_param)
elif mouse_model == 'logitech':
return GHubMover(mouse_mover_param)
elif mouse_model == "pan_ni":
return PanNiMover(mouse_mover_param)
elif mouse_model == "fei_yi_lai" or mouse_model == 'fei_yi_lai_single':
return FeiMover(mouse_mover_param)
elif mouse_model == "km_box_net":
current_mover = KmBoxNetMover(mouse_mover_param)
if mouse_listener is not None:
current_mover.listener = KmBoxNetListener(current_mover, mouse_listener)
threading.Thread(target=current_mover.listener.km_box_net_start).start()
if parent_mover is None:
parent_mover = current_mover
if config.rea_snow_gun_config_name is not None and config.rea_snow_gun_config_name != '':
current_mover.toggle_key_listener = ToggleKeyListener(km_box_net_listener=current_mover.listener,
delayed_activation_key_list=config.delayed_activation_key_list,
mouse_mover=parent_mover, c1_mouse_mover=c1_mover,
toggle_hold_key=config.toggle_hold_key,
game_windows_status=game_windows_status)
return current_mover
elif mouse_model == "distributed" or mouse_model == "distributed_c1":
current_mover = SocketMouseMover(mouse_mover_param=mouse_mover_param,
mode="mouse_mover" if mouse_model == "distributed" else "c1_mouse_mover")
# server_mover = get_mover(logger=logger, mouse_listener=mouse_listener, config=config,
# mouse_model=config.server_mouse_mover, parent_mover=current_mover, c1_mover=c1_mover,
# game_windows_status=game_windows_status)
# current_mover.server_mouse_mover = server_mover
return current_mover
================================================
FILE: mouse_mover/PanNiMover.py
================================================
import ctypes
import random
import sys
import time
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class PanNiMover(MouseMover):
def __init__(self, mouse_mover_param):
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
self.dev = None
self.version = 0
self.model = 0
self.vid = 0
self.pid = 0
self.wait_respon = False
if sys.platform == "win32":
user32 = ctypes.windll.user32
self.screenX = user32.GetSystemMetrics(78)
self.screenY = user32.GetSystemMetrics(79)
else:
import tkinter
root = tkinter.Tk()
self.screenX = root.winfo_vrootwidth()
self.screenY = root.winfo_vrootheight()
root.quit()
vid_pid = mouse_mover_param["VID/PID"]
vid = int(vid_pid[:4], 16)
pid = int(vid_pid[4:], 16)
if not self.OpenDevice(vid, pid):
print("设备连接失败")
return
print("型号:", chr(self.model + 64))
print("版本:", self.version)
print("序列号:", self.GetChipID())
print("空间大小:", self.GetStorageSize())
self.SetWaitRespon(True)
def __del__(self):
self.Close()
def OpenDevice(self, pid, vid):
"""
打开默认设备
:return:
"""
return self.OpenDeviceByID(pid, vid)
def OpenDeviceByID(self, vid, pid):
"""
通过pid vid打开设备
:param vid:
:param pid:
:return:
"""
dev = HID()
devices = dev.enum_device()
vidpid_str = "#vid_{:04x}&pid_{:04x}&".format(vid, pid)
for device in devices:
if device.find(vidpid_str) == -1:
continue
print("open", device)
ret = dev.open(device)
if not ret:
dev.close()
else:
self.dev = dev
ret = self._getVersion()
if not ret:
continue
self.version = ret[1]
self.model = ret[0]
return True
return False
def _getVersion(self):
self.write_cmd(1)
return self.read_data_timeout_promise(1, 10)
def write_cmd(self, cmd, dat=None):
"""
:param cmd:
:param dat:
:return:
"""
if not self.dev:
return -1
if dat and len(dat) > 61:
return -2
buf = [32, 1, cmd]
if dat:
buf[1] = len(dat) + 1
buf.extend(dat)
buf.extend([0xff] * (64 - len(buf)))
ret = self.dev.write(buf)
# print(ret)
if ret < 0:
self.Close()
return ret
def read_data_timeout_promise(self, cmd, timeout=None):
"""
:param cmd:
:param timeout:
:return:
"""
if not self.dev:
return None
for i in range(0, 10):
ret = self.read_data_timeout(timeout)
if ret and ret[0] == cmd:
return ret[1]
return None
def read_data_timeout(self, timeout=None):
"""
:param timeout:
:return:
"""
if not self.dev:
return None
try:
ret = self.dev.read(64, timeout)
if ret and ret[0] == 31:
return ret[2], ret[3:ret[1] + 2]
else:
return None
except OSError:
self.Close()
return None
def GetChipID(self):
"""
:return:
"""
self.write_cmd(12)
ret = self.read_data_timeout_promise(9, 10)
if not ret:
return -1
result = int.from_bytes(ret, byteorder='little', signed=True)
result += 113666
return ctypes.c_int32(result).value
def GetStorageSize(self):
"""
:return:
"""
self.write_cmd(2)
ret = self.read_data_timeout_promise(2, 10)
if not ret:
return -1
result = int.from_bytes(ret, byteorder='little', signed=True)
return result
def SetWaitRespon(self, wait):
"""
:param wait:
"""
self.wait_respon = wait
self.write_cmd(34)
self.read_data_timeout_promise(39, 10)
def Close(self):
"""
关闭盒子
"""
if self.dev:
self.dev.close()
self.dev = None
self.version = 0
self.model = 0
self.vid = 0
self.pid = 0
self.wait_respon = False
def mouse_event(self, e, x=0, y=0, extra1=0, extra2=0):
"""
鼠标事件
:param e:
:param x:
:param y:
:param extra1:
:param extra2:
:return:
"""
cmd = [0xff] * 12
cmd[0] = e
if e >= 1 and e <= 7:
pass
elif e == 8:
if x < 0:
x = 0
if y < 0:
y = 0
screenx = self.screenX
screeny = self.screenY
if x >= screenx:
x = screenx - 1
if y >= screeny:
y = screeny - 1
x = int((x << 15) / screenx)
y = int((y << 15) / screeny)
cmd[1] = (x >> 8) & 0xff
cmd[2] = x & 0xff
cmd[3] = (y >> 8) & 0xff
cmd[4] = y & 0xff
elif e == 9:
if x < -128 or x > 127 or y < -128 or y > 127:
return
cmd[1] = x
cmd[2] = y
elif e == 91:
if x < -32768 or x > 32767 or y < -32768 or y > 32767:
return
cmd[1] = (x >> 8) & 0xff
cmd[2] = x & 0xff
cmd[3] = (y >> 8) & 0xff
cmd[4] = y & 0xff
elif e == 10:
if x < -128 or x > 127:
return
cmd[1] = x
elif e == 11:
if x < 0:
x = 0
if y < 0:
y = 0
cmd[1] = (x >> 8) & 0xff
cmd[2] = x & 0xff
cmd[3] = (y >> 8) & 0xff
cmd[4] = y & 0xff
screenx = self.screenX
screeny = self.screenY
cmd[5] = (screenx >> 8) & 0xff
cmd[6] = screenx & 0xff
cmd[7] = (screeny >> 8) & 0xff
cmd[8] = screeny & 0xff
cmd[9] = extra1
cmd[10] = extra2
elif e == 12:
cmd[1] = (x >> 8) & 0xff
cmd[2] = x & 0xff
cmd[3] = (y >> 8) & 0xff
cmd[4] = y & 0xff
screenx = self.screenX
screeny = self.screenY
cmd[5] = (screenx >> 8) & 0xff
cmd[6] = screenx & 0xff
cmd[7] = (screeny >> 8) & 0xff
cmd[8] = screeny & 0xff
cmd[9] = extra1
cmd[10] = extra2
elif e == 13 or e == 14:
cmd[1] = x
self.write_cmd(16, cmd)
if self.wait_respon:
self.read_data_timeout_promise(20, 10)
def key_event(self, e, key):
"""
键盘事件
:param e:
:param key:
"""
cmd = [e, 0xff]
if isinstance(key, str):
key = self.GetScanCodeFromKeyName(key)
cmd[1] = key
self.write_cmd(17, cmd)
if self.wait_respon:
self.read_data_timeout_promise(20, 10)
@staticmethod
def DelayRandom(delay_min, delay_max):
"""
:param delay_min:
:param delay_max:
"""
delay = 0
if delay_max >= delay_min >= 0 and delay_max > 0:
delay = random.randint(delay_min, delay_max)
elif delay_max == 0 and delay_min > 0:
delay = delay_min
if delay > 0:
time.sleep(delay / 1000)
@staticmethod
def GetScanCodeFromKeyName(keyname):
"""
键值表
:param keyname:
:return:
"""
keymap = {
"a": 4, "b": 5, "c": 6, "d": 7, "e": 8, "f": 9, "g": 10, "h": 11, "i": 12, "j": 13, "k": 14, "l": 15,
"m": 16, "n": 17, "o": 18, "p": 19, "q": 20,
"r": 21, "s": 22, "t": 23, "u": 24, "v": 25, "w": 26, "x": 27, "y": 28, "z": 29, "1": 30, "2": 31, "3": 32,
"4": 33, "5": 34, "6": 35, "7": 36,
"8": 37, "9": 38, "0": 39, "enter": 40, "esc": 41, "backspace": 42, "tab": 43, "space": 44, " ": 44,
"空格键": 44, "-": 45, "=": 46, "[": 47, "]": 48,
"\\": 49, ";": 51, "'": 52, "`": 53, ",": 54, ".": 55, "/": 56, "capslock": 57, "f1": 58, "f2": 59,
"f3": 60, "f4": 61, "f5": 62, "f6": 63, "f7": 64,
"f8": 65, "f9": 66, "f10": 67, "f11": 68, "f12": 69, "printscreen": 70, "scrolllock": 71, "pause": 72,
"break": 72, "insert": 73, "home": 74,
"pageup": 75, "delete": 76, "end": 77, "pagedown": 78, "right": 79, "left": 80, "down": 81, "up": 82,
"numlock": 83, "小键盘/": 84, "小键盘*": 85,
"小键盘-": 86, "小键盘+": 87, "小键盘enter": 88, "小键盘1": 89, "小键盘2": 90, "小键盘3": 91, "小键盘4": 92,
"小键盘5": 93, "小键盘6": 94,
"小键盘7": 95, "小键盘8": 96, "小键盘9": 97, "小键盘0": 98, "小键盘.": 99, "menu": 101, "小键盘=": 103,
"静音": 127, "音量加": 128, "音量减": 129,
"lctrl": 224, "lshift": 225, "lalt": 226, "lwin": 227, "rctrl": 228, "rshift": 229, "ralt": 230,
"rwin": 231,
"ctrl": 224, "shift": 225, "alt": 226, "win": 227
}
keyname = keyname.lower()
if keyname in keymap:
return keymap[keyname]
else:
return 0
def move_rp(self, x: int, y: int):
self.mouse_event(91, x, y)
def move(self, x: int, y: int):
move_max = max(x, y)
if move_max == 0:
return
move_max = min(255, move_max)
self.mouse_event(12, x, y, 1, move_max)
def left_click(self):
self.left_down()
self.DelayRandom(0, 50)
self.left_up()
def mouse_click(self, key, press):
print("未实现 mouse_click")
def left_down(self):
self.mouse_event(1)
def left_up(self):
self.mouse_event(2)
def right_down(self):
self.mouse_event(3)
def right_up(self):
self.mouse_event(4)
def click_key(self, value):
self.key_down(value)
self.DelayRandom(0, 20)
self.key_up(value)
def key_down(self, value):
self.key_event(1, value)
def key_up(self, value):
self.key_event(2, value)
# -*- coding: utf-8 -*-
from ctypes import *
import platform
class GUID(Structure):
_fields_ = [("Data1", c_ulong),
("Data2", c_ushort),
("Data3", c_ushort),
("Data4", c_ubyte * 8)]
class SP_DEVICE_INTERFACE_DATA(Structure):
_fields_ = [("cbSize", c_ulong),
("InterfaceClassGuid", GUID),
("Flags", c_ulong),
("Reserved", c_ulong)]
def SP_DATA_A_factory(length):
class SP_DEVICE_INTERFACE_DETAIL_DATA_A(Structure):
_fields_ = [("cbSize", c_ulong), ("DevicePath", c_char * (length - 4))]
return SP_DEVICE_INTERFACE_DETAIL_DATA_A
class HID:
"""
"""
def __init__(self):
self.setupapi_dll = WinDLL("setupapi.dll")
info_value = [c_ulong(0x4d1e55b2), c_ushort(0xf16f), c_ushort(0x11cf),
(c_ubyte * 8)(0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30)]
self.InterfaceClassGuid = GUID(*info_value)
self.handle = None
self.setupapi_dll.SetupDiGetClassDevsA.restype = c_void_p
self.setupapi_dll.SetupDiEnumDeviceInterfaces.argtypes = (
c_void_p, c_void_p, POINTER(GUID), c_ulong, POINTER(SP_DEVICE_INTERFACE_DATA))
def __del__(self):
self.close()
def enum_device(self):
"""
:return:
"""
result = []
device_info_set = self.setupapi_dll.SetupDiGetClassDevsA(pointer(self.InterfaceClassGuid), None, None, 0x12)
if device_info_set != -1:
# print(device_info_set)
device_index = 0
while True:
if platform.architecture()[0] == "64bit":
info_value = [c_ulong(32), self.InterfaceClassGuid, 0, 0]
else:
info_value = [c_ulong(28), self.InterfaceClassGuid, 0, 0]
device_interface_data = SP_DEVICE_INTERFACE_DATA(*info_value)
ret = self.setupapi_dll.SetupDiEnumDeviceInterfaces(device_info_set, None,
pointer(self.InterfaceClassGuid), device_index,
byref(device_interface_data))
if not ret:
err = GetLastError()
if err != 259:
print("SetupDiEnumDeviceInterfaces return:", err)
break
required_size = c_ulong(0)
SP_DATA_A = SP_DATA_A_factory(8)
self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA.argtypes = (
c_void_p, POINTER(SP_DEVICE_INTERFACE_DATA), POINTER(SP_DATA_A), c_ulong, POINTER(c_ulong),
c_void_p)
ret = self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA(device_info_set,
pointer(device_interface_data), None, 0,
byref(required_size), None)
# print(required_size.value)
SP_DATA_A = SP_DATA_A_factory(required_size.value)
self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA.argtypes = (
c_void_p, POINTER(SP_DEVICE_INTERFACE_DATA), POINTER(SP_DATA_A), c_ulong, POINTER(c_ulong),
c_void_p)
if platform.architecture()[0] == "64bit":
device_interface_detail_data = SP_DATA_A(*[8, b''])
else:
device_interface_detail_data = SP_DATA_A(*[5, b''])
ret = self.setupapi_dll.SetupDiGetDeviceInterfaceDetailA(device_info_set,
pointer(device_interface_data),
byref(device_interface_detail_data),
required_size, None, None)
# print(ret)
if ret:
# print(device_interface_detail_data.DevicePath)
device_path = device_interface_detail_data.DevicePath.decode("gbk")
# print(device_path)
if device_path.find("pid") != -1:
# print(device_path)
if device_path.find("&mi_00#") != -1:
result.append(device_path)
else:
print("SetupDiGetDeviceInterfaceDetailA return:", GetLastError())
device_index += 1
return result
def open(self, path):
"""
:param path:
:return:
"""
handle = windll.kernel32.CreateFileA(c_char_p(bytes(path, "gbk")), 0xc0000000, 3, None, 3, 0x00000080, 0)
if handle == -1:
return False
self.handle = handle
return True
def close(self):
"""
"""
if self.handle:
windll.kernel32.CancelIo(self.handle)
windll.kernel32.CloseHandle(self.handle)
self.handle = None
def write(self, data):
"""
:param data:
:return:
"""
if self.handle == -1:
return -1
length = len(data)
buf = bytearray(data)
ret = windll.kernel32.WriteFile(self.handle, c_char_p(bytes(buf)), length, None, None)
return ret
def read(self, len, timeout):
"""
:param len:
:param timeout:
:return:
"""
if self.handle == -1:
return -1
buf = create_string_buffer(len)
bytes_read = c_ulong(0)
ret = windll.kernel32.ReadFile(self.handle, buf, len, byref(bytes_read), None)
if ret:
return bytes(buf)
else:
return None
================================================
FILE: mouse_mover/Win32ApiMover.py
================================================
from ctypes import windll
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
MOUSE_EVEN_TF_LEFT_DOWN = 0x2
MOUSE_EVEN_TF_LEFT_UP = 0x4
MOUSE_EVEN_TF_MIDDLE_DOWN = 0x20
MOUSE_EVEN_TF_MIDDLE_UP = 0x40
MOUSE_EVEN_TF_RIGHT_DOWN = 0x8
MOUSE_EVEN_TF_RIGHT_UP = 0x10
MOUSE_EVEN_TF_MOVE = 0x1
class Win32ApiMover(MouseMover):
def __init__(self, mouse_mover_param):
super().__init__(mouse_mover_param)
self.user32 = windll.user32
self.logger = LogFactory.getLogger(self.__class__)
def move_rp(self, x: int, y: int):
self.user32.mouse_event(MOUSE_EVEN_TF_MOVE, x, y)
def move(self, x, y):
self.move_rp(x, y)
def left_click(self):
self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_DOWN, 0, 0, 0, 0)
self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_UP, 0, 0, 0, 0)
def left_down(self):
self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_DOWN, 0, 0, 0, 0)
def left_up(self):
self.user32.mouse_event(MOUSE_EVEN_TF_LEFT_UP, 0, 0, 0, 0)
def right_down(self):
self.user32.mouse_event(MOUSE_EVEN_TF_RIGHT_DOWN, 0, 0, 0, 0)
def right_up(self):
self.user32.mouse_event(MOUSE_EVEN_TF_RIGHT_UP, 0, 0, 0, 0)
================================================
FILE: mouse_mover/WuYaMover.py
================================================
from ctypes import *
import win32com.client
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
class WuYaMover(MouseMover):
def __init__(self, mouse_mover_param):
# 进程内注册插件,模块所在的路径按照实际位置修改
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
vid_pid = mouse_mover_param["VID/PID"]
hkm_dll = windll.LoadLibrary("wy_hkm.dll")
hkm_dll.DllInstall.argtypes = (c_long, c_longlong)
if hkm_dll.DllInstall(1, 2) < 0:
self.logger.print_log("注册失败!")
vid = int(vid_pid[:4], 16)
pid = int(vid_pid[4:], 16)
try:
self.wy_hkm = win32com.client.Dispatch("wyp.hkm")
except Exception as e:
self.logger.print_log("创建对象失败!")
print(e)
version = self.wy_hkm.GetVersion()
self.logger.print_log("无涯键鼠盒子模块版本:" + hex(version))
dev_id = self.wy_hkm.SearchDevice(vid, pid, 0)
if dev_id == -1:
self.logger.print_log("未找到无涯键鼠盒子")
if not self.wy_hkm.Open(dev_id, 0):
self.logger.print_log("打开无涯键鼠盒子失败")
def move_rp(self, short_x: int, short_y: int):
self.wy_hkm.MoveRP(short_x, short_y)
def move(self, short_x: int, short_y: int):
self.wy_hkm.MoveR(short_x, short_y)
def left_click(self):
self.wy_hkm.LeftClick()
================================================
FILE: mouse_mover/__init__.py
================================================
================================================
FILE: net/__init__.py
================================================
================================================
FILE: net/socket/Client.py
================================================
import pickle # 用于序列化/反序列化数据
import socket
import threading
from auth.check_run import auth
from net.socket import SocketUtil
client_cache = {}
class Client:
"""
识别客户端
"""
# @auth
def __init__(self, socket_address, client_type):
self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.client_socket.connect(socket_address)
data = pickle.dumps(client_type)
SocketUtil.send(self.client_socket, data)
self.intention_lock = threading.Lock()
def compare_with_path(self, path, images, lock_score, discard_score):
"""
:param path:
:param images:
:param lock_score:
:param discard_score:
:return:
"""
with self.intention_lock:
data = (path, images, lock_score, discard_score)
# data = {"type": "compare_with_path", "data": (path, images, lock_score, discard_score)}
data = pickle.dumps(data)
SocketUtil.send(self.client_socket, data)
result_data = SocketUtil.recv(self.client_socket)
result = pickle.loads(result_data)
if result == 'msg:error':
return 0, 0
return result
def key_trigger(self, select_gun, select_scope, hot_pop):
"""
:param select_gun:
:param select_scope:
:param hot_pop:
"""
with self.intention_lock:
data = (select_gun, select_scope, hot_pop)
data = pickle.dumps(data)
SocketUtil.send(self.client_socket, data)
SocketUtil.recv(self.client_socket)
def mouse_mover(self, func_name, param):
"""
:param func_name:
:param param:
:return:
"""
with self.intention_lock:
data = (func_name, param)
data = pickle.dumps(data)
SocketUtil.send(self.client_socket, data)
SocketUtil.recv(self.client_socket)
def get_images_from_bbox(self, bbox_list):
"""
从服务获取截图,反向架构
"""
with self.intention_lock:
data = bbox_list
data = pickle.dumps(data)
SocketUtil.send(self.client_socket, data)
result_data = SocketUtil.recv(self.client_socket)
result = pickle.loads(result_data)
if result == 'msg:error':
return None
return result
================================================
FILE: net/socket/NetImageComparator.py
================================================
import re
import requests
from core.image_comparator.ImageComparator import ImageComparator
from log import LogFactory
headers_list = [
{
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36 CrKey/1.54.248666'
}, {
'user-agent': 'Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.188 Safari/537.36 CrKey/1.54.250320'
}, {
'user-agent': 'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+'
}, {
'user-agent': 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+'
}, {
'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'
}, {
'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'
}, {
'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true'
}, {
'user-agent': 'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)'
}, {
'user-agent': 'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36'
}, {
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1'
}, {
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
}, {
'user-agent': 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1'
}
]
net_file_cache = {}
class NetImageComparator(ImageComparator):
def __init__(self, base_path):
super().__init__(base_path)
# 用于缓存已下载图像的字典
self.image_cache = {}
self.logger = LogFactory.getLogger(self.__class__)
self.base_path = base_path
def read_file_from_url(self, url):
"""
:param url:
:return:
"""
try:
if url in net_file_cache:
return net_file_cache[url]
# 发送GET请求获取文件内容
# headers = random.choice(headers_list)
response = requests.get(url)
response.encoding = 'utf-8'
# 检查请求是否成功
if response.status_code == 200:
# 根据换行符切割文件内容并返回列表
text = response.text
lines = re.split(r'\r\n|\r|\n', text)
net_file_cache[url] = lines
return lines
else:
print(f"Failed to read file from URL. Status code: {response.status_code}")
return None
except Exception as e:
print(f"An error occurred: {e}")
return None
def cache_image(self, base_path, url):
# 如果图像已经在缓存中,直接返回缓存的图像
url = base_path + url
url = url.strip()
if url in self.image_cache:
return
self.logger.print_log(f"正在加载图片:{url.replace(self.base_path, '')}")
# 发送GET请求获取图片的二进制数据
# 发送GET请求获取文件内容
# headers = random.choice(headers_list)
response = requests.get(url)
# 检查请求是否成功
if response.status_code == 200:
# 将二进制数据转换为图像对象
image_bytes = response.content
# 将图像添加到缓存
self.image_cache[url] = image_bytes
else:
# 如果请求失败,打印错误信息
self.logger.print_log(f"Failed to download image: {url}. Status code: {response.status_code}")
================================================
FILE: net/socket/ReaSnowSelectGunSocket.py
================================================
import time
from core.SelectGun import SelectGun
from log import LogFactory
from net.socket.Client import Client
class ReaSnowSelectGunSocket:
"""
通过网络socket触发按键
"""
def __init__(self, select_gun: SelectGun, socket_address=("127.0.0.1", 12345)):
self.logger = LogFactory.getLogger(self.__class__)
self.client = Client(socket_address, "key_trigger")
select_gun.connect(self.trigger_button)
def trigger_button(self, select_gun, select_scope, hot_pop):
"""
:param select_gun:
:param select_scope:
:param hot_pop:
:return:
"""
if select_gun is None or select_scope is None:
return
start = time.time()
self.client.key_trigger(select_gun, select_scope, hot_pop)
self.logger.print_log(f"该次按键触发耗时:{int(1000 * (time.time() - start))}ms")
================================================
FILE: net/socket/Server.py
================================================
import pickle
import socket
import threading
import traceback
from auth.check_run import auth
from core.ReaSnowSelectGun import ReaSnowSelectGun
from core.screentaker.ScreenTaker import ScreenTaker
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
from net.socket import SocketUtil
class Server:
"""
识别服务端
"""
# @auth
def __init__(self, server_address, image_comparator, select_gun: ReaSnowSelectGun,
mouse_mover: MouseMover, c1_mouse_mover: MouseMover, screen_taker: ScreenTaker):
self.logger = LogFactory.getLogger(self.__class__)
self.server_address = server_address
self.image_comparator = image_comparator
self.mouse_mover = mouse_mover
self.c1_mouse_mover = c1_mouse_mover
self.select_gun = select_gun
self.screen_taker = screen_taker
self.server_socket = None
self.buffer_size = 4096
self.open()
def open(self):
"""
打开服务端
"""
# 创建一个TCP/IP套接字
self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# 绑定服务器地址和端口
self.server_socket.bind(self.server_address)
# 监听客户端连接
self.server_socket.listen(1)
def wait_client(self):
"""
监听
"""
while True:
self.logger.print_log('等待客户端连接...')
# 等待客户端连接
client_socket, client_address = self.server_socket.accept()
self.logger.print_log('客户端已连接:{}'.format(client_address))
data = SocketUtil.recv(client_socket)
data = pickle.loads(data)
self.logger.print_log("客户端类型:{}".format(data))
threading.Thread(target=self.listener, args=(client_socket, data)).start()
def listener(self, client_socket, data_type):
"""
:param data_type:
:param client_socket:
"""
try:
while True:
try:
data = SocketUtil.recv(client_socket)
data = pickle.loads(data)
if data_type == "compare_with_path":
result = self.image_comparator.compare_with_path(*data)
result_data = pickle.dumps(result)
SocketUtil.send(client_socket, result_data)
elif data_type == "key_trigger":
self.select_gun.trigger_button(*data)
SocketUtil.send(client_socket, pickle.dumps('ok'))
elif data_type == "mouse_mover" or data_type == "c1_mouse_mover":
func_name, param = data
self.logger.print_log(f"{data_type}:{func_name}({param})) ")
mouse_mover = getattr(self, data_type)
f = getattr(mouse_mover, func_name)
f(*param)
SocketUtil.send(client_socket, pickle.dumps('ok'))
elif data_type == "screen_taker":
images = self.screen_taker.get_images_from_bbox(data)
result_data = pickle.dumps(images)
SocketUtil.send(client_socket, result_data)
except Exception as e:
print(e)
traceback.print_exc()
SocketUtil.send(client_socket, pickle.dumps("msg:error"))
except Exception as e:
print(e)
traceback.print_exc()
finally:
# 关闭连接
try:
client_socket.close()
except Exception as e:
print(e)
traceback.print_exc()
================================================
FILE: net/socket/SocketImageComparator.py
================================================
from core.image_comparator.ImageComparator import ImageComparator
from log import LogFactory
from net.socket.Client import Client
class SocketImageComparator(ImageComparator):
def __init__(self, base_path, socket_address=("127.0.0.1", 12345)):
# 用于缓存已下载图像的字典
super().__init__(base_path)
self.image_cache = {}
self.logger = LogFactory.getLogger(self.__class__)
self.client = Client(socket_address, "compare_with_path")
def compare_with_path(self, path, images, lock_score, discard_score):
"""
截图范围与文件路径内的所有图片对比
:param path:
:param images:
:param lock_score:
:param discard_score:
:return:
"""
return self.client.compare_with_path(path, images, lock_score, discard_score)
================================================
FILE: net/socket/SocketMouseMover.py
================================================
from log import LogFactory
from mouse_mover.MouseMover import MouseMover
from net.socket.Client import Client
class SocketMouseMover(MouseMover):
def __init__(self, mouse_mover_param, mode="mouse_mover"):
super().__init__(mouse_mover_param)
self.logger = LogFactory.getLogger(self.__class__)
self.mode = mode
self.client = Client((mouse_mover_param["ip"], mouse_mover_param["port"]), mode)
self.listener = None
self.toggle_key_listener = None
def move_rp(self, x: int, y: int):
self.client.mouse_mover("move_rp", (x, y))
def move(self, x: int, y: int):
self.client.mouse_mover("move", (x, y))
def left_click(self):
self.client.mouse_mover("left_click", ())
def key_down(self, value):
self.client.mouse_mover("key_down", (value,))
def key_up(self, value):
self.client.mouse_mover("key_up", (value,))
def get_position(self):
return super().get_position()
def is_num_locked(self):
return super().is_num_locked()
def is_caps_locked(self):
return super().is_caps_locked()
def click_key(self, value):
self.client.mouse_mover("click_key", (value,))
def destroy(self):
"""
销毁
"""
self.listener.stop()
self.toggle_key_listener.destory()
def toggle_caps_lock(self, lock_status):
self.client.mouse_mover("toggle_caps_lock", (lock_status,))
def mouse_click(self, key, press):
self.client.mouse_mover("mouse_click", (key, press))
================================================
FILE: net/socket/SocketScreenTaker.py
================================================
from core.screentaker.ScreenTaker import ScreenTaker
from log import LogFactory
from net.socket.Client import Client
class SocketScreenTaker(ScreenTaker):
"""
网络截图
"""
def __init__(self, socket_address=("127.0.0.1", 12345)):
self.logger = LogFactory.getLogger(self.__class__)
self.client = Client(socket_address, "screen_taker")
def get_images_from_bbox(self, bbox_list):
return self.client.get_images_from_bbox(bbox_list)
================================================
FILE: net/socket/SocketUtil.py
================================================
def send(send_socket, byte_array, buffer_size=4096):
"""
:param send_socket:
:param byte_array:
:param buffer_size:
"""
send_socket.sendall(str(len(byte_array)).encode('utf-8'))
ready = send_socket.recv(buffer_size)
if ready == b'ready':
send_socket.sendall(byte_array)
def recv(recv_socket, buffer_size=4096):
"""
:param recv_socket:
:param buffer_size:
:return:
"""
data_length = recv_socket.recv(32)
if not data_length:
return None
recv_socket.send(b'ready')
data_length = int(data_length.decode('utf-8'))
recv_data_count = 0
recv_data = bytearray()
while recv_data_count < data_length:
if data_length - recv_data_count < buffer_size:
data_temp = recv_socket.recv(data_length - recv_data_count)
else:
data_temp = recv_socket.recv(buffer_size)
recv_data.extend(data_temp)
recv_data_count += len(data_temp)
return recv_data
================================================
FILE: net/socket/__init__.py
================================================
================================================
FILE: server.py
================================================
import sys
import threading
from PyQt5.QtWidgets import QApplication
from auth.check_run import open_check
from core.Config import Config
from core.GameWindowsStatus import GameWindowsStatus
from core.ReaSnowSelectGun import ReaSnowSelectGun
from core.image_comparator.LocalImageComparator import LocalImageComparator
from core.screentaker.LocalScreenTaker import LocalScreenTaker
from log import LogFactory
from mouse_mover import MoverFactory
from mouse_mover.MouseMover import MouseMover
from net.socket.NetImageComparator import NetImageComparator
from net.socket.Server import Server
from windows.SystemTrayApp import SystemTrayApp
# @open_check("apex_recoils_server")
def main():
"""
main
"""
app = QApplication(sys.argv)
# Tools.hide_process()
config = Config(default_ref_config_name="server")
game_windows_status = GameWindowsStatus()
if config.read_image_mode == "local":
image_comparator = LocalImageComparator(config.image_base_path)
else:
image_comparator = NetImageComparator(config.image_base_path)
mouse_mover: MouseMover = MoverFactory.get_mover(config=config,
mouse_model=config.server_mouse_mover,
game_windows_status=game_windows_status)
rea_snow_select_gun = None
if config.rea_snow_gun_config_name != '':
rea_snow_select_gun = ReaSnowSelectGun(mouse_mover=mouse_mover,
config_name=config.rea_snow_gun_config_name)
c1_mouse_mover: MouseMover = MoverFactory.get_mover(config=config,
mouse_model=config.mouse_mover,
game_windows_status=game_windows_status)
system_tray_app = SystemTrayApp("server")
server = Server(server_address=(config.distributed_param["ip"], config.distributed_param["port"]),
image_comparator=image_comparator,
select_gun=rea_snow_select_gun,
mouse_mover=mouse_mover,
c1_mouse_mover=c1_mouse_mover,
screen_taker=LocalScreenTaker())
threading.Thread(target=server.wait_client).start()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
================================================
FILE: test/__init__.py
================================================
================================================
FILE: test/cap_test.py
================================================
import cv2
from core.screentaker.CapScreenTaker import CapScreenTaker
from log import LogFactory
from net.socket.NetImageComparator import NetImageComparator
if __name__ == '__main__':
LogFactory.init_logger()
base_path = "http://1.15.138.227:9000/apex/images/"
screen_taker = CapScreenTaker({
"width": 2560,
"height": 1440,
"frame_rate": 144,
"format": "MJPG"
})
image_comparator = NetImageComparator(base_path)
image_path, x, y, w, h = "bag_cap.png", 779, 37, 897, 75
box = (int(x), int(y), int(w), int(h))
image_path = base_path + "licking/2560x1440/bag/" + image_path
# 显示两张图片
while True:
img = screen_taker.get_images_from_bbox([box])[0]
# 显示这帧内容
score = image_comparator.compare_image(img, image_path)
print(score)
# 如果按下 'q' 键则退出
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# 释放摄像头并关闭所有窗口
cv2.destroyAllWindows()
================================================
FILE: test/fei_test.py
================================================
import ctypes
class FeiMover:
"""
飞易来vip盒子,在python311下测试 ctypes.__version__==1.1.0
"""
def __init__(self, vid_pid):
# 进程内注册插件,模块所在的路径按照实际位置修改
self.dll = self.init_dll()
vid = int(vid_pid[:4], 16)
pid = int(vid_pid[4:], 16)
self.hdl = self.dll.M_Open_VidPid(vid, pid)
def move_rp(self, short_x: int, short_y: int):
self.dll.M_MoveR(self.hdl, short_x, short_y)
def move(self, short_x: int, short_y: int):
self.dll.M_MoveR2(self.hdl, short_x, short_y)
def left_click(self):
self.dll.M_LeftClick(self.hdl, 1)
def click_key(self, value):
self.dll.M_KeyPress(self.hdl, value, 1)
def init_dll(self):
objdll = ctypes.cdll.LoadLibrary(r".\msdk.dll")
# 定义函数原型
M_Open = objdll.M_Open
M_Open.argtypes = [ctypes.c_int]
M_Open.restype = ctypes.c_void_p
M_Open_VidPid = objdll.M_Open_VidPid
M_Open_VidPid.argtypes = [ctypes.c_int, ctypes.c_int]
M_Open_VidPid.restype = ctypes.c_void_p
M_KeyPress = objdll.M_KeyPress
M_KeyPress.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
M_KeyPress.restype = ctypes.c_int
M_KeyDown = objdll.M_KeyDown
M_KeyDown.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_KeyDown.restype = ctypes.c_int
M_KeyUp = objdll.M_KeyDown
M_KeyUp.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_KeyUp.restype = ctypes.c_int
M_LeftClick = objdll.M_LeftClick
M_LeftClick.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_LeftClick.restype = ctypes.c_int
M_LeftDown = objdll.M_LeftDown
M_LeftDown.argtypes = [ctypes.c_void_p]
M_LeftDown.restype = ctypes.c_int
M_LeftUp = objdll.M_LeftUp
M_LeftUp.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_LeftUp.restype = ctypes.c_int
M_RightClick = objdll.M_RightClick
M_RightClick.argtypes = [ctypes.c_void_p, ctypes.c_int]
M_RightClick.restype = ctypes.c_int
M_RightDown = objdll.M_RightDown
M_RightDown.argtypes = [ctypes.c_void_p]
M_RightDown.restype = ctypes.c_int
M_RightUp = objdll.M_RightUp
M_RightUp.argtypes = [ctypes.c_void_p]
M_RightUp.restype = ctypes.c_int
# 拟人移动
M_MoveR2 = objdll.M_MoveR2
M_MoveR2.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
M_MoveR2.restype = ctypes.c_int
# 无拟人移动
M_MoveR = objdll.M_MoveR
M_MoveR.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
M_MoveR.restype = ctypes.c_int
M_Close = objdll.M_Close
M_Close.argtypes = [ctypes.c_void_p]
M_Close.restype = ctypes.c_int
return objdll
fei = FeiMover("C2160102")
fei.move_rp(100, 100)
================================================
FILE: test/image_match/__init__.py
================================================
================================================
FILE: test/image_match/image_match.py
================================================
import time
import cv2
import numpy as np
def match_template(origin_image, match_image_list, save_image=False, early_termination=True, threshold=0.6,
dynamic_range=0.5):
# 转换为灰度图
image_gray = cv2.cvtColor(origin_image, cv2.COLOR_BGR2GRAY)
found_list = []
temp_scale = None
for match_image in match_image_list:
template_gray = cv2.cvtColor(match_image, cv2.COLOR_BGR2GRAY)
# 获取模板的原始宽高
template_height, template_width = template_gray.shape[:2]
found = None
# 定义缩放范围
if temp_scale is None:
scales = np.linspace(1 - dynamic_range, 1 + dynamic_range, 5)
else:
scales = np.linspace(temp_scale - dynamic_range, temp_scale + dynamic_range, 5)
for scale in scales:
resized = cv2.resize(template_gray, (int(template_width * scale), int(template_height * scale)))
r = float(resized.shape[1]) / template_gray.shape[1]
if resized.shape[0] > image_gray.shape[0] or resized.shape[1] > image_gray.shape[1]:
continue
result = cv2.matchTemplate(image_gray, resized, cv2.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result)
if found is None or max_val > found[0]:
found = (max_val, max_loc, r)
if found[0] > threshold:
temp_scale = scale
print(scales)
break
if found is not None and found[0] >= threshold:
max_val, max_loc, r = found
print(f"Match found with value: {max_val}")
start_x, start_y = int(max_loc[0]), int(max_loc[1])
end_x, end_y = int((max_loc[0] + template_width * r)), int((max_loc[1] + template_height * r))
found_list.append((start_x, start_y, end_x, end_y))
if early_termination:
break
else:
print("no found")
if save_image and len(found_list) > 0:
for found in found_list:
# 在原图上绘制矩形框
cv2.rectangle(origin_image, (found[0], found[1]), (found[2], found[3]), (0, 255, 0), 2)
cv2.imwrite('result.png', origin_image)
if __name__ == '__main__':
# 读取图像
image_path = 'box.png' # 替换为你的大图路径
image = cv2.imread(image_path)
template_path = ['s.png', 's2.png', 's3.png'] # 替换为你要查找的小图路径
template_image = [cv2.imread(template) for template in template_path]
start = time.time()
match_template(image, template_image, save_image=True, early_termination=False)
end = time.time()
print(f"Match template time: {int((end - start) * 1000)}ms")
================================================
FILE: test/test.py
================================================
import os
print(os.path.expanduser('~'))
================================================
FILE: tools/Tools.py
================================================
import ctypes
import os
import queue
import threading
import time
from io import BytesIO
from shutil import copyfile
import cv2
import numpy as np
import win32gui
from skimage.metrics import structural_similarity
from collections import deque
import mss
class Tools:
"""
工具类
"""
@staticmethod
def get_resolution():
"""
获取当前屏幕分辨率
:return:
"""
user32 = ctypes.windll.user32
user32.SetProcessDPIAware(2)
[xw, yh] = [user32.GetSystemMetrics(0), user32.GetSystemMetrics(1)]
return xw, yh
@staticmethod
def compare_image(img, path_image):
"""
图片对比
:param img:
:param path_image:
:return:
"""
buffer = BytesIO()
img.save(buffer, format="PNG")
buffer.seek(0)
image_a = cv2.imdecode(np.frombuffer(buffer.getvalue(), dtype=np.uint8), cv2.IMREAD_COLOR)
buffer.close()
image_b = cv2.imdecode(np.fromfile(path_image, dtype=np.uint8), cv2.IMREAD_COLOR)
gray_a = cv2.cvtColor(image_a, cv2.COLOR_BGR2GRAY)
gray_b = cv2.cvtColor(image_b, cv2.COLOR_BGR2GRAY)
(score, diff) = structural_similarity(gray_a, gray_b, full=True)
return score
def mss_shot(sel, bbox):
with mss.mss() as sct:
return sct.grab(bbox)
@staticmethod
def current_milli_time():
"""
获取当前时间戳13位
:return:
"""
return int(round(time.time() * 1000))
@staticmethod
def copy_file(source_path, target_path):
"""
复制文件
:param source_path:
:param target_path:
"""
op = os.path
if isinstance(source_path, str):
if op.exists(source_path):
copyfile(source_path, target_path)
else:
print("源文件不存在")
@staticmethod
def convert_to_decimal(input_str):
try:
# 尝试将输入字符串解析为16进制数字
decimal_value = int(input_str, 10)
except ValueError:
try:
# 如果解析失败,则尝试将输入字符串解析为10进制数字
decimal_value = int(input_str, 16)
except ValueError:
# 如果两者都失败,返回一个适当的错误或默认值
# print("无法解析输入字符串为数字")
return None
return decimal_value
@staticmethod
def is_apex_windows():
"""
是否处于apex窗口中
:return:
"""
window_handle = win32gui.GetForegroundWindow()
window_title = win32gui.GetWindowText(window_handle)
return window_title == 'Apex Legends'
@staticmethod
def hide_process():
try:
# 获取进程ID
pid = ctypes.windll.kernel32.GetCurrentProcessId()
# 获取进程句柄
handle = ctypes.windll.kernel32.OpenProcess(1, False, pid)
# 隐藏进程窗口
ctypes.windll.user32.ShowWindow(handle, 0)
ctypes.windll.kernel32.CloseHandle(handle)
except Exception as e:
print(f"Error: {e}")
class FixedSizeQueue:
"""
固定长度队列
"""
def __init__(self, max_size):
self.queue = deque(maxlen=max_size)
def push(self, item):
"""
将数据入队
:param item:
"""
self.queue.append(item)
def pop(self):
"""
出队最先入队的数据
:return:
"""
return self.queue.popleft()
def size(self):
"""
获取队列当前数据量
:return:
"""
return len(self.queue)
def get_last(self):
"""
获取最后入队的数据,不出队
:return:
"""
# 获取最后一次进队的元素但不出队
return self.queue[-1] if self.queue else None
class GetBlockQueue:
"""
阻塞队列
"""
def __init__(self, name, maxsize=1):
self.name = name
self.lock = threading.Lock()
self.queue = queue.Queue(maxsize=maxsize)
def get(self):
o = self.queue.get()
return o
def put(self, data):
with self.lock:
while True:
try:
self.queue.put(data, block=False)
break
except queue.Full:
try:
self.queue.get_nowait()
except queue.Empty:
pass
def clear(self):
with self.lock:
while not self.queue.empty():
self.queue.get()
================================================
FILE: tools/__init__.py
================================================
================================================
FILE: tools/image_tool.conf
================================================
[conf]
path = temp
bbox = 991,37,1112,77
print_screen_key = f
================================================
FILE: tools/image_tool.py
================================================
import cv2
import numpy as np
from PIL import ImageGrab
import configparser
from pynput.keyboard import Controller, Listener
from core.screentaker.CapScreenTaker import CapScreenTaker
from core.screentaker.LocalMssScreenTaker import LocalMssScreenTaker
from log import LogFactory
config = configparser.ConfigParser() # 创建对象
config.read("image_tool.conf", encoding="utf-8")
path = config.get("conf", "path") # 需要保存到E盘的目录文件名
bbox = tuple(int(x) for x in config.get("conf", "bbox").split(","))
print_screen_key = config.get("conf", "print_screen_key")
keyboard = Controller()
i = 1
LogFactory.init_logger()
# screen_taker = CapScreenTaker({
# "width": 2560,
# "height": 1440,
# "frame_rate": 144,
# "format": "MJPG"
# })
screen_taker = LocalMssScreenTaker()
def on_press(key):
# print('{0} 被按下'.format(key))
pass
# 释放按钮,按esc按键会退出监听
def on_release(key):
# print('{0} 被释放'.format(key))
global i
if not hasattr(key, 'name') and (key.char == print_screen_key):
# img = ImageGrab.grab(bbox=bbox) # 也可以不传参数,默认截取整个屏幕
# img.save(path + str(i) + ".png") # 保存到E盘目录
img = screen_taker.get_images_from_bbox([bbox])[0]
img = np.array(img)
cv2.imwrite(path + str(i) + ".png", img)
print('截图保存成功')
i += 1
# 创建监听
with Listener(on_press=on_press, on_release=on_release) as listener:
listener.join()
# imsrc = ac.imread(path) # 需要用aircv转换,方便cv2.imshow函数打开
# cv2.imshow('python屏幕截图后自动打开该图片', imsrc)
# cv2.waitKey(0)
# cv2.destroyAllWindows()
================================================
FILE: windows/SystemTrayApp.py
================================================
import os
import sys
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QSystemTrayIcon, QMenu, QAction, QMainWindow
from log import LogFactory
class SystemTrayApp(QMainWindow):
"""
系统托盘
"""
def __init__(self, icon_path):
super().__init__()
self.logger = LogFactory.getLogger(self.__class__)
self.tray_menu = None
self.tray_icon = None
if not QSystemTrayIcon.isSystemTrayAvailable():
self.logger.print_log("系统托盘不可用")
return
path = f"images/{icon_path}.png"
if not os.path.exists(path):
bundle_dir = getattr(sys, '_MEIPASS', os.path.abspath(os.path.dirname(__file__)))
path = os.path.join(bundle_dir, f"images/{icon_path}.png")
if not os.path.exists(path):
self.logger.print_log("无法找到图标")
self.icon = QIcon(path)
if self.icon.isNull():
self.logger.print_log("无效的图标")
return
self.exit_action = QAction("退出", self)
self.init_icon()
def init_icon(self):
self.tray_menu = QMenu(self)
self.tray_menu.addAction(self.exit_action)
self.exit_action.triggered.connect(self.exit_app)
self.tray_icon = QSystemTrayIcon(self)
self.tray_icon.setIcon(self.icon)
self.tray_icon.setContextMenu(self.tray_menu)
self.tray_icon.show()
def exit_app(self):
self.tray_icon.hide()
os._exit(0)
================================================
FILE: windows/__init__.py
================================================