AOWiki :: AODevs Forums :: Arcanum :: AO Official Forums :: AOC US/EU Official Forums
Welcome, Guest. Please login or register.
Did you miss your activation email?
+  FC 3rd Party Dev
|-+  Age of Conan» Releases» VhaBot.Net | An AoC Chat Library
Username:
Password:
 
Pages: [1]
  Print  
Author Topic: VhaBot.Net | An AoC Chat Library  (Read 7507 times)
Vhab
VhaBot Developer
Administrator
*****

Reetness: +2/-0
Offline Offline

Posts: 234


View Profile WWW
« on: June 07, 2008, 08:20:08 »

VhaBot.Net & BasicBot
Disclaimer: These tools are designed for developers, not end users

Introduction
I'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.

Example
Code:
static 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"));
}

License
VhaBot.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.

Download
Currently, 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.

Changes
Revision 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 Sad

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
« Last Edit: July 20, 2008, 11:24:09 by Vhab » Logged
Vhab
VhaBot Developer
Administrator
*****

Reetness: +2/-0
Offline Offline

Posts: 234


View Profile WWW
« Reply #1 on: July 05, 2008, 17:48:54 »

FAQ Located at: http://forums-eu.ageofconan.com/showpost.php?p=410467&postcount=2
« Last Edit: July 20, 2008, 11:25:04 by Vhab » Logged
Pages: [1]
  Print  

 
Jump to:  

Page created in 0.035 seconds with 17 queries.