StealthBot.net: Chat Bot Script - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chat Bot Script Helps your bot greet users who enter the channel, and chat with users.

#1 User is offline   WataBoy7 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 36
  • Joined: April-25 12

Posted June 03, 2012 - 09:00 PM

Chat Bot Script

Author: WataBoy7
Version: v1.23
Description: Helps your bot greet users who enter the channel, and respond to users who output certain words in chat.


Commands:

.topic - Lists all the current Chat Topics.
.topic <topic name> - Adds a new Chat Topic to the Chat file if it doesn't exist. Lists the keywords and responses of a Topic if it already does.
.topic <topic number> - Lists all the keywords and responses stored under a specific Topic.
Aliases: .ct

.key <topic number> <new keyword> - Lets you add/modify a keyword of a Chat Topic that already exists. Use the topic number listed when you
type .ct

.cstr <response string> - Allows you to add a new response to a Chat Topic.
Aliases: .crl

.silent <on/off> - enables or disables bot Silent Mode for x minutes. During this time, the bot will not greet a random user every 10 minutes and will not respond to any chat 'keywords'.

.hide - Only for eligible users who enter the channel. Hides Clan Eligibility Notifications (CEN) for them if it is enabled in the Chat file.


Example Usages:

.ct - lists all the current Chat Topics.
.ct Mark As AFK - creates a new Chat Topic labeled "Mark As AFK" (if it doesn't already exist)
.topic 2 - lists the keywords and responses stored under Chat Topic 2.

.key 8 brb,afk,i*gtg,heard(4) - If a user's message contains "brb" OR "afk" OR ("i" AND "gtg") OR if they've heard a response from Topic 4, this returns true and a random response filed under Chat Topic 8 will be outputted to the user.

.crl 8 %u, would you like to be marked as AFK? - creates a new response string under Chat Topic 8. When the keywords of Topic 8 return true, a random response string is outputted to the user.

.silent on

.hide


Important Notes:

  • Yes, you can add new Chat Topics, keywords to search for, and even create your own responses! My goal was to make Chat Bot as user-friendly as possible. The preferred method for achieving this is to use the commands listed above. But if you know what you're doing, you can modify the settings file directly and create or delete entries in the *.ini.

  • This script requires that you reload your scripts once as soon as your bot is online. This to check if your bot belongs to a Clan and if so, whether Clan Eligibility Notifications (CEN) will be enabled.

  • Please closely examine the Chat settings (*.ini) file created in your bot's Script folder. The name of the file is ChatFile_settings.ini. It contains the names of all the current Chat Topics, keywords, and response strings as well as important information on how to modify it.

  • Please don't delete any Chat Topic entries in the settings file. Only modify the keywords and response strings if you know what you're doing!

  • I actually wrote this script in Visual Studio so most of the formatting in the *.txt file might be off. Nothing I can do about that <_<

  • Along with this script, I also used my Random Joke, Clan Mail, and Word of the Day scripts. That is why you might find that most of the responses under the Topic Introduction (shown when a user enters the channel) contain references to these scripts ^_^

  • I tested this script extensively on my bot so I'm pretty sure most (if not all) the bugs have been fixed. But please report it to me if you find any!

Attached File(s)


This post has been edited by WataBoy7: June 03, 2012 - 09:15 PM


#2 User is offline   Fallen-God Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 364
  • Joined: September-11 09

Posted June 03, 2012 - 09:21 PM

Something like this should (I think?) fix the reloading scripts thing...

Sub Event_LoggedOn(Username, Product)
    ReloadScript()
End Sub

This post has been edited by Fallen-God: June 03, 2012 - 09:26 PM

Choose Functional.

#3 User is offline   WataBoy7 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 36
  • Joined: April-25 12

Posted June 05, 2012 - 05:26 PM

Thanks for the heads-up, Fallen-God! Anyway, here's the newest version of the script:


Quote

Updates:

  • Changed Whisper_Greet to a boolean.
  • Added the subs Event_LoggedOn, Event_MessageQueued, and Event_ServerInfo.
  • Replaced the dsp function with AddQ function in most instances. Chat Bot messages now have higher priority than CEN messages.
  • Created the variable Queued_Messages - when a user leaves the channel or is currently marked as 'away' or 'unavailable', the list of unsent messages for him are removed from the queue.
  • Manually aligned all the lines in this script so everything is properly indented.

Attached File(s)


This post has been edited by WataBoy7: June 05, 2012 - 05:40 PM


#4 User is offline   Plutonium239 Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 124
  • Joined: January-29 12

Posted December 10, 2012 - 11:01 PM

Does anyone have a good list of statements and responses?

EDIT: The script does not recognize all the responses it already comes with, it will only use topic 1 and 2.

It appears that the script also is supposed to ignore Pinggnome, but it is not doing that. Could that be because Ping is in my clan?

This post has been edited by Plutonium239: December 10, 2012 - 11:06 PM

Posted Image
http://images.cheezb...0f14e916b04.jpg Picture is way too big for a signature! -PhiX

#5 User is offline   lilkenny Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: September-13 13

Posted April 30, 2014 - 07:29 PM

Does not respond when I input any of the keywords :c

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users