VhaBot.Net & BasicBotDisclaimer: These tools are designed for developers, not end usersIntroductionI'm proud to announce the first public release of an AoC targeted chat library.
It has full support for the new friends system. It has been cleaned from AO specific stuff as much as possible.
It's pretty bare bone and designed to serve as a chat library, not a full featured bot. You'll have to write that yourself.
It has been written to be event based and multi-threaded. So please be advised to make sure you think about thread safety inside your callbacks.
Examplestatic void Main(string[] args)
{
Chat chat = new Chat("213.244.186.133", 7002, "Account", "Password", "Character"); // Initialize a new chat connection
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); // This allows you to view debug output from the library
chat.PrivateMessageEvent += new PrivateMessageEventHandler(PrivateMessageEvent); // Hook a tell event
chat.Connect(); // Connect
Console.ReadLine(); // Make sure the application doesn't close instantly
}
static void PrivateMessageEvent(Chat chat, PrivateMessageEventArgs e)
{
if (chat.ID == e.CharacterID || e.Outgoing) return;
TextWindow window = new TextWindow();
window.AppendColorString("AABBCC", "Inside a TextWindow");
window.AppendLineBreak();
window.AppendCommand("Click me", "/text You clicked me!", true);
chat.SendPrivateMessage(e.CharacterID, "Greetings, " + window.ToString("you can click this"));
}
LicenseVhaBot.Net (and all related source files) is released under GPLv2.
This means you are allowed to fork the project and change the name as long as you credit the original authors.
However, it also means that when you release anything that uses this library, you need to publish the complete source under GPLv2.
DownloadCurrently, I'm releasing the library only through SVN. I will take good care to keep the SVN version operational.
Point you SVN client at
http://svn.vhabion.net/VhaBot/trunk/ to obtain the source.
ChangesRevision 7
- Revised source directory structure. When upgrading existing implementations, add: "using VhaBot.Net.Events;".
- Renamed ChannelJoinPacket.Type to ChannelJoinPacket.ChannelType as it was hiding Packet.Type
- Renamed Chat.IgnoreOfflineTells to Chat.IgnoreOfflineMessages
- Renamed Chat.IgnoreAfkTells to Chat.IgnoreAfkMessages
- Renamed Chat.TellEvent to Chat.PrivateMessageEvent
- Renamed TellEventArgs to PrivateMessageEventArgs
- Renamed CharacterClass.HeraldOfXolti to CharacterClass.HeraldOfXotli- Added Chat.PingTimeout to configure the maximum delay to receive a ping reply
- Added SystemMessagePacketEventArgs.Type to allow you to identify the messages
- Added Chat.LoginErrorEvent which is triggered upon failing to login
- Added support for AoC-style item links
- Added FriendStatusEventArgs.State which is more accurate than FriendStatusEventArgs.Online. Returns Offline/Online/Afk/Lft.
Revision 6
- Really fixed the ClientName and NameLookup issue now. Seems I forgot to commit one change

Revision 5
- Fixed an issue with !random in BasicBot
- Fixed the ClientNamePacket and NameLookupPacket confusion
Revision 4
- Fixed guildchat support in BasicBot
Revision 3
- Renamed Chat.Organization and Chat.OrganizationID to Chat.Guild and Chat.GuildID- Fixed an error thrown when no username was configured
- Fixed NetString to properly use UTF-8
- Added BasicBot
Revision 2
- Check in sourcecode
Revision 1
- Create directory structure