Clan object

From StealthBot Wiki

Jump to: navigation, search

The Clan object exposes your bot's Battle.net clan and its members to you. You may want to use these, for example, to find information on current members of the clan.

Contents

History

This object was added in StealthBot version 2.7 by Eric to create an object-oriented experience in scripting.

How to use

Example: Get the value of a property of the current clan.

Value = Clan.PropertyName

Properties

List of properties

Name property

This property returns the current two-to-four letter clan tag.

MOTD property

This property returns the clan's current MOTD (automatically updated at approximately 20 second intervals).

Self property

This property returns a ClanMember object for this bot in the clan.

Example: Output your bot's clan tag and rank:

AddChat vbGreen, "I am a " & Clan.Self.RankName & " in Clan " & Clan.Name & "!"

Members property

This property returns a collection of ClanMember objects, one for each member of the clan.

Example: Output the number of members in the clan.

AddChat vbGreen, "There are " & Clan.Members.Count & " members in this clan."

Peons property

This property returns a collection of ClanMember objects, one for each member of the clan whose rank is Peon.

Example: Output the number of Peons in the clan.

AddChat vbGreen, "There are " & Clan.Peon.Count & " peons in this clan."

Grunts property

This property returns a collection of ClanMember objects, one for each member of the clan whose rank is Grunt.

Example: Output the number of Grunts in the clan.

AddChat vbGreen, "There are " & Clan.Grunt.Count & " grunts in this clan."

Shamans property

This property returns a collection of ClanMember objects, one for each member of the clan whose rank is Shaman.

Example: Output the number of Shamans in the clan.

AddChat vbGreen, "There are " & Clan.Peon.Count & " shamans in this clan."

Chieftain property

This property returns a ClanMember object for the Chieftain of this clan.

Example: Output the Chieftain's name.

AddChat vbGreen, "The chieftain's name is " & Chieftain.Name & "."

Functions

List of functions

GetUser function

This function returns the ClanMember object for the specified member. This is affected by naming conventions.

GetUserEx function

This function returns the ClanMember object for the specified member.

GetUserIndex function

This function returns the member's index in the clan or the integer value 0 if not found. This is affected by naming conventions.

GetUserIndexEx function

This function returns the member's index in the channel or the integer value 0 if not found.

GetMember function

This function returns the ClanMember object for the specified member. This is affected by naming conventions. This is an alias for the #GetUser function.

GetMemberEx function

This function returns the ClanMember object for the specified member. This is an alias for the #GetUserEx function.

GetMemberIndex function

This function returns the member's index in the clan or the integer value 0 if not found. This is affected by naming conventions. This is an alias for the #GetUserIndex function.

GetMemberIndexEx function

This function returns the member's index in the channel or the integer value 0 if not found. This is an alias for the #GetUserIndexEx function.

Disband function

This function will disband your clan if the bot is the Chieftain.

SetMOTD function

This function will set the Clan MOTD to the one specified.

See also

Personal tools