'/* StealthBot VBScripting System
' * 
' * THIS SYSTEM IS UNDER DEVELOPMENT
' * If you need to access any part of the bot's internals that is not already given to you please,
' * PLEASE tell me how I can make it more useful to you!
' * Feel free to e-mail me at stealth@stealthbot.net with your comments, questions or concerns.
' *
' * DISCLAIMER
' * I will NOT provide Visual Basic language help!
' * Either you know VB enough to use this scripting plugin, or you don't!
' * Please don't come to me asking for help with VBScript.
' * If you're having problems and want to learn more, I'd suggest a Google search on the topic.
' * 
' * Finally, developers, to see the internal "mirror" calls that you have access to in this scripting
' * system, open the included file ScriptSupportClass.txt, which contains a text version of the class
' * that I expose the script to.
' * 
' * SCRIPT OBJECTS
' * 
' * scTimer
' *  - Microsoft standard Timer control. Fires the ScriptTimer_Timer() event each time it runs.
' *  - Disabled by default. To use it, set an interval <= 65535 milliseconds using the .Interval property
' *    	and set .Enabled = True.
' *
' * scINet
' *  - Microsoft Internet Transfer Control. Allows you to communicate with websites using GET or, with
' *  	with more work, POST methods. Very versatile, can be adapted for many purposes.
' *  - Does nothing unless scripted otherwise
' *
' * ssc
' *  - Instantiated ScriptSupportClass for bot tie-in functions (see ScriptSupportClass.txt)
' * 
' * BotVars
' *  - Internal bot variables accessible to you
' *
' * (More to come?)
' * 		   */

'// INCLUDES
'// You may reference other .txt files here. They will be imported into
'//    the script control on load.
'#include textfile.txt
'// Use that exact syntax, including the # mark at the beginning! (Remove the ' VB comment marker.)
'// One include per line.


'// FLAGS as they are referred to here are the user's BATTLE.NET FLAGS, the following tests can be applied to them:
'	If Flags And 2 	// user is a moderator
'	If Flags And 16 // User has the UDP plug
'	If Flags And 32 // User is squelched
'	If Flags And 1 	// user is a blizzard rep


'// Fires when the bot executes.

Sub Event_Load()

End Sub


'// Fires when the server sends a blue INFO-type message. (Includes ban and kick messages.)

Sub Event_ServerInfo(Message)

End Sub


'// Fires when the server sends a red ERROR-type message. (Includes "That user is not logged on." etc.)

Sub Event_ServerError(Message)

End Sub


'// Fires when a user on battle.net talks.

Sub Event_UserTalk(Username, Flags, Message, Ping)

	' sample autoresponse:

	'if instr(1, lcase(message), "omg") > 0 then
	'	addq "Omg what?!"
	'end if
End Sub


'// Fires when a user speaks with /emote.

Sub Event_UserEmote(Username, Flags, Message)

End Sub


'// Fires when a whisper is recieved.

Sub Event_WhisperFromUser(Username, Flags, Message)

End Sub


'// Fires when a user joins the channel.
'// Level will contain 0 for no-level Warcraft III players or non-Warcraft III products.
'// Message contains the user's PARSED statstring.
'// OriginalStatstring contains the user's UNPARSED statstring.

Sub Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring)

End Sub


'// Fires when a user leaves the channel.

Sub Event_UserLeaves(Username, Flags)

End SUb


'// Fires when Battle.net updates a user's flags in the channel.

Sub Event_FlagUpdate(Username, NewFlags, Ping)

End Sub


'// Fires after a successful login.

Sub Event_LoggedOn(Username, Product)

End Sub


'// Fires once for each user in the channel upon joining a channel.

Sub Event_UserInChannel(Username, Flags, Message, Ping, Product)

End Sub


'// Flags in this case stores the channel's flags.

Sub Event_ChannelJoin(ChannelName, Flags)

End Sub


'// Executes every X milliseconds, as set by using its .Interval property.

Sub scTimer_Timer()

End Sub


'// Executes after the user presses ENTER in the Send box on the bot. Text will always be processed by the bot and sent to battle.net before arriving here.

Sub Event_PressedEnter(Text)

End Sub


'// Executes when the bot recieves a Profile return from the server. KeyName will be one of the following:
	' Profile\Sex
	' Profile\Location
	' Profile\Description
'// KeyValue will contain the value of that profile key as a string.

Sub Event_KeyReturn(KeyName, KeyValue)

End Sub


'// Executes when the bot is closed. You can use this sub to write things to disk before the bot shuts down.

Sub Event_Close()

End Sub