forked from rathena/rathena
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for macro detection (rathena#7315)
* Adds the official client macro detection system. * Includes the ability to load imagery at server boot. * See doc/captcha_db.txt for more information! Thanks to @Asheraf and @Lemongrass3110! Co-authored-by: Lemongrass3110 <[email protected]>
- Loading branch information
Showing
19 changed files
with
883 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file is a part of rAthena. | ||
# Copyright(C) 2022 rAthena Development Team | ||
# https://rathena.org - https://github.com/rathena | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
########################################################################### | ||
# Captcha Database Table | ||
########################################################################### | ||
# | ||
# Captcha Database Settings | ||
# | ||
########################################################################### | ||
# - Id Index value. | ||
# Filename Name of the BMP image file (with location). | ||
# Answer Correct answer for the captcha (case-sensitive). | ||
# Bonus Bonus Script ran on success. (Default: Level 10 Blessing and Increase Agility) | ||
########################################################################### | ||
|
||
Header: | ||
Type: CAPTCHA_DB | ||
Version: 1 | ||
|
||
Footer: | ||
Imports: | ||
- Path: db/import/captcha_db.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This file is a part of rAthena. | ||
# Copyright(C) 2022 rAthena Development Team | ||
# https://rathena.org - https://github.com/rathena | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
########################################################################### | ||
# Captcha Database Table | ||
########################################################################### | ||
# | ||
# Captcha Database Settings | ||
# | ||
########################################################################### | ||
# - Id Index value. | ||
# Filename Name of the BMP image file (with location). | ||
# Answer Correct answer for the captcha (case-sensitive). | ||
# Bonus Bonus Script ran on success. (Default: Level 10 Blessing and Increase Agility) | ||
########################################################################### | ||
|
||
Header: | ||
Type: CAPTCHA_DB | ||
Version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//===== rAthena Documentation ================================ | ||
//= Captcha Database Structure | ||
//===== By: ================================================== | ||
//= rAthena Dev Team | ||
//===== Last Updated: ======================================== | ||
//= 20220920 | ||
//===== Description: ========================================= | ||
//= Explanation of the captcha_db.yml file and structure. | ||
//============================================================ | ||
|
||
--------------------------------------- | ||
|
||
Id: Unique ID. | ||
|
||
--------------------------------------- | ||
|
||
Filename: Name of the BMP image file (with location). | ||
The path of the file can be different for each captcha image, but it's best practice to keep them in the same directory. | ||
|
||
Example: | ||
Filename: db/import/captcha/rathena.bmp | ||
|
||
--------------------------------------- | ||
|
||
Answer: Correct answer for the captcha (case-sensitive). | ||
|
||
--------------------------------------- | ||
|
||
Bonus: NPC script that is ran when a captcha is successfully answered. Accepts all forms of script constants, variables, as well as the | ||
unique player variable @captcha_retries. This variable can be used within the Bonus script to get the remaining retries a player | ||
has. Coupled with the script command 'getbattleflag()' this could be used to assign different bonuses based on success rate. | ||
|
||
Example: | ||
# Give level 10 Blessing for 20 minutes with no failures, else give for 30 seconds. | ||
Bonus: > | ||
if (@captcha_retries == getbattleflag("macro_detection_retry")) { | ||
# Player solved it on first try | ||
specialeffect2 EF_BLESSING; | ||
sc_start SC_BLESSING,1200000,10; | ||
} else { | ||
# Player needed more than one try | ||
specialeffect2 EF_BLESSING; | ||
sc_start SC_BLESSING,30000,10; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.