StealthBot.net: Scripting Event Subs - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Scripting Event Subs

#1 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted October 17, 2009 - 05:22 AM

Here are all the Event subs for the new scripting system. All thanks for this thread goes to Ribose for creating the topic on the old forums, setting up the post's HTML, and typing up all the info. I only modified how it looks.

Legend:
RED = New in 2.7
GREEN = Existing from 2.6


Events:

#2 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted October 17, 2009 - 05:42 AM

The following events are still the same as last version:

Sub Event_Load()
' Occurs when the bot loads or the scripting system reloads.
End Sub

Sub Event_ServerInfo(Message)
' Occurs when the bot recieves a server information message (blue) from Battle.net.
' - (examples include ban messages, designated messages, away messages, help messages, and the welcome message)
' Message = The message.

End Sub

Sub Event_ServerError(Message)
' Occurs when the bot recieves a server error message (red) from Battle.net.
' - (examples include channel error messages, operator error messages)
' Message = The message.
' In the new version, this includes the disconnected message as well, "All connections closed.".

End Sub

Sub Event_UserTalk(Username, Flags, Message, Ping)
' Occurs when a user talks in the channel the bot is in.
' Username = The name of the user who talked.
' Flags = His/her Battle.net flags.
' Message = The message that he/she sent.
' Ping = His/her current ping (ms).

End Sub

Sub Event_UserEmote(Username, Flags, Message)
' Occurs when a user emotes (/me command) in the channel the bot is in.
' Username = The name of the user who emoted.
' Flags = His/her Battle.net flags.
' Message = The message that he/she sent (not including the "/me " part.

End Sub

Sub Event_UserLeaves(Username, Flags)
' Occurs when a user leaves the channel the bot is in.
' Username = The name of the user who left.
' Flags = His/her Battle.net flags.

End Sub

Sub Event_FlagUpdate(Username, NewFlags, Ping)
' Occurs when a users Battle.net flags update.
' Username = The name of the user.
' NewFlags = His/her new Battle.net flags.

End Sub

Sub Event_LoggedOn(Username, Product)
' Occurs when the bot successfully connects to Battle.net (or the script is reloaded).
' Username = The bot's username.
' Product = The bot's game product.
' - Note: This value is backwards.

End Sub

Sub Event_ChannelJoin(ChannelName, Flags)
' Occurs when the bot successfully joins a channel.
' ChannelName = The channel's name.
' Flags = The channel flags.

End Sub

Sub Event_PressedEnter(Text)
' Occurs when you press enter in the send box to send text.
' - This event is generally used to handle /commands with the VetoThisMessage() scripting function.
' Text = The text in the send box.

End Sub

Sub Event_KeyReturn(KeyName, KeyValue)
' Occurs when a profile key/value pair is returned (multiple calls for multiple keys).
' KeyName = The name of the key.
' KeyValue = The value in the key.

End Sub

Sub Event_Close()
' Occurs when the bot is closing (or the script is reloading).
End Sub


Go to the top of the page
<-- Go to top of page.



The following events have additional arguments you must be aware of:

Sub Event_WhisperFromUser(Username, Flags, Message, Ping)
' Occurs when a user whispers the bot a message.
' Username = The name of the user who whispered.
' Flags = His/her Battle.net flags.
' Message = The message that he/she sent.
' Ping = His/her current ping (ms).

End Sub

Sub Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring, Banned)
' Occurs when a user joins the channel the bot is in.
' Username = The name of the user who joined.
' Flags = His/her Battle.net flags.
' Note: In this event, these won't include Operator status.
' Message = The parsed statstring message (as seen in the channel with join/leaves enabled).
' Ping = His/her current ping (ms).
' Product = His/her game product.
' Level = For WarCraft III users, the integer level of the user's account.
' OriginalStatstring = The unparsed data which provides all information needed in the channel
' - (includes icon names, levels, clan tag, Diablo II Character appearence, etc)
' Banned = Whether this user is banned according to database flags.

End Sub

Sub Event_UserInChannel(Username, Flags, Message, Ping, Product, StatUpdate)
' Occurs for each user when you join a channel, and upon stat update (and upon script reload).
' Username = The name of the user in the channel.
' Flags = His/her Battle.net flags.
' Message = The parsed statstring message (as seen in the channel with join/leaves enabled).
' Ping = His/her current ping (ms).
' Product = His/her game product.
' StatUpdate = Whether this is a statupdate.
' - If you have just joined the channel or the script has just reloaded, this is False, otherwise if this is a user stats update, this is True.

End Sub


Go to the top of the page
<-- Go to top of page.



The following events are completely new:

Sub Event_FirstRun()
' Occurs only once when the bot first loads (not when script reloads!).
End Sub

Sub Event_ChannelLeave()
' Occurs when the bot leaves a channel to enter another channel.
End Sub

Sub Event_MessageSent(MessageID, Message, Tag)
' Occurs when a message from the queue is being sent to Battle.net.
' MessageID = A unique message ID in the queue.
' Message = The message being sent.
' Tag = The tag provided in the AddQ scripting function or vbNullString.

End Sub

Sub Event_MessageQueued(MessageID, Message, Tag)
' Occurs when a message is added to the message queue.
' MessageID = A unique message ID in the queue.
' Message = The message being sent.
' Tag = The tag provided in the AddQ scripting function or vbNullString.

End Sub

Sub Event_ClanInfo(Name, Rank, Online)
' Occurs whenever clan information is recieved about a user in the bot's clan.
' Name = The user's name.
' Rank = The user's rank.
' Online = The user's status (1 = online, 0 = offline).

End Sub

Sub Event_ClanMemberList(Username, Rank, Online)
' Occurs when the clan member list is being recieved.
' Username = The user's name.
' Rank = The user's rank.
' Online = The user's status (1 = online, 0 = offline).

End Sub

Sub Event_ClanMemberUpdate(Username, Rank, Online)
' Occurs when a clan member's information is updated.
' Username = The user's name.
' Rank = The user's rank.
' Online = The user's status (1 = online, 0 = offline).

End Sub

Sub Event_ClanMOTD(Message)
' Occurs when the clan MOTD is recieved. The bot requests this periodically while idle as well.
' Message = The clan MOTD.

End Sub

Sub Event_ClanMemberLeaves(Username)
' Occurs when a clan member leaves the clan.
' Username = The user's name.

End Sub

Sub Event_BotRemovedFromClan()
' Occurs when the bot is removed from the clan (either quit or kicked).
End Sub

Sub Event_BotClanRankChanged(NewRank)
' Occurs when the bot's rank is changed.
' NewRank = The bot's new rank.

End Sub

Sub Event_BotJoinedClan(ClanTag)
' Occurs when the bot accepts an invitation to join a clan and joins the clan.
' ClanTag = The clan's tag.

End Sub

Sub Event_BotClanInfo(ClanTag, Rank)
' Occurs during log on providing current clan information if in a clan.
' ClanTag = The clan's tag.
' Rank = The bot's rank in the clan.

End Sub

Sub Event_PacketSent(Protocol, ID, Length, Data)
' Occurs when the bot sends a packet to Battle.net, BNLS, or the MCP server.
' Protocol = The name of the protocol ("BNCS", "BNLS", "MCP").
' ID = The packet ID.
' Length = The packet length.
' Data = The packet data.

End Sub

Sub Event_PacketReceived(Protocol, ID, Length, Data)
' Occurs when the bot recieves a packet from Battle.net, BNLS, or the MCP server.
' Protocol = The name of the protocol ("BNCS", "BNLS", "MCP").
' ID = The packet ID.
' Length = The packet length.
' Data = The packet data.

End Sub

Sub Event_LoggedOff()
' Occurs when the bot logs off Battle.net.
End Sub

Sub Event_Shutdown()
' Occurs when the bot is closing (not before reloading script!).
End Sub

Sub Event_ClanCandidateList(Result, Users())
' Occurs when the clan create candidates list is recieved by the bot.
' Result = The result of the find clan candidates request. Possible values:
' &H00: Successful
' &H01: Clan tag already taken
' &H08: Already in clan
' &H0A: Invalid clan tag specified
' Users() = An array of candidates for clan creation, empty if Result was not 0.

End Sub

Sub Event_ClanPromoteUserReply(Result)
' Occurs when a clan member promotion response is recieved by the bot.
' Result = The result of the rank change request. Possible values:
' &H00: Successful
' &H01: Failed
' &H02: Cannot change user rank yet
' &H07: Not shaman or chieftain
' &H08: Not allowed to change user above you
End Sub

Sub Event_ClanDemoteUserReply(Result)
' Occurs when a clan member demotion response is recieved by the bot.
' Result = The result of the rank change request. Possible values:
' &H00: Successful
' &H01: Failed
' &H02: Cannot change user rank yet
' &H07: Not shaman or chieftain
' &H08: Not allowed to change user above you
End Sub

Sub Event_ClanRemoveUserReply(Result)
' Occurs when a clan member remove response is recieved by the bot.
' Result = The result of the remove request. Possible values:
' &H00: Successful
' &H01: Failed
' &H02: Cannot change user rank yet
' &H07: Not shaman or chieftain
' &H08: Not allowed to change user above you
End Sub

Sub Event_ClanDisbandReply(Result)
' Occurs when a clan disband response is recieved by the bot.
' Result = The result of the disband request. Possible values:
' &H00: Successful
' &H02: Cannot disband yet
' &H07: Not chieftain
End Sub

Sub Event_ClanInviteUserReply(Result)
' Occurs when a response is recieved by the bot after attempting to invite a user.
' Result = The result of the invite user request. Possible values:
' &H00: Successful
' &H04: Invitation declined
' &H05: Failed
' &H09: Clan is full
End Sub

Sub Event_ClanInvitation(Token, ClanTag, RawClanTag, ClanName, InvitedBy, NewClan)
' Occurs when a request to join another clan is recieved.
' Token =
' ClanTag = The two-to-four-character clan tag of the clan.
' RawClanTag =
' ClanName = The name of the clan.
' InvitedBy = The inviting user.
' NewClan = A boolean value telling whether this is a mass invite to create a new clan or not.

End Sub

Sub Event_ChannelList(Channels())
' Occurs after logging on to Battle.net with the list of the public channels.
' Channels() = An array of the names of the Battle.net public channels.

End Sub


Go to the top of the page
<-- Go to top of page.



Battle.net User Flags (ones common/possible today):

' &H01 = Blizzard Representative
' &H02 = Channel Operator (Hammer or Moderator)
' &H08 = Battle.net Administrator
' &H10 = No UDP Support (UDP Plug)
' &H20 = Squelched

Battle.net Channel Flags:
' &H01 = Public Channel
' &H02 = Moderated
' &H04 = Restricted
' &H08 = Silent
' &H10 = System
' &H20 = Product-Specific
' &H1000 = Globally Accessible

Battle.net Clan Ranks:
' 0 = Peon (7-day probation period)
' 1 = Peon
' 2 = Grunt
' 3 = Shaman
' 4 = Chieftain


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users