Vindication Custom Scripting:(Originally taken from
here, edited by Rizon.)
For Vindication, the script lines are held in script.cfg in the bot folder. Lines that start with anything other then & are ignored (except brackets that will be covered later). It is always automatically loaded when you start up the bot and refresh the settings either manually or using the :reload command. In order to actually enable the bot to search through all the lines in the config, you need to make sure that the "Enable custom scripting" item in the Options menu has a check by it.
The format for the lines that are to processed is as follows:
&<Type Number>&<User Name Match>&<Text Match>&<Action> <Type Number> = The number for the chat event (1000 less than the Telnet event number. Click
here to see a list of event numbers.)
<User Name Match> = Substring to search user name for.
Match specifications:
To match an exact name: &5&"Zonker[RC]"&&.. Have quotation marks at the begining and end of the name
To match the begining of a name: &5&"Zonker[RC]&&.. Only have a single quote at the begining of the name
To match anything in a name: &5&RC&&.. If RC is found anywhere in the name then it works. Also, you can use wildcards in the name to make sure that script works even if the name contains multiple things (ie: &5&*Zonker*RC*&&... would fire for Zonker[RC], Zonker{RC}, Zonker-RC-, etc.).
<Text Match> = Same as user name but for the text sent/received (matching rules apply as well), for example in a whisper, or channel name when joining a channel.
The script will always stop for an event when it finds something that matches it if you don't tell it to keep going through script.
&5&"SomeonesName"&"~say /&:null
&5&"SomeonesName"&"~say &%3
That allows you to purposefully stop checking to keep someone from doing something such as having the bot say something that you don't want it to. If you want it to continue checking, then you would add a + at the begining of that line.
&5&"YourName"&"~fulltime"&+The current time is %20.
&5&"YourName"&"~fulltime"^ today's date is %21.
<Action> = Either a response to send or a command. A command begins with a colon, and thus you cannot send a response beginning with a colon. Also, a plus will have a special meaning. Normally the parsing is stopped after the first matching line, but if the matching line has an action starting with a plus, parsing of the remaining lines will continue.
Detailed Information (click on each link to see a more detailed description):Vindication Event Numbers - <Type Number>: 0 - Send Text Prompt
1 - Scans Channel
2 - User Join
3 - User Leave
4 - Received Chat Whisper
5 - Received Chat Message
6 - Broadcast message from Battle.Net
7 - Joined channel
9 - Flag change detection
10 - Sent Whisper
13 - Channel full
14 - Channel does not exist
15 - Banned from channel
18 - Info received from Battle.net
19 - Battle.Net error message recieved
23 - Emote
Vindication Commands - <Action>:%n variables: %0 - Current config section
%1 - Users name
%2 - All text
%3 - Result of matching text
%4 - Name of bot
%5 - Current server
%6 - Current channel
%7 - Home channel
%8 - Targets ping
%9 - Hex form of flags
%10-%19 - Reserved for :scanf
%20 - Current time
%21 - Current date
%22 - Current Vindication build number
Vindication Event Numbers Details:0 - This is unique to Vindication and isn't exactly a real event, it is triggered when you type something in the chat window. If you have a plus by the last action that is carried out, the message is sent to battle.net, if not, it isn't sent or processed for other internal commands (/e, /r, etc).
1 - When you join a channel, this event is sent to you for each user that is already in the channel. The text is the user's statstring.
2 - Someone joined the channel.
3 - Someone left the channel.
4 - You received a whisper.
5 - Someone talked in the channel.
6 - Broadcast message from Battle.Net.
7 - You have just joined a channel.
9 - Someone's flags has changed in the channel.
10 - You sent a whisper to someone.
13 - Channel you are trying to join is full.
14 - Channel you are trying to join does not exist.
15 - You are banned from a channel that you are trying to join.
18 - Info received from Battle.Net.
19 - Error message from Battle.Net.
23 - Emote action received.
Vindication Command Details::addline <text> Adds a line to the end of your script.cfg, make sure you have blank line at the very end, or it will be added onto the end of the last line. If you use config sections in your script file and want to make sure that the line being added isn't put in that section, add a [globals] section to the end of the file and leave a blank space as always. This is one of the more helpful commands, especially for adding script lines so that people can use your bot.
&5&"YourName"&"~addsay &+:addline &5&"%3"&"~say &\%3
&5&"YourName"&"~addsay &:addline &4&"%3"&"say &\%3
Notice the \%3, that makes it so that the %3 doesn't get processed, having the person's name beging put in there.
:addtext <color> <text> Adds text to the main chat window, for the color you can either have just a plain color name (ie: red, green, blue), or you can have a html coded color starting with &H (ie: &H00ff00 for green). To have a new line, you must add \n to the end, if you don't, the next thing added to the chat window will go right after that.
&0&&"/addred &:addtext red %3\n
&0&&"/addgray &:addtext &H808080 %3\n
&0&&"/hmm"&+:addtext blue Hmm,
&0&&"/hmm"&:addtext green can't figure out what to do?\n
:addtime Adds a timestamp to the main chat window. Use it if you have timestamps enabled so that any text added using :addtext won't look too odd

&0&&"/addred &+addtime
&0&&"/addred &+addtime
:beep <frequency> <duration(ms)> Causes your computer's built in buzzer to beep. You do not need to give it a frequency or a duration, the default frequency is 1000 and the default duration is 50ms. This can be quiet fun to mess with, especially when you have a pet in the same room.

:checksay <text> Runs the text that you want through the internal say parser. (Ex: You want your bot to say something encrypted :checksay /e test)
:config <new config section> Changes the config section that your bot is currently in. Sections are in brackets, and everything before sections is always loaded. The default section that will always be read is [globals], so if you use sections and also use :addline, have that section at the very end of the file so that you can use the lines being added.
:if <expression> ; <true action> ; <false action> Checks to see if the expression is true, if it is then the true action is executed, and if it isn't, then the false action is executed.
&9&&&:if %9=2 ; :addtext blue %1 got ops.\n ; :null
&0&&"/checkgreater &:if %3 > 10 ; :addtext blue %3 is greater than 10.\n ; :addtext blue %3 isn't greater than 10.\n
The comparisons that you can use are =, >, and <. Most people would think that the greater then or less then are pretty useless, but you could easily use them to check if someone's level for War3 is above a certain amount, a user has at least a certain number of wins, or anything else you can think of.
:null, :nothing Does nothing, used to block out something that you don't want to happen.
:ops <text> Only executes the specified text if the bot has ops, the text can be a command.
:quit Quits the bot as soon as it gets to this, doesn't wait for anything in the send buffer before it.
:random <1|2|3|x> Says/does one of the choices randomly, can be a command.
:rejoin Rejoins the current channel.
:reload Reloads the bots configuration.
:scanf <base variable no> <expected no variables> <match string> <searched string> Yikes, this one is really complex, but extremely useful if you know how to use it. It basically splits whatever you tell it to in the search string. It goes until it hits what you specify in the match string, which is %[^]. Whatever you want to stop at, put after the caret, or leave nothing after it so that it searches the whole string. The base variable is the first %variable to be stored into + 10, so if you put 2 there, %12 would be the first assigned to (used when you have multiple :scanfs and you want to preserve whatever is already in there). Expected number of variables is how many arguments that you should read in.
&1&&"PX3W &+:scanf 0 3 %c%c3W %s %[^]&%3
&1&&"PX3W &:addtext blue Statstring: %2\nFav race: %11\nIcon Level: %10\nLevel: %12\n
The expected number of variables is 3 because you are only reading in 3 values. %c is for reading in a single character and %s is for a string, the 3W is in there because it is something that should always be like that, and if it isn't then the :scanf will fail and not assign anything to any of the values.
:setprof <name no> <key name> <key value> The only reason Name is in there is to keep backwards compatability with some of the old NBBot script, you can just put %4 there always. The different Key Names you can use without getting IP-Banned by Battle.net are:
Profile\Age
Profile\Sex
Profile\Location
Profile\Description
In the key value you can use \n for a newline just like you can for other commands.
&7&&&:setprof %4 Profile\Location Joined channel %6 at %20
:shell <command> WARNING!!!BE VERY CAREFUL ABOUT THIS ONE!!!
Executes a command through the shell, mostly for launching other programs. Do NOT! give other people straight access to do :shell %3, or they could easily damage your computer!
&0&&"/bw"&:shell C:\Program Files\Starcraft\Starcraft.exe
Vindication %n Command Details:%0 - Current config section.
%1 - User's name, includes asterix when on Diablo II / Diablo II Expansion.
%2 - All of the text in the message that triggered the event.
%3 - The text after whatever was matched in the text match argument.
%4 - Current username of the bot.
%5 - Current server you are connected to.
%6 - Current channel you are in.
%7 - Your home channel.
%8 - The user's ping. (Yours if it isn't an event involving someone else.)
%9 - Hex form of the user's flags (Yours if it isn't an event involving someone else.)
%10-%19 - Reserved for :scanf.
%20 - The current time.
%21 - The current date.
%22 - The current Vindication build number.