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.0First 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.1Improvements 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.2Improvements 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.3Improvements 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:

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}

Tip: If you use more then 1 bot at a time, you must input diferent file names to each one. That is because, when the bot is running, it do not keep writing the file, it just write the file when the bot is closed. So only the sentences learn by the last closed bot will be recorded, if they use the same file name.

first time trying this out.asked this question before the forum was wiped again. first off, by creating a directory in my openkore folder, does that just meanc create a new folder and renaming it Chatbot? also, for the first line of txt that u included, do i add that into my config.txt? or..what do i do with it? help appreciated

Yep!At openkore folder you will find the src subfolder, inside of it you create a directory and rename it to Chatbot.About the file, you must input the name of the file at scriptfile option, this file will be created automatically at openkore root folder.

Joined: 05 Apr 2008, 05:15Posts: 95Location: in place where you cant go

Mucilon wrote:

Yep!At openkore folder you will find the src subfolder, inside of it you create a directory and rename it to Chatbot.About the file, you must input the name of the file at scriptfile option, this file will be created automatically at openkore root folder.

CadeathI don't get it...What happen?1) Did your bot said these sentences randomically? Like: tae n dc and other time wa dc map and so on...In this case, it may be repeating this sentences because the file has just this sentences. I mean, the plugin will choose 1 sentence among those inside the file, if there are just 5 sentences, it will repeat his messages a lot... you must input another ones or leave it some time at any city with the ai off, so it won't answer, but will record the file.

2) Did your bot literaly said: @random("tae n dc","wa dc map", "aw", "wtf", "haha",?In this case, these sentences are inside the file, open it and edit, taking it off! If this sentences are not inside the file, then this must be a bug, that I have never seen on this plugin. If so, turn on the degug to 1 and post the console log.

still having errors.i have placed the the exact lines into config.txt as well as "saved paged" the kadiliman.pl and kadiliman.pm file.i placed the kadiliman.pl in the plugins folder along with my macro folder, as well as my macro.pl file. i also created a new folder in src, renamed it Chatbot, and placed the kadiliman.pm inside.yet, when i start the thing, i get an error

<missing operator before content?>Bareword found where operator expected at c:/documents and settings....desktop/openkore.....plugins/kadiliman.pl line 10, near ""resource-type" content'<missing operator before content?>etc etc..

First, I can't access the imagesshack domain, so the link doesn't solve the problem, I'm writing from work and the firewall blocks this domain.About the error message, it is moving, at your other post it triggered at line 10 and now it is at line 14... did you change the file kadiliman.pl or just copied a diferent line of the error text... Did you try copy the code and paste at the file again?If your openkore has stopped with this error, then the error log was generated at errors.txt.Please copy and paste the error log, without it I can't do any thing!

Who is online

Users browsing this forum: No registered users and 3 guests

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