vb code for auto inviting on warcraft 3 binary bot (checks stats and invites)

[code]'/* StealthBot VBScripting System
' *
' * 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 [email protected] with your comments, questions or concerns.
' *
' * 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.
' *
' *
' * scTimer
' * - Microsoft standard Timer control. Fires the ScriptTimer_Timer() event each time it runs.
' * - Disabled by default. To use it, set an interval
' * 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
' *
' * (More to come?)
' * */

'// 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! (But 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)
if Lcase(Left(message,5)) = "join" then
call invite(Username)
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

Sub invite(name)

if inviting=True then
AddQ "The bot is busy wait a few seconds. Then try again."
Exit Sub
end if

content=ScINet.OpenURL("http://www.battle.net/war3/ladder/W3XP-player-profile.aspx?Gateway=azero..." & name)

if instr(content,"Error Encountered")>0 then
AddQ "/w " & user & " The Battle.Net web site is currently unavailable or an error has occured."
Exit Sub
end if

clan=Mid(content,instr(Lcase(content),"clan name:"))
if instr(clan,"")>0 then
end if


if clan="N/a" then
AddQ "Checking stats..."
if ((int(wins)>=5) and (Left(percent,5)>=40)) then
AddQ "Stats Accepted Sending Invite!"
command "high access username", ", "/invite " & Name, True
Exit Sub
AddQ "Stats Rejected"
Exit Sub
end if
AddQ name & " is in a clan already."
Exit Sub
end if
end sub

replace all of this with ur script.txt file i believe it is called change some of the settings for percent and level and clan names.

This would be good to add to the site. Next time your on AIM give me an IM. Send me your MSN from AIM if you ever use that too.