Author Topic: [TUTORIAL] Stealthbot Event Subs  (Read 890 times)

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
[TUTORIAL] Stealthbot Event Subs
« on: September 21, 2008, 12:59:25 PM »
Here's a current list of StealthBot event subs. Scroll down for an explanation of each event, as well as how to use StealthBot events.

NOTE: RED ONES ARE FOR 2.7 - Thanks Jack!

[div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto']Event_Load()
Event_Close()
Event_ServerInfo(Message)
Event_ServerError(Message)
Event_UserTalk(Username, Flags, Message, Ping)
Event_UserEmote(Username, Flags, Message)
Event_WhisperFromUser(Username, Flags, Message)
Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring, Banned)
Event_UserLeaves(Username, Flags)
Event_FlagUpdate(Username, NewFlags, Ping)
Event_LoggedOn(Username, Product)
Event_UserInChannel(Username, Flags, Message, Ping, Product, StatUpdate)
Event_ChannelJoin(ChannelName, Flags)
Event_PressedEnter(Text)
Event_KeyReturn(KeyName, KeyValue)
Event_MessageSent(Message, Tag)
Event_ClanInfo(Name, Rank, Online)
Event_ClanMemberList(Username, Rank, Online)
Event_ClanMemberUpdate(Username, Rank, Online)
Event_ClanMOTD(Message)
Event_ClanMemberLeaves(Username)
Event_BotRemovedFromClan()
Event_BotClanRankChanged(NewRank)
Event_BotJoinedClan(ClanTag)
Event_BotClanInfo(ClanTag, Rank)
Event_Shutdown()
Event_LoggedOff()
Event_FirstRun()
[/div]
[div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto'] Examples - Thanks Swent!
Sub prefix_Event_Load()

End Sub
Fires at script load.


Sub prefix_Event_ServerInfo(Message)

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


Sub prefix_Event_ServerError(Message)

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


Sub prefix_Event_UserTalk(Username, Flags, Message, Ping)

End Sub
Fires when a user in the channel talks.


Sub prefix_Event_UserEmote(Username, Flags, Message)

End Sub
Fires when a user in the channel speaks with /emote.


Sub prefix_Event_WhisperFromUser(Username, Flags, Message)

End Sub
Fires when a whisper is recieved.


Sub prefix_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

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 prefix_Event_UserLeaves(Username, Flags)

End Sub
Fires when a user leaves the channel.


Sub prefix_Event_FlagUpdate(Username, NewFlags, Ping)

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


Sub prefix_Event_LoggedOn(Username, Product)

End Sub
Fires after the bot successfully logs on to battle.net


Sub prefix_Event_UserInChannel(Username, Flags, Message, Ping, Product, StatUpdate)

End Sub
Fires once for each user in the channel upon joining a channel.


Sub prefix_Event_ChannelJoin(ChannelName, Flags)

End Sub
Fires upon joining a channel. Flags in this case stores the channel's flags.


Sub prefix_Event_PressedEnter(Text)

End Sub
Fires 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 prefix_Event_KeyReturn(KeyName, KeyValue)

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


Sub prefix_Event_Close()

End Sub
Fires at script close.[/div]


How to use StealthBot events

First of all, to start a writing a new plugin, create a new text file in your plugins folder, and type a prefix and version of your choice (exactly as shown below). Then simply paste the desired event(s) above into your plugin, and replace "prefix" with the prefix of your plugin.

Example:

(Example Plugin)
Code: [Select]
'ex
 '1.0
 
 Sub ex_Event_Load()
 
 AddChat vbWhite, "Example plugin loaded!"
 
 End Sub
 
 
 Sub ex_Event_PressedEnter(Text)
 
 AddChat vbWhite, "You just typed " & Text
 
 End Sub

This is not my tutorial or FAQ. To see these posts in original context, please go here.
« Last Edit: December 17, 2008, 07:44:45 AM by Shadow »
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
[TUTORIAL] Stealthbot Event Subs
« Reply #1 on: September 21, 2008, 02:49:52 PM »
I have moved this topic to the Scripting Tutorials/FAQS area.
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector