Valhalla Legends Forums Archive | Battle.net Bot Development | Bot plugins

AuthorMessageTime
QwertyMonster
I havent ever tried loading or using a plugin in a bot. I want to add a plugin i downloaded and add it to my bot for tests etc..

My question is: How do i load the plugin into my bot?

I seriously have no idea how, or where to start.. :-\
April 21, 2005, 5:17 PM
Networks
It's not quite simple, unfortunetly there isn't a standardized type of plugin for battle.net bots although I did make a topic that I attempted to call people out, didn't seem to work. Anyhow you would either have to adopt someone's plugin interface or create your own. Search the forum you should find something, I know I posted about it somewhere.

You load a plugin into a bot by using the createobject() function which will take that plugin's class and create an object out of it that you can use like a normal class, with that normal class you can use it as you would any other class.

If you need to see a simple plugin interface, I created one for my bot that's public to influence users to create plugins for my own bot. you can go to: h**p://www.zeroforce.net -> downloads -> Bots -> and download Vanquish Bot v2.0 and view the plugin interface. I think it's pretty basic but that's a moderation bot so meh.


This is all for VB6, which I am assuming is the language you may program in? *shrugs*
April 21, 2005, 5:35 PM
QwertyMonster
Yes it is VB. I downloaded UserLosers Winamp one, so i would just use the CreateObject() control and target it to userlosers winamp plugin?
April 21, 2005, 5:45 PM
Quarantine
No. You need to support the BCP Plugin Structure. check out www.valhallalegends.com/pub/BCP

Be prepared to port BCP.h and support all the plugin call backs.
April 21, 2005, 8:19 PM
QwertyMonster
What warrior said helped a bit, but i still dont get how im meant to "insert" this plugin (.bcp) into my project.. :-\
April 21, 2005, 8:46 PM
Archangel
Maybe this helps a little more:

http://www.madzlair.net/madzb/forums/index.php?topic=79.0
http://www.madzlair.net/madzb/forums/index.php?topic=81.0
April 21, 2005, 9:07 PM
laurion
[quote author=Warrior link=topic=11341.msg109293#msg109293 date=1114114757]
No. You need to support the BCP Plugin Structure. check out www.valhallalegends.com/pub/BCP

Be prepared to port BCP.h and support all the plugin call backs.

[/quote]
Spht has a copy of that in VB
April 21, 2005, 9:38 PM
Networks
[quote author=QwertyMonster link=topic=11341.msg109288#msg109288 date=1114105523]
Yes it is VB. I downloaded UserLosers Winamp one, so i would just use the CreateObject() control and target it to userlosers winamp plugin?
[/quote]

Once again different plugins structures act different. You would have to read up as Warrior suggested on BCP plugins to understand how to impliment them in your bot. BCP is rather extensive, I would suggest you play around first with creating your own before stepping up to BCP. Just create something basic first.
April 21, 2005, 10:09 PM
QwertyMonster
[quote author=Archangel link=topic=11341.msg109299#msg109299 date=1114117674]
Maybe this helps a little more:

http://www.madzlair.net/madzb/forums/index.php?topic=79.0
http://www.madzlair.net/madzb/forums/index.php?topic=81.0
[/quote]

Thanks! That helps alot. Ok i am understanding it all now. I will read up on BCP and learn. Thank-you for all your helps guys! :D
April 22, 2005, 7:09 AM
tA-Kane
Note that I've written a BCP for use with SphtBotv3 (latest build, to my knowledge). From what I can tell, his implementation of the BCP API is fairly old and/or incomplete.

I whipped up a teeny plugin to show me what interfaces SphtBotv3 supports, here's my results:
[code]
SphtBotv3 - Copyright (C) 2003-2004 Spht - version 1.00 build 269.
Checking for valid API calls...
m_ClearMessage: (Non-NULL)
m_IsMessageSet: (Non-NULL)
m_SetMessage: (Non-NULL)
m_QueueMessage: (Non-NULL)
m_QueueChatMessage: (Non-NULL)
m_CloseConnection: (Non-NULL)
m_SendConnectionMessage: (Non-NULL)
m_QueryStateInformation: (Non-NULL)
m_QueryChannelInformation: 0x00000000
m_SetOutputColor: (Non-NULL)
m_WriteOutputTimestamp: (Non-NULL)
m_WriteOutputString: (Non-NULL)
m_ProcessBotCommand: (Non-NULL)
m_GetRegistryPath: (Non-NULL)
m_ResetAwayIdle: (Non-NULL)
m_IsService: (Non-NULL)
m_GetWindow: (Non-NULL)
m_GetMenu: (Non-NULL)
m_IsUserFiltered: 0x00000000
m_IsMessageFiltered: 0x00000000
m_EnumUserFilters: 0x00000000
m_EnumMessageFilters: 0x00000000
m_AddUserFilter: 0x00000000
m_AddMessageFilter: 0x00000000
m_RemoveUserFilter: 0x00000000
m_RemoveMessageFilter: 0x00000000
NotifyMsg: 0x00000000
m_EnumLoadedPlugins: 0x00000000
m_GetBotVersion: 0x00000000
m_GetBotVersionEx: 0x00000000
m_QueryConfigurationSetting: 0x00000000
m_Revision: (Non-NULL)
[/code]

"(Non-NULL)" means that it supports the interface. 0x00000000 is NULL, which means that it is not supported in this build of SphtBotv3. I just checked the website and it's the latest build.


First thing that I've noticed since I last checked the valid calls is that a call to API.GetRegistryPath() returns the correct registry path when the instance of SphtBotv3 has been launched by ProfileLauncher. That's nice to know! Now I can (finally) save my IRC plugin's settings in the registry!
The last public build (267) returned the default registry path, even when it was using settings from a different registry path, which was quite annoying.

In any case, the apparent BCP version that SphtBotv3 is using is version 3, with the exception that it does not support BCP version 1's API.QueryChannelInformation call.


Also note that the example BCP plugin available in the BCP directory is a little dated... it only supports up to BCP version 4. You should notice that there are some headers that are also in a similar directory as the BCP example plugin that show BCP version 5 and a preliminary BCP version 6, both of which are relatively undocumented, except for what you can get out of the headers...

Other than the http://www.valhallalegends.com/pub/BCP directory, is there any other public information regarding the BCP API?
April 22, 2005, 8:35 AM
Quarantine
I don't think so. I did ask a ton of people a ton of questions which I think might have annoyed them :p
April 23, 2005, 1:39 AM

Search