-
Notifications
You must be signed in to change notification settings - Fork 17
Bot Configuration
David edited this page Nov 7, 2020
·
9 revisions
All of the functional configuration for a bot profile is stored in a file called Config.ini.
General purpose settings.
Key | Type | Default | Description |
---|---|---|---|
ConfigVersion | Long | 6 | Config format version. Only 5 and 6 are supported. Version 5 will be upgraded to 6 automatically. |
DisableNews | Bool | False | If TRUE, disables the fetching and display of news and updates from StealthBot.net. |
Defines network client behavior.
Key | Type | Default | Description |
---|---|---|---|
Username | String | Name of the Battle.net account to login with. Names longer than 15 characters can be truncated by the server. Only certain characters are allowed. | |
Password | String | Password for the account being logged into. Due to Blizzard's implementation this is not case-sensitive. (this behavior can be overriden with Emulation\LowerCasePassword) |
|
CdKey | String | The 13, 16, or 26 digit product key associated with your selected game's base product. | |
ExpKey | String | The 13, 16, or 26 digit product key associated with your selected game's expansion product. | |
Spawn | Bool | False | If TRUE, the bot will attempt to authenticate as a "spawn" client. (STAR, JSTR, and W2BN only) |
Game | String | STAR | The 4-digit product code associated with the game to be emulated. Supported products:
|
Server | String | useast.battle.net | The hostname or IP of the Battle.net server to connect to. |
HomeChannel | String | Name of the channel to automatically join once the bot enters chat. | |
AutoConnect | Bool | False | Automatically connects the bot when it's opened. |
UseRealm | Bool | False | Attempts to join a Diablo 2 realm (D2DV/D2XP only) |
UseBNLS | Bool | True | Uses a special server to assist the bot in connecting. If this is disabled then you will need the hash files for the game you are attempting to connect with placed in their appropriate location in your bot folder. |
BNLSServer | String | The hostname or IP of the BNLS server to connect to. | |
UseBNLSFinder | Bool | True | Finds an available BNLS server from a pool of recommended servers. |
BNLSFinderSource | String | Overrides the location where BNLS servers are found. | |
UseProxy | Bool | False | If TRUE, attempts to connect to Battle.net through a configured SOCKS4 or SOCKS5 proxy. (see Client\ProxyIP, Client\ProxyPort, and Client\ProxyType) |
ProxyIP | String | 127.0.0.1 | The IP address of the proxy to connect through. |
ProxyPort | Long | 1080 | The port number on the proxy IP to connect to. 1-65535 |
ProxyType | String | SOCKS4 | Controls the type of proxy used. Can be 'SOCKS4' or 'SOCKS5'. |
ProxyServerResolve | Bool | False | If TRUE, resolves the Battle.net server IP on the proxy rather than the local system. |
ProxyUsername | String | Username used for authenticating to the proxy (SOCKS5 only) | |
ProxyPassword | String | Password for authenticated to the proxy (SOCKS5 only) | |
ProxyBNLS | Bool | False | Uses the configured proxy for the connection to BNLS. |
ProxyMCP | Bool | True | Uses the configured proxy for the connection to the Diablo 2 realm. |
AccountMode | String | LOGON | Controls account actions taken during login.
|
ManageOnAccountError | Bool | True | If TRUE, opens the account manager when an error occurs while logging in. |
NewPassword | String | The new password to set when Client\AccountMode is "CHANGEPASS". |
General bot and automation features.
Key | Type | Default | Description |
---|---|---|---|
UseBackupChannel | Bool | False | If TRUE, automatically joins a backup channel when kicked. |
BackupChannel | String | The channel to join when kicked if Features\UseBackupChannel is TRUE. | |
ReconnectType | Long | 2 | Controls behavior when the bot is disconnected from Battle.net.
|
ReconnectDelay | Long | 300 | The base number of seconds between reconnect attempts (type 1 and 2) |
ReconnectDelayMax | Long | 3600 | The maximum number of seconds between reconnect attempts (type 2 only) |
BotMail | Bool | True | If TRUE, allows users to leave messages for each other that will be sent when they next join the channel or check their mail. |
ProfileAmp | Bool | False | If TRUE, regularly updates the bot's profile with the currently playing track from a configured media player. |
VoidView | Bool | False | If TRUE, sends periodic /unignore commands when in a channel with SILENT flags to attempt to detect other users. May not always work. |
GreetMessage | Bool | False | Sends a message to users when they join the channel. See Features\GreetMessageText. |
GreetMessageText | String | The message to send users who join the channel when Features\GreetMessage is enabled. Supports some variables:
|
|
WhisperGreet | Bool | False | If TRUE, greet messages will be whispered to the user instead of posted publicly. |
IdleMessage | Bool | False | Sends a pre-configured message at a fixed interval. See Features\IdleText, Features\IdleDelay, Features\IdleType |
IdleText | String | The text to send when Features\IdleMessage is enabled. Supports some variables:
|
|
IdleDelay | Long | 12 | Number of minutes between idle messages. |
IdleType | String | msg | The type of idle message to send. No value will use "msg".
|
Trigger | String | {.} | The string used to access bot commands. Should be encapsulated in curly brackets {}. Can be >1 character in length. |
BotOwner | String | The name of another user that will be given complete control over the bot. Automatically assigns database rank 200. | |
ChatFilters | Bool | True | If TRUE, enables the blocking of users and messages as well as the combining of related chat events. See also Features\ChatDelay. |
WhisperWindows | Bool | False | If TRUE, separates whisper conversations into separate windows for each user. |
WhisperCommands | Bool | False | If TRUE, command responses will be whispered back even when a command is used in the channel. |
ChatDelay | Long | 500 | The time in milliseconds in which related chat events should be combined. |
MediaPlayer | String | Winamp | The name of the media player to use with music-related commands. Can be Winamp or iTunes. |
PlayerPath | String | The path to the EXE of the media player. If not set it will be detected automatically. | |
AllowMP3 | Bool | True | If TRUE, allows the use of music-related commands and functionality. |
NameAutoComplete | Bool | True | If TRUE, pressing TAB while typing a username in the send box will attempt to auto-complete that name from the names in the current channel. |
AutoCompletePostfix | String | {,} | A string to be appended after a name when TAB auto-complete is used. Should be encapsulated in curly brackets {}. A space will automatically be added after this value. |
CaseSensitiveFlags | Bool | True | If TRUE, flags in the user database will be case sensitive (flag 'D' will be different from flag 'd') |
MultiLinePostfix | Long | { [more]} | A string to be appended to any lines from messages that are split up for being too long. Should be encapsulated in curly brackets {}. See also Emulation\MaxMessageLength |
FriendsListTab | Bool | True | If FALSE, disables the friends list tab and automatic tracking of friend status. |
RealmAutoChooseServer | String | If set, automatically joins a realm with the given name or index (D2DV/D2XP only). Client\UseRealm must be enabled. | |
RealmAutoChooseCharacter | String | If set, automatically selects the character with the given name or index (D2DV/D2XP only). Client\UseRealm must be enabled. | |
RealmAutoChooseDelay | Long | 30 | The number of seconds before automatically choosing a realm character.
|
Controls channel moderation functions
Key | Type | Default | Description |
---|---|---|---|
BanEvasion | Bool | True | If TRUE, bans any users who join that are on the bot's internal ban list. |
PhraseBans | Bool | True | If TRUE, bans users who send any message containing a phrase on the banned phrases list. |
PhraseKick | Bool | True | If TRUE, kicks users instead of banning them for saying banned phrases. |
LevelBanW3 | Long | 0 | If >0, bans WAR3/W3XP users with a level lower than the set value. |
LevelBanD2 | Long | 0 | If >0, bans D2DV/D2XP users with a level lower than the set value. |
LevelBanMessage | String | The reason used when banning a user for having a low level. | |
PeonBan | Bool | False | If TRUE, bans WAR3/W3XP users who have the default peon icon. |
KickOnYell | Bool | False | If TRUE, kicks users who send a message in ALL CAPS. Messages must be longer than 5 characters and be more than 90% uppercase. |
ShitlistGroup | String | The name of a group in the user database to assign to users added to the shitlist. | |
TagbansGroup | String | The name of a group in the user database to assign to phrases added to the tagban list. | |
SafelistGroup | String | The name of a group in the user database to assign to phrases added to the safelist. | |
RetainOldBans | Bool | False | Keeps bans on the internal ban list even after the issuing operator leaves the channel. |
StoreAllBans | Bool | False | Adds bans from other operators to the bot's internal ban list. |
ProtectMessage | String | Lockdown | The reason used when banning users when Moderation\ChannelProtect is enabled. |
RemoveIdleUsers | Bool | False | If TRUE, bans users who are in the channel longer than a set time without saying anything. See Moderation\IdleBanDelay |
IdleBanDelay | Long | 300 | The number of seconds from when a user last talked before they will be banned if Moderation\RemoveIdleUsers is enabled. |
KickIdleUsers | Bool | False | Kicks users instead of banning them when Moderation\RemoveIdleUsers is enabled. |
IPBans | Bool | True | Enables use of the /ipban command and automatically bans any users with the SQUELCHED flag. |
BanUDPPlugs | Bool | False | If TRUE, automatically bans users with the UDP plug flag. |
AutoSafelistLevel | Long | 20 | The level of rank required to be safe from auto-moderation functions. |
ChannelProtect | Bool | False | If TRUE, automatically bans any non-safelisted users who join the channel. |
QuietTime | Bool | False | If TRUE, bans any non-safelisted users in the channel who send a message. |
QuietTimeKick | Bool | False | If TRUE, kicks users who talk when Moderation\QuietTime is enabled instead of banning them. |
PingBan | Bool | False | If TRUE, bans users with a ping value higher than the level configured in Moderation\PingBanLevel |
PingBanLevel | Long | 5000 | The maximum allowed ping before a user is banned when Moderation\PingBan is enabled. |
Controls the look and function of the bot's user interface.
Key | Type | Default | Description |
---|---|---|---|
ShowSplashScreen | Bool | True | Shows the splash screen when the bot first starts. |
ShowWhisperWindow | Bool | False | Expands a panel at the bottom of the main window showing received (and optionally sent) whispers. See also UI\ShowOutgoingWhispers |
MinimizeOnStartup | Bool | False | Automatically minimizes the bot when it starts. |
UseUTF8 | Bool | True | Enables the sending and receiving of UTF-8 messages in chat. |
DetectURLs | Bool | True | Detects hyperlinks in chat and makes them clickable. |
ShowOutgoingWhispers | Bool | True | Shows sent whispers in the whisper window. See UI\ShowWhisperWindow |
HideWhispersInMain | Bool | False | If TRUE, hides whisper messages from being displayed in the main chat window. |
HideExtraServerAlerts | Bool | False | Hides "extra" alert messages generated by the server.
|
HideMutualFriendAlerts | Bool | False | Hides alert messages generated by the actions of your mutual friends, such as "Your friend ... has ...". |
TimestampMode | Long | 1 | Controls the format of displayed timestamps.
|
ChatFont | String | Tahoma | The name of a font family to use in the chat window. Must be a font recognized by your computer system. |
ChatSize | Long | 10 | The size of the font used in the chat window. |
ChannelFont | String | Tahoma | The name of a font family to use in the channel list. Must be a font recognized by your computer system. |
ChannelSize | Long | 10 | The size of the font used in the channel list. |
HideCLanDisplay | Bool | False | Hides clan tags from the channel list. |
HidePingDisplay | Bool | False | Hides ping bars from the channel list. |
NamespaceConvention | Long | 0 | Controls the reference point for usernames as seen by the bot.
|
UseD2Naming | Bool | False | Allows referencing users by their Diablo 2 character name. |
ShowStatsIcons | Bool | True | Shows icons based on a user's stats. These icons are overridden if a user has special flags and UI\ShowFlagsIcons is also enabled. |
ShowFlagsIcons | Bool | True | Shows icons based on a user's channel flags. If the user does not have any flags then the default icon for their game is shown. |
ShowJoinLeaves | Bool | True | Shows messages when users join or leave the channel. |
FlashOnEvents | Bool | False | Flashes the bot window when an event occurs in the channel. |
FlashOnCatchPhrases | Bool | True | Flashes the bot window when any of a list of preconfigured phrases is said in the channel. |
MinimizeToTray | Bool | True | Minimizes the bot to the system tray rather than the taskbar. |
NameColoring | Bool | True | Colors users in the channel list based on their flags and the amount of time since they last spoke in the channel. See also UI\SecondsToIdle. |
ShowOfflineFriends | Bool | True | If disabled, hides offline friends from the friends tab and response from the /friends list command. |
DisablePrefix | Bool | False | Hides the prefix send box. |
DisableSuffix | Bool | False | Hides the suffix send box. |
MathAllowUI | Bool | False | If enabled, allows UI-related functions to be used with the /math command. |
D2NamingFormat | String | The format used when converting Diablo 2 character names. Allows some variables:
|
|
SecondsToIdle | Long | 600 | Number of seconds before a user is marked in the channel list as idle, if UI\NameColoring is enabled. |
NoRTBAutomaticCopy | Bool | False | If FALSE, any text highlighted in the bot's main chat window will be copied to the computer's clipboard. |
HideBanMessages | Bool | False | Hides ban messages from the chat window. |
RealmHideMotd | Bool | False | Hides the D2 realm message of the day. |
MaxUserlistSize | Long | 255 | The maximum number of users tracked in the channel list. |
Holds the position and state of UI elements.
Key | Type | Default | Description |
---|---|---|---|
Left | Long | 0 | The pixel position of the left side of the main chat window. |
Top | Long | 0 | The pixel position of the top side of the main chat window. |
Height | Long | 600 | The height of the main chat window, in pixels. |
Width | Long | 800 | The width of the main chat window, in pixels. |
Maximized | Bool | False | TRUE if the main chat window is maximized. In this state the left, top, height, and width values are ignored and not updated. |
LastSettingsPanel | Long | 0 | The index of the last settings panel that was open. |
EnforceBounds | Bool | True | Snaps the window back onto an available monitor should the number of monitors on the computer change. |
MonitorCount | Long | 1 | The number of monitors on the system when the bot was last loaded. |
Controls the bot's log files and data retention.
Key | Type | Default | Description |
---|---|---|---|
LogDBActions | Bool | True | Logs changes to the user database to the 'master' log file. |
LogCommands | Bool | True | Logs executed commands to the 'master' log file. |
MaxBacklogSize | Long | 10000 | The maximum length of the text in the bot's main chat window, in characters. 0 for unlimited, though it may cause lag when the bot is running for an extended period. |
MaxLogFileSize | Long | 0 | The maximum length of the bot's log files, in characters. 0 for unlimited. |
LogMode | Long | 2 | The logging method used by the bot.
|
Tunes the bot's outbound message queue (prevents being kicked for flooding when sending lots of messages)
Key | Type | Default | Description |
---|---|---|---|
MaxCredits | Long | 600 | The maximum number of queue credits the bot can have. |
CostPerPacket | Long | 200 | The number of credits required for each packet sent. |
CostPerByte | Long | 7 | The number of credits required for each byte of each packet sent. |
CostPerByteOverThreshhold | Long | 8 | The number of credits required for each byte of messages longer than the threshhold. |
StartingCredits | Long | 200 | The number of queue credits given to the bot at startup |
ThreshholdBytes | Long | 200 | The maximum length of a message before it uses the increased credit cost per byte sent. |
CreditRate | Long | 7 | The number of milliseconds it takes to earn back 1 credit. |
Controls the bot's scripting system.
Key | Type | Default | Description |
---|---|---|---|
DisableScripts | Bool | False | Disables the entire scripting system |
AllowUI | Bool | True | Allows scripts to create forms and modify UI elements. |
ScriptViewer | String | Path to a program used to view and edit scripts when opened from the scripting menu. Defaults to the system default handler for the script's file type. | |
ScriptViewerArgs | String | Optional command-line parameters passed to the script viewer program when opening a file. |
Controls specifics of the bot's emulation of the Battle.net protocol.
Key | Type | Default | Description |
---|---|---|---|
IgnoreClanInvites | Bool | False | Ignores invites to WarCraft 3 clans. |
IgnoreKeyLength | Bool | False | Allows any length CD key to be used with any product. (Warning! Use at your own risk, may result in an IP ban.) |
PingSpoof | Long | 0 | Exploits server behavior to give the bot a fake ping value.
|
UseUDP | Bool | False | Gives the bot a UDP plug flag (not available on D2DV/D2XP or WAR3/W3XP) |
CustomStatstring | String | Allows you to customize your statstring on supported products (DSHR and DRTL only) | |
ForceDefaultLocaleID | Bool | False | Forces the bot to use locale ID 1033 (US English) instead of the system locale. |
UDPString | String | bnet | Modifies the token code used to validate a client as supporting UDP. |
KeyOwner | String | If set, the name is registered as being the owner of the bot's CD key. Defaults to the bot's username. | |
LowerCasePassword | Bool | True | If FALSE, passwords for OLS (non-WAR3) accounts will NOT be lowercased before hashing. May cause incompatibility with other bots not being able to login to your account. |
IgnoreVersionCheck | Bool | False | Ignores the response from the server's version check and attempts to continue the connection sequence. |
PredefinedGateway | String | If set, disables automatic gateway detection and treats the client as being on the set gateway. Used with UI\NamespaceConvention | |
ForceJoinDefaultChannel | Bool | False | Joins the product's home channel (and receives the server's MotD) before joining the channel configured in Client\HomeChannel. |
MaxMessageLength | Long | 223 | The maximum length of a chat message before it is split into multiple messages. See also Features\MultiLinePostfix. |
AutoCreateChannels | String | ALWAYS | Controls behavior when joining a channel from the channel list.
|
RegisterEmailAction | String | PROMPT | Controls the bot's response to being requested to register an email address for an account.
|
RegisterEmailDefault | String | The email address registered when Emulation\RegisterEmailAction is set to VALUE. | |
RegisterEmailChange | String | The email address used when changing your email address with Client\AccountMode set to CHANGEEMAIL. | |
RealmServerPassword | String | password | Overrides the password used to login to the realm server |
RealmAccountMaxCharacters | Long | 8 | Overrides the limit for the number of characters allowed on a Diablo 2 realm account. Use with caution! |
ProtocolID | Long | 0 | Overrides the ProtocolID value sent in SID_AUTH_INFO (0x50). Use with caution! |
PlatformID | String | IX86 | Overrides the PlatformID value sent in SID_AUTH_INFO (0x50), SID_STARTVERSIONING (0x06) and SID_REPORTVERSION (0x07). Use with caution! |
ProductLanguage | String | Overrides the language value sent in SID_AUTH_INFO (0x50). Use with caution! | |
ServerCommandList | String | w %,whisper %,m %,msg %,f m,clan mail,c mail,clan motd,c motd,away,dnd,ban %,kick %,j,join,channel,me,emote | |
GatewayDelimeter | String | # | The string used to separate usernames from the gateway component (Bob@USEast vs Bob#USEast) |
XXVerByte | Long | -1 | Overrides the version byte sent when logging into products indicated by XX. Value should be hexadecimal. XX can be:
|
XXLogonSystem | Long | -1 | Overrides the logon mechanism used by products indicated by XX.
|
Controls specifics of the bot's emulation of the Battle.net protocol.
Key | Type | Default | Description |
---|---|---|---|
WardenFlags | Long | 0 | Bitwise flags used to control debugging behavior of WardenDLL.
|
Adding a new setting to the configuration is done entirely within clsConfig.cls.
- Pick a section for the setting to go in. If none of the sections apply you can consider adding a new one, just be sure to define the section name as a SECTION_ constant at the top of the file.
- Create a private field. Each setting has a private field in the config class. Find the section you've chosen for your setting and add a member for it there. Please follow the naming convention that the other settings use.
- Create public GET/LET properties. Each setting also has a public GET and LET property. This property sets or returns the value of the private field. Find the section for your setting and add properties for it. You should put all of these in the same relative place within the section.
- Add a default value for the setting in the LoadDefaults() method. Again, be sure to put it in the section in the same relative place as the field and properties.
- Load the setting's value. Find the load functions for the config versions this setting can be found in (you usually do not need to create a new one just to add a setting). Using the same methods as the other settings, load the value for your setting here. Note: ReadSetting() returns a string. ReadSettingB() returns a bool. ReadSettingL() returns a long. There is no method for doubles or other variable types so you will either have to make a function for that type of do the manual conversion from string in the load function.
- Save the setting. Add the setting to the Save() method. Be sure to specify the default value parameter as the private field, so the default system works correctly.