'/*
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
' * - Disable 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)
' *
' * (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)
If (Instr(1, lcase(Message), "salut") > 0) or (Instr(1,
lcase(Message), "Salut") > 0) or (Instr(1, lcase(Message),
"SALUT") > 0) then
Randomize
Answer = Int((4 * Rnd) + 1)
If Answer="1" then
Answer = ("Salutation " & Username)
ElseIf Answer = "2" then
Answer = ("/me te salue " & Username)
ElseIf Answer = "3" then
Answer = ("Salut " & Username)
ElseIf Answer = "4" then
Answer = ("lut " & Username)
End If
If Username="AlphaPredatory" then
AddQ "/me salue sa grande créatrice " &
Username
ElseIf Username="AlphaVeloceTia" then
AddQ "/me salue sa Majesté: La reine " &
Username
Else
AddQ Answer
End If
ElseIf (Instr(1, lcase(Message), "vent") > 0) or
(Instr(1, lcase(Message), "Vent") > 0) or (Instr(1,
lcase(Message), "VENT") > 0) then
Randomize
Answer = Int((4 * Rnd) + 1)
If Answer="1" then
Answer = ("Qui a osé faire un vent à "
& Username & " !")
ElseIf Answer = "2" then
Answer = ("/me sais ce que c'est que d'être rejeté,
" & Username & " !")
ElseIf Answer = "3" then
Answer = ("Fais gaffe au courant d'air " & Username
& " :p")
ElseIf Answer = "4" then
Answer = ("Il sera châtié pour cette affront")
End If
If Username="AlphaPredatory" then
AddQ "Qui a osé faire un vent à ma créatrice
" & Username & " !"
ElseIf Username="AlphaVeloceTia" then
AddQ "Qui a osé faire un vent à notre Reine
" & Username & " !"
Else
AddQ Answer
End If
ElseIf instr(1, lcase(message), "^^") > 0 then
AddQ "^^"
ElseIf instr(1, lcase(message), "lol") > 0 then
AddQ "lol"
ElseIf instr(1, lcase(message), "reee") > 0 or
(instr(1, lcase(message), "REEE") > 0) or (instr(1,
lcase(message), "Reee") > 0) then
Randomize
Answer = Int((3 * Rnd) + 1)
If Answer="1" then
Answer = ("/me te suivra jusqu'à sa mort, Ô
" & Username)
ElseIf Answer = "2" then
Answer = ("C'est reparti " & Username)
ElseIf Answer = "3" then
Answer = ("On y retourne " & Username)
End If
If Username="AlphaPredatory" then
AddQ Answer
Else
AddQ "C'est reparti " & Username
End If
ElseIf (instr(1, lcase(message), "@++") > 0) or
(instr(1, lcase(message), "@+") > 0) then
Randomize
Answer = Int((4 * Rnd) + 1)
If Answer="1" then
Answer = ("/me attendra ton retour, " & Username)
ElseIf Answer = "2" then
Answer = ("Reviens vite " & Username & "
!")
ElseIf Answer = "3" then
Answer = ("Tu part déja " & Username &
" ?")
ElseIf Answer = "4" then
Answer = ("Le temps passe trop vite !!")
End If
If Username="AlphaPredatory" or Username="AlphaVeloceTia"
then
AddQ "/me attendra ton retour, Ô " & Username
& " !"
Else
AddQ Answer
End If
ElseIf instr(1, lcase(message), "*membres") > 0
then
AddQ "AlphaVeloceTia(Deesse) ~>AlphaAnihilator ~>AlphaPredatory(moi)
~>AlphaCondemned ~>AlphaLordAngel ~>AlphaSasuke ~>AlphaTyrael
~>AlphaDeath ~>AlphaVengeur ~>AlphaGouze"
ElseIf (instr(1, lcase(message), "*menu") > 0)
or (instr(1, lcase(message), "*Menu") > 0) or (instr(1,
lcase(message), "*MENU") > 0) then
If Username="AlphaPredatory" then
AddQ "COMMENT! Tu as oubliée mes commandes: *canal,
*ping,*kickmeplz, *heure, *jour, *site, *autres, *recrute, *tournoi,
*membres !!!"
Else
AddQ "[ßot de AlphaPredatory] cmd: *canal, *ping,*kickmeplz,
*heure, *jour, *site, *autres, *recrute, *tournoi, *membres
!!!"
End If
ElseIf instr(1, lcase(message), "*kickmeplz") >
0 then
AddQ "/kick " & Username & " Si tu le
demande!!"
ElseIf instr(1, lcase(message), "*canal") > 0 then
AddQ "Op QG_Alpha est le canal perso des Alpha"
ElseIf instr(1, lcase(message), "*ping") > 0 then
AddQ "Ton super ping est de " & Ping & "
!!"
ElseIf instr(1, lcase(message), "*heure") > 0 then
AddQ time
ElseIf instr(1, lcase(message), "*jour") > 0 then
AddQ Date
ElseIf instr(1, lcase(message), "*tournoi") > 0
then
AddQ "Desole pas de tournoi de prevue pour l'instant..."
ElseIf instr(1, lcase(message), "*recrute") > 0
then
AddQ "Vous pouvez whisper La recruteuse: AlphaVeloceTia
,La creatrice de la Team Alpha!!"
ElseIf instr(1, lcase(message), "*autres") > 0
then
AddQ "*questions, *idées,* conseils, *thanx"
ElseIf instr(1, lcase(message), "*thanx") > 0 then
AddQ "Remerciement à AlphaAnihilator, AlphaTyrael,
Loud-said et encore Anihilator pour leur précieuse aide!"
ElseIf instr(1, lcase(message), "*questions") >
0 or (instr(1, lcase(message), "*idées") >
0) or (instr(1, lcase(message), "*conseils") >
0) then
AddQ "Questions, idées ou conseils pour faire progresser
le bot: whisper sa créatrice AlphaPredatory"
ElseIf instr(1, lcase(message), "*site") > 0 then
AddQ "Visiter notre très bon site: http://clanalphasc.free.fr/index.html"
End If
'
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)
If Username="AlphaVeloceTia" then
AddQ "Notre Reine " & Username & " à
rejoint son royaume!"
ElseIf Username="AlphaPredatory" then
AddQ "Ma créatrice " & Username & "
à rejoint le royaume!"
ElseIf Product="STAR" then
AddQ "/stats " & Username & " STAR"
ElseIf Product="SEXP" then
AddQ "/stats " & Username & " SEXP"
Else
AddQ Username & " à rejoint le royaume!"
End If
End Sub
'// Fires when a user leaves the channel.
Sub
Event_UserLeaves(Username, Flags)
If Username="AlphaVeloceTia" then
AddQ "Notre Reine " & Username & " à
quittée son royaume!"
ElseIf Username="AlphaPredatory" then
AddQ "Ma créatrice " & Username & "
à quittée le royaume!"
Else
AddQ Username & " à quitté(e) le royaume!"
End If
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:
' ProfileSex
' ProfileLocation
' ProfileDescription
'// 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