hmm a bot that talks to u. not to take anything away from these forums but look at stealthbot.net 's forums
i got my starcraft bot from there and in the forums there is visual basic stuff and general programming so u can get some help from there
i know the code is really different but there is some stuff the same
'/* 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 [email protected] 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
' *
' *
' * (More to come?)
' * */
'// INCLUDES
'// You may reference other .txt files here. They will be imported into
'// the script control on load.
'#include \Scripts\script.txt
'
'// Use that exact syntax, including the comment mark at the beginning!
'// 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
'Generate a random number, inclusive
Sub random(high, low, ByRef rndNum)
rndNum = Int((high - low + 1) * Rnd + low)
End Sub
'// 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
Option Explicit
Public myAccess 'Holds the users Access level
Public myFlags 'Holds the users Flags
Public myCommand 'Holds the users command
Public msgStart 'Current position in the message
Public param1 'First parameter from the users command
Randomize 'Initialize random-number generator.
'// Fires when a user on battle.net talks.
Sub Event_UserTalk(Username, Flags, Message, Ping)
'If they are not issuing a command, ignore the user
If (Mid(Message, 1, 1) <> ".") Then
Exit Sub
End If
'Get the users access level
GetDBEntry Username, myAccess, myFlags
'If the user doesn't have basic access, don't bother
If (myAccess < 25) Then
Exit Sub
End If
'Get the command the user is trying to issue
msgStart = 2
getNextWord Message, myCommand
myCommand = LCase(myCommand)
Select Case (myCommand)
Case "ask8ball"
param1 = mid(Message, msgStart) 'Get the question
If (param1 <> Empty) Then 'Make sure they supplied a question
ask8Ball
Else
AddQ "/w *" & Username & " you must supply a question!"
End If
End Select
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)
Event_UserTalk Username, Flags, Message, 0
End Sub
Public roulette 'holds game status
Public pullcount 'holds the number of times the trigger has been pulled
Public cylindercount 'holds the number of cylinders
Public bullet 'holds the location of the bullet
Randomize 'Initialize random-number generator.
'//////////////////////////////////////////// Custom Functions /////////////////////////////////////////////
'Generate a random Magic 8 Ball saying
Sub ask8Ball()
Dim saying(28), sayNum
random 28, 1, sayNum
saying(1) = "As I see It, Yes"
saying(2) = "It is certain"
saying(3) = "It is decidedly so"
saying(4) = "Most likely"
saying(5) = "Outlook good"
saying(6) = "Signs point to Yes"
saying(7) = "Without a doubt"
saying(8) = "YES"
saying(9) = "Yes definitely"
saying(10) = "You may rely on it"
saying(11) = "Ask again later"
saying(12) = "Better not tell you now"
saying(13) = "Cannot predict now"
saying(14) = "Concentrate and ask again"
saying(15) = "Don't count on it"
saying(16) = "My reply is No"
saying(17) = "My sources say No"
saying(18) = "Outlook not so good"
saying(19) = "Reply Hazy, Try again"
saying(20) = "Very doubtful"
saying(21) = "Not only no, but HELL No !"
saying(22) = "Not only yes, but HELL Yes !"
saying(23) = "You will regret it !"
saying(24) = "Signs point to No"
saying(25) = "Go away... I don't want you back !"
saying(26) = "Well I love you, come back !"
saying(27) = "What? Are you taking me as an 8 ball ?"
saying(28) = "Do you suck or sux ! ?"
AddQ "/me looks into his Magic 8 Ball: " & saying(sayNum)
End Sub
'Grabs the next word in a message
Sub getNextWord(Message, ByRef Word)
'Loop through the message until we find the next space
Word = Empty
Do Until (Mid(Message, msgStart, 1) = " " Or msgStart > Len(Message))
Word = Word & Mid(Message, msgStart, 1)
msgStart = msgStart + 1
Loop
'Skip the space
msgStart = msgStart + 1
End Sub
'Generate a random number, inclusive
Sub random(high, low, ByRef rndNum)
rndNum = Int((high - low + 1) * Rnd + low)
End Sub
Dim myAccess, myFlags
GetDBentry Username, myAccess, myFlags
If lcase(Message) = ".roulette" Then
If Roulette = False Then
roulette = True
pullcount = 0
cylindercount = 6 'The number of cylinders in the gun
Dim sayNum
random cylindercount, 1, sayNum 'randomly sets the location of the bullet, using Sub Random()
bullet = saynum
AddQ "/me Pulls out his " & cylindercount & " cylinder pistol and slaps the side of the barrel. Spining barrel *whoooshh...clickety click*"
AddQ "The Barrel has stopped. There is a 16.666% Chance of Getting Shot. Type .pull to meet your fate!"
'ordinal number endings
Select Case saynum
Case 1
ordend = "st"
Case 2
ordend = "nd"
Case 3
ordend = "rd"
Case 4,5,6
ordend = "th"
End Select
If MyAccess > 1000 Then
AddQ "/w " & username & " The bullet is in the " & saynum & "" & ordend & " cylinder"
End If
Else
AddQ "You can't spin the barrel. The gun must fire before a new game can be started!"
End If
End If
If lcase(Message) = ".pull" Then
If Roulette = True Then
pullcount = pullcount + 1 'keeps track of the number of times the trigger has been pulled
If Flags = 2 Then
AddQ Username & " is a moderator, and cannot play roulette."
Exit Sub
End If
If pullcount <> bullet Then
perchance = 1/(cylindercount - pullcount) *100 'percent chance of getting shot
trunchance = left(perchance, instr(perchance, ".")+3) 'truncates the perchance variable
AddQ "*Click. You've lucked out! There is now a " & trunchance & "% chance that you'll be shot. Do you have the balls!?"
ElseIf pullcount = cylindercount Then
AddQ "ROFL he/she pulled the trigger on the last cylinder!!!"
AddQ "/kick " & Username & " *BANG* You've been Shot!!!"
roulette = False
Else
AddQ "/kick " & Username & " *BANG* You've been Shot!!!"
roulette = False
End If
ElseIf Roulette = False Then
AddQ "You must first type .roulette to spin the barrel!"
End If
End If
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 scriptTimer_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
that is the bots script file on it with an added 8 ball script and a russian roullette thing(it dont work but 8ball does)
any language used by me will be dbpro(saves me a lot of typing)