If kaliwanagan (now know as Kali) allows me, I'll post his plugin, which I made some improvements.
Kali, please change this description, if you want to or find something wrong.
What it does:
This plugin was made to answer any chat (public, pm, party, guild or system) based on what the bot "knows", which means, the bot "learn" to talk. Every sentence it receive will be recorded at a file, "learning" from other players and it use some kind of comparation logic to choose which sentence from this file it will use to answer the player. This way, you can teach the bot to talk writing this file or can leave it at any city "learning" from public chats, so as big as your file is better it will convince some player, but be aware, you probably won't convince a GM, just the most of players.
If you read this and still have doubts, search at old forum topic: http://bibian.ath.cx/openkore/viewtopic.php?t=9304
Version 1.0
First version made by Kaliwanagan was maint to answer any chat (public, pm, party, guild or system) based on the words of the chat received from other players.
- Choose the name of file to record all the sentences of each bot, so they can have a diferent personality!
- Enable or disable the answer to any kind of chat.
- Rate to answer, type speed configurable.
- Rate to include at the end of bot answers a smiley and input any smiley you want.
- Option to turn on / off the learn state.
Version 1.1
Improvements made by me:
- Included inLockOnly to answer to plublic chat, so you won't spam at cities.
- Disable the plugin to learn from system chat, so you won't speak exatly the sentences from the server messages to other players, but you will be able to answer to system chat, if you want to.
Version 1.2
Improvements made by me:
- Included noPlayers option, where you can not answer any player you write at here comma separeted and regexp supported, very good to bot party members.
- Included noWords option, where you can not answer any player you write at here comma separeted and regexp supported, very good to don't spam, when some player asks for buff at your side or to your priest party member.
Version 1.3
Improvements made by me:
- Included timesToBlockPM option, where you can block/ignore any player that pmed you more then this option times, so don't wory with those anoing players that keep sending pms to you.
- Included timeToResetCount option, time in seconds to reset the chat count, so every this option seconds the count of chats received from every players will be reseted.
How to Install:
1) Download the 2 files.
2) Copy the kadiliman.pl file to openkoreroot\plugins directory.
3) Create a directory named Chatbot at openkoreroot\src directory.
4) Copy the Kadiliman.pm file to this Chatbot directory.
5) At config.txt see below at how to use.
How to Use:
Use this exemple at config.txt.
Code: Select all
chatBot Kadiliman {
inLockOnly 1 # (0|1) Just answer to public chat at lockmap, pm will be answered normally
scriptfile lines.txt # Name of the file where all sentences are storage, it will be create at openkore root directory
replyRate 80 # (0..100) Rate to answer, 80 means: answer 80% of chats and don't answer 20%
onPublicChat 1 # (0|1) Enable to answer any plublic chat
onPrivateMessage 1 # (0|1) Enable to answer any private message
onSystemChat 1 # (0|1) Enable to answer any system message
onGuildChat 1 # (0|1) Enable to answer any guild chat
onPartyChat 1 # (0|1) Enable to answer any party chat
wpm 65 # Don't need to change - words per minute, simulate typing speed
smileys ^_^,xD,^^,:),XD # Smileys that may end your sentences on chat (separeted by commas)
smileyRate 20 # Rate to add smiley to the sentences, means: add smileys to 20% of messages
learn 1 # This plugin can "learn" every sentence read by the bot, this sentences are storage at the scriptfile
noPlayers , , # Name of the players (supported by regexp) you don't want to answer any thing, like party members (separeted by commas)
noWords , , , # Words (supported by regexp) at the chats you don't want to answer, like "bot", "heal", "buffs" or something like this (separeted by commas)
timesToBlockPM 10 # Number of times of pms received by each player to ignore him, work just to pm
timeToResetCount 300 # Number of seconds to reset the count to ignore any player, with zero it won't reset
}
Files: I hope you enjoy it!