Openkore.com

OpenKore Forums
It is currently 19 Jun 2018, 21:40

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 572 posts ]  Go to page 1, 2, 3, 4, 5 ... 58  Next
Author Message
 Post subject: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 24 Apr 2008, 08:59 
Offline
Cybernatic Entity
Cybernatic Entity
User avatar

Joined: 04 Apr 2008, 13:15
Posts: 249
Location: Brazil
Topic contents:
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:
ASCIInumberKiller {
lengthCharNumber 8
BgColor ^[D-Fd-f][A-Fa-f0-9][D-Fd-f][A-Fa-f0-9]{3}
}

Where:
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:
#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 /.*/
}


Image
Image

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:
Quote:
1: ############==#####################
2: ############==####==###############

3: ############==####==###############
4: ############==####==###############
5: ############=========##############
6: ##################==###############
7: ##################==###############

1: ############========###############
2: ############==####==###############
3: ################==#################
4: ###############==##################
5: ###############==##################
6: ###############==##################
7: ###############==##################


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):
Quote:
3: ############==####==###############
4: ############==####==###############
5: ############=========##############
6: ##################==###############
7: ##################==###############

1: ############========###############
2: ############==####==###############
3: ################==#################
4: ###############==##################
5: ###############==##################


Then need to select our number consisting of 5 lines and 9 characters:
Quote:
3: ==####==#
4: ==####==#
5: =========
6: ######==#
7: ######==#

1: ========#
2: ==####==#
3: ####==###
4: ###==####
5: ###==####


Then convert that number in one line:
Quote:
'==####==#==####==#=========######==#######==#' => 4,

'========#==####==#####==######==#######==####' => 7,

_________________
Old Openkore Manual | Macro Plugin Manual | Old Forum | My Perl Bible | Guide to figuring out server information


Last edited by Mucilon on 17 Oct 2008, 15:08, edited 12 times in total.

Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 26 Apr 2008, 10:09 
Offline
Noob
Noob

Joined: 25 Apr 2008, 10:12
Posts: 3
the plugin not work in version 2.0.6 . Please fix it :(


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 27 Apr 2008, 00:10 
Offline
Cybernatic Entity
Cybernatic Entity
User avatar

Joined: 04 Apr 2008, 13:15
Posts: 249
Location: Brazil
OK...
It had a problem... I change the first post, you can download again.
I assure that it run at 2.0.5.1, don't know at the SVN version.

_________________
Old Openkore Manual | Macro Plugin Manual | Old Forum | My Perl Bible | Guide to figuring out server information


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 27 Apr 2008, 02:02 
Offline
Human
Human

Joined: 04 Apr 2008, 22:55
Posts: 26
i cant solve it please help me

Image

#Use this when you need to answer a number
reactOnNPC ASCIInumber num {
type number
msg_0 /.*/
msg_1 /.*/
msg_2 /.*/
msg_3 /.*/
msg_4 /.*/
msg_5 /.*/
msg_6 /.*/
}

#Use this when you need to answer a text
reactOnNPC ASCIInumber text {
type text
msg_0 /.*/
msg_1 /.*/
msg_2 /.*/
msg_3 /.*/
msg_4 /.*/
msg_5 /.*/
msg_6 /.*/
}

and what i will right in the ASCII number text and num


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 27 Apr 2008, 03:46 
Offline
Noob
Noob

Joined: 25 Apr 2008, 10:12
Posts: 3
i was try it on version 2.0.5. it not work because method run and register, unregister can not exported from Command module .


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 27 Apr 2008, 04:00 
Offline
Noob
Noob

Joined: 25 Apr 2008, 10:12
Posts: 3
sorry muscino i were tested the latest pl files. its ok on version 2.0.5 thank you so much


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 27 Apr 2008, 20:38 
Offline
Cybernatic Entity
Cybernatic Entity
User avatar

Joined: 04 Apr 2008, 13:15
Posts: 249
Location: Brazil
kingkevz,
first of all, did you install the plugin? And used the block below at config.txt file?
Next time post the console like a text... turn on the logConsole at config.txt, like this: logConsole 0 change it to logConsole 1 and search the file console.txt at your logs folder. Like this, you don't have to edit image files...
Code:
reactOnNPC ASCIInumber num {
type number
msg_0 /.*/
msg_1 /.*/
msg_2 /.*/
msg_3 /.*/
msg_4 /.*/
msg_5 /.*/
msg_6 /.*/
}


dembuonvn, no problem!

_________________
Old Openkore Manual | Macro Plugin Manual | Old Forum | My Perl Bible | Guide to figuring out server information


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 27 Apr 2008, 22:28 
Offline
Human
Human

Joined: 04 Apr 2008, 22:55
Posts: 26
yes i already did it but i dont know what will i write in that reactOnNPC ASCIInumber num


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 28 Apr 2008, 07:23 
Offline
Cybernatic Entity
Cybernatic Entity
User avatar

Joined: 04 Apr 2008, 13:15
Posts: 249
Location: Brazil
You don't need to write nothing... ASCIInumber num already is a command registered at the responseOnASCIInumber plugin.
When the text received from the NPC matchs the msg_X, the plugin will run!

_________________
Old Openkore Manual | Macro Plugin Manual | Old Forum | My Perl Bible | Guide to figuring out server information


Top
 Profile  
 
 Post subject: Re: responseOnASCIInumber.pl #for response BotKiller(ASCII)
PostPosted: 28 Apr 2008, 23:01 
Offline
Human
Human

Joined: 04 Apr 2008, 22:55
Posts: 26
why mine is not running???


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 572 posts ]  Go to page 1, 2, 3, 4, 5 ... 58  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group