• Welcome to Valhalla Legends Archive.
 

Bot plugins

Started by QwertyMonster, April 21, 2005, 12:17 PM

Previous topic - Next topic

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.. :-\

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*

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?

Warrior

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 from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

QwertyMonster

What warrior said helped a bit, but i still dont get how im meant to "insert" this plugin (.bcp) into my project.. :-\

Archangel

I'm not an Addict.

Tazo

Quote from: Warrior on April 21, 2005, 03:19 PM
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.

Spht has a copy of that in VB

Networks

Quote from: QwertyMonster on April 21, 2005, 12:45 PM
Yes it is VB. I downloaded UserLosers Winamp one, so i would just use the CreateObject() control and target it to userlosers winamp plugin?

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.

QwertyMonster

Quote from: Archangel on April 21, 2005, 04:07 PM
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

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

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:

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)


"(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?
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Warrior

I don't think so. I did ask a ton of people a ton of questions which I think might have annoyed them :p
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?