Kadiliman Plugin v 1.3 - ChatBot by Kali

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#71 Post by Mucilon »

Let's work like Jack (the ripper), by pieces... :D

1) Are These messages send by the server? If they are system chat, you can just turn off the onSystemChat option, but some servers send messages as guild messages, in that case you can just turn off the onGuildChat option as well or if you need to answer to your guild, just input these messages at the noWords option, then the plugin won't answer or record them.

2) I never saw the plugin just erase any line from the file, but if you use more then 1 bot with the same file for both, when the first bot is closed the file is recreated and wrote with the sentences at his data base and the ones learned by this bot, but when the second bot is closed the same happen, so all the new sentences added by the first bot are gone! The file is recreated just when the bot associated to that file is close. Solution, create one file to each bot.

Leleck
Noob
Noob
Posts: 4
Joined: 26 May 2008, 21:29
Noob?: Yes

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#72 Post by Leleck »

Mucilon wrote:Let's work like Jack (the ripper), by pieces... :D

1) Are These messages send by the server? If they are system chat, you can just turn off the onSystemChat option, but some servers send messages as guild messages, in that case you can just turn off the onGuildChat option as well or if you need to answer to your guild, just input these messages at the noWords option, then the plugin won't answer or record them.
The message I normally recieve, You have 0 new emails (0 unread), is normally sent by guild message. Taking your advice, I set onGuildChat to zero, but it still records the message whenever the bot logs in. I thought this flag was only meant to keep the bot from responding to guild chat, not learning from it?
Mucilon wrote:2) I never saw the plugin just erase any line from the file, but if you use more then 1 bot with the same file for both, when the first bot is closed the file is recreated and wrote with the sentences at his data base and the ones learned by this bot, but when the second bot is closed the same happen, so all the new sentences added by the first bot are gone! The file is recreated just when the bot associated to that file is close. Solution, create one file to each bot.
I'm only running one bot. I'll outline the the sequence of events;
- I run start.exe, the bot loads, and learns 'You have 0 new emails (0 unread)'
- I check my lines.txt and see 'You have 0 new emails (0 unread)' in there
- I PM my bot using another account to work on some responses. The bot learns a few of the things I PM it, and responds once or twice with 'You have 0 new emails (0 unread)'
- I check the lines.txt file, and see all of my PM'ed text in there
- I quit the bot by typing 'quit' in the command console
- I check lines.txt and all my learned text is still there
- I run start.exe again, the bot loads, learns 'You have 0 new emails (0 unread)' (again)
- I check lines.txt and it only has 'You have 0 new emails (0 unread)' in it now
I've also tried setting lines.txt to read only, but that doesn't stop it from doing this.

It doesn't seem like this is how it should be working, from what you've described to me. I don't think you're script likes me :p My install/client information is the same it was in my post before the last one.

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#73 Post by Mushroom »

Code: Select all

chatBot Kadiliman {
	inLockOnly 0
	scriptfile lines.txt
	replyRate 80
	onPublicChat 1
	onPrivateMessage 1
	onSystemChat 0
	onGuildChat 0
	onPartyChat 0
	wpm 65
	smileys xD
	smileyRate 50
	learn 1
	noPlayers
	noWords
	timesToBlockPM 20
	timeToResetCount 300
}
Try using this. Then get another acc and talk in pm and pub.
It will just learn pm and publiic mensages.
Quit.

Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#74 Post by Mucilon »

Leleck
What Mushroom said is true, if you set onGuildChat to zero, your bot won't learn from guild chat anymore... Try to turn debug on and search for this message at your log: Learn Learning: ...., when you receive a guild chat. If this message appear, means that your bot is learning from that chat, I think it won't show up.
About your lines.txt problem, I really don't know why this is happening... when you do this sequence, is your file lines.txt open all the time?
You can try this:
Open your kadiliman.pl file and search for this part of program:

Code: Select all

sub Reload {
        for (my $i = 0; (exists $config{$prefix.$i}); $i++) {
                message "Plugin Kadiliman: checking for duplicate lines in ". $config{$prefix.$i."_scriptfile"} ."...", "plugins";
                checkForDupes($config{$prefix.$i."_scriptfile"});
                message "[Kadiliman] done.\n", "plugins";
                $bot{$i} = new Chatbot::Kadiliman {
                        name        => $config{$prefix.$i},
                        scriptfile      => $config{$prefix.$i."_scriptfile"},
                        learn      => $config{$prefix.$i."_learn"},
                        reply      => 1,
                };
        }
}
And just change it to this:

Code: Select all

sub Reload {
        for (my $i = 0; (exists $config{$prefix.$i}); $i++) {
                message "Plugin Kadiliman: checking for duplicate lines in ". $config{$prefix.$i."_scriptfile"} ."...", "plugins";
#                checkForDupes($config{$prefix.$i."_scriptfile"});
                message "[Kadiliman] done.\n", "plugins";
                $bot{$i} = new Chatbot::Kadiliman {
                        name        => $config{$prefix.$i},
                        scriptfile      => $config{$prefix.$i."_scriptfile"},
                        learn      => $config{$prefix.$i."_learn"},
                        reply      => 1,
                };
        }
}
But I don't think this is the problem... this sub function checkForDupes search for duplicate lines at the file and erase them, but it run just when the plugin is reloaded and not when it is started.

Kilzone2
Noob
Noob
Posts: 6
Joined: 03 Jun 2008, 20:49
Noob?: No

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#75 Post by Kilzone2 »

How come I always get "[Kadiliman] Don't answering player " message from macro? :?:
Image

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#76 Post by Mushroom »

Post your configs :D
Quit.

Leleck
Noob
Noob
Posts: 4
Joined: 26 May 2008, 21:29
Noob?: Yes

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#77 Post by Leleck »

I don't know why, but using Mushroom's config seems to of fixed the lines.txt problem. The file is saving correctly now.

However, I do have -one- more thing I'm going to bother you with, and then I will go away and leave you alone :roll: My server sends the 'it's day time' and 'it's night time' messages via PM. Is there a way to keep the bot from learning these messages without disabling it's ability to respond to players/learn other words via PM? I suppose I could do /exall and only let it respond in public chat, but it seems like that'd be a bit obvious that I'm botting. Well, no more obvious than it responding 'Day mode is active xD' I guess...but still kind of silly.

Thanks for all the help!

Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#78 Post by Mucilon »

Leleck
Glad to know, but I really don't know why that was happen...
Don't mind to bother... While I would have time, I'll try to help... (Is this sentence correct :?: )
If you receive it via PM, just add the "player" name that sends these messages to you at the noPlayers option.

Kilzone2
If you see this message, means that the player that you receive the message from is at the noPlayers option. If there are no player name at this option, try to erase the commas.

Kilzone2
Noob
Noob
Posts: 6
Joined: 03 Jun 2008, 20:49
Noob?: No

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#79 Post by Kilzone2 »

Mucilon wrote: Kilzone2
If you see this message, means that the player that you receive the message from is at the noPlayers option. If there are no player name at this option, try to erase the commas.
thx a lot it works! :D
now, Is there a way to make the bot learn without answering them? (im going to make em sit in the middle of prontera)
Image

Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: Kadiliman Plugin v 1.3 - ChatBot by Kali

#80 Post by Mucilon »

Try to turn off ai. At the bot console type: ai off or ai manual, try with each one.
I think it won't answer, but will learn!
If like this don't work, try to set the replyRate to zero!

Post Reply