├── .gitignore
├── HeartBroken.ico
├── LICENSE.md
├── README.md
├── add_setting.py
├── assets
├── LaetitiaMinionCrop.webp
├── Wich.webp
├── Wich
│ ├── Wich_00000.png
│ ├── Wich_00001.png
│ ├── Wich_00002.png
│ ├── Wich_00003.png
│ ├── Wich_00004.png
│ ├── Wich_00005.png
│ ├── Wich_00006.png
│ ├── Wich_00007.png
│ ├── Wich_00008.png
│ ├── Wich_00009.png
│ ├── Wich_00010.png
│ ├── Wich_00011.png
│ ├── Wich_00012.png
│ ├── Wich_00013.png
│ ├── Wich_00014.png
│ ├── Wich_00015.png
│ ├── Wich_00016.png
│ ├── Wich_00017.png
│ ├── Wich_00018.png
│ ├── Wich_00019.png
│ ├── Wich_00020.png
│ ├── Wich_00021.png
│ ├── Wich_00022.png
│ └── Wich_00023.png
├── back_button_1690.png
├── back_button_fullscreen.png
├── bus_1690.png
├── bus_fullscreen.png
├── button_close_1690.png
├── button_close_fullscreen.png
├── button_ip_1690.png
├── button_ip_fullscreen.png
├── button_setting_1690.png
├── button_setting_fullscreen.png
├── button_sk_1690.png
├── button_sk_fullscreen.png
├── button_yes2_1690.png
├── button_yes2_fullscreen.png
├── button_yes_1690.png
├── button_yes_fullscreen.png
├── censored.png
├── chair_1690.png
├── chair_fullscreen.png
├── ego1_1690.png
├── ego1_fullscreen.png
├── ego2_1690.png
├── ego2_fullscreen.png
├── ego3_1690.png
├── ego3_fullscreen.png
├── ego4_1690.png
├── ego4_fullscreen.png
├── en
│ ├── bad_en_1690.png
│ ├── bad_en_fullscreen.png
│ ├── badbad_en_1690.png
│ ├── badbad_en_fullscreen.png
│ ├── button_vote1_en_1690.png
│ ├── button_vote1_en_fullscreen.png
│ ├── button_vote2_en_1690.png
│ ├── button_vote2_en_fullscreen.png
│ ├── button_vote3_en_1690.png
│ ├── button_vote3_en_fullscreen.png
│ ├── button_vote4_en_1690.png
│ ├── button_vote4_en_fullscreen.png
│ ├── button_vote5_en_1690.png
│ ├── button_vote5_en_fullscreen.png
│ ├── death_en_1690.png
│ └── death_en_fullscreen.png
├── encounter_1690.png
├── encounter_fullscreen.png
├── gear2_1690.png
├── gear2_fullscreen.png
├── gear_1690.png
├── gear_fullscreen.png
├── gifts
│ ├── ashes2_1690.png
│ ├── ashes_1690.png
│ ├── back_1690.png
│ ├── backplz_1690.png
│ ├── battery2_1690.png
│ ├── battery_1690.png
│ ├── branch2_1690.png
│ ├── branch_1690.png
│ ├── button_yes3_1690.png
│ ├── button_yes4_1690.png
│ ├── dust2_1690.png
│ ├── dust_1690.png
│ ├── gifts_checked_1690.png
│ ├── horseshoe2_1690.png
│ ├── horseshoe_1690.png
│ ├── leaf2_1690.png
│ ├── leaf_1690.png
│ ├── muzzle2_1690.png
│ ├── muzzle_1690.png
│ ├── normal_1690.png
│ ├── over_1690.png
│ ├── refresh_1690.png
│ ├── wire2_1690.png
│ └── wire_1690.png
├── jp
│ ├── bad_jp_1690.png
│ ├── bad_jp_fullscreen.png
│ ├── badbad_jp_1690.png
│ ├── badbad_jp_fullscreen.png
│ ├── button_vote1_jp_1690.png
│ ├── button_vote1_jp_fullscreen.png
│ ├── button_vote2_jp_1690.png
│ ├── button_vote2_jp_fullscreen.png
│ ├── button_vote3_jp_1690.png
│ ├── button_vote3_jp_fullscreen.png
│ ├── button_vote4_jp_1690.png
│ ├── button_vote4_jp_fullscreen.png
│ ├── button_vote5_jp_1690.png
│ ├── button_vote5_jp_fullscreen.png
│ ├── death_jp_1690.png
│ └── death_jp_fullscreen.png
├── kr
│ ├── bad_kr_1690.png
│ ├── bad_kr_fullscreen.png
│ ├── badbad_kr_1690.png
│ ├── badbad_kr_fullscreen.png
│ ├── button_vote1_kr_1690.png
│ ├── button_vote1_kr_fullscreen.png
│ ├── button_vote2_kr_1690.png
│ ├── button_vote2_kr_fullscreen.png
│ ├── button_vote3_kr_1690.png
│ ├── button_vote3_kr_fullscreen.png
│ ├── button_vote4_kr_1690.png
│ ├── button_vote4_kr_fullscreen.png
│ ├── button_vote5_kr_1690.png
│ ├── button_vote5_kr_fullscreen.png
│ ├── death_kr_1690.png
│ └── death_kr_fullscreen.png
├── melancholy_1690.png
├── melancholy_fullscreen.png
├── option_1690.png
├── option_fullscreen.png
├── other
│ ├── 1_fullscreen.png
│ ├── 2_1690.png
│ └── 2_fullscreen.png
├── setting_button.png
├── stage_1690.png
├── stage_fullscreen.png
├── store_1690.png
├── store_fullscreen.png
└── zh
│ ├── bad_zh_1690.png
│ ├── bad_zh_fullscreen.png
│ ├── badbad_zh_1690.png
│ ├── badbad_zh_fullscreen.png
│ ├── button_vote1_zh_1690.png
│ ├── button_vote1_zh_fullscreen.png
│ ├── button_vote2_zh_1690.png
│ ├── button_vote2_zh_fullscreen.png
│ ├── button_vote3_zh_1690.png
│ ├── button_vote3_zh_fullscreen.png
│ ├── button_vote4_zh_1690.png
│ ├── button_vote4_zh_fullscreen.png
│ ├── button_vote5_zh_1690.png
│ ├── button_vote5_zh_fullscreen.png
│ ├── death_zh_1690.png
│ ├── death_zh_fullscreen.png
│ └── rename.ipynb
├── flet_test
├── keyboard-events.py
└── setting_page_test.py
├── main.py
├── models
├── japan_PP-OCRv3_rec_infer.onnx
└── korean_PP-OCRv3_rec_infer.onnx
├── onnxruntime_providers_shared.dll
├── opencv_test
├── center_hole_maker.py
├── contour_rectangle.py
├── find_and_draw_rotated_bounding_rectangles.py
├── find_skip_button.py
├── hls_filter_multi.py
├── hsl_image_filter.py
├── orb_test.py
└── subtraction_operation.py
├── pack.bat
├── requirements.txt
├── settings.ini
├── test
├── Snipaste_2024-02-25_14-20-24.png
├── Snipaste_2024-02-26_23-00-27.png
└── pp.png
├── text_test
├── get_choice_json.py
└── the_fuss_test.py
└── workbench
├── __init__.py
├── choices_dict.json
├── ego_gift.py
├── file_path_utils.py
├── image_processing.py
├── keyboard_control.py
├── logging_utils.py
├── main_work.py
├── mission_handling.py
├── mouse_control.py
├── ocr_utils.py
├── read_settings.py
├── ui_config.py
└── worklist.json
/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__
2 | /log/
3 | /venv/
4 | main.spec
5 | dist
6 | build
7 | .idea
--------------------------------------------------------------------------------
/HeartBroken.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/HeartBroken.ico
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Limbug⚠Clicker
2 |
3 | > Limbus Company挂机脚本
4 |
5 |
6 |
7 | ### 脚本发布🍺4.1.0
8 | - 百度网盘→[点击跳转](https://pan.baidu.com/s/1XoUBqNN0wa81663HuXHxXA),提取码`0e14`
9 | - Github Releases → [点击跳转](https://github.com/Xie-Tiao/Limbus-Scripts/releases)
10 | ### 使用说明⭐
11 | - 分辨率只支持``1920*1080``或``1600 x 900``
12 | - 语言支持**日韩英**,但是英韩没怎么测,可能存在bug
13 | - 有问题请提[issue](https://github.com/Xie-Tiao/Limbus-Scripts/issues),或者加q群[660753997](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=A7d_y-nT8veLireU5jjEjirEeL-PYHEO&authKey=CKGZp1EMeELWo9TVNviGCBfM7GVWElcye8qMxsNpHh168kMoDf449GQr5OFvak9P&noverify=0&group_code=660753997)
14 | - 📺[bilibili视频教程](https://www.bilibili.com/video/BV19P411h7Wx)
15 |
16 | 
17 | ---
18 | ### 2024.3.10更新
19 | - 目前版本为4.1.0
20 | - 新增阵亡重开开关
21 | - 支持了零协汉化
22 | - 全屏识别图片换高清
23 |
24 | #### 预计新加功能
25 | - [ ] 全自动挂机
26 | - [ ] 利用**特征识别**适应任意分辨率
27 | - [ ] pyautogui库完全替换成Camreishi写的组件
28 |
29 |
30 |
31 | ### ~~2024.3.3更新~~
32 | - ~~目前版本为4.0.2~~
33 | - ~~先感谢[Camreishi佬](https://github.com/Camreishi)帮了很多忙~~
34 | - ~~新增内容~~
35 | - ~~英日韩三语支持~~
36 | - ~~辅助使用ego~~
37 | - ~~队友死亡自动重开~~
38 | - ~~设置界面~~
39 | - ~~语言选择~~
40 | - ~~自定义窗口置顶与否~~
41 | - ~~是否使用ego~~
42 | - ~~**桌宠模式**~~
43 | - ~~点击 **蕾蒂希娅** 即可***暂停***,且暂停时动画也跟着暂停~~
44 |
45 | ---
46 |
47 | ### ~~2023.9.23更新~~
48 | - ~~目前版本为3.1.3~~
49 | - ~~兼容了win7~~
50 | - ~~去掉了等待时间,现在脚本的运行速度取决于你的电脑性能~~
51 | - ~~异想体事件“低い”补充~~
52 | ---
53 |
54 | ### ~~2023.9.3更新~~
55 | - ~~目前版本为3.1.2~~
56 | - ~~使用门槛降低了,只要会摁鼠标就能用~~
57 | - ~~主要是想做的更轻量一点,但发现实现起来困难重重,索性先这样吧~~
58 | ---
59 |
60 | ### ~~2023.7.5更新~~
61 | - ~~目前版本为2.3.3~~
62 | - ~~没做大改动,适配了一下新的镜牢~~
63 | ### ~~使用说明~~
64 | - ~~默认分辨率为``1920*1080``,其他分辨率应该也能用~~
65 | - ~~语言必须是**日语**,否则不生效~~
66 | - ~~脚本仍是**半成品**,仅支持战斗界面、事件界面的自动化~~
67 | - ~~**注意:** 镜牢选**商店**、**椅子**等休息处可能会出bug,建议避开~~
68 | 1. ~~根据`requirements.txt`配置环境~~
69 | 2. ~~建议直接在`.py`脚本文件所在路径打开cmd~~
70 | 3. ~~在配置环境对应版本python中输入`python main.py`即可运行脚本~~
71 | - ~~**注意:** 保证`assets`文件夹与`.py`文件在同一路径下~~
72 | ### ~~预计下次更新~~
73 | - [ ] ~~重新用Js编写脚本~~
74 | - [ ] ~~重新用Electron配合Js搭建前端UI~~
75 | - [ ] ~~真正实现轻量级~~
76 |
77 | 记录
78 | 2023.5.22
79 |
80 | - 方案 1:继续装opencv,用vs2022开发
81 |
- 方案 2:研究其他语言py结合方法
82 |
83 |
84 |
85 | ---
86 |
87 | ### ~~2023.5.21更新~~
88 | - ~~脚本命名更为**Limbug Clicker**,目前版本为2.2.2~~
89 | - ~~前端GUI编码使用了`Flet`库,打包后的.exe有*427MB*,且启动耗时长~~
90 | - ~~重新分类整理了代码、图片资源~~
91 | ---
92 | ### ~~**2023.4.30发布**~~
93 | ### ~~**使用说明**~~
94 | - ~~基于python的`pyautogui`库编写了脚本~~
95 | 1. ~~直接在`.py`脚本文件所在位置打开cmd~~
96 | 2. ~~输入`python LBhelper2.0.py`~~
97 | 3. ~~**注意:** 保证`cmd.xls`文件与`.py`文件以及`.png`文件在同一位置~~
98 | 4. pyinstaller -D -w -i HeartBroken.ico main.py
99 |
--------------------------------------------------------------------------------
/add_setting.py:
--------------------------------------------------------------------------------
1 | import configparser
2 |
3 | config = configparser.ConfigParser()
4 | # config.read('settings.ini')
5 | config.add_section('Language')
6 | config.add_section('Shortcut')
7 | config.set('Shortcut', 'Shortcut1', 'P')
8 | config.set('Shortcut', 'Shortcut2', 'Q')
9 | with open('settings.ini', 'w') as f:
10 | config.write(f)
11 |
--------------------------------------------------------------------------------
/assets/LaetitiaMinionCrop.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/LaetitiaMinionCrop.webp
--------------------------------------------------------------------------------
/assets/Wich.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich.webp
--------------------------------------------------------------------------------
/assets/Wich/Wich_00000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00000.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00001.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00002.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00003.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00004.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00005.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00006.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00007.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00008.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00009.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00010.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00011.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00012.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00013.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00014.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00015.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00016.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00017.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00018.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00019.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00020.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00021.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00021.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00022.png
--------------------------------------------------------------------------------
/assets/Wich/Wich_00023.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/Wich/Wich_00023.png
--------------------------------------------------------------------------------
/assets/back_button_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/back_button_1690.png
--------------------------------------------------------------------------------
/assets/back_button_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/back_button_fullscreen.png
--------------------------------------------------------------------------------
/assets/bus_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/bus_1690.png
--------------------------------------------------------------------------------
/assets/bus_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/bus_fullscreen.png
--------------------------------------------------------------------------------
/assets/button_close_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_close_1690.png
--------------------------------------------------------------------------------
/assets/button_close_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_close_fullscreen.png
--------------------------------------------------------------------------------
/assets/button_ip_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_ip_1690.png
--------------------------------------------------------------------------------
/assets/button_ip_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_ip_fullscreen.png
--------------------------------------------------------------------------------
/assets/button_setting_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_setting_1690.png
--------------------------------------------------------------------------------
/assets/button_setting_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_setting_fullscreen.png
--------------------------------------------------------------------------------
/assets/button_sk_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_sk_1690.png
--------------------------------------------------------------------------------
/assets/button_sk_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_sk_fullscreen.png
--------------------------------------------------------------------------------
/assets/button_yes2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_yes2_1690.png
--------------------------------------------------------------------------------
/assets/button_yes2_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_yes2_fullscreen.png
--------------------------------------------------------------------------------
/assets/button_yes_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_yes_1690.png
--------------------------------------------------------------------------------
/assets/button_yes_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/button_yes_fullscreen.png
--------------------------------------------------------------------------------
/assets/censored.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/censored.png
--------------------------------------------------------------------------------
/assets/chair_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/chair_1690.png
--------------------------------------------------------------------------------
/assets/chair_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/chair_fullscreen.png
--------------------------------------------------------------------------------
/assets/ego1_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego1_1690.png
--------------------------------------------------------------------------------
/assets/ego1_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego1_fullscreen.png
--------------------------------------------------------------------------------
/assets/ego2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego2_1690.png
--------------------------------------------------------------------------------
/assets/ego2_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego2_fullscreen.png
--------------------------------------------------------------------------------
/assets/ego3_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego3_1690.png
--------------------------------------------------------------------------------
/assets/ego3_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego3_fullscreen.png
--------------------------------------------------------------------------------
/assets/ego4_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego4_1690.png
--------------------------------------------------------------------------------
/assets/ego4_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/ego4_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/bad_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/bad_en_1690.png
--------------------------------------------------------------------------------
/assets/en/bad_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/bad_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/badbad_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/badbad_en_1690.png
--------------------------------------------------------------------------------
/assets/en/badbad_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/badbad_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/button_vote1_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote1_en_1690.png
--------------------------------------------------------------------------------
/assets/en/button_vote1_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote1_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/button_vote2_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote2_en_1690.png
--------------------------------------------------------------------------------
/assets/en/button_vote2_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote2_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/button_vote3_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote3_en_1690.png
--------------------------------------------------------------------------------
/assets/en/button_vote3_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote3_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/button_vote4_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote4_en_1690.png
--------------------------------------------------------------------------------
/assets/en/button_vote4_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote4_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/button_vote5_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote5_en_1690.png
--------------------------------------------------------------------------------
/assets/en/button_vote5_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/button_vote5_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/en/death_en_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/death_en_1690.png
--------------------------------------------------------------------------------
/assets/en/death_en_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/en/death_en_fullscreen.png
--------------------------------------------------------------------------------
/assets/encounter_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/encounter_1690.png
--------------------------------------------------------------------------------
/assets/encounter_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/encounter_fullscreen.png
--------------------------------------------------------------------------------
/assets/gear2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gear2_1690.png
--------------------------------------------------------------------------------
/assets/gear2_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gear2_fullscreen.png
--------------------------------------------------------------------------------
/assets/gear_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gear_1690.png
--------------------------------------------------------------------------------
/assets/gear_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gear_fullscreen.png
--------------------------------------------------------------------------------
/assets/gifts/ashes2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/ashes2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/ashes_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/ashes_1690.png
--------------------------------------------------------------------------------
/assets/gifts/back_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/back_1690.png
--------------------------------------------------------------------------------
/assets/gifts/backplz_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/backplz_1690.png
--------------------------------------------------------------------------------
/assets/gifts/battery2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/battery2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/battery_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/battery_1690.png
--------------------------------------------------------------------------------
/assets/gifts/branch2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/branch2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/branch_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/branch_1690.png
--------------------------------------------------------------------------------
/assets/gifts/button_yes3_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/button_yes3_1690.png
--------------------------------------------------------------------------------
/assets/gifts/button_yes4_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/button_yes4_1690.png
--------------------------------------------------------------------------------
/assets/gifts/dust2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/dust2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/dust_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/dust_1690.png
--------------------------------------------------------------------------------
/assets/gifts/gifts_checked_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/gifts_checked_1690.png
--------------------------------------------------------------------------------
/assets/gifts/horseshoe2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/horseshoe2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/horseshoe_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/horseshoe_1690.png
--------------------------------------------------------------------------------
/assets/gifts/leaf2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/leaf2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/leaf_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/leaf_1690.png
--------------------------------------------------------------------------------
/assets/gifts/muzzle2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/muzzle2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/muzzle_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/muzzle_1690.png
--------------------------------------------------------------------------------
/assets/gifts/normal_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/normal_1690.png
--------------------------------------------------------------------------------
/assets/gifts/over_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/over_1690.png
--------------------------------------------------------------------------------
/assets/gifts/refresh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/refresh_1690.png
--------------------------------------------------------------------------------
/assets/gifts/wire2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/wire2_1690.png
--------------------------------------------------------------------------------
/assets/gifts/wire_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/gifts/wire_1690.png
--------------------------------------------------------------------------------
/assets/jp/bad_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/bad_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/bad_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/bad_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/badbad_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/badbad_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/badbad_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/badbad_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/button_vote1_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote1_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/button_vote1_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote1_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/button_vote2_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote2_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/button_vote2_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote2_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/button_vote3_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote3_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/button_vote3_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote3_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/button_vote4_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote4_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/button_vote4_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote4_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/button_vote5_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote5_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/button_vote5_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/button_vote5_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/jp/death_jp_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/death_jp_1690.png
--------------------------------------------------------------------------------
/assets/jp/death_jp_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/jp/death_jp_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/bad_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/bad_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/bad_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/bad_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/badbad_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/badbad_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/badbad_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/badbad_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/button_vote1_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote1_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/button_vote1_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote1_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/button_vote2_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote2_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/button_vote2_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote2_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/button_vote3_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote3_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/button_vote3_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote3_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/button_vote4_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote4_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/button_vote4_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote4_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/button_vote5_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote5_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/button_vote5_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/button_vote5_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/kr/death_kr_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/death_kr_1690.png
--------------------------------------------------------------------------------
/assets/kr/death_kr_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/kr/death_kr_fullscreen.png
--------------------------------------------------------------------------------
/assets/melancholy_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/melancholy_1690.png
--------------------------------------------------------------------------------
/assets/melancholy_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/melancholy_fullscreen.png
--------------------------------------------------------------------------------
/assets/option_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/option_1690.png
--------------------------------------------------------------------------------
/assets/option_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/option_fullscreen.png
--------------------------------------------------------------------------------
/assets/other/1_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/other/1_fullscreen.png
--------------------------------------------------------------------------------
/assets/other/2_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/other/2_1690.png
--------------------------------------------------------------------------------
/assets/other/2_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/other/2_fullscreen.png
--------------------------------------------------------------------------------
/assets/setting_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/setting_button.png
--------------------------------------------------------------------------------
/assets/stage_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/stage_1690.png
--------------------------------------------------------------------------------
/assets/stage_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/stage_fullscreen.png
--------------------------------------------------------------------------------
/assets/store_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/store_1690.png
--------------------------------------------------------------------------------
/assets/store_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/store_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/bad_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/bad_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/bad_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/bad_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/badbad_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/badbad_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/badbad_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/badbad_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/button_vote1_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote1_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/button_vote1_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote1_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/button_vote2_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote2_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/button_vote2_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote2_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/button_vote3_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote3_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/button_vote3_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote3_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/button_vote4_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote4_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/button_vote4_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote4_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/button_vote5_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote5_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/button_vote5_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/button_vote5_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/death_zh_1690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/death_zh_1690.png
--------------------------------------------------------------------------------
/assets/zh/death_zh_fullscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/assets/zh/death_zh_fullscreen.png
--------------------------------------------------------------------------------
/assets/zh/rename.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "import os\n",
10 | "import shutil\n",
11 | "\n",
12 | "# 获取文件夹中的所有文件名\n",
13 | "file_names = os.listdir('./')\n",
14 | "\n",
15 | "# 循环遍历每个文件名\n",
16 | "for file_name in file_names:\n",
17 | " # 分离文件名和扩展名\n",
18 | " old_file_name, old_ext = os.path.splitext(file_name)\n",
19 | " # 重命名文件\n",
20 | " new_file_name = old_file_name.replace('en', 'zh') + old_ext\n",
21 | " shutil.move('./' + file_name, './' + new_file_name)"
22 | ]
23 | }
24 | ],
25 | "metadata": {
26 | "kernelspec": {
27 | "display_name": "py310",
28 | "language": "python",
29 | "name": "python3"
30 | },
31 | "language_info": {
32 | "codemirror_mode": {
33 | "name": "ipython",
34 | "version": 3
35 | },
36 | "file_extension": ".py",
37 | "mimetype": "text/x-python",
38 | "name": "python",
39 | "nbconvert_exporter": "python",
40 | "pygments_lexer": "ipython3",
41 | "version": "3.9.13"
42 | }
43 | },
44 | "nbformat": 4,
45 | "nbformat_minor": 2
46 | }
47 |
--------------------------------------------------------------------------------
/flet_test/keyboard-events.py:
--------------------------------------------------------------------------------
1 | import json
2 | import time
3 |
4 | import flet
5 | from flet import Container, Page, Row, Text, border, colors, KeyboardEvent
6 |
7 |
8 | class ButtonControl(Container):
9 | def __init__(self, text):
10 | super().__init__()
11 | self.content = Text(text)
12 | self.border = border.all(1, colors.BLACK54)
13 | self.border_radius = 3
14 | self.bgcolor = "0x09000000"
15 | self.padding = 10
16 | self.visible = False
17 |
18 |
19 | def main(page: Page):
20 | def on_keyboard(e: KeyboardEvent):
21 | # for attr, value in vars(e).items():
22 | # print(f"{attr}: {value}")
23 | data = json.loads(e.data) # 转换 string 到 dictionary
24 | keys_pressed = [k for k, v in data.items() if v and k != 'key']
25 | final_string = ' + '.join(keys_pressed + [data['key']])
26 | print(final_string)
27 |
28 | key.content.value = e.key
29 | key.visible = True
30 | shift.visible = e.shift
31 | ctrl.visible = e.ctrl
32 | alt.visible = e.alt
33 | meta.visible = e.meta
34 | page.update()
35 | time.sleep(0.5)
36 | key.visible = False
37 | shift.visible = False
38 | ctrl.visible = False
39 | alt.visible = False
40 | meta.visible = False
41 | page.update()
42 |
43 | page.on_keyboard_event = on_keyboard
44 |
45 | key = ButtonControl("")
46 | shift = ButtonControl("Shift")
47 | ctrl = ButtonControl("Control")
48 | alt = ButtonControl("Alt")
49 | meta = ButtonControl("Meta")
50 |
51 | page.spacing = 50
52 | page.vertical_alignment = "center"
53 | page.horizontal_alignment = "center"
54 | page.add(
55 | Text("Press any key with a combination of CTRL, ALT, SHIFT and META keys..."),
56 | Row([key, shift, ctrl, alt, meta], alignment="center"),
57 | )
58 |
59 |
60 | flet.app(target=main)
61 |
--------------------------------------------------------------------------------
/flet_test/setting_page_test.py:
--------------------------------------------------------------------------------
1 | import flet as ft
2 |
3 | import workbench
4 |
5 |
6 | def main(page: ft.Page):
7 | def handle_route_change(r: ft.RouteChangeEvent):
8 | if page.route == "/settings":
9 | page.views.clear()
10 | page.views.append(views["/settings"])
11 |
12 | elif page.route == "/home":
13 | page.views.clear()
14 | page.views.append(views["/home"])
15 |
16 | def go_settings(e: ft.ControlEvent):
17 | page.go("/settings")
18 |
19 | def go_home(e: ft.ControlEvent):
20 | page.go("/home")
21 |
22 | page.title = "Settings Navigation Example"
23 | page.horizontal_alignment = page.vertical_alignment = "center"
24 | views = workbench.ui_config.views
25 |
26 | views["/settings"] = ft.View(
27 | route="/settings",
28 | fullscreen_dialog=True,
29 | appbar=ft.AppBar(
30 | title=ft.Text("Settings Page"),
31 | leading=ft.IconButton(icon=ft.icons.ARROW_BACK, on_click=go_home)),
32 | controls=[ft.Text("Settings Content", weight=ft.FontWeight.BOLD, size=20)]
33 | )
34 | views["/home"] = ft.View(
35 | route="/home",
36 | controls=[ft.OutlinedButton("Go to Settings", on_click=go_settings)]
37 | )
38 |
39 | page.on_route_change = handle_route_change
40 | # page.on_view_pop = handle_view_pop
41 | page.add(
42 | ft.OutlinedButton("Go to Settings", on_click=go_settings)
43 | )
44 |
45 |
46 | ft.app(target=main)
47 |
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import logging
2 | import os
3 | import threading
4 | import time
5 |
6 | import flet as ft
7 |
8 | import workbench
9 |
10 |
11 | def main(page: ft.Page):
12 | page.window_title_bar_hidden = True
13 | page.window_frameless = True
14 | page.window_always_on_top = workbench.ui_config.ALWAYS_ON_TOP
15 | page.window_width, page.window_height = workbench.ui_config.HOME_PAGE_SIZE
16 | page.spacing = 0
17 | page.theme = ft.theme.Theme(color_scheme_seed='red')
18 | page.window_bgcolor = ft.colors.TRANSPARENT
19 |
20 | def handle_route_change(_):
21 | if page.route == "/settings":
22 | page.window_width, page.window_height = workbench.ui_config.SETTING_PAGE_SIZE
23 | page.views.clear()
24 | page.views.append(views["/settings"])
25 |
26 | elif page.route == "/home":
27 | # save settings.ini when return home
28 | workbench.SettingsReader.write_config()
29 | page.window_width, page.window_height = workbench.ui_config.HOME_PAGE_SIZE
30 | page.views.clear()
31 | page.views.append(views["/home"])
32 |
33 | page.on_route_change = handle_route_change
34 |
35 | def switch_page(e):
36 | route = e.control.data
37 | # if route == '/home':
38 | # pause_event.clear()
39 | # print("[Continue]")
40 | # else:
41 | # pause_event.set()
42 | # print("[Pausing]")
43 | page.go(route)
44 |
45 | pause_event = threading.Event()
46 |
47 | def pause_main_work(e):
48 | if pause_event.is_set():
49 | pause_event.clear()
50 | e.control.tooltip = '程序正在运行...'
51 | print("[Continue]")
52 | else:
53 | pause_event.set()
54 | e.control.tooltip = '⚠已暂停'
55 | print("[Pausing]")
56 | e.control.update()
57 |
58 | # /settings
59 |
60 | # 创建一个下拉框,用于选择游戏语言
61 | language_dropdown = ft.Dropdown(
62 | options=[
63 | ft.dropdown.Option("零协汉化"),
64 | ft.dropdown.Option("English"),
65 | ft.dropdown.Option("日本語"),
66 | ft.dropdown.Option("한국어"),
67 | ],
68 | value=workbench.SettingsReader.read_option_language('Language', 'current'),
69 | label="Game Language",
70 | data={
71 | "零协汉化":'zh',
72 | "English": 'en',
73 | "日本語": 'jp',
74 | "한국어": 'kr',
75 | },
76 | on_change=lambda e: workbench.SettingsReader.set_option('Language', 'Current', e.control.data[e.control.value]),
77 | content_padding=ft.padding.symmetric(horizontal=15),
78 | )
79 |
80 | # 置顶窗口开关
81 | def toggle_always_on_top():
82 | workbench.ui_config.ALWAYS_ON_TOP = not workbench.ui_config.ALWAYS_ON_TOP
83 | page.window_always_on_top = workbench.ui_config.ALWAYS_ON_TOP
84 | return workbench.ui_config.ALWAYS_ON_TOP
85 |
86 | window_always_on_top_button = ft.Switch(label='置顶开关', value=True, on_change=lambda _: toggle_always_on_top())
87 |
88 | # ego开关
89 | def toggle_ego():
90 | if workbench.SettingsReader.read_option('EGO', 'value') == 'True':
91 | workbench.SettingsReader.set_option('EGO', 'value', 'False')
92 | else:
93 | workbench.SettingsReader.set_option('EGO', 'value', 'True')
94 |
95 | ego_button = ft.Switch(label='ego开关', value=workbench.SettingsReader.read_option('EGO', 'value'),
96 | on_change=lambda _: toggle_ego())
97 |
98 | # 阵亡重开开关
99 | def toggle_death():
100 | if workbench.SettingsReader.read_option('DEATH', 'value') == 'True':
101 | workbench.SettingsReader.set_option('DEATH', 'value', 'False')
102 | else:
103 | workbench.SettingsReader.set_option('DEATH', 'value', 'True')
104 |
105 | death_button = ft.Switch(label='阵亡重开', value=workbench.SettingsReader.read_option('DEATH', 'value'),
106 | on_change=lambda _: toggle_death())
107 |
108 | # 桌宠模式开关
109 | def toggle_pet():
110 | if workbench.SettingsReader.read_option('OPACITY', 'opacity') == '1':
111 | workbench.SettingsReader.set_option('OPACITY', 'opacity', '0')
112 | workbench.SettingsReader.set_option('OPACITY', 'value', 'True')
113 | else:
114 | workbench.SettingsReader.set_option('OPACITY', 'opacity', '1')
115 | workbench.SettingsReader.set_option('OPACITY', 'value', 'False')
116 |
117 | pet_button = ft.Column(
118 | horizontal_alignment=ft.CrossAxisAlignment.CENTER,
119 | controls=[
120 | ft.Switch(label='桌宠模式', value=workbench.SettingsReader.read_option('OPACITY', 'value'),
121 | on_change=lambda _: toggle_pet()),
122 | ft.Text(
123 | "—— 设置桌宠请重启 ——",
124 | size=12,
125 | )
126 | ]
127 | )
128 |
129 | # 关于
130 | about = ft.Column(
131 | horizontal_alignment=ft.CrossAxisAlignment.CENTER,
132 | controls=[
133 | ft.Text(
134 | size=13,
135 | weight=ft.FontWeight.W_400,
136 | spans=[
137 | ft.TextSpan(
138 | "作者: ",
139 | ),
140 | ft.TextSpan(
141 | "协调人",
142 | url="https://github.com/Xie-Tiao",
143 | ),
144 | ft.TextSpan(
145 | " & ",
146 | ),
147 | ft.TextSpan(
148 | "Camreishi",
149 | url="https://github.com/Camreishi",
150 | ),
151 | ]
152 | ),
153 | ft.Text(
154 | spans=[
155 | ft.TextSpan(
156 | "开源仓库",
157 | ft.TextStyle(size=10, color=workbench.ui_config.RECORD_TEXT_COLOR, weight=ft.FontWeight.W_900),
158 | url="https://github.com/Xie-Tiao/Limbus-Scripts",
159 | ),
160 | ft.TextSpan(
161 | " | ",
162 | ft.TextStyle(weight=ft.FontWeight.BOLD)
163 | ),
164 | ft.TextSpan(
165 | "版本:4.1.0",
166 | ft.TextStyle(size=10, weight=ft.FontWeight.W_900),
167 | ),
168 | ]
169 | ),
170 | ]
171 | )
172 |
173 | # 设置GUI
174 | view_settings = ft.View(
175 | route="/settings",
176 | bgcolor=ft.colors.GREY_200,
177 | appbar=ft.AppBar(
178 | title=ft.WindowDragArea(ft.Text("O-01-67")),
179 | leading=ft.IconButton(icon=ft.icons.ARROW_BACK, icon_size=20, on_click=switch_page, data="/home"),
180 | leading_width=45,
181 | toolbar_height=45,
182 | ),
183 | padding=0,
184 | controls=[
185 | ft.Tabs(
186 | selected_index=0,
187 | animation_duration=200,
188 | scrollable=True,
189 | tab_alignment=ft.TabAlignment.CENTER,
190 | expand=True,
191 | tabs=[
192 | ft.Tab(
193 | # text="工作偏好",
194 | tab_content=ft.Text('工作偏好', width=68, text_align=ft.TextAlign.CENTER),
195 | content=ft.Container(
196 | padding=12,
197 | content=ft.Column(
198 | scroll=ft.ScrollMode.AUTO,
199 | controls=[
200 | ft.Container(
201 | # 顶部占位
202 | padding=1
203 | ),
204 | language_dropdown,
205 | window_always_on_top_button,
206 | ego_button,
207 | death_button,
208 | ft.Container(
209 | # 底部占位
210 | padding=1
211 | )
212 | ],
213 | )
214 | )
215 | ),
216 | ft.Tab(
217 | # text="敏感信息",
218 | tab_content=ft.Text('敏感信息', width=68, text_align=ft.TextAlign.CENTER),
219 | content=ft.Column(
220 | # scroll=ft.ScrollMode.ADAPTIVE,
221 | controls=[
222 | ft.Container(
223 | # 顶部占位
224 | padding=1
225 | ),
226 | ft.Container(
227 | padding=10,
228 | content=ft.Column(
229 | controls=[
230 | pet_button,
231 | ]
232 | )
233 | ),
234 | ft.Container(expand=1),
235 | ft.Divider(),
236 | about,
237 | ft.Container(
238 | # 底部占位
239 | padding=1
240 | ),
241 | ],
242 | horizontal_alignment=ft.CrossAxisAlignment.CENTER,
243 | ),
244 | )
245 | ]
246 | )
247 |
248 | ],
249 | )
250 |
251 | app_bar = ft.Container(
252 | opacity=workbench.SettingsReader.read_option('OPACITY', 'opacity'),
253 | padding=0,
254 | content=ft.Row(
255 | [
256 | ft.IconButton(
257 | icon=ft.icons.ADS_CLICK,
258 | icon_color="#ffffff",
259 | on_click=switch_page,
260 | data="/settings",
261 | icon_size=20,
262 | tooltip='设置',
263 | ),
264 | ft.WindowDragArea(
265 | ft.Container(
266 | ft.Text(
267 | "Limbug Clicker",
268 | color="#ffffff",
269 | size=20,
270 | no_wrap=False,
271 | overflow="ellipsis",
272 | ),
273 | ),
274 | expand=True,
275 | ),
276 | ft.IconButton(
277 | icon=ft.icons.CLOSE,
278 | on_click=lambda _: page.window_close(),
279 | icon_color="#ffffff",
280 | icon_size=20,
281 | tooltip='close',
282 | )
283 | ],
284 | ),
285 | )
286 |
287 | # 首页GUI
288 | # noinspection SpellCheckingInspection
289 |
290 | assets_path = workbench.PathManager.ASSETS_RELPATH
291 | wich_image_path = os.path.join(assets_path, 'Wich', 'Wich_00000.png')
292 | img_Laetitia = ft.Image(
293 | src=wich_image_path,
294 | height=220,
295 | fit=ft.ImageFit.FIT_HEIGHT,
296 | gapless_playback=True
297 | )
298 | Laetitia = ft.WindowDragArea(
299 | ft.Container(
300 | alignment=ft.alignment.center,
301 | width=230,
302 | height=230,
303 | on_click=pause_main_work,
304 | tooltip='程序正在运行...',
305 | ink=True,
306 | content=img_Laetitia
307 | ))
308 |
309 | img_Monster = ft.Image(
310 | src=os.path.join(assets_path, 'LaetitiaMinionCrop.webp'),
311 | width=800,
312 | fit=ft.ImageFit.FIT_WIDTH
313 | )
314 |
315 | Monster = ft.Row(
316 | [
317 | ft.Container(ft.Text("所", color="#c8c01a", size=60), padding=0, height=300,
318 | alignment=ft.alignment.Alignment(-1, -1)),
319 | ft.Container(ft.Text("以,", color="#c8c01a", size=60), padding=0, height=300,
320 | alignment=ft.alignment.Alignment(1, -0.7)),
321 | ft.Container(ft.Text("她 ", color="#e13317", size=90), padding=0, height=300,
322 | alignment=ft.alignment.center),
323 | ft.Container(ft.Text("想出了这个绝妙的主意!!", color="#482d66", size=30), padding=0, height=300,
324 | width=100,
325 | alignment=ft.alignment.Alignment(-0.5, -0.5)),
326 | img_Monster,
327 | ft.Container(ft.Text("惊喜!!", color="#2f8c02", size=40), padding=10, height=300, width=100,
328 | alignment=ft.alignment.Alignment(-10, -10)),
329 | ft.Container(ft.Text("礼物!!", color="#e13317", size=50), padding=10, height=300, width=100,
330 | alignment=ft.alignment.Alignment(-10, -10)),
331 | ft.Container(bgcolor="#ffffff", height=10, width=1000, alignment=ft.alignment.Alignment(100, 100))
332 | ],
333 | alignment=ft.MainAxisAlignment.CENTER,
334 | vertical_alignment=ft.CrossAxisAlignment.CENTER,
335 | )
336 |
337 | # /home
338 | view_home = ft.View(
339 | route="/home",
340 | bgcolor=ft.colors.with_opacity(workbench.SettingsReader.read_option('OPACITY', 'opacity'),
341 | workbench.ui_config.MAIN_COLOR),
342 | horizontal_alignment=ft.CrossAxisAlignment.CENTER,
343 | controls=[
344 | app_bar,
345 | Laetitia,
346 | Monster
347 | ]
348 | )
349 |
350 | views = workbench.ui_config.views
351 | views["/settings"] = view_settings
352 | views["/home"] = view_home
353 | page.views.append(views["/home"])
354 | page.update()
355 |
356 | def Laetitia_Animation(i):
357 | # print(i)
358 | wich_image_path = os.path.join(assets_path, 'Wich', f'Wich_{i:05}.png')
359 | img_Laetitia.src = wich_image_path
360 | try:
361 | Laetitia.update()
362 | except AssertionError:
363 | pass
364 | time.sleep(0.1)
365 |
366 | def animation_thread(pause_event):
367 | idx = 0
368 | while True:
369 | if not pause_event.is_set():
370 | Laetitia_Animation(idx)
371 | idx += 1
372 | idx = idx % 24
373 | else:
374 | pass
375 |
376 | def main_thread(pause_event):
377 | while True:
378 | if not pause_event.is_set():
379 | workbench.main_work.main()
380 | else:
381 | pass
382 |
383 | # 创建两个线程
384 | animation_t = threading.Thread(target=animation_thread, args=(pause_event,))
385 | main_t = threading.Thread(target=main_thread, args=(pause_event,))
386 |
387 | # 启动线程
388 | animation_t.start()
389 | main_t.start()
390 |
391 | # 等待线程结束
392 | animation_t.join()
393 | main_t.join()
394 |
395 |
396 | if __name__ == '__main__':
397 | # noinspection PyBroadException
398 | try:
399 | ft.app(target=main)
400 |
401 | except Exception:
402 | logging.exception("An error occurred: ")
403 |
--------------------------------------------------------------------------------
/models/japan_PP-OCRv3_rec_infer.onnx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/models/japan_PP-OCRv3_rec_infer.onnx
--------------------------------------------------------------------------------
/models/korean_PP-OCRv3_rec_infer.onnx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/models/korean_PP-OCRv3_rec_infer.onnx
--------------------------------------------------------------------------------
/onnxruntime_providers_shared.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/onnxruntime_providers_shared.dll
--------------------------------------------------------------------------------
/opencv_test/center_hole_maker.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import numpy as np
3 |
4 | # Define the scaling factor as constants
5 | SCALING_FACTOR_HEIGHT = 3 / 4
6 | SCALING_FACTOR_WIDTH = 3 / 4
7 | IMAGE_NAME = 'max_button.png'
8 |
9 |
10 | def create_masked_image(image_path, height_factor, width_factor, preserve_center=False):
11 | # Load the image
12 | image = cv2.imread(image_path)
13 |
14 | # Obtain the image dimensions
15 | h, w, channels = image.shape
16 |
17 | # Create a white image of the same dimensions
18 | mask = np.zeros((h, w, channels), np.uint8) if preserve_center else np.ones((h, w, channels), np.uint8) * 255
19 |
20 | # Define your rectangle
21 | start_y, start_x = int(h * (1 - height_factor) / 2), int(w * (1 - width_factor) / 2)
22 | end_y, end_x = int(h * (1 + height_factor) / 2), int(w * (1 + width_factor) / 2)
23 |
24 | # Set rectangle color based on preserve_center
25 | rectangle_color = (255, 255, 255) if preserve_center else (0, 0, 0)
26 |
27 | # Draw a rectangle on the white mask
28 | cv2.rectangle(mask, (start_x, start_y), (end_x, end_y), rectangle_color, -1)
29 |
30 | # Combine the image with the mask
31 | result = cv2.bitwise_and(image, mask)
32 |
33 | # Use cv2.imshow() function to display the image
34 | # cv2.imwrite(IMAGE_NAME, result)
35 | cv2.imshow('Processed Image', result)
36 | cv2.waitKey(0)
37 | cv2.destroyAllWindows()
38 |
39 |
40 | def main():
41 | image_path = IMAGE_NAME # Replace with your image path
42 | create_masked_image(image_path, height_factor=SCALING_FACTOR_HEIGHT, width_factor=SCALING_FACTOR_WIDTH,
43 | preserve_center=True)
44 |
45 |
46 | if __name__ == "__main__":
47 | main()
48 |
--------------------------------------------------------------------------------
/opencv_test/contour_rectangle.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | import cv2
4 |
5 |
6 | def apply_hsl_filter(image, h_range, s_range, l_range):
7 | hls_channels = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
8 | mask = cv2.bitwise_and(
9 | cv2.inRange(hls_channels[0], *h_range),
10 | cv2.inRange(hls_channels[1], *s_range),
11 | cv2.inRange(hls_channels[2], *l_range)
12 | )
13 | return cv2.bitwise_and(image, image, mask=mask)
14 |
15 |
16 | def find_bounding_boxes(image, threshold):
17 | contours, _ = cv2.findContours(image, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
18 | bounding_rects = [cv2.boundingRect(c) for c in contours]
19 | sizes = [rect[2] * rect[3] for rect in bounding_rects]
20 | sizes = sorted(sizes, reverse=True)
21 |
22 | threshold_size = sizes[min(threshold - 1, len(sizes) - 1)]
23 | return [
24 | rect for rect in bounding_rects
25 | if rect[2] * rect[3] >= threshold_size and 0.1 <= rect[2] / rect[3] <= 10 # 添加了新的条件,宽度和高度之间的比例应在 0.1 到 10 之间
26 | ]
27 |
28 |
29 | def draw_rectangles(image, rects, color=(0, 255, 0), thickness=2):
30 | i = 1000
31 | for rect in rects:
32 | save_rectangles(image, rect, i)
33 | i += 1
34 | for rect in rects:
35 | cv2.rectangle(image, rect[:2], (rect[0] + rect[2], rect[1] + rect[3]), color, thickness)
36 |
37 |
38 | def save_rectangles(image, rect, i):
39 | # 保存对应的图像区域到 /output 目录中
40 | x, y, w, h = rect
41 | roi = image[y:y + h, x:x + w]
42 | output_path = os.path.join('output', f'rect_{i}.png')
43 | cv2.imwrite(output_path, roi)
44 |
45 |
46 | def main():
47 | # Load and pre-process the image
48 | # image = cv2.imread("2-3.png")
49 | # image_filtered = apply_hsl_filter(image, h_range=[12, 25], s_range=[150, 210], l_range=[20, 200])
50 | image = cv2.imread("origin/3500.png")
51 | image_filtered = apply_hsl_filter(image, h_range=[0, 30], s_range=[0, 90], l_range=[0, 180])
52 | _, image_binary = cv2.threshold(cv2.cvtColor(image_filtered, cv2.COLOR_BGR2GRAY), 0, 255, cv2.THRESH_OTSU)
53 |
54 | # Detect rectangles and draw them on the image
55 | rectangles = find_bounding_boxes(image_binary, 20)
56 | draw_rectangles(image, rectangles)
57 |
58 | cv2.imshow("Image with rectangles", image)
59 | cv2.waitKey(0)
60 |
61 |
62 | if __name__ == "__main__":
63 | main()
64 |
--------------------------------------------------------------------------------
/opencv_test/find_and_draw_rotated_bounding_rectangles.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import numpy as np
3 |
4 |
5 | def extract_and_save_rotated_rect(img, rect):
6 | h, w = img.shape[:2] # 原图像的长和宽
7 | box = np.intp(cv2.boxPoints(rect))
8 | rect_w, rect_h = round(rect[1][0]), round(rect[1][1]) # 最小外接矩形的宽和高
9 | margin = 0
10 | if rect_w <= rect_h:
11 | x, y = int(box[1][0]), int(box[1][1]) # 旋转中心
12 | M2 = cv2.getRotationMatrix2D((x, y), rect[2], 1)
13 | rotated_image = cv2.warpAffine(img, M2, (w * 2, h * 2))
14 | y1, y2 = y - margin if y - margin > 0 else 0, y + rect_h + margin + 1
15 | x1, x2 = x - margin if x - margin > 0 else 0, x + rect_w + margin + 1
16 | rotated_rect_img = rotated_image[y1: y2, x1: x2]
17 |
18 | # 保存包含旋转矩形区域的新图像
19 | cv2.imwrite('output_rotated_rect.png', rotated_rect_img)
20 | cv2.imshow('output_rotated_rect.png', rotated_rect_img)
21 | cv2.waitKey(0)
22 | else:
23 | x, y = int(box[2][0]), int(box[2][1]) # 旋转中心
24 | M2 = cv2.getRotationMatrix2D((x, y), rect[2] + 90, 1)
25 | rotated_image = cv2.warpAffine(img, M2, (w * 2, h * 2))
26 | y1, y2 = y - margin if y - margin > 0 else 0, y + rect_w + margin + 1
27 | x1, x2 = x - margin if x - margin > 0 else 0, x + rect_h + margin + 1
28 | rotated_rect_img = rotated_image[y1: y2, x1: x2]
29 |
30 | return rotated_rect_img
31 |
32 |
33 | def find_min_area_rectangles(image_path):
34 | # 读取图像
35 | image = cv2.imread(image_path)
36 |
37 | h_range = (0, 3)
38 | l_range = (0, 255)
39 | s_range = (0, 255)
40 | h_channel, s_channel, l_channel = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
41 | h_mask = cv2.inRange(h_channel, h_range[0], h_range[1])
42 | l_mask = cv2.inRange(l_channel, l_range[0], l_range[1])
43 | s_mask = cv2.inRange(s_channel, s_range[0], s_range[1])
44 | mask = cv2.bitwise_and(h_mask, cv2.bitwise_and(s_mask, l_mask))
45 | filtered_image = cv2.bitwise_and(image, image, mask=mask)
46 |
47 | # 执行阈值处理或其他预处理以获取二值图像
48 | _, image_binary = cv2.threshold(cv2.cvtColor(filtered_image, cv2.COLOR_BGR2GRAY), 0, 255, cv2.THRESH_OTSU)
49 |
50 | # 寻找轮廓
51 | contours, _ = cv2.findContours(image_binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
52 |
53 | # 绘制所有轮廓的最小外接矩形
54 | for contour in contours:
55 | rect = cv2.minAreaRect(contour)
56 | box = cv2.boxPoints(rect)
57 | box = np.intp(box)
58 |
59 | # 绘制旋转矩形
60 |
61 | if 63 < rect[-1] < 66:
62 | print(rect)
63 | # extract_and_save_rotated_rect(image, rect)
64 | cv2.drawContours(image, [box], 0, (0, 255, 0), 2)
65 |
66 | # 显示或保存带有矩形的图像
67 | cv2.imshow("Rotated Bounding Rectangles", image)
68 | cv2.waitKey(0)
69 | cv2.destroyAllWindows()
70 |
71 |
72 | # 使用示例:
73 | # find_min_area_rectangles('output/rect_1000.png')
74 | find_min_area_rectangles("origin/3450.png")
75 |
--------------------------------------------------------------------------------
/opencv_test/find_skip_button.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import numpy as np
3 |
4 |
5 | def apply_hsl_filter(image, h_range, s_range, l_range):
6 | hls_channels = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
7 | mask = cv2.bitwise_and(
8 | cv2.inRange(hls_channels[0], *h_range),
9 | cv2.inRange(hls_channels[1], *s_range),
10 | cv2.inRange(hls_channels[2], *l_range)
11 | )
12 | return cv2.bitwise_and(image, image, mask=mask)
13 |
14 |
15 | def find_bounding_boxes(image, threshold):
16 | contours, _ = cv2.findContours(image, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
17 | bounding_rects = [cv2.boundingRect(c) for c in contours]
18 | sizes = [rect[2] * rect[3] for rect in bounding_rects]
19 | sizes = sorted(sizes, reverse=True)
20 |
21 | threshold_size = sizes[min(threshold - 1, len(sizes) - 1)]
22 | return [
23 | rect for rect in bounding_rects
24 | if rect[2] * rect[3] >= threshold_size and 0.1 <= rect[2] / rect[3] <= 10
25 | ]
26 |
27 |
28 | def calculate_similarity(image, template: cv2.typing.MatLike):
29 | # 调整图片大小
30 | target_size = (template.shape[1], template.shape[0])
31 | image = cv2.resize(image, target_size)
32 | mask = cv2.inRange(image, np.array([0, 0, 0]), np.array([255, 255, 255]))
33 | # 创建ORB特征提取器
34 | orb = cv2.ORB.create(edgeThreshold=0)
35 |
36 | # 从两幅图像中查找关键点和描述符
37 | kp1, des1 = orb.detectAndCompute(image, mask)
38 | kp2, des2 = orb.detectAndCompute(template, mask)
39 |
40 | # 创建Brute Force Matcher
41 | bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=False) # 修改为False,以便返回两个最近的匹配点
42 |
43 | # 使用Matcher匹配描述符
44 | matches = bf.knnMatch(des1, des2, k=2) # 修改为knnMatch,以便返回两个最近的匹配点
45 |
46 | # 应用比例测试,过滤掉明显不匹配的点
47 | good_matches = []
48 | for m, n in matches:
49 | if m.distance < 0.75 * n.distance: # 如果第一个匹配点的距离小于第二个匹配点的距离的0.75倍,那么它是好的匹配点
50 | good_matches.append(m)
51 |
52 | # 根据好的匹配数返回相似度
53 | return len(good_matches)
54 |
55 |
56 | def main():
57 | # Load and pre-process the image
58 | image = cv2.imread("3-1.png")
59 | size_list = [960, 540]
60 |
61 | image = cv2.resize(image, [int(x * 0.8) for x in size_list])
62 | image_filtered = apply_hsl_filter(image, h_range=[12, 25], s_range=[150, 210], l_range=[20, 200])
63 | _, image_binary = cv2.threshold(cv2.cvtColor(image_filtered, cv2.COLOR_BGR2GRAY), 128, 255, cv2.THRESH_BINARY)
64 |
65 | # Detect rectangles and draw them on the image
66 | rectangles = find_bounding_boxes(image_binary, 12)
67 |
68 | # Load the skip button template
69 | skip_button_template = cv2.imread("skip_button_2.png")
70 |
71 | # Calculate similarity for each rectangle
72 | for rect in rectangles:
73 | x, y, w, h = rect
74 | roi = image[y:y + h, x:x + w]
75 | similarity = calculate_similarity(roi, skip_button_template)
76 | cv2.imshow("12", roi)
77 | print(f"Similarity for rectangle at ({x}, {y}) is {similarity:.4f}")
78 | cv2.waitKey(0)
79 |
80 |
81 | if __name__ == "__main__":
82 | main()
83 |
--------------------------------------------------------------------------------
/opencv_test/hls_filter_multi.py:
--------------------------------------------------------------------------------
1 | import base64
2 | import os
3 | import time
4 |
5 | import cv2
6 | import flet as ft
7 | import numpy as np
8 |
9 | # 初始值
10 | H_INIT = [0, 180]
11 | L_INIT = [0, 255]
12 | S_INIT = [0, 255]
13 | THRESH = 36
14 |
15 | image_list = [
16 | '1-4.png',
17 | '1-6.png',
18 | ]
19 |
20 |
21 | def main(page: ft.Page):
22 | page.window_width = 1700
23 | page.window_height = 1000
24 |
25 | def update_images(_):
26 | for image_update in image_filter_list:
27 | image_update.update_image()
28 | time.sleep(0.1)
29 | page.update()
30 |
31 | h_slider = ft.RangeSlider(min=0, max=180, start_value=H_INIT[0], end_value=H_INIT[1], divisions=181,
32 | label="{value} H",
33 | on_change=update_images)
34 | l_slider = ft.RangeSlider(min=0, max=255, start_value=L_INIT[0], end_value=L_INIT[1], divisions=256,
35 | label="{value} L",
36 | on_change=update_images)
37 | s_slider = ft.RangeSlider(min=0, max=255, start_value=S_INIT[0], end_value=S_INIT[1], divisions=256,
38 | label="{value} S",
39 | on_change=update_images)
40 | factor_x_slider = ft.Slider(min=-3, max=3, value=0, label="{value} x", on_change=update_images)
41 | factor_y_slider = ft.Slider(min=-3, max=3, value=0, label="{value} y", on_change=update_images)
42 | factor_w_slider = ft.Slider(min=-3, max=3, value=1, label="{value} w", on_change=update_images)
43 | factor_h_slider = ft.Slider(min=-3, max=3, value=1, label="{value} h", on_change=update_images)
44 | kernel_size_slider = ft.Slider(min=1, max=31, value=1, divisions=31, label="kernel_size", on_change=update_images)
45 | hls_column = ft.Column(width=1700, height=900, scroll=ft.ScrollMode.AUTO)
46 |
47 | def str_to_int(value):
48 | return round(float(value))
49 |
50 | def find_bounding_boxes(image, threshold):
51 | contours, _ = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
52 | bounding_rects = [cv2.boundingRect(c) for c in contours]
53 | sizes = [rect[2] * rect[3] for rect in bounding_rects]
54 | sizes = sorted(sizes, reverse=True)
55 |
56 | threshold_size = sizes[min(threshold - 1, len(sizes) - 1)]
57 | return [
58 | rect for rect in bounding_rects
59 | if rect[2] * rect[3] >= threshold_size and 0.1 <= rect[2] / rect[3] <= 10
60 | # 添加了新的条件,宽度和高度之间的比例应在 0.1 到 10 之间
61 | ]
62 |
63 | def rectangles_offset(rectangles, image, x_offset_factor=0, y_offset_factor=0, width_scale_factor=1,
64 | height_scale_factor=1):
65 | # 获取图像的宽度和高度
66 | image_width = image.shape[1]
67 | image_height = image.shape[0]
68 |
69 | rectangles_list = [(max(0, round(x + w * x_offset_factor)), # 确保x坐标不小于0
70 | max(0, round(y + h * y_offset_factor)), # 确保y坐标不小于0
71 | min(image_width, round(w * width_scale_factor)), # 确保宽度不超过图像宽度
72 | min(image_height, round(h * height_scale_factor))) # 确保高度不超过图像高度
73 | for x, y, w, h in rectangles]
74 |
75 | return rectangles_list
76 |
77 | def convert_b64(image_cv2):
78 | encode_img = cv2.imencode('.jpg', image_cv2)
79 | b64_img = base64.b64encode(encode_img[1]).decode('utf-8')
80 | return b64_img
81 |
82 | class ImageFilter:
83 | def __init__(self, image_path):
84 | self.image_path = image_path
85 | self.original_image = cv2.imread(image_path)
86 | self.image_show = ft.Image(src_base64=convert_b64(self.original_image), width=800)
87 | self.image_output = ft.Image(src_base64=convert_b64(self.original_image), width=800)
88 | self.mask = np.zeros_like(self.original_image)
89 | hls_column.controls.append(ft.Row(controls=[self.image_show, self.image_output]))
90 |
91 | def apply_hsl_filter(self, image, h_range, s_range, l_range):
92 | h_channel, s_channel, l_channel = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
93 | h_mask = cv2.inRange(h_channel, h_range[0], h_range[1])
94 | s_mask = cv2.inRange(s_channel, s_range[0], s_range[1])
95 | l_mask = cv2.inRange(l_channel, l_range[0], l_range[1])
96 | self.mask = cv2.bitwise_and(h_mask, cv2.bitwise_and(s_mask, l_mask))
97 |
98 | # 对mask进行闭运算
99 | kernel_size = str_to_int(kernel_size_slider.value)
100 | kernel = np.ones((kernel_size, kernel_size), np.uint8)
101 | self.mask = cv2.morphologyEx(self.mask, cv2.MORPH_CLOSE, kernel)
102 | # 然后使用闭运算后的掩模来过滤图像
103 | filtered_image = cv2.bitwise_and(image, image, mask=self.mask)
104 | print(
105 | f'{tuple(h_range)},\n{tuple(s_range)},\n{tuple(l_range)}'
106 | )
107 | # print(f'H:{h_range}S:{s_range}L:{l_range}')
108 | # print(f'h_range={h_range}, s_range={s_range}, l_range={l_range}')
109 | try:
110 | print(
111 | f'({round(factor_x_slider.value, 2)}, {round(factor_y_slider.value, 2)}, {round(factor_w_slider.value, 2)}, {round(factor_h_slider.value, 2)})'
112 | )
113 | except NameError:
114 | pass
115 |
116 | print(f'\'kernel_size\': {str_to_int(kernel_size_slider.value)},')
117 |
118 | return filtered_image
119 |
120 | def save_rectangles(self, image, rect, i):
121 | # 保存对应的图像区域到 /output 目录中
122 | x, y, w, h = rect
123 | roi = image[y:y + h, x:x + w]
124 | output_path = os.path.join('output', f'{self.image_path}rect_{i}.png')
125 | cv2.imwrite(output_path, roi)
126 |
127 | def draw_rectangles(self, image, rects, color=(255, 255, 0), thickness=2):
128 | # pass
129 |
130 | # image = image_binary
131 | i = 1000
132 | for rect in rects:
133 | self.save_rectangles(image, rect, i)
134 | i += 1
135 | for rect in rects:
136 | cv2.rectangle(image, rect[:2], (rect[0] + rect[2], rect[1] + rect[3]), color, thickness)
137 | self.image_output.src_base64 = convert_b64(image)
138 |
139 | def update_image(self):
140 |
141 | h_range = [str_to_int(h_slider.start_value), str_to_int(h_slider.end_value)]
142 | s_range = [str_to_int(s_slider.start_value), str_to_int(s_slider.end_value)]
143 | l_range = [str_to_int(l_slider.start_value), str_to_int(l_slider.end_value)]
144 | filtered_image = self.apply_hsl_filter(self.original_image, h_range, s_range, l_range)
145 | self.image_show.src_base64 = convert_b64(filtered_image)
146 |
147 | image = self.original_image.copy()
148 | # image_filtered = apply_hsl_filter(image, h_range=h_range, s_range=s_range, l_range=l_range)
149 | # _, image_binary = cv2.threshold(cv2.cvtColor(image_filtered, cv2.COLOR_BGR2GRAY), 0, 255, cv2.THRESH_OTSU)
150 |
151 | # Detect rectangles and draw them on the image
152 | rectangles = find_bounding_boxes(self.mask, THRESH)
153 | rectangles_offset_list = rectangles_offset(
154 | rectangles,
155 | image,
156 | factor_x_slider.value,
157 | factor_y_slider.value,
158 | factor_w_slider.value,
159 | factor_h_slider.value,
160 | )
161 | # draw_rectangles_rotated(image, image_binary)
162 | self.draw_rectangles(image, rectangles_offset_list)
163 |
164 | # images_processor = ImageProcessor(page, ["path/to/image1.png", "path/to/image2.png"], [0, 180], [0, 255],
165 | # [0, 255])
166 |
167 | image_filter_list = []
168 | for image_input in image_list:
169 | image_filter = ImageFilter(image_input)
170 | image_filter_list.append(image_filter)
171 |
172 | hls_column.controls.extend([
173 | h_slider,
174 | l_slider,
175 | s_slider,
176 | factor_x_slider,
177 | factor_y_slider,
178 | factor_w_slider,
179 | factor_h_slider,
180 | kernel_size_slider,
181 | ])
182 |
183 | page.add(hls_column)
184 |
185 |
186 | ft.app(target=main)
187 |
--------------------------------------------------------------------------------
/opencv_test/hsl_image_filter.py:
--------------------------------------------------------------------------------
1 | import base64
2 | import os
3 | import time
4 |
5 | import cv2
6 | import flet as ft
7 | import numpy as np
8 |
9 | '''
10 | gear: H:[15, 40]S:[30, 180]:L[40, 190]
11 | skip: H12-25 S:150-210 L:20-200
12 | encounters_flag: H:[10, 40]S:[50, 130]:L[30, 140]
13 | yes_button: H:[12, 18]S:[100, 185]L:[30, 125]
14 | high very high: H:[18, 30]S:[40, 170]L:[20, 255]
15 |
16 |
17 | 'back_button.png': [
18 | [9, 21],
19 | [10, 110],
20 | [40, 230]
21 |
22 |
23 | '''
24 | image_path = "2-3.png" # Replace with the actual path to your image
25 | thresh = 36
26 |
27 |
28 | def convert_b64(image_cv2):
29 | encode_img = cv2.imencode('.jpg', image_cv2)
30 | b64_img = base64.b64encode(encode_img[1]).decode('utf-8')
31 | return b64_img
32 |
33 |
34 | def main(page: ft.Page):
35 | page.window_width = 1700
36 | page.window_height = 900
37 | # image_path = "2-3.png" # Replace with the actual path to your image
38 | original_image = cv2.imread(image_path)
39 |
40 | def update_image(_):
41 | def str_to_int(value):
42 | return round(float(value))
43 |
44 | h_range = [str_to_int(h_slider.start_value), str_to_int(h_slider.end_value)]
45 | s_range = [str_to_int(s_slider.start_value), str_to_int(s_slider.end_value)]
46 | l_range = [str_to_int(l_slider.start_value), str_to_int(l_slider.end_value)]
47 | filtered_image = apply_hsl_filter(original_image, h_range, s_range, l_range)
48 | image_show.src_base64 = convert_b64(filtered_image)
49 | image_show.update()
50 |
51 | image = original_image.copy()
52 | image_filtered = apply_hsl_filter(image, h_range=h_range, s_range=s_range, l_range=l_range)
53 | _, image_binary = cv2.threshold(cv2.cvtColor(image_filtered, cv2.COLOR_BGR2GRAY), 0, 255, cv2.THRESH_OTSU)
54 |
55 | # Detect rectangles and draw them on the image
56 | rectangles = find_bounding_boxes(image_binary, thresh)
57 | rectangles_offset_list = rectangles_offset(
58 | rectangles,
59 | factor_x_slider.value,
60 | factor_y_slider.value,
61 | factor_w_slider.value,
62 | factor_h_slider.value,
63 | )
64 | # draw_rectangles_rotated(image, image_binary)
65 | draw_rectangles(image, rectangles_offset_list, image_binary)
66 |
67 | def find_bounding_boxes(image, threshold):
68 | contours, _ = cv2.findContours(image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
69 | bounding_rects = [cv2.boundingRect(c) for c in contours]
70 | sizes = [rect[2] * rect[3] for rect in bounding_rects]
71 | sizes = sorted(sizes, reverse=True)
72 |
73 | threshold_size = sizes[min(threshold - 1, len(sizes) - 1)]
74 | return [
75 | rect for rect in bounding_rects
76 | if rect[2] * rect[3] >= threshold_size and 0.1 <= rect[2] / rect[3] <= 10
77 | # 添加了新的条件,宽度和高度之间的比例应在 0.1 到 10 之间
78 | ]
79 |
80 | def rectangles_offset(rectangles, x_offset_factor=0, y_offset_factor=0, width_scale_factor=1,
81 | height_scale_factor=1):
82 | image_width, image_height = 1920, 1080
83 |
84 | rectangles_list = [(max(0, round(x + w * x_offset_factor)), # 确保x坐标不小于0
85 | max(0, round(y + h * y_offset_factor)), # 确保y坐标不小于0
86 | min(image_width, round(w * width_scale_factor)), # 确保宽度不超过图像宽度
87 | min(image_height, round(h * height_scale_factor))) # 确保高度不超过图像高度
88 | for x, y, w, h in rectangles]
89 |
90 | return rectangles_list
91 |
92 | def apply_hsl_filter(image, h_range, s_range, l_range):
93 | h_channel, s_channel, l_channel = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
94 | h_mask = cv2.inRange(h_channel, h_range[0], h_range[1])
95 | s_mask = cv2.inRange(s_channel, s_range[0], s_range[1])
96 | l_mask = cv2.inRange(l_channel, l_range[0], l_range[1])
97 | mask = cv2.bitwise_and(h_mask, cv2.bitwise_and(s_mask, l_mask))
98 | filtered_image = cv2.bitwise_and(image, image, mask=mask)
99 | print(
100 | f'{tuple(h_range)},\n{tuple(s_range)},\n{tuple(l_range)}'
101 | )
102 | # print(f'H:{h_range}S:{s_range}L:{l_range}')
103 | # print(f'h_range={h_range}, s_range={s_range}, l_range={l_range}')
104 | try:
105 | print(
106 | f'({round(factor_x_slider.value, 2)}, {round(factor_y_slider.value, 2)}, {round(factor_w_slider.value, 2)}, {round(factor_h_slider.value, 2)})'
107 | )
108 | except NameError:
109 | pass
110 |
111 | return filtered_image
112 |
113 | def save_rectangles(image, rect, i):
114 | # 保存对应的图像区域到 /output 目录中
115 | x, y, w, h = rect
116 | roi = image[y:y + h, x:x + w]
117 | output_path = os.path.join('output', f'rect_{i}.png')
118 | cv2.imwrite(output_path, roi)
119 |
120 | def draw_rectangles(image, rects, image_binary, color=(255, 255, 0), thickness=2):
121 | # pass
122 | time.sleep(0.1)
123 | # image = image_binary
124 | i = 1000
125 | for rect in rects:
126 | save_rectangles(image, rect, i)
127 | i += 1
128 | for rect in rects:
129 | cv2.rectangle(image, rect[:2], (rect[0] + rect[2], rect[1] + rect[3]), color, thickness)
130 | image_output.src_base64 = convert_b64(image)
131 | image_output.update()
132 |
133 | def draw_rectangles_rotated(image, image_binary):
134 | # 寻找轮廓
135 | contours, _ = cv2.findContours(image_binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
136 |
137 | # 绘制所有轮廓的最小外接矩形
138 | for contour in contours:
139 | rect = cv2.minAreaRect(contour)
140 | box = cv2.boxPoints(rect)
141 | box = np.intp(box)
142 |
143 | # 绘制旋转矩形
144 |
145 | if 63 < rect[-1] < 66:
146 | print(rect)
147 | # extract_and_save_rotated_rect(image, rect)
148 | cv2.drawContours(image, [box], 0, (0, 255, 0), 2)
149 |
150 | image_output.src_base64 = convert_b64(image)
151 | image_output.update()
152 |
153 | # H:[0, 30]S:[0, 90]L:[0, 180]
154 | h_range = [0, 180]
155 | s_range = [0, 255]
156 | l_range = [0, 255]
157 | image_show = ft.Image(src_base64=convert_b64(original_image), width=800)
158 | image_output = ft.Image(src_base64=convert_b64(original_image), width=800)
159 |
160 | filtered_image = apply_hsl_filter(original_image, h_range, s_range, l_range)
161 | image_show.src_base64 = convert_b64(filtered_image)
162 | h_slider = ft.RangeSlider(min=0, max=180, start_value=h_range[0], end_value=h_range[1], divisions=181,
163 | label="{value} H",
164 | on_change=update_image)
165 | s_slider = ft.RangeSlider(min=0, max=255, start_value=s_range[0], end_value=s_range[1], divisions=256,
166 | label="{value} S",
167 | on_change=update_image)
168 | l_slider = ft.RangeSlider(min=0, max=255, start_value=l_range[0], end_value=l_range[1], divisions=256,
169 | label="{value} L",
170 | on_change=update_image)
171 | factor_x_slider = ft.Slider(min=-3, max=3, value=0, label="{value} x", on_change=update_image)
172 | factor_y_slider = ft.Slider(min=-3, max=3, value=0, label="{value} y", on_change=update_image)
173 | factor_w_slider = ft.Slider(min=-3, max=3, value=1, label="{value} w", on_change=update_image)
174 | factor_h_slider = ft.Slider(min=-3, max=3, value=1, label="{value} h", on_change=update_image)
175 |
176 | page.add(
177 | ft.Column(
178 | horizontal_alignment=ft.CrossAxisAlignment.CENTER,
179 | controls=[
180 | ft.Row(controls=[image_show, image_output]),
181 | h_slider,
182 | s_slider,
183 | l_slider,
184 | factor_x_slider,
185 | factor_y_slider,
186 | factor_w_slider,
187 | factor_h_slider,
188 | ],
189 | )
190 | )
191 |
192 |
193 | ft.app(target=main)
194 |
--------------------------------------------------------------------------------
/opencv_test/orb_test.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import numpy as np
3 |
4 | query_img = cv2.imread('skip_button.png') # 查询图像
5 | train_img = cv2.imread('skip_button.png') # 训练图像
6 | query_img_bw = cv2.cvtColor(query_img, cv2.COLOR_BGR2GRAY) # 转换为灰度图
7 | train_img_bw = cv2.cvtColor(train_img, cv2.COLOR_BGR2GRAY) # 转换为灰度图
8 | orb = cv2.ORB.create(edgeThreshold=0) # 初始化ORB检测器
9 | queryKeypoints, queryDescriptors = orb.detectAndCompute(query_img_bw, None) # 在查询图像中找到关键点和描述符
10 | trainKeypoints, trainDescriptors = orb.detectAndCompute(train_img_bw, None) # 在训练图像中找到关键点和描述符
11 | print("queryDescriptors shape:", queryDescriptors.shape) # 打印查询图像的描述符的形状
12 | print("trainDescriptors shape:", trainDescriptors.shape) # 打印训练图像的描述符的形状
13 | queryDescriptors = queryDescriptors.astype(np.float32) # 转换查询图像的描述符的数据类型为浮点数
14 | trainDescriptors = trainDescriptors.astype(np.float32) # 转换训练图像的描述符的数据类型为浮点数
15 | matcher = cv2.BFMatcher() # 创建暴力匹配器
16 | matches = matcher.match(queryDescriptors, trainDescriptors) # 匹配两组描述符
17 | final_img = cv2.drawMatches(query_img, queryKeypoints, train_img, trainKeypoints, matches[:20], None) # 绘制前20个最佳匹配
18 | final_img = cv2.resize(final_img, (1000, 650)) # 调整图像大小
19 | cv2.imshow("Matches", final_img) # 显示匹配结果
20 | cv2.waitKey(3000) # 等待3秒
21 |
--------------------------------------------------------------------------------
/opencv_test/subtraction_operation.py:
--------------------------------------------------------------------------------
1 | import cv2
2 |
3 | cap = cv2.VideoCapture('1-1.mkv')
4 |
5 | # Read the first frame
6 | ret, frame1 = cap.read()
7 | i = 1000
8 | while cap.isOpened():
9 | i += 1
10 | ret, frame2 = cap.read()
11 | # if i % 50 != 0:
12 | # continue
13 | # Read the next frame
14 |
15 | if not ret:
16 | break
17 |
18 | # Calculate the absolute difference between frames
19 | # diff = cv2.absdiff(frame1, frame2)
20 | cv2.imwrite(f'output/{i}.png', frame2)
21 |
22 | # Display the difference
23 | # cv2.imshow('diff', diff)
24 | #
25 | # # Press 'q' to quit
26 | # if cv2.waitKey(1) & 0xFF == ord('q'):
27 | # break
28 |
29 | # Now update frame1 to be the new frame2
30 | frame1 = frame2
31 |
32 | cap.release()
33 | cv2.destroyAllWindows()
34 |
--------------------------------------------------------------------------------
/pack.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | @REM 主目录的图片和记录和OCR模型和设置ini
4 | set "source1=assets"
5 | set "source2=log"
6 | set "source3=models"
7 | set "source4=settings.ini"
8 |
9 | set "destination1=dist\main\_internal"
10 |
11 | xcopy /s /i "%source1%" "%destination1%\%source1%"
12 | xcopy /s /i "%source2%" "%destination1%\%source2%"
13 | xcopy /s /i "%source3%" "%destination1%\%source3%"
14 | copy /y "%source4%" "%destination1%"
15 |
16 | @REM 工作区
17 | set "source5=workbench\choices_dict.json"
18 | set "source6=workbench\worklist.json"
19 |
20 | set "destination2=dist\main\_internal\workbench\"
21 |
22 | xcopy /s /i "%source5%" "%destination2%"
23 | xcopy /s /i "%source6%" "%destination2%"
24 |
25 | @REM OCR的一个警告dll
26 | set "source7=onnxruntime_providers_shared.dll"
27 | set "destination3=dist\main\_internal\onnxruntime\capi"
28 |
29 | copy /y "%source7%" "%destination3%"
30 |
31 | @REM OCR的依赖
32 | if exist D:\anaconda (
33 | set "anaconda_folder=D:\anaconda"
34 | ) else (
35 | set "anaconda_folder=D:\Anaconda3"
36 | )
37 |
38 | set "source8=%anaconda_folder%\envs\py310\Lib\site-packages\rapidocr_onnxruntime\models"
39 | set "source9=%anaconda_folder%\envs\py310\Lib\site-packages\rapidocr_onnxruntime\config.yaml"
40 | set "destination4=dist\main\_internal\rapidocr_onnxruntime"
41 |
42 | xcopy /s /i "%source8%" "%destination4%\models"
43 | copy /y "%source9%" "%destination4%"
44 |
45 | pause
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | flet~=0.19.0
2 | opencv-python~=4.9.0.80
3 | numpy~=1.26.3
4 | colorlog~=6.8.2
5 | Pillow~=10.0.1
6 | rapidocr-onnxruntime~=1.3.11
7 | thefuzz~=0.22.1
8 | pyautogui~=0.9.54
--------------------------------------------------------------------------------
/settings.ini:
--------------------------------------------------------------------------------
1 | [Language]
2 | current = jp
3 |
4 | [Shortcut]
5 | shortcut1 = P
6 | shortcut2 = Enter
7 |
8 | [EGO]
9 | value = True
10 |
11 | [DEATH]
12 | value = True
13 |
14 | [OPACITY]
15 | opacity = 1
16 | value = False
17 |
18 |
--------------------------------------------------------------------------------
/test/Snipaste_2024-02-25_14-20-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/test/Snipaste_2024-02-25_14-20-24.png
--------------------------------------------------------------------------------
/test/Snipaste_2024-02-26_23-00-27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/test/Snipaste_2024-02-26_23-00-27.png
--------------------------------------------------------------------------------
/test/pp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Xie-Tiao/Limbus-Scripts/e5a12ed5c979bdf1b8d814987273ea3716b11358/test/pp.png
--------------------------------------------------------------------------------
/text_test/get_choice_json.py:
--------------------------------------------------------------------------------
1 | input_data = """
2 | Ardor Blossom Moth
3 |
4 | [1]/Reach out./손을 뻗는다./手を伸ばす。
5 | Spiral of Contempt
6 |
7 | [2]/Avert your eyes./눈을 돌린다./目を背ける。
8 | Rising Ashes
9 |
10 | [1]/Walk into the mist./안개 속으로 걸어 들어간다./霧の中に入っていく。
11 | Nymph
12 |
13 | [1]/Accept blood./피를 받는다./血を受ける。
14 | Wailing Coffin
15 |
16 | [1]/Open the coffin./관을 연다./棺を開ける。
17 | Paper Chairman
18 |
19 | [2]/Shake your head./거절한다./拒否する。
20 | Sunset Wayfarer
21 |
22 | [1]/Take a break./잠시 쉬어간다./ちょっと休んでいく。
23 | Hurting Teddy Bear
24 |
25 | [1]/Remove the nails./못을 뺀다./釘を抜く。
26 | Skin Prophet
27 |
28 | [1]/Snuff out the candles./촛불을 끈다./蝋燭を消す。
29 | My Form Empties
30 |
31 | [2]/Take the brass ring./귀를 기울인다./真鍮の指輪を摘まむ。
32 | Drifting Fox
33 |
34 | [2]/Pet the fox./쓰다듬는다./撫でる。
35 | So That No One Will Cry
36 |
37 | [1]/Remove the doll’s talismans./인형에 붙어있는 부적을 뗀다./人形に付いているお札を剥がす。
38 | Brazen Bull
39 |
40 | [1]/Give water./물을 준다./水を与える。
41 | Fairy Gentleman
42 |
43 | [2]/Shake your head./고개를 젓는다./首を横に振る。
44 | Heavenly Executor's Scribe
45 |
46 | [1]/Read the tablet./석판을 읽는다./石版を読む。
47 | Sign of Roses
48 |
49 | [1]/Pick a rose./장미를 딴다./薔薇を手折る。
50 | Ambling Pearl
51 |
52 | [1]/Sample the green substance./녹색물질을 담는다./緑色の物質を掬う。
53 | Drenched Gossypium
54 |
55 | [1]/Approach it./다가간다./近寄る。
56 | Wayward Passenger
57 |
58 | [1]/Point the direction it should go./가야할 방향을 손으로 알려준다./進むべき方向を指し示す。
59 | Lost Mind
60 |
61 | [1]/Reach out to grab its hand./팔을 뻗어 손을 잡는다./腕を伸ばして手を掴む。
62 | Monkey Tree
63 |
64 | [2]/Snap the twig./가지를 꺾어간다./枝を折る。
65 | Blubbering Toad
66 |
67 | [2]/Sit and wait./차분히 앉아서 기다린다./ゆっくり座って待つ。
68 | Hole-in-the-Man
69 |
70 | [1]/Reach out to grab its hand./다가간다./近寄る。
71 | Stuck In Heaven
72 |
73 | [1]/Close your eyes./눈을 감는다./目を閉じる。
74 | Blue-ish Star
75 |
76 | [1]/Forward./나아간다./進む。
77 | Spider of Marriage
78 |
79 | [1]/Pick a flower./ 꽃 하나를 따간다./花を一本持っていく。
80 | Steam Transport Machine
81 |
82 | [1]/Order it to carry luggage./짐을 옮기라고 명령한다./荷物を運べと命令する。
83 | Dreaming Electric Sheep
84 |
85 | [1]/Cut the cables./케이블을 끊는다./ケーブルを切る。
86 | Shock Centipede
87 |
88 | [1]/Press the lightning-shaped button./전기모양 버튼을 누른다./電気の形をしたボタンを押す。
89 | kqe-1j-23
90 |
91 | [1]/Write [Hello]./안녕이라고 적는다./こんにちはと打つ。
92 | [1]/Ask for an explanation of the “town”./마을에 대해 설명해달라고 적는다./町について説明してくれと打つ。
93 | [1]/Confess the truth./솔직하게 대답한다./正直に答える。
94 | Will You Play?
95 |
96 | [2]/Play paper./보를 낸다./パーを出す。
97 | All-Around Cleaner
98 |
99 | [2]/You are not special./너는 특별하지 않다./君は特別じゃない。
100 | Rose Hunter
101 |
102 | [1]/Tell the truth./사실대로 말한다./正直に言う。
103 | Forsaken Employee
104 |
105 | [1]/Cut the ring./끊는다./切る。
106 | Faelantern
107 |
108 | [2]/Move on without resting./쉬지 않고 계속 나아간다./休まずに進み続ける。
109 | Centipede Apostle
110 |
111 | [2]/Take one of the prayer books from its body./몸에 있는 기도서 중 하나를 떼어온다./身体に付いてる祈祷書を一つ取ってくる。
112 | Pagoda Veneration
113 |
114 | [1]/Place a stone over the tower./돌탑위에 돌을 하나 올린다./石塔の上に石を一つ載せる。
115 | Fairy-Long-Legs
116 |
117 | [2]/Weather the rain and leave the place./비를 맞으며 이곳을 벗어난다./雨に降られながらここを離れる。
118 | Dimensional Oxidation Variant
119 |
120 | [1]/Hit the switch./스위치를 누른다./スイッチを押す。
121 | [2]/Leave the room./이대로 방을 나간다./このまま部屋を出る。
122 | Der Schütze
123 |
124 | [1]/Tell the shooter to look at the pendant on its neck./사수 목에 걸려있는 팬던트를 보라고 한다./射手の首に掛かっている ペンダントを見ろという。
125 | Overdue Assignments
126 |
127 | [1]/Say that you haven't put off any./없다고 한다./無いと言う。
128 | Hydra
129 |
130 | [1]/Accept the surgery./시술을 받는다./施術を受ける。
131 | Highway Devotee
132 |
133 | [1]/Go back the way you came instead of taking the main road./큰 도로로 가지 않고 왔던 길로 되돌아 나간다./大きな道路に行かずに、来た道へ引き返す。
134 | Chattering Teeth
135 |
136 | [3]/Choose the deranged skull./정신나간 해골을 선택한다./イカれた骸骨を選ぶ。
137 | Four-hundred Roses
138 |
139 | [2]/Break the spring's entryway to let more blood out./샘물의 입구를 부숴 더 넓혀 피를 더 많이 마시게 한다./湧き水の入口を壊してさらに広げ、血をより沢山飲ませる。
140 | Centaur
141 |
142 | [1]/Pull out the intravenous line on its body./몸과 연결된 링거를 뽑는다./身体と繋がっている点滴を抜く。
143 | Smokey Old Man
144 |
145 | [1]/Say that you're willing to hear the stories./이야기를 듣겠다고 한다./話を聞くと言う。
146 | [1]/Take the painting./그림을 가져간다./絵を持っていく。
147 | Tomorrow's Expression
148 |
149 | [2]/Don't make any expression./아무 표정도 짓지 마./何の表情も浮かべるな。
150 | Funeral of a Dying Butterfly
151 |
152 | [1]/Tell the truth./사실대로 말한다./正直に言う。
153 | Children in the Flask
154 |
155 | [1]/Comfort the pink droplet./분홍 물방울을 위로한다./桃色の雫を慰める。
156 | Star Luminary
157 |
158 | [2]/Agree that they are stars./별이 맞다고 한다./星で合ってると言う。
159 | 4th Front of the Smoke War
160 |
161 | [1]/Sneak up and remove a part of the wire./몰래 다가가 철조망 일부를 떼어낸다./こっそり近づいて鉄条網の一部を取り外す。
162 | Heavenly Commander's Throne
163 |
164 | [3]/Don't command anything./그 무엇도 지시하지 않는다./いかなることも指示しない。
165 | Sleepyhead
166 |
167 | [1]/Fill it with a Sinner's blood./수감자의 피를 줘서 채운다./囚人の血を与えて満たす。
168 | Golden Grip
169 |
170 | [2]/Hug and shake the giant body./거대한 몸을 안아 악수한다./巨大な手を抱いて握手する。
171 | Drunkard
172 |
173 | [2]/I don't./좋아하지 않는다./好きじゃない。
174 | Time Duck
175 |
176 | [2]/A rabbit./토끼다./ウサギだ。
177 | Dimensional Orbit Stabilizer
178 |
179 | [2]/I pity the one that binds./묶여져버린 것이 불쌍하다./縛られてしまったものが可哀想だ。
180 | Tomb of Bone
181 |
182 | [1]/Search to find where the voice is coming from./목소리의 위치를 찾는다./声の出る場所を探す。
183 | Sleeping Bag of Olden Days
184 |
185 | [1]/Pick up a respirator and put it in its mouth./바닥에 놓여져있는 호흡기를 입에 물어준다./床に置かれてる呼吸器を口にあてがう。
186 | Bound King
187 |
188 | [1]/... Bandages./이것은 붕대이다./これは包帯だ。
189 | Handshake of Handshakes
190 |
191 | [2]/Push the hand away./손을 뿌리친다./手を振り払う。
192 | Dream-Devouring Siltcurrent
193 |
194 | [1]/Say that you will sink together./같이 내려간다고 한다./一緒に降りると言う。
195 | Portrait of a Certain Day
196 |
197 | [1]/Say that you can't see it well./보이지 않는다고 답한다./見えないと言う。
198 | Broken Wings
199 |
200 | [2]/Leave./그 자리를 떠난다./その場から離れる。
201 | Cyclops
202 |
203 | [1]/Tell the truth./사실대로 말한다./正直に言う。
204 | Clockwork-time Roly-poly
205 |
206 | [2]/Push it further./더욱 젖혀버린다./もっと傾けてしまう。
207 | Explorer on a Bereaved Road
208 |
209 | [2]/East, to where the warning hand points./경고하는 손짓의 동쪽으로./警告しているハンドサインの東へ。
210 | [1]/Investigate./조사해본다./調査してみる。
211 | Resident of Metropolaris
212 |
213 | [2]/Ask to shake hands./악수를 청한다./握手を求める。
214 | [1]/Try to shake its hands anyway./그럼에도 악수를 청한다./だが、握手を求める
215 | """
216 |
217 | # Split the input data into individual lines
218 | lines = input_data.strip().split("\n")
219 |
220 | # Initialize an empty list to store the Japanese phrases
221 | jp_phrases = []
222 | en_phrases = []
223 | kr_phrases = []
224 |
225 | # Iterate over each line
226 | for line in lines:
227 | # Split the line by "/" to extract the Japanese phrase
228 | parts = line.split("/")
229 | if len(parts) >= 3:
230 | jp_phrase = parts[-1].strip()
231 | en_phrase = parts[-3].strip()
232 | kr_phrase = parts[-2].strip()
233 | en_phrases.append(en_phrase)
234 | jp_phrases.append(jp_phrase)
235 | kr_phrases.append(kr_phrase)
236 |
237 | choices_dict = {
238 | 'en': en_phrases,
239 | 'jp': jp_phrases,
240 | 'kr': kr_phrases
241 | }
242 |
243 | import json
244 |
245 | with open('choices_dict.json', 'w', encoding='utf-8') as f:
246 | json.dump(choices_dict, f, ensure_ascii=False, indent=4)
247 |
--------------------------------------------------------------------------------
/text_test/the_fuss_test.py:
--------------------------------------------------------------------------------
1 | from thefuzz import process
2 |
3 | choices = [
4 | "手を伸ばす。",
5 | "目を背ける。",
6 | "霧の中に入っていく。",
7 | "血を受ける。",
8 | "棺を開ける。",
9 | "拒否する。",
10 | "ちょっと休んでいく。",
11 | "釘を抜く。",
12 | "蝋燭を消す。",
13 | "真鍮の指輪を摘まむ。",
14 | "撫でる。",
15 | "人形に付いているお札を剥がす。",
16 | "水を与える。",
17 | "首を横に振る。",
18 | "石版を読む。",
19 | "薔薇を手折る。",
20 | "緑色の物質を掬う。",
21 | "近寄る。",
22 | "進むべき方向を指し示す。",
23 | "腕を伸ばして手を掴む。",
24 | "枝を折る。",
25 | "ゆっくり座って待つ。",
26 | "近寄る。",
27 | "目を閉じる。",
28 | "進む。",
29 | "花を一本持っていく。",
30 | "荷物を運べと命令する。",
31 | "ケーブルを切る。",
32 | "電気の形をしたボタンを押す。",
33 | "こんにちはと打つ。",
34 | "町について説明してくれと打つ。",
35 | "正直に答える。",
36 | "パーを出す。",
37 | "君は特別じゃない。",
38 | "正直に言う。",
39 | "切る。",
40 | "休まずに進み続ける。",
41 | "身体に付いてる祈祷書を一つ取ってくる。",
42 | "石塔の上に石を一つ載せる。",
43 | "雨に降られながらここを離れる。",
44 | "スイッチを押す。",
45 | "このまま部屋を出る。",
46 | "射手の首に掛かっている ペンダントを見ろという。",
47 | "無いと言う。",
48 | "施術を受ける。",
49 | "大きな道路に行かずに、来た道へ引き返す。",
50 | "イカれた骸骨を選ぶ。",
51 | "湧き水の入口を壊してさらに広げ、血をより沢山飲ませる。",
52 | "身体と繋がっている点滴を抜く。",
53 | "話を聞くと言う。",
54 | "絵を持っていく。",
55 | "何の表情も浮かべるな。",
56 | "正直に言う。",
57 | "桃色の雫を慰める。",
58 | "星で合ってると言う。",
59 | "こっそり近づいて鉄条網の一部を取り外す。",
60 | "いかなることも指示しない。",
61 | "囚人の血を与えて満たす。",
62 | "巨大な手を抱いて握手する。",
63 | "好きじゃない。",
64 | "ウサギだ。",
65 | "縛られてしまったものが可哀想だ。",
66 | "声の出る場所を探す。",
67 | "床に置かれてる呼吸器を口にあてがう。",
68 | "これは包帯だ。",
69 | "手を振り払う。",
70 | "一緒に降りると言う。",
71 | "見えないと言う。",
72 | "その場から離れる。",
73 | "正直に言う。",
74 | "もっと傾けてしまう。",
75 | "警告しているハンドサインの東へ。",
76 | "調査してみる。",
77 | "握手を求める。",
78 | "だが、握手を求める"
79 | ]
80 |
81 |
82 | def filter_by_length_ratio(target, choices, max_length_diff_ratio=0.6):
83 | target_len = len(target)
84 | filtered_choices = [choice for choice in choices if
85 | min(abs(len(choice) - target_len) / target_len,
86 | abs(len(choice) - target_len) / len(choice)) <= max_length_diff_ratio]
87 | print(filtered_choices)
88 |
89 | # 现在使用限定长度差异的choices进行匹配
90 | match = process.extractOne(target, filtered_choices)
91 |
92 | return match
93 |
94 |
95 | result = filter_by_length_ratio("握手", choices)
96 | print(result)
97 |
--------------------------------------------------------------------------------
/workbench/__init__.py:
--------------------------------------------------------------------------------
1 | from workbench.file_path_utils import PathManager
2 | from workbench.logging_utils import LoggingManager
3 | from workbench.ocr_utils import Ocr
4 | from workbench.read_settings import SettingsReader
5 | from . import keyboard_control
6 | from . import mission_handling
7 | from . import mouse_control
8 | from . import ui_config
9 | from . import main_work
10 |
--------------------------------------------------------------------------------
/workbench/choices_dict.json:
--------------------------------------------------------------------------------
1 | {
2 | "en": [
3 | "Avert your eyes.",
4 | "Shake your head.",
5 | "Take the brass ring.",
6 | "Pet the fox.",
7 | "Shake your head.",
8 | "Snap the twig.",
9 | "Sit and wait.",
10 | "Play paper.",
11 | "You are not special.",
12 | "Move on without resting.",
13 | "Take one of the prayer books from its body.",
14 | "Weather the rain and leave the place.",
15 | "Leave the room.",
16 | "Choose the deranged skull.",
17 | "Break the spring's entryway to let more blood out.",
18 | "Don't make any expression.",
19 | "Agree that they are stars.",
20 | "Don't command anything.",
21 | "Hug and shake the giant body.",
22 | "I don't.",
23 | "A rabbit.",
24 | "I pity the one that binds.",
25 | "Push the hand away.",
26 | "Leave.",
27 | "Push it further.",
28 | "East, to where the warning hand points.",
29 | "Ask to shake hands."
30 | ],
31 | "jp": [
32 | "目を背ける。",
33 | "日を背ける。",
34 | "拒否する。",
35 | "真鍮の指輪を摘まむ。",
36 | "撫でる。",
37 | "起でる。",
38 | "首を横に振る。",
39 | "枝を折る。",
40 | "ゆっくり座って待つ。",
41 | "パーを出す。",
42 | "君は特別じゃない。",
43 | "休まずに進み続ける。",
44 | "身体に付いてる祈祷書を一つ取ってくる。",
45 | "雨に降られながらここを離れる。",
46 | "このまま部屋を出る。",
47 | "イカれた骸骨を選ぶ。",
48 | "湧き水の入口を壊してさらに広げ、血をより沢山飲ませる。",
49 | "何の表情も浮かべるな。",
50 | "星で合ってると言う。",
51 | "いかなることも指示しない。",
52 | "巨大な手を抱いて握手する。",
53 | "好きじゃない。",
54 | "ウサギだ。",
55 | "縛られてしまったものが可哀想だ。",
56 | "手を振り払う。",
57 | "その場から離れる。",
58 | "もっと傾けてしまう。",
59 | "警告しているハンドサインの東へ。",
60 | "握手を求める。",
61 | "囚人を捧げる",
62 | "剣契だと言う"
63 | ],
64 | "kr": [
65 | "눈을 돌린다.",
66 | "거절한다.",
67 | "귀를 기울인다.",
68 | "쓰다듬는다.",
69 | "고개를 젓는다.",
70 | "가지를 꺾어간다.",
71 | "차분히 앉아서 기다린다.",
72 | "보를 낸다.",
73 | "너는 특별하지 않다.",
74 | "쉬지 않고 계속 나아간다.",
75 | "몸에 있는 기도서 중 하나를 떼어온다.",
76 | "비를 맞으며 이곳을 벗어난다.",
77 | "이대로 방을 나간다.",
78 | "정신나간 해골을 선택한다.",
79 | "샘물의 입구를 부숴 더 넓혀 피를 더 많이 마시게 한다.",
80 | "아무 표정도 짓지 마.",
81 | "별이 맞다고 한다.",
82 | "그 무엇도 지시하지 않는다.",
83 | "거대한 몸을 안아 악수한다.",
84 | "좋아하지 않는다.",
85 | "토끼다.",
86 | "묶여져버린 것이 불쌍하다.",
87 | "손을 뿌리친다.",
88 | "그 자리를 떠난다.",
89 | "더욱 젖혀버린다.",
90 | "경고하는 손짓의 동쪽으로.",
91 | "악수를 청한다."
92 | ],
93 | "zh": [
94 | "移开视线",
95 | "摘下黄铜戒指",
96 | "抚摸狐狸",
97 | "摇头",
98 | "折断树枝",
99 | "坐下慢慢等待",
100 | "出布",
101 | "不做任何表情。",
102 | "我不喜欢。",
103 | "选择发狂的骷髅头。",
104 | "把泉水的入口破坏,让更多血流出来。",
105 | "你不是特别的。",
106 | "同意那是星星。",
107 | "从它的身上拿一本祈祷书。",
108 | "不下达命令。",
109 | "冒雨离开这里。",
110 | "离开房间。",
111 | "不作休息,继续前进。",
112 | "离开。",
113 | "拥抱它巨大的身体并握手。",
114 | "是兔子。",
115 | "束缚着的一方更可怜。",
116 | "推开手。",
117 | "离开那里。",
118 | "让它倾倒得更厉害。",
119 | "向警告的手所指的东方。",
120 | "要求握手。"
121 | ]
122 | }
--------------------------------------------------------------------------------
/workbench/ego_gift.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import time
4 |
5 | import pyautogui as pg
6 |
7 | import file_path_utils
8 |
9 | pg.FAILSAFE = False
10 |
11 |
12 | # 界面检查模块
13 | def check_img(img, confid=0.9):
14 | try:
15 | if pg.locateOnScreen(file_path_utils.PathManager.get_local_image(img), confidence=confid) is not None:
16 | print('看到了...', img)
17 | return True
18 | except pg.ImageNotFoundException:
19 | print('没看到..', img)
20 | return False
21 |
22 |
23 | def check_img_list(img_list, confid=0.9):
24 | for i in range(len(img_list)):
25 | if check_img(img_list[i], confid):
26 | return True
27 | return False
28 |
29 |
30 | # 控制模块
31 | def mouse_click(img, times=1, confid=0.9):
32 | try:
33 | location = pg.locateCenterOnScreen(file_path_utils.PathManager.get_local_image(img), confidence=confid)
34 | if location is not None:
35 | pg.click(
36 | location.x,
37 | location.y,
38 | interval=0.6,
39 | duration=0,
40 | clicks=times,
41 | button='left',
42 | )
43 | pg.moveTo(0, 0)
44 | print("点到了 ...", img)
45 | except pg.ImageNotFoundException:
46 | print("没点到 ...", img)
47 |
48 |
49 | def mouse_click_img_list(img_list, times=1, confid=0.9):
50 | for i in range(len(img_list)):
51 | if mouse_click(img_list[i], times, confid):
52 | return True
53 | return False
54 |
55 |
56 | _worklist_path = os.path.join(file_path_utils.PathManager.CURRENT_DIR, 'worklist.json')
57 | with open(_worklist_path, 'r', encoding='utf-8') as f:
58 | _worklist = json.load(f)
59 |
60 |
61 | # ————————————————————————————————————————————
62 | # ————————————————————————————————————————————
63 | def start_mirror():
64 | mouse_click_img_list(_worklist['start_mirror'])
65 |
66 |
67 | def end_mirror():
68 | mouse_click_img_list(_worklist['end_mirror'])
69 |
70 |
71 | def gift(camp):
72 | for _ in range(2):
73 | camp_checked = check_img_list(_worklist[f'{camp}_checked'][0], 0.85) & check_img_list(
74 | _worklist[f'{camp}_checked'][1], 0.85)
75 | if camp_checked:
76 | mouse_click_img_list(_worklist[f'{camp}_click'], confid=0.85)
77 | mouse_click('gifts_checked_1690.png')
78 | print('等待下一步操作')
79 | time.sleep(999999)
80 | else:
81 | mouse_click('refresh_1690.png')
82 |
83 |
84 | def mirror_opening_field():
85 | while True:
86 | start_mirror()
87 | gift('bleed')
88 | end_mirror()
89 |
90 |
91 | """
92 | 流血: bleed
93 | 呼吸: breath
94 | 烧伤: burn
95 | 破裂: fracture
96 |
97 | """
98 |
99 | if __name__ == '__main__':
100 | mirror_opening_field()
101 |
--------------------------------------------------------------------------------
/workbench/file_path_utils.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 |
4 | class PathManager:
5 | """
6 | To manage the essential file paths and language list for the application.
7 |
8 | Attributes:
9 | CURRENT_PATH (str): The absolute path to the current script file.
10 | CURRENT_DIR (str): The directory containing the current script file.
11 | ROOT_RELPATH (str): The relative path to the root.
12 | ASSETS_RELPATH (str): The relative path to the assets.
13 | LANGUAGE_LIST (List[str]): A list of supported languages, including "English", "Japanese", and "Korean".
14 |
15 | Methods:
16 | get_local_image(image_name: str) -> str or None:
17 | Looks up and returns the local path of the specified image file. It checks the root directory first,
18 | then iterates through the language directories in the `LANGUAGE_LIST`.
19 | """
20 |
21 | CURRENT_PATH = os.path.abspath(__file__)
22 | CURRENT_DIR = os.path.dirname(CURRENT_PATH)
23 | ROOT_RELPATH = os.path.join(CURRENT_DIR, '../')
24 | ASSETS_RELPATH = os.path.join(CURRENT_DIR, '../assets')
25 | LOG_RELPATH = os.path.join(CURRENT_DIR, '../log', )
26 | MODEL_RELPATH = os.path.join(CURRENT_DIR, '../models', )
27 | LANGUAGE_LIST = ["en", "jp", "kr", "zh"]
28 | OTHER_LIST = ["gifts"]
29 |
30 | @classmethod
31 | def get_local_image(cls, image_name: str) -> str | None:
32 | """Find and return the local path of the specified image file. Check the root directory first,
33 | then traverse through the language directories in the `LANGUAGE_LIST`.
34 |
35 | Args:
36 | image_name (str): The name of the image file to be located.
37 |
38 | Returns:
39 | str or None: The local path of the found image file, or None if not found.
40 | """
41 | path = os.path.join(cls.ASSETS_RELPATH, image_name)
42 |
43 | if os.path.isfile(path):
44 | return path
45 |
46 | for lang in cls.LANGUAGE_LIST:
47 | lang_path = os.path.join(cls.ASSETS_RELPATH, lang, image_name)
48 | if os.path.isfile(lang_path):
49 | return lang_path
50 |
51 | for other in cls.OTHER_LIST:
52 | other_path = os.path.join(cls.ASSETS_RELPATH, other, image_name)
53 | if os.path.isfile(other_path):
54 | return other_path
55 |
56 | return None
57 |
58 |
59 | if __name__ == '__main__':
60 | result = PathManager.get_local_image('back_button.png')
61 | print(result)
62 |
--------------------------------------------------------------------------------
/workbench/image_processing.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import numpy as np
3 |
4 | from workbench.file_path_utils import PathManager
5 |
6 |
7 | class ImageDetector:
8 | """
9 | To detect specific templates within images and computes their similarity to a reference.
10 |
11 | Attributes: HLS: A constant string representing the HLS color space filter. MASK_PARAM: A constant string
12 | indicating the key for mask parameters in TEMPLATE_DICT. OFFSET_PARAM: A constant string indicating the key for
13 | rectangle offset parameters in TEMPLATE_DICT. TEMPLATE_DICT: Dictionary containing detection parameters for
14 | various templates. Each template name maps to a sub-dictionary with keys 'HLS', 'mask_param', and 'offset_param'.
15 |
16 | Args: image_input (cv2.UMat): The input image data as an OpenCV UMat object. template_name (str): The name of the
17 | template to match, which must exist in TEMPLATE_DICT. threshold (int, optional): Specifies the maximum number of
18 | bounding boxes with the largest area to retain, defaults to 12.
19 |
20 | Methods:
21 | apply_hls_filter(): Applies an HLS color space filter to preprocess the image.
22 | find_bounding_boxes(): Identifies and selects bounding boxes that meet size criteria.
23 | rectangles_offset(): Adjusts the position and dimensions of bounding boxes based on template parameters.
24 | get_confidence_rect(): Calculates the most similar bounding box and its similarity to the specified template.
25 | create_masked_image(): Generates a masked version of the image using the given masking parameters.
26 | calculate_similarity(): Computes the similarity between two images.
27 | """
28 | HLS = 'hls'
29 | MASK_PARAM = 'mask_param'
30 | OFFSET_PARAM = 'offset_param'
31 | KERNEL_SIZE = 'kernel_size'
32 | TEMPLATE_DICT = {
33 | 'battle.png': {
34 | 'hls': (
35 | (0, 30),
36 | (170, 255),
37 | (125, 255)
38 | )
39 | },
40 | 'battle_rate_jp.png': {
41 | 'hls': (
42 | (0, 30),
43 | (149, 255),
44 | (46, 195)
45 | ),
46 | 'kernel_size': 1,
47 | },
48 | 'setting_button.png': {
49 | 'hls': (
50 | (0, 60),
51 | (0, 110),
52 | (0, 60)
53 | ),
54 | },
55 | 'setting_menu': {
56 | 'hls': (
57 | (0, 20),
58 | (0, 255),
59 | (0, 255)
60 | ),
61 | },
62 | 'death_jp.png': {
63 | 'hls': (
64 | (0, 4),
65 | (40, 70),
66 | (250, 255)
67 | ),
68 | 'offset_param': (0.26, -1.31, 1.77, 1.65),
69 | },
70 | 'gear.png': {
71 | 'hls': (
72 | (14, 20),
73 | (70, 200),
74 | (90, 200)
75 | ),
76 | 'offset_param': (0.18, 0.2, 0.71, 0.71),
77 | },
78 | 'gear_active.png': {
79 | 'hls': (
80 | (0, 19),
81 | (100, 160),
82 | (200, 255)
83 | ),
84 | 'offset_param': (0.18, 0.15, 0.78, 0.71),
85 | },
86 | 'skip_button.png': {
87 | 'hls': (
88 | (12, 25),
89 | (150, 210),
90 | (20, 200)
91 | )
92 | },
93 | 'skip_button_2.png': {
94 | 'hls': (
95 | (12, 25),
96 | (150, 210),
97 | (20, 200)
98 | )
99 | },
100 | 'back_button.png': {
101 | 'hls': (
102 | (9, 21),
103 | (10, 110),
104 | (40, 230)
105 | ),
106 | 'mask_param': (
107 | 2 / 3,
108 | 3 / 4,
109 | )
110 |
111 | },
112 | 'yes_button.png': {
113 | 'hls': (
114 | (12, 18),
115 | (100, 180),
116 | (0, 100)
117 | )
118 | },
119 | 'intensity': {
120 | 'hls': (
121 | (0, 30),
122 | (0, 255),
123 | (0, 255)
124 | ),
125 | 'offset_param': (-0.1, -0.72, 1.18, 0.67),
126 | },
127 | 'choices': {
128 | 'hls': (
129 | (0, 180),
130 | (0, 38),
131 | (0, 160)
132 | )
133 | },
134 | }
135 |
136 | def __init__(self, image_input: np.ndarray, template_name: str, threshold=12):
137 | self.image = image_input
138 | self.template_name = template_name
139 | self.current_dict = self.TEMPLATE_DICT[self.template_name]
140 | self.rectangles_list = []
141 | self.threshold = threshold
142 | self.mask = np.zeros_like(image_input)
143 |
144 | def apply_hls_filter(self, image):
145 | h_range, l_range, s_range = self.current_dict[self.HLS]
146 | h_channel, l_channel, s_channel = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
147 | h_mask = cv2.inRange(h_channel, h_range[0], h_range[1])
148 | l_mask = cv2.inRange(l_channel, l_range[0], l_range[1])
149 | s_mask = cv2.inRange(s_channel, s_range[0], s_range[1])
150 |
151 | mask = cv2.bitwise_and(h_mask, cv2.bitwise_and(s_mask, l_mask))
152 | kernel_size = self.current_dict.get(self.KERNEL_SIZE, 1)
153 | kernel = np.ones((kernel_size, kernel_size), np.uint8)
154 | self.mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel)
155 | # mask = cv2.bitwise_and(
156 | # cv2.inRange(hls_channels[0], *h_range),
157 | # cv2.inRange(hls_channels[1], *l_range),
158 | # cv2.inRange(hls_channels[2], *s_range)
159 | # )
160 | return cv2.bitwise_and(image, image, mask=self.mask)
161 |
162 | def find_bounding_boxes(self):
163 | self.rectangles_list.clear()
164 | _ = self.apply_hls_filter(self.image)
165 |
166 | contours, _ = cv2.findContours(self.mask, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
167 | bounding_rects = [cv2.boundingRect(c) for c in contours]
168 | # apply offset
169 | bounding_rects = self.rectangles_offset(bounding_rects)
170 | sizes = [rect[2] * rect[3] for rect in bounding_rects]
171 | sizes = sorted(sizes, reverse=True)
172 | # print(sizes)
173 | threshold_size = sizes[min(self.threshold - 1, len(sizes) - 1)]
174 | self.rectangles_list.extend(
175 | rect for rect in bounding_rects
176 | if rect[2] * rect[3] >= threshold_size and 0.1 <= rect[2] / rect[3] <= 10
177 | )
178 |
179 | # i = 1000
180 | # for rect in self.rectangles_list:
181 | # x, y, w, h = rect
182 | # # print(rect)
183 | # roi = self.image[y:y + h, x:x + w]
184 | #
185 | # cv2.imshow('1', roi)
186 | # cv2.waitKey(100)
187 | # cv2.imwrite(f'{i}.png', roi)
188 | # i += 1
189 |
190 | return self.rectangles_list
191 |
192 | def rectangles_offset(self, rectangles_list):
193 | offset_factors = self.current_dict.get(self.OFFSET_PARAM, [0, 0, 1, 1])
194 | # print(f'offsets:{offset_factors}')
195 | x_offset_factor, y_offset_factor, width_scale_factor, height_scale_factor = offset_factors
196 |
197 | image_width, image_height = self.image.shape[1], self.image.shape[0]
198 |
199 | rectangles_offset_list = [(max(0, round(x + w * x_offset_factor)), # 确保x坐标不小于0
200 | max(0, round(y + h * y_offset_factor)), # 确保y坐标不小于0
201 | max(1, min(image_width, round(w * width_scale_factor))), # 确保宽度不超过图像宽度
202 | max(1, min(image_height, round(h * height_scale_factor)))) # 确保高度不超过图像高度
203 | for x, y, w, h in rectangles_list]
204 |
205 | return rectangles_offset_list
206 |
207 | def get_confidence_rect(self):
208 |
209 | # Detect rectangles and draw them on the image
210 | self.find_bounding_boxes()
211 |
212 | # Load the skip button template
213 | template = cv2.imread(PathManager.get_local_image(self.template_name))
214 | # template = self.apply_hls_filter(template)
215 | # cv2.imshow('1', template)
216 | # cv2.waitKey(0)
217 | # template = cv2.imread(get_local_image('skip_button.png'))
218 |
219 | # Initialize maximum similarity and corresponding rectangle
220 | max_similarity = 0
221 | max_similarity_rect = None
222 |
223 | # Calculate similarity for each rectangle
224 | mask_param_list = self.current_dict.get(self.MASK_PARAM, [])
225 | template_masked = self.create_masked_image(template, *mask_param_list)
226 | for rect in self.rectangles_list:
227 | x, y, w, h = rect
228 | # print(rect)
229 | roi = self.image[y:y + h, x:x + w]
230 | # roi = self.apply_hls_filter(roi)
231 | roi_masked = self.create_masked_image(roi, *mask_param_list)
232 | # cv2.imshow('1', roi)
233 | # cv2.waitKey(0)
234 | similarity = self.calculate_similarity(roi_masked, template_masked)
235 |
236 | # Update max similarity and max similarity rectangle if necessary
237 | if similarity > max_similarity:
238 | max_similarity = similarity
239 | max_similarity_rect = rect
240 |
241 | # cv2.imshow("12", roi)
242 | # cv2.waitKey(0)
243 | # print(f"Similarity for rectangle at ({x}, {y}) is {similarity:.4f}")
244 |
245 | # Return max similarity and it's corresponding rectangle
246 | return max_similarity, max_similarity_rect
247 |
248 | @staticmethod
249 | def create_masked_image(image, height_factor=None, width_factor=None, preserve_center=False):
250 | if height_factor is None or width_factor is None:
251 | return image
252 | # Obtain the image dimensions
253 | h, w, channels = image.shape
254 |
255 | # Create a white image of the same dimensions
256 | mask = np.zeros((h, w, channels), np.uint8) if preserve_center else np.ones((h, w, channels), np.uint8) * 255
257 |
258 | # Define your rectangle
259 | start_y, start_x = int(h * (1 - height_factor) / 2), int(w * (1 - width_factor) / 2)
260 | end_y, end_x = int(h * (1 + height_factor) / 2), int(w * (1 + width_factor) / 2)
261 |
262 | # Set rectangle color based on preserve_center
263 | rectangle_color = (255, 255, 255) if preserve_center else (0, 0, 0)
264 |
265 | # Draw a rectangle on the white mask
266 | cv2.rectangle(mask, (start_x, start_y), (end_x, end_y), rectangle_color, -1)
267 |
268 | # Combine the image with the mask
269 | result = cv2.bitwise_and(image, mask)
270 |
271 | # Use cv2.imshow() function to display the image
272 | # cv2.imshow('Processed Image', result)
273 | # cv2.waitKey(0)
274 | # cv2.destroyAllWindows()
275 | return result
276 |
277 | @staticmethod
278 | def calculate_similarity(image, template: cv2.typing.MatLike):
279 | # 调整图片大小
280 | try:
281 | target_size = (template.shape[1], template.shape[0])
282 | except AttributeError:
283 | return 0
284 | image = cv2.resize(image, target_size)
285 | mask = cv2.inRange(image, np.array([0, 0, 0]), np.array([255, 255, 255]))
286 | # 创建ORB特征提取器
287 | orb = cv2.ORB.create(edgeThreshold=0)
288 |
289 | # 从两幅图像中查找关键点和描述符
290 | # cv2.imshow('1', image)
291 | # cv2.waitKey(0)
292 | try:
293 | kp1, des1 = orb.detectAndCompute(image, mask)
294 | except cv2.error:
295 | # cv2.imshow('1', image)
296 | # cv2.waitKey(0)
297 | return 0
298 | kp2, des2 = orb.detectAndCompute(template, mask)
299 |
300 | # 创建Brute Force Matcher
301 | bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=False) # 修改为False,以便返回两个最近的匹配点
302 |
303 | # 使用Matcher匹配描述符
304 | matches = bf.knnMatch(des1, des2, k=2) # 修改为knnMatch,以便返回两个最近的匹配点
305 |
306 | # 应用比例测试,过滤掉明显不匹配的点
307 | good_matches = []
308 | for m, n in matches:
309 | if m.distance < 0.75 * n.distance: # 如果第一个匹配点的距离小于第二个匹配点的距离的0.75倍,那么它是好的匹配点
310 | good_matches.append(m)
311 |
312 | # 根据好的匹配数返回相似度
313 | return len(good_matches)
314 |
315 | def get_mask(self, image):
316 | h_range, l_range, s_range = self.current_dict[self.HLS]
317 | h_channel, l_channel, s_channel = cv2.split(cv2.cvtColor(image, cv2.COLOR_BGR2HLS))
318 | h_mask = cv2.inRange(h_channel, h_range[0], h_range[1])
319 | l_mask = cv2.inRange(l_channel, l_range[0], l_range[1])
320 | s_mask = cv2.inRange(s_channel, s_range[0], s_range[1])
321 |
322 | mask = cv2.bitwise_and(h_mask, cv2.bitwise_and(s_mask, l_mask))
323 |
324 | return mask
325 |
326 | def get_confidence_rect_mask(self):
327 |
328 | # Detect rectangles and draw them on the image
329 | self.find_bounding_boxes()
330 |
331 | # Load the skip button template
332 | template = cv2.imread(PathManager.get_local_image(self.template_name))
333 | template_mask = self.get_mask(template)
334 |
335 | max_similarity = 0
336 | max_similarity_rect = None
337 |
338 | for rect in self.rectangles_list:
339 | x, y, w, h = rect
340 | # print(rect)
341 | roi = self.image[y:y + h, x:x + w]
342 | roi_mask = self.get_mask(roi)
343 |
344 | similarity = self.calculate_similarity_mask(roi_mask, template_mask)
345 |
346 | # Update max similarity and max similarity rectangle if necessary
347 | if similarity > max_similarity:
348 | max_similarity = similarity
349 | max_similarity_rect = rect
350 |
351 | # cv2.imshow("12", roi)
352 | # cv2.waitKey(0)
353 | # print(f"Similarity for rectangle at ({x}, {y}) is {similarity:.4f}")
354 |
355 | # Return max similarity and it's corresponding rectangle
356 | return max_similarity, max_similarity_rect
357 |
358 | @staticmethod
359 | def calculate_similarity_mask(image, template: cv2.typing.MatLike):
360 | # 调整图片大小
361 | try:
362 | target_size = (template.shape[1], template.shape[0])
363 | except AttributeError:
364 | return 0
365 | image = cv2.resize(image, target_size)
366 | res = cv2.matchTemplate(image, template, cv2.TM_CCOEFF_NORMED)
367 | # print(1 - abs(res[0][0]))
368 | # 根据好的匹配数返回相似度
369 | return abs(res[0][0])
370 |
371 | # if __name__ == "__main__":
372 | # def main():
373 | # image_path = 'back_button.png' # Replace with your image path
374 | # create_masked_image(image_path, height_factor=2 / 3, width_factor=3 / 4, preserve_center=True)
375 | #
376 | #
377 | # main()
378 |
--------------------------------------------------------------------------------
/workbench/keyboard_control.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | import time
3 |
4 |
5 | # 定义一个键盘类,用于模拟键盘按键的操作
6 | class KeyBoard:
7 | # 定义按键的虚拟键码映射
8 | key_values = {
9 | 'shift': 0x10,
10 | 'ctrl': 0x11,
11 | 'alt': 0x12,
12 | 'enter': 0x0D
13 | }
14 |
15 | for i in range(26):
16 | key_values[chr(65 + i).lower()] = 0x41 + i
17 |
18 | # 定义按键的操作,表示按键的升起和落下
19 | KEY_EVENT_KEYDOWN = 0x0
20 | KEY_EVENT_KEYUP = 0x2
21 |
22 | # 引用用户32库,用以发送按键消息
23 | user32 = ctypes.windll.user32
24 |
25 | # 定义一个私有函数,用于按下一个键
26 | # 参数key是要按下的键的名字,比如'a'或'shift'
27 | def __press_one_key(self, key):
28 | self.user32.keybd_event(self.key_values[key], 0, self.KEY_EVENT_KEYDOWN, 0)
29 |
30 | # 定义一个私有函数,用于释放一个键
31 | # 参数key是要释放的键的名字,比如'a'或'shift'
32 | def __release_one_key(self, key):
33 | self.user32.keybd_event(self.key_values[key], 0, self.KEY_EVENT_KEYUP, 0)
34 |
35 | # 定义一个公开函数,用于按下多个键
36 | # 参数keys是要按下的键的名字的字符串,用' + '分隔,比如'shift + ctrl + alt + D'
37 | def press_keys(self, keys: str):
38 | keys = keys.lower().split(' + ')
39 | for key in keys:
40 | self.__press_one_key(key)
41 | # 短暂等待,确保按键消息已送达
42 | time.sleep(0.01)
43 | # 释放按键
44 | for key in keys:
45 | self.__release_one_key(key)
46 |
47 |
48 | # 创建一个键盘对象
49 | keyboard = KeyBoard()
50 |
51 | if __name__ == '__main__':
52 | # 测试函数
53 | # keyboard.press_keys("shift + ctrl + alt + D")
54 | # keyboard.press_keys("alt + C")
55 | keyboard.press_keys('enter')
56 |
--------------------------------------------------------------------------------
/workbench/logging_utils.py:
--------------------------------------------------------------------------------
1 | import logging
2 | import os
3 |
4 | from colorlog import ColoredFormatter
5 |
6 | from workbench.file_path_utils import PathManager
7 |
8 |
9 | class LoggingManager:
10 | # noinspection SpellCheckingInspection
11 | log_file_path = os.path.join(PathManager.LOG_RELPATH, 'Limbug_Clicker.log')
12 | logger = logging.getLogger('my_logger')
13 | logger.propagate = False
14 | # 清除logger上的处理器
15 | if len(logger.handlers) > 0:
16 | for handler in logger.handlers:
17 | logger.removeHandler(handler)
18 |
19 | logger.setLevel(logging.DEBUG)
20 | # 创建FileHandler和StreamHandler
21 | fh = logging.FileHandler(log_file_path, mode='w')
22 | # fh.setLevel(logging.CRITICAL)
23 | fh.setLevel(logging.DEBUG)
24 | ch = logging.StreamHandler()
25 | ch.setLevel(logging.DEBUG)
26 |
27 | formatter = ColoredFormatter('%(asctime)s - %(levelname)s: %(filename)s[line:%(lineno)d] - %(message)s')
28 | ch_formatter = ColoredFormatter(
29 | '%(log_color)s%(asctime)s - %(levelname)s: %(filename)s[line:%(lineno)d] - %(message)s')
30 | ch.setFormatter(ch_formatter)
31 | fh.setFormatter(formatter)
32 | logger.addHandler(fh)
33 | logger.addHandler(ch)
34 |
35 | @classmethod
36 | def toggle_logging(cls, is_enabled: bool):
37 | if is_enabled:
38 | cls.fh.setLevel(logging.DEBUG)
39 | else:
40 | cls.fh.setLevel(logging.CRITICAL)
41 |
42 | # 使用示例:
43 | # from workbench.logging_utils import LoggingManager
44 | #
45 | # if __name__ == '__main__':
46 | #
47 | # # 改变日志级别
48 | # logger = LoggingManager.logger
49 | # LoggingManager.toggle_logging(True) # 将日志级别切换到DEBUG(假设我们希望看到详细的调试信息)
50 | #
51 | # # 使用logger记录一条info消息
52 | # logger.info('Hello from the test.')
53 | #
54 | # # 模拟一个异常并记录错误信息
55 | # # noinspection PyBroadException
56 | # try:
57 | # res = 0 / 0
58 | # except Exception as exc:
59 | # logger.exception("An error occurred: ")
60 | #
61 | # # 如果需要,还可以再次改变日志级别
62 | # LoggingManager.toggle_logging(False) # 将日志级别切换回CRITICAL或更高
63 |
--------------------------------------------------------------------------------
/workbench/main_work.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import time
4 |
5 | import cv2
6 | import numpy as np
7 | import pyautogui as pg
8 | from PIL import ImageGrab
9 |
10 | from workbench import SettingsReader
11 | from workbench import mouse_control
12 | from workbench.image_processing import ImageDetector
13 | from workbench.ocr_utils import Ocr
14 | from . import file_path_utils
15 |
16 | pg.FAILSAFE = False
17 |
18 | _worklist_path = os.path.join(file_path_utils.PathManager.CURRENT_DIR, 'worklist.json')
19 | with open(_worklist_path, 'r', encoding='utf-8') as f:
20 | _worklist = json.load(f)
21 |
22 |
23 | def get_screenshot():
24 | # 获取屏幕截图
25 | image = ImageGrab.grab()
26 |
27 | # 转换为opencv的数据格式
28 | # noinspection PyTypeChecker
29 | opencv_image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
30 | return opencv_image
31 |
32 |
33 | # 界面检查模块
34 | def check_img(img, confid=0.9):
35 | try:
36 | if pg.locateOnScreen(file_path_utils.PathManager.get_local_image(img), confidence=confid) is not None:
37 | print('看到了...', img)
38 | return True
39 | except pg.ImageNotFoundException:
40 | print('没看到..', img)
41 | return False
42 |
43 |
44 | def check_img_list(img_list, confid=0.9):
45 | for i in range(len(img_list)):
46 | if check_img(img_list[i], confid):
47 | return True
48 | return False
49 |
50 |
51 | # 控制模块
52 | def mouse_click(img, times=1, confid=0.9):
53 | try:
54 | location = pg.locateCenterOnScreen(file_path_utils.PathManager.get_local_image(img), confidence=confid)
55 | if location is not None:
56 | pg.click(
57 | location.x,
58 | location.y,
59 | interval=0.1,
60 | duration=0,
61 | clicks=times,
62 | button='left',
63 | )
64 | pg.moveTo(0, 0)
65 | print("点到了 ...", img)
66 | except pg.ImageNotFoundException:
67 | print("没点到 ...", img)
68 |
69 |
70 | def mouse_click_img_list(img_list, times=1, confid=0.9):
71 | for i in range(len(img_list)):
72 | if mouse_click(img_list[i], times, confid):
73 | return True
74 | return False
75 |
76 |
77 | def mouse_hold(img, confid=0.75):
78 | try:
79 | location = pg.locateCenterOnScreen(file_path_utils.PathManager.get_local_image(img), confidence=confid)
80 | if location is not None:
81 | pg.click(
82 | x=location.x + (-27),
83 | y=location.y + 117,
84 | interval=0,
85 | duration=0,
86 | clicks=1,
87 | button='left',
88 | )
89 | print('点到了模糊的...', img)
90 | pg.mouseDown(
91 | x=location.x + (-27),
92 | y=location.y + 117,
93 | duration=0,
94 | button='left',
95 | )
96 | print('按住模糊的..', img)
97 | except pg.ImageNotFoundException:
98 | print("没按住 ...", img)
99 |
100 |
101 | def mouse_hold_img_list(img_list, confid=0.75):
102 | for i in range(len(img_list)):
103 | if mouse_hold(img_list[i], confid):
104 | return True
105 | return False
106 |
107 |
108 | def abnormality_ocr():
109 | # text_rect_list = screenshot_ocr()
110 | image = get_screenshot()
111 | dict_key = 'choices'
112 | image_detector = ImageDetector(image, dict_key, 12)
113 | rectangles_list = image_detector.find_bounding_boxes()
114 |
115 | text_rect_list = Ocr.recognize_rectangles(image, rectangles_list)
116 | match, rect, score = Ocr.get_best_choice(text_rect_list)
117 | print(f'match,{match} rect,{rect} score{score}')
118 | if score > 60:
119 | mouse_control.click_rect_center(rect)
120 | else:
121 | mouse_click_img_list(_worklist['abnormality_click'])
122 |
123 |
124 | # ————————————————————————————————————————————————————
125 | # ————————————————————————————————————————————————————
126 | # 按界面归类组件
127 | def battle_field():
128 | battle_checked = check_img_list(_worklist['battle_checked'])
129 | if battle_checked:
130 | mouse_click("gear_1690.png")
131 | mouse_click("gear_fullscreen.png")
132 | pg.press('p')
133 | time.sleep(0.5) # 让游戏\\gear反应一下
134 | lang = SettingsReader.read_option('Language', 'current')
135 | print('123')
136 | if SettingsReader.read_option('DEATH', 'value') == 'True':
137 | death_checked = check_img_list(_worklist[f'death_checked_{lang}'])
138 | if death_checked:
139 | mouse_click_img_list(_worklist['death_click'])
140 | # 暂时将就用这个,以后改
141 | time.sleep(15)
142 | stage_field()
143 | if SettingsReader.read_option('EGO', 'value') == 'True':
144 | bad_checked = check_img_list(_worklist[f'bad_checked_{lang}'], confid=0.75)
145 | if bad_checked:
146 | mouse_hold_img_list(_worklist[f'bad_checked_{lang}'], confid=0.75)
147 | time.sleep(2) # 让游戏\\ego反应一下
148 | if check_img_list(_worklist['ego_click']):
149 | mouse_click_img_list(_worklist['ego_click'], 4)
150 | mouse_click_img_list(_worklist['property'], 2)
151 | pg.press('p')
152 | pg.press('p')
153 | else:
154 | mouse_click_img_list(_worklist['property'], 2)
155 | pg.press('enter')
156 | else:
157 | pass
158 |
159 |
160 | def encounters_field():
161 | encounters_checked = check_img_list(_worklist['encounters_checked'])
162 | if encounters_checked:
163 | store_checked = check_img_list(_worklist['store_checked'])
164 | chair_checked = check_img_list(_worklist['chair_checked'])
165 | mouse_click_img_list(_worklist['encounters_click'][0], 3)
166 | mouse_click_img_list(_worklist['encounters_click'][1])
167 | if store_checked:
168 | time.sleep(0.5)
169 | mouse_click_img_list(_worklist['store_click'])
170 | print('store空着的...')
171 | elif chair_checked:
172 | time.sleep(0.5)
173 | mouse_click_img_list(_worklist['chair_click'])
174 | print('chair空着的...')
175 | else:
176 | abnormality_ocr()
177 | lang = SettingsReader.read_option('Language', 'current')
178 | vote_checked = check_img_list(_worklist[f'vote_checked_{lang}'])
179 | if vote_checked:
180 | mouse_click_img_list(_worklist[f'vote_click_{lang}'], confid=0.95)
181 | else:
182 | pass
183 | else:
184 | print('654')
185 | pass
186 |
187 |
188 | def stage_field():
189 | stage_checked = check_img_list(_worklist['stage_checked'])
190 | if stage_checked:
191 | mouse_click_img_list(_worklist['stage_click'])
192 | pg.press('enter')
193 | time.sleep(2)
194 | pg.press('enter')
195 | else:
196 | pass
197 |
198 |
199 | def main():
200 | battle_field()
201 | # stage_field()
202 | encounters_field()
203 |
204 |
205 | if __name__ == '__main__':
206 | while True:
207 | battle_field()
208 |
209 | # stage_field()
210 | encounters_field()
211 |
--------------------------------------------------------------------------------
/workbench/mission_handling.py:
--------------------------------------------------------------------------------
1 | import time
2 |
3 | import cv2
4 | import numpy as np
5 | from PIL import ImageGrab
6 |
7 | from workbench import keyboard_control
8 | from workbench import mouse_control
9 | from workbench.image_processing import ImageDetector
10 | from workbench.ocr_utils import Ocr
11 | from workbench.read_settings import SettingsReader
12 |
13 | en_ocr_engine = Ocr('en')
14 |
15 |
16 | def get_screenshot():
17 | # 获取屏幕截图
18 | image = ImageGrab.grab()
19 |
20 | # 转换为opencv的数据格式
21 | # noinspection PyTypeChecker
22 | opencv_image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
23 | return opencv_image
24 |
25 |
26 | def check_and_click_image(image, target: str, current_language: str | None = None, thresh=30):
27 | if current_language is None:
28 | template_name = f'{target}.png'
29 | else:
30 | template_name = f'{target}_{current_language}.png'
31 |
32 | image_detector = ImageDetector(image, template_name)
33 | confidence, rect = image_detector.get_confidence_rect()
34 | print(f'confidence: {confidence}')
35 | if confidence > thresh:
36 | mouse_control.click_rect_center(rect)
37 | return True
38 | else:
39 | return False
40 |
41 |
42 | def check_and_click_intensity(image):
43 | dict_key = 'intensity'
44 | image_detector = ImageDetector(image, dict_key, 20)
45 | rectangles_list = image_detector.find_bounding_boxes()
46 | text_rect_list = Ocr.recognize_rectangles(image, rectangles_list)
47 | mouse_control.click_intensity(text_rect_list, ['常に高', '高い', '通', '低い', '常に低'])
48 |
49 |
50 | def check_and_click_choices():
51 | image = get_screenshot()
52 | dict_key = 'choices'
53 | image_detector = ImageDetector(image, dict_key, 12)
54 | rectangles_list = image_detector.find_bounding_boxes()
55 |
56 | text_rect_list = Ocr.recognize_rectangles(image, rectangles_list)
57 | match, rect, score = Ocr.get_best_choice(text_rect_list)
58 | print(f'match,{match} rect,{rect} score{score}')
59 | if score > 74:
60 | mouse_control.click_rect_center(rect)
61 |
62 |
63 | def check_and_click_text(dict_key, text, rect_thresh=36, score_thresh=75):
64 | image = get_screenshot()
65 | image_detector = ImageDetector(image, dict_key, rect_thresh)
66 | rectangles_list = image_detector.find_bounding_boxes()
67 |
68 | match, rect, score = Ocr.check_text_in_rectangles_cls(image, rectangles_list, text)
69 | print(f'match,{match} rect,{rect} score{score}')
70 | if score > score_thresh:
71 | mouse_control.click_rect_center(rect)
72 | return True
73 | else:
74 | return False
75 |
76 |
77 | def test():
78 | image = get_screenshot()
79 | death_detector = ImageDetector(image, 'death_jp.png', 36)
80 | death_confidence, _ = death_detector.get_confidence_rect()
81 | # confidence, rect = image_detector.get_confidence_rect()
82 | print(f'confidence: {death_confidence}')
83 |
84 |
85 | def test_ocr():
86 | image = get_screenshot()
87 | dict_key = 'intensity'
88 | image_detector = ImageDetector(image, dict_key, 20)
89 | rectangles_list = image_detector.find_bounding_boxes()
90 | print(len(rectangles_list))
91 | text_rect_list = Ocr.recognize_rectangles(image, rectangles_list)
92 | mouse_control.click_intensity(text_rect_list, ['常に高', '高い', '通', '低い', '常に低'])
93 |
94 |
95 | def test_ocr_2():
96 | image = get_screenshot()
97 | image_detector = ImageDetector(image, 'setting_button.png', 36)
98 | rectangles_list = image_detector.find_bounding_boxes()
99 | _, _, score = en_ocr_engine.check_text_in_rectangles(image, rectangles_list, 'MAX')
100 | print(score)
101 |
102 |
103 | def test_ocr_3():
104 | image = get_screenshot()
105 | image_detector = ImageDetector(image, 'setting_menu', 36)
106 | rectangles_list = image_detector.find_bounding_boxes()
107 | _, _, score = Ocr.check_text_in_rectangles_cls(image, rectangles_list, 'ステージをギブアップ')
108 | print(score)
109 |
110 |
111 | def test_choices():
112 | image = get_screenshot()
113 | dict_key = 'choices'
114 | image_detector = ImageDetector(image, dict_key, 12)
115 | rectangles_list = image_detector.find_bounding_boxes()
116 |
117 | text_rect_list = Ocr.recognize_rectangles(image, rectangles_list)
118 | match, rect, score = Ocr.get_best_choice(text_rect_list)
119 | print(f'match,{match} rect,{rect} score{score}')
120 | # mouse_control.click_rect_center(rect)
121 |
122 | def main():
123 | image = get_screenshot()
124 | current_language = SettingsReader.read_option('Language', 'current')
125 | # 先判断状态
126 | setting_button_detector = ImageDetector(image, 'setting_button.png', 36)
127 | battle_detectors = [
128 | ImageDetector(image, 'battle_rate_jp.png', 36),
129 | ImageDetector(image, 'battle.png', 36),
130 | ImageDetector(image, 'gear.png', 36),
131 | ImageDetector(image, 'gear_active.png', 36),
132 | ]
133 | battle_confidence = max(detector.get_confidence_rect()[0] for detector in battle_detectors)
134 | # _, _, battle_confidence = en_ocr_engine.check_text_in_rectangles(image, setting_button_rectangles_list, 'MA')
135 |
136 | skip_button_detector = [
137 | ImageDetector(image, 'skip_button.png', 36),
138 | ImageDetector(image, 'skip_button_2.png', 36),
139 | ]
140 | encounters_confidence = max(detector.get_confidence_rect()[0] for detector in skip_button_detector)
141 | try:
142 | skip_rect = max(detector.get_confidence_rect()[1] for detector in skip_button_detector)
143 | except TypeError:
144 | pass
145 |
146 | # logging_utils.logger.info(f'battle_confidence: {battle_confidence}')
147 | print(f'battle_confidence: {battle_confidence}')
148 | print(f'encounters_confidence: {encounters_confidence}')
149 | check_and_click_image(image, 'yes_button')
150 | if battle_confidence > 30 and encounters_confidence < 10:
151 | time.sleep(0.2)
152 | keyboard_control.keyboard.press_keys('P')
153 | death_detector = ImageDetector(image, 'death_jp.png', 36)
154 | death_confidence, _ = death_detector.get_confidence_rect()
155 | gear_detector = ImageDetector(image, 'gear.png', 12)
156 | gear_confidence, _ = gear_detector.get_confidence_rect()
157 | gear_active_detector = ImageDetector(image, 'gear_active.png', 12)
158 | gear_active_confidence, _ = gear_active_detector.get_confidence_rect()
159 | print(gear_confidence,'---',gear_active_confidence)
160 |
161 | if death_confidence > 18:
162 | _, setting_rect = setting_button_detector.get_confidence_rect()
163 | mouse_control.click_rect_center(setting_rect)
164 | print(setting_rect)
165 | time.sleep(0.6)
166 | click_flag = check_and_click_text('setting_menu', 'Cステージリトライ')
167 | if click_flag is False:
168 | print('123')
169 | check_and_click_text('setting_menu', 'メステージをギブアップ')
170 | print('321')
171 | # test_ocr_3()
172 | elif gear_confidence > 160:
173 | keyboard_control.keyboard.press_keys(SettingsReader.read_option('Shortcut', 'shortcut1'))
174 | elif gear_active_confidence > 0:
175 | keyboard_control.keyboard.press_keys(SettingsReader.read_option('Shortcut', 'shortcut2'))
176 |
177 | elif battle_confidence < 60 and encounters_confidence > 70:
178 | # 找back_button
179 | back_button_detector = ImageDetector(image, 'back_button.png')
180 | back_button_confidence, back_button_rect = back_button_detector.get_confidence_rect()
181 | print(f'back_button_confidence: {back_button_confidence, back_button_rect}')
182 | if back_button_confidence > 30:
183 | mouse_control.click_rect_center(back_button_rect)
184 | time.sleep(1.5)
185 | # check_and_click_image(image, 'yes_button')
186 | check_and_click_intensity(image)
187 | # 找选项
188 | check_and_click_choices()
189 | # click skip button
190 | mouse_control.click_skip_button(skip_rect)
191 |
192 |
193 |
194 | if __name__ == '__main__':
195 | test()
196 |
--------------------------------------------------------------------------------
/workbench/mouse_control.py:
--------------------------------------------------------------------------------
1 | import time
2 | from ctypes import windll, Structure, c_ulong, byref
3 |
4 | windll.shcore.SetProcessDpiAwareness(1)
5 |
6 |
7 | class PointAPI(Structure):
8 | _fields_ = [("x", c_ulong), ("y", c_ulong)]
9 |
10 |
11 | def get_mouse_position():
12 | po = PointAPI()
13 | windll.user32.GetCursorPos(byref(po))
14 | return int(po.x), int(po.y)
15 |
16 |
17 | def move_mouse(x, y):
18 | windll.user32.SetCursorPos(x, y)
19 |
20 |
21 | def click_mouse():
22 | # 模拟鼠标左键按下和释放
23 | windll.user32.mouse_event(2, 0, 0, 0, 0) # 鼠标左键按下
24 | windll.user32.mouse_event(4, 0, 0, 0, 0) # 鼠标左键释放
25 |
26 |
27 | def click_mouse_after_moveto(x, y):
28 | move_mouse(x, y)
29 | click_mouse()
30 |
31 |
32 | def click_rect_center(rect):
33 | time.sleep(0.2)
34 | x, y = get_center(rect)
35 | click_mouse_after_moveto(x, y)
36 | time.sleep(0.2)
37 | move_mouse(0, 0)
38 | #
39 |
40 |
41 | def click_skip_button(rect):
42 | x, y = get_center(rect)
43 | move_mouse(x, y)
44 |
45 | for _ in range(4):
46 | click_mouse()
47 | time.sleep(0.2)
48 | move_mouse(0, 0)
49 | # time.sleep(1)
50 |
51 |
52 | def get_center(rect):
53 | x, y, w, h = rect
54 | center_x = round(x + w / 2)
55 | center_y = round(y + h / 2)
56 | return center_x, center_y
57 |
58 |
59 | def click_intensity(text_rect_list, target_texts):
60 | # if current_language == 'jp':
61 | # target_texts = ['常に高', '高い', '普通', '低い', '常に低']
62 | # elif current_language == 'kr':
63 | # target_texts = ['매우 높음', '높음', '보통', '낮음', '매우 낮음']
64 | # else:
65 | # target_texts = ['VeryHigh', 'High', 'Normal', 'Low', 'VeryLow']
66 |
67 | for target_text in target_texts:
68 | for text, rect in text_rect_list:
69 | if target_text in text:
70 | click_rect_center(rect)
71 | return
72 |
73 |
74 | if __name__ == "__main__":
75 | click_rect_center((1044, 399, 693, 98))
76 | # # 获取当前鼠标位置
77 | current_x, current_y = get_mouse_position()
78 | print(f"当前鼠标位置:({current_x}, {current_y})")
79 |
80 | # # 移动鼠标到指定位置
81 | # target_x, target_y = 900, 300
82 | # move_mouse(target_x, target_y)
83 | # print(f"移动鼠标到:({target_x}, {target_y})")
84 |
85 | # # 模拟点击鼠标
86 | # click_mouse()
87 | # print("模拟点击鼠标左键")
88 |
--------------------------------------------------------------------------------
/workbench/ocr_utils.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 |
4 | from rapidocr_onnxruntime import RapidOCR
5 | from thefuzz import process, fuzz
6 |
7 | from workbench.file_path_utils import PathManager
8 | from workbench.read_settings import SettingsReader
9 |
10 |
11 | class Ocr:
12 | """
13 | To recognize text in images using the RapidOCR library.
14 |
15 | This class provides a language-aware OCR engine initialization and text recognition functionality.
16 | Depending on the current language settings, it loads the appropriate model for Japanese or Korean text recognition.
17 | For other languages, it initializes the OCR engine with default parameters.
18 |
19 | Attributes:
20 | _model_path_japanese (str): Relative path to the Japanese OCR model file.
21 | _model_path_korean (str): Relative path to the Korean OCR model file.
22 | _choices_path (str): Relative path to the choices dictionary JSON file.
23 | _current_language (str): The currently set language for OCR processing.
24 | _ocr_engine (RapidOCR or None): An instance of the RapidOCR class, initialized based on the current language.
25 | _choices (list): A list of choices for the current language.
26 |
27 | Methods: set_language(cls, language): Sets the current language for OCR processing. init_orc_engine(cls):
28 | Initializes the OCR engine according to the current language setting. get_orc_engine(cls): Retrieves the current
29 | OCR engine instance, initializing if necessary due to a language change. recognize_text(cls, image,
30 | use_det=False, use_cls=False, use_rec=True): Recognizes text in an image and returns the result.
31 | """
32 | _model_path_jp = os.path.join(PathManager.MODEL_RELPATH, 'japan_PP-OCRv3_rec_infer.onnx')
33 | _model_path_kr = os.path.join(PathManager.MODEL_RELPATH, 'korean_PP-OCRv3_rec_infer.onnx')
34 | _choices_path = os.path.join(PathManager.CURRENT_DIR, 'choices_dict.json')
35 | _current_language = None
36 | # 调用init_orc_engine
37 | _ocr_engine = None
38 | _choices = []
39 | with open(_choices_path, 'r', encoding='utf-8') as f:
40 | _choices_dict = json.load(f)
41 |
42 | def __init__(self, language):
43 | if language == 'jp':
44 | self.ocr_engine = RapidOCR(
45 | rec_model_path=self._model_path_jp,
46 | )
47 | elif language == 'kr':
48 | self.ocr_engine = RapidOCR(
49 | rec_model_path=self._model_path_kr,
50 | )
51 | else:
52 | self.ocr_engine = RapidOCR()
53 |
54 | def check_text_in_rectangles(self, image, rectangles_list, target: str, use_det=False, use_cls=False, use_rec=True):
55 | matched_str = ''
56 | best_rect = None
57 | max_score = -1
58 | for rect in rectangles_list:
59 | x, y, w, h = rect
60 | roi = image[y:y + h, x:x + w]
61 | try:
62 | result_list, _ = self.recognize_text_instance(roi, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
63 | except ValueError:
64 | result_list = self.recognize_text_instance(roi, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
65 | result_str = result_list[0][0] if result_list else None
66 | # 现在使用限定长度差异的choices进行匹配
67 | score = fuzz.ratio(target, result_str)
68 |
69 | # 更新最佳匹配结果
70 | if score > max_score:
71 | max_score = score
72 | matched_str = result_str
73 | best_rect = rect
74 |
75 | return matched_str, best_rect, max_score
76 |
77 | @classmethod
78 | def check_text_in_rectangles_cls(cls, image, rectangles_list, target: str, use_det=False, use_cls=False,
79 | use_rec=True):
80 | matched_str = ''
81 | best_rect = None
82 | max_score = -1
83 | for rect in rectangles_list:
84 | x, y, w, h = rect
85 | roi = image[y:y + h, x:x + w]
86 | try:
87 | result_list, _ = cls.recognize_text(roi, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
88 | except ValueError:
89 | result_list = cls.recognize_text(roi, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
90 | result_str = result_list[0][0] if result_list else None
91 | print(result_str)
92 | # 现在使用限定长度差异的choices进行匹配
93 | score = fuzz.ratio(target, result_str)
94 |
95 | # 更新最佳匹配结果
96 | if score > max_score:
97 | max_score = score
98 | matched_str = result_str
99 | best_rect = rect
100 |
101 | return matched_str, best_rect, max_score
102 |
103 | @classmethod
104 | def init_orc_engine(cls):
105 | if cls._current_language == 'jp':
106 | ocr_engine = RapidOCR(
107 | rec_model_path=cls._model_path_jp,
108 | )
109 | elif cls._current_language == 'kr':
110 | ocr_engine = RapidOCR(
111 | rec_model_path=cls._model_path_kr,
112 | )
113 | else:
114 | ocr_engine = RapidOCR()
115 |
116 | return ocr_engine
117 |
118 | @classmethod
119 | def get_orc_engine(cls):
120 | current_language = SettingsReader.read_option('Language', 'current')
121 | if current_language != cls._current_language:
122 | cls._current_language = current_language
123 | cls._choices = cls._choices_dict[current_language]
124 | cls._ocr_engine = cls.init_orc_engine()
125 |
126 | return cls._ocr_engine
127 |
128 | @classmethod
129 | def recognize_text(cls, image, use_det=False, use_cls=False, use_rec=True):
130 | ocr_engine = cls.get_orc_engine()
131 | result, _ = ocr_engine(image, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
132 | return result
133 |
134 | def recognize_text_instance(self, image, use_det=False, use_cls=False, use_rec=True):
135 | result, _ = self.ocr_engine(image, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
136 | return result
137 |
138 | @classmethod
139 | def recognize_rectangles(cls, image, rectangles_list, use_det=False, use_cls=False, use_rec=True):
140 | text_rect_list = []
141 | for rect in rectangles_list:
142 | x, y, w, h = rect
143 | roi = image[y:y + h, x:x + w]
144 | try:
145 | result_list, _ = cls.recognize_text(roi, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
146 | except ValueError:
147 | result_list = cls.recognize_text(roi, use_det=use_det, use_cls=use_cls, use_rec=use_rec)
148 | result_str = result_list[0][0] if result_list else None
149 | text_rect_list.append([result_str, rect])
150 |
151 | return text_rect_list
152 |
153 | @classmethod
154 | def get_best_choice(cls, text_rect_list, max_length_diff_ratio=0.6):
155 | max_score = -1 # 初始化最大得分为负数
156 | best_rect = []
157 | matched_str = ''
158 |
159 | for target, rect in text_rect_list:
160 | print(f'target:{target, rect}')
161 | target_len = len(target)
162 | if target_len < 2:
163 | continue
164 | filtered_choices = [choice for choice in cls._choices
165 | if min(abs(len(choice) - target_len) / target_len,
166 | abs(len(choice) - target_len) / len(choice)) <= max_length_diff_ratio]
167 |
168 | # 现在使用限定长度差异的choices进行匹配
169 | result = process.extractOne(target, filtered_choices)
170 | if result is None:
171 | continue
172 | match = result[0]
173 | score = result[1]
174 |
175 | # 更新最佳匹配结果
176 | if score > max_score:
177 | max_score = score
178 | matched_str = match
179 | best_rect = rect
180 |
181 | return matched_str, best_rect, max_score
182 |
183 |
184 | if __name__ == '__main__':
185 | import time
186 |
187 | img_path = r'C:\Users\Camreishi\PycharmProjects\Limbus-Scripts\opencv_test\output'
188 | start_time = time.time()
189 | for i in range(9):
190 | img_name = f'rect_100{i}.png'
191 | img = os.path.join(img_path, img_name)
192 | ocr_result = Ocr.recognize_text(
193 | img,
194 | use_det=False, use_cls=False, use_rec=True)
195 | print(ocr_result)
196 | end_time = time.time()
197 | print(end_time - start_time)
198 |
--------------------------------------------------------------------------------
/workbench/read_settings.py:
--------------------------------------------------------------------------------
1 | import configparser
2 | import os
3 |
4 | from workbench.file_path_utils import PathManager
5 |
6 |
7 | class SettingsReader:
8 | config_path = os.path.join(PathManager.ROOT_RELPATH, 'settings.ini')
9 | config = configparser.ConfigParser()
10 | encoding = 'utf-8'
11 |
12 | @classmethod
13 | def read_option(cls, section, option):
14 | cls.config.read(cls.config_path, encoding=cls.encoding)
15 | return cls.config.get(section, option)
16 |
17 | @classmethod
18 | def read_option_language(cls, section, option):
19 | lang = cls.read_option(section, option)
20 | lang_data = {
21 | 'en': "English",
22 | 'jp': "日本語",
23 | 'kr': "한국어",
24 | 'zh':"零协汉化",
25 | }
26 | return lang_data[lang]
27 |
28 | @classmethod
29 | def set_option(cls, section, option, value):
30 | cls.config.read(cls.config_path, encoding=cls.encoding)
31 | cls.config.set(section, option, value)
32 | cls.write_config()
33 |
34 | @classmethod
35 | def write_config(cls):
36 | with open(cls.config_path, 'w', encoding=cls.encoding) as config_file:
37 | cls.config.write(config_file)
38 |
39 |
40 | # 示例用法
41 | if __name__ == '__main__':
42 | # 读取当前设置
43 | language_current = SettingsReader.read_option('Language', 'current')
44 | print(f"当前语言: {language_current}")
45 |
46 | shortcut1 = SettingsReader.read_option('Shortcut', 'shortcut1')
47 | shortcut2 = SettingsReader.read_option('Shortcut', 'shortcut2')
48 | print(f"快捷键1: {shortcut1}, 快捷键2: {shortcut2}")
49 |
50 | # 设置新的语言并保存到文件
51 | SettingsReader.set_option('Language', 'current', 'jp')
52 | new_language = SettingsReader.read_option('Language', 'current')
53 | print(f"已将当前语言设置为: {new_language}")
54 |
55 | # 更改快捷键设置
56 | SettingsReader.set_option('Shortcut', 'shortcut1', 'P')
57 | new_shortcut1 = SettingsReader.read_option('Shortcut', 'shortcut1')
58 | print(f"已将快捷键1设置为: {new_shortcut1}")
59 |
--------------------------------------------------------------------------------
/workbench/ui_config.py:
--------------------------------------------------------------------------------
1 | views = {}
2 | HOME_PAGE_SIZE = [200, 300]
3 | SETTING_PAGE_SIZE = HOME_PAGE_SIZE
4 | MAIN_COLOR = "#240e13"
5 | RECORD_BUTTON_COLOR = "#fbeff3"
6 | RECORD_TEXT_COLOR = "#bb1614"
7 | ALWAYS_ON_TOP = True
8 |
--------------------------------------------------------------------------------
/workbench/worklist.json:
--------------------------------------------------------------------------------
1 | {
2 | "battle_checked":[
3 | "gear_1690.png",
4 | "gear2_1690.png",
5 |
6 | "gear_fullscreen.png",
7 | "gear2_fullscreen.png"
8 | ],
9 | "bad_checked_jp":[
10 | "bad_jp_1690.png",
11 | "badbad_jp_1690.png",
12 |
13 | "bad_jp_fullscreen.png",
14 | "badbad_jp_fullscreen.png"
15 | ],
16 | "bad_checked_en": [
17 | "bad_en_1690.png",
18 | "badbad_en_1690.png",
19 |
20 | "bad_en_fullscreen.png",
21 | "badbad_en_fullscreen.png"
22 | ],
23 | "bad_checked_kr": [
24 | "bad_kr_1690.png",
25 | "badbad_kr_1690.png",
26 |
27 | "bad_kr_fullscreen.png",
28 | "badbad_kr_fullscreen.png"
29 | ],
30 | "bad_checked_zh": [
31 | "bad_zh_1690.png",
32 | "badbad_zh_1690.png",
33 |
34 | "bad_zh_fullscreen.png",
35 | "badbad_zh_fullscreen.png"
36 | ],
37 | "ego_click":[
38 | "ego4_1690.png",
39 | "ego4_fullscreen.png",
40 | "ego3_1690.png",
41 | "ego3_fullscreen.png",
42 | "ego2_1690.png",
43 | "ego2_fullscreen.png",
44 | "ego1_1690.png",
45 | "ego1_fullscreen.png"
46 | ],
47 | "property":[
48 | "melancholy_1690.png",
49 |
50 | "melancholy_fullscreen.png"
51 | ],
52 | "death_checked_jp":[
53 | "death_jp_1690.png",
54 |
55 | "death_jp_fullscreen.png"
56 | ],
57 | "death_checked_en": [
58 | "death_en_1690.png",
59 | "death_en_fullscreen.png"
60 | ],
61 | "death_checked_kr": [
62 | "death_kr_1690.png",
63 | "death_kr_fullscreen.png"
64 | ],
65 | "death_checked_zh": [
66 | "death_zh_1690.png",
67 | "death_zh_fullscreen.png"
68 | ],
69 | "death_click": [
70 | "button_setting_1690.png",
71 | "button_close_1690.png",
72 |
73 | "button_setting_fullscreen.png",
74 | "button_close_fullscreen.png"
75 | ],
76 | "encounters_checked":[
77 | "encounter_1690.png",
78 |
79 | "encounter_fullscreen.png"
80 | ],
81 | "encounters_click": [
82 | [
83 | "button_sk_1690.png",
84 | "button_ip_1690.png",
85 |
86 | "button_sk_fullscreen.png",
87 | "button_ip_fullscreen.png"
88 | ],
89 | [
90 | "back_button_1690.png",
91 |
92 | "back_button_fullscreen.png"
93 | ]
94 | ],
95 | "store_checked":[
96 | "store_1690.png",
97 | "store_fullscreen.png"
98 | ],
99 | "store_click": [
100 | "button_yes_1690.png",
101 | "button_yes_fullscreen.png"
102 | ],
103 | "chair_checked": [
104 | "chair_1690.png",
105 | "chair_fullscreen.png"
106 | ],
107 | "chair_click": [
108 | "button_yes2_1690.png",
109 | "button_yes2_fullscreen.png"
110 | ],
111 | "abnormality_click":[
112 | "option_1690.png",
113 | "option_fullscreen.png"
114 | ],
115 | "vote_checked_jp": [
116 | "button_vote5_jp_1690.png",
117 | "button_vote3_jp_1690.png",
118 | "button_vote1_jp_1690.png",
119 |
120 | "button_vote5_jp_fullscreen.png",
121 | "button_vote3_jp_fullscreen.png",
122 | "button_vote1_jp_fullscreen.png"
123 | ],
124 | "vote_click_jp":[
125 | "button_vote5_jp_1690.png",
126 | "button_vote4_jp_1690.png",
127 | "button_vote3_jp_1690.png",
128 | "button_vote2_jp_1690.png",
129 | "button_vote1_jp_1690.png",
130 |
131 | "button_vote5_jp_fullscreen.png",
132 | "button_vote4_jp_fullscreen.png",
133 | "button_vote3_jp_fullscreen.png",
134 | "button_vote2_jp_fullscreen.png",
135 | "button_vote1_jp_fullscreen.png"
136 | ],
137 | "vote_checked_en": [
138 | "button_vote5_en_1690.png",
139 | "button_vote3_en_1690.png",
140 | "button_vote1_en_1690.png",
141 | "button_vote5_en_fullscreen.png",
142 | "button_vote3_en_fullscreen.png",
143 | "button_vote1_en_fullscreen.png"
144 | ],
145 | "vote_click_en": [
146 | "button_vote5_en_1690.png",
147 | "button_vote4_en_1690.png",
148 | "button_vote3_en_1690.png",
149 | "button_vote2_en_1690.png",
150 | "button_vote1_en_1690.png",
151 | "button_vote5_en_fullscreen.png",
152 | "button_vote4_en_fullscreen.png",
153 | "button_vote3_en_fullscreen.png",
154 | "button_vote2_en_fullscreen.png",
155 | "button_vote1_en_fullscreen.png"
156 | ],
157 | "vote_checked_kr": [
158 | "button_vote5_kr_1690.png",
159 | "button_vote3_kr_1690.png",
160 | "button_vote1_kr_1690.png",
161 | "button_vote5_kr_fullscreen.png",
162 | "button_vote3_kr_fullscreen.png",
163 | "button_vote1_kr_fullscreen.png"
164 | ],
165 | "vote_click_kr": [
166 | "button_vote4_kr_1690.png",
167 | "button_vote3_kr_1690.png",
168 | "button_vote2_kr_1690.png",
169 | "button_vote1_kr_1690.png",
170 | "button_vote5_kr_fullscreen.png",
171 | "button_vote4_kr_fullscreen.png",
172 | "button_vote3_kr_fullscreen.png",
173 | "button_vote2_kr_fullscreen.png",
174 | "button_vote1_kr_fullscreen.png"
175 | ],
176 | "vote_checked_zh": [
177 | "button_vote5_zh_1690.png",
178 | "button_vote3_zh_1690.png",
179 | "button_vote1_zh_1690.png",
180 | "button_vote5_zh_fullscreen.png",
181 | "button_vote3_zh_fullscreen.png",
182 | "button_vote1_zh_fullscreen.png"
183 | ],
184 | "vote_click_zh": [
185 | "button_vote4_zh_1690.png",
186 | "button_vote3_zh_1690.png",
187 | "button_vote2_zh_1690.png",
188 | "button_vote1_zh_1690.png",
189 | "button_vote5_zh_fullscreen.png",
190 | "button_vote4_zh_fullscreen.png",
191 | "button_vote3_zh_fullscreen.png",
192 | "button_vote2_zh_fullscreen.png",
193 | "button_vote1_zh_fullscreen.png"
194 | ],
195 | "stage_checked":[
196 | "stage_1690.png",
197 |
198 | "stage_fullscreen.png"
199 | ],
200 | "stage_click":[
201 | "bus_1690.png",
202 |
203 | "bus_fullscreen.png"
204 | ],
205 |
206 | "start_mirror":[
207 | "backplz_1690.png",
208 | "normal_1690.png",
209 | "button_yes4_1690.png",
210 | "button_yes3_1690.png"
211 | ],
212 | "bleed_checked": [
213 | [
214 | "muzzle_1690.png"
215 | ],
216 | [
217 | "wire_1690.png"
218 | ]
219 | ],
220 | "bleed_click": [
221 | "muzzle_1690.png",
222 | "wire_1690.png",
223 | "muzzle2_1690.png",
224 | "wire2_1690.png"
225 | ],
226 | "breath_checked": [
227 | [
228 | "horseshoe_1690.png"
229 | ],
230 | [
231 | "leaf_1690.png"
232 | ]
233 | ],
234 | "breath_click": [
235 | "horseshoe_1690.png",
236 | "leaf_1690.png",
237 | "horseshoe2_1690.png",
238 | "leaf2_1690.png"
239 | ],
240 | "burn_checked": [
241 | [
242 | "ashes_1690.png"
243 | ],
244 | [
245 | "dust_1690.png"
246 | ]
247 | ],
248 | "burn_click": [
249 | "ashes_1690.png",
250 | "dust_1690.png",
251 | "ashes2_1690.png",
252 | "dust2_1690.png"
253 | ],
254 | "fracture_checked": [
255 | [
256 | "branch_1690.png"
257 | ],
258 | [
259 | "battery_1690.png"
260 | ]
261 | ],
262 | "fracture_click": [
263 | "branch_1690.png",
264 | "battery_1690.png",
265 | "branch2_1690.png",
266 | "battery2_1690.png"
267 | ],
268 | "end_mirror": [
269 | "back_1690.png",
270 | "normal_1690.png",
271 | "over_1690.png",
272 | "button_yes4_1690.png",
273 | "button_close_1690.png"
274 | ]
275 |
276 | }
--------------------------------------------------------------------------------