NPC with more than 5 lines for ASCII graphics
Just for the record, I never used this plugin, but can try to help!
This plugin was made and post at the old forum by windows98SE@thaikore. You can find a lot of useful information at this link: http://bibian.ath.cx/openkore/viewtopic.php?t=32782.
What it does:
You use it for response BotKiller #1 - Method 4: ASCII number, working together to the hakore's reactOnNPC plugin.
(http://www.eathena.ws/board/index.php?showtopic=120522)
Version of Openkore Required: OpenKore 1.9.x (tested in Opk 2.0.5.1)
v.3 by 4epT (24/08/2013)
- optimized plugin
- remove the extra variables
- add new number
v.2.2.1 by Windows98SE (08/06/2008)
- change name&prefix from responseOnASCIInumber to ASCIInumberKiller (b'cus my anti-bot set is name "ACkiller, ActorKiller" ^^")
- update note (you must read my note in plugin befor use "ASCIInumberKiller")
- can set background color in config block by regexp or hexcode (can use 'regexp|color1|color2|color3' for fix some color)
v.2.2 by Mucilon (04/06/2008)
- Add options to the config.txt file
- Add colorCode, to support more than 1 server color pattern
v.2.1
- Fix "Error in function 'talk num' (Respond to NPC) You must specify a number." - fix
- *resp multi line [ex. img]
v.1.3
- Fix Regex
- add %digit
v.1.2
- Fix Regex
v1.1
- add note03
- support 0-9,A-Z
- add sub onDebug
- fix some code
v1.0
- support only digit 0-9 : (if you read my note or the mini tutorial, you can add it by yourself ^^)
How to install:
1) Place this plugin in your plugins folder (see the Plugins FAQ how or macro plugin manual at my signature).
2) Don't forget to also download the reactOnNPC plugin and place it at the plugins folder, without it won't work!
3) Add a reactOnNPC config block in your config.txt which defines the command to use and the conditions of the NPC conversation which will trigger Openkore to use the command.
How to use:
At config.txt use this:
Code: Select all
ASCIInumberKiller {
lengthCharNumber 8
BgColor ^[D-Fd-f][A-Fa-f0-9][D-Fd-f][A-Fa-f0-9]{3}
}
lengthCharNumber = length of characters at each line of each number
BgColor = background color pattern of your server, you can use other colors like this:
BgColor ^[D-Fd-f][A-Fa-f0-9][D-Fd-f][A-Fa-f0-9]{3}|^FFFFFF|^FFFFFA|code hexcolor you server|color_brabra|..
Just the background color pattern ^[D-Fd-f][A-Fa-f0-9][D-Fd-f][A-Fa-f0-9]{3} will work for most of the servers.
The operator | is the operator or, so you can add other color codes at your will. Don't forget to use the ^ at the begining.
If you tried some codes and you still can't read clearly the numbers, post your console, so I can create another color pattern to your server.
And something like this: (still at config.txt file)
Code: Select all
#Use this when you need to answer a number
reactOnNPC ASCIInumberKiller num {
type number
msg_0 /.*/
msg_1 /.*/
msg_2 /.*/
msg_3 /.*/
}
#Use this when you need to answer a text
reactOnNPC ASCIInumberKiller text {
type text
msg_0 /.*/
msg_1 /.*/
msg_2 /.*/
msg_3 /.*/
}


TIP 1: You can find useful information about HEX code colors at: http://www.drpeterjones.com/colorcalc/
TIP 2: If after all, your bot got the error Error in function 'talk num' (Respond to NPC). You must specify a number, this means that you need to input your server's numbers to the plugin, so there is a mini Tutorial of how input your server numbers to the plugin file.
TIP 3: And if you can't see any number at your console, you probable forgot to add the ASCIInumberKiller block at your config.txt file.
TIP 4: You can find useful information about regexp (the code used to compare the colors) at the quick regexp tutorial or at the complete regexp tutorial. Regexp = Perl Regular Expression.
TIP 5: Beware, during the procedure of inputing your server's numbers to the plugin, you may lost some accounts banned or chars jailed to get the correct number and / or letters.
reactOnNPC.pl
responseOnASCIInumber.pl
I hope you enjoy it!

== NOTE ==
Here we must take into account the peculiarity of the plugin. He is looking for numbers, consisting of 5 lines, and in your NPC is used 7 lines:
But you can use a trick! You can cut our numbers up to 5 lines (above, below or one line from above and one line from below - it does not matter):1: ############==#####################
2: ############==####==###############
3: ############==####==###############
4: ############==####==###############
5: ############=========##############
6: ##################==###############
7: ##################==###############
1: ############========###############
2: ############==####==###############
3: ################==#################
4: ###############==##################
5: ###############==##################
6: ###############==##################
7: ###############==##################
Then need to select our number consisting of 5 lines and 9 characters:3: ############==####==###############
4: ############==####==###############
5: ############=========##############
6: ##################==###############
7: ##################==###############
1: ############========###############
2: ############==####==###############
3: ################==#################
4: ###############==##################
5: ###############==##################
Then convert that number in one line:3: ==####==#
4: ==####==#
5: =========
6: ######==#
7: ######==#
1: ========#
2: ==####==#
3: ####==###
4: ###==####
5: ###==####
'==####==#==####==#=========######==#######==#' => 4,
'========#==####==#####==######==#######==####' => 7,