Valhalla Legends Forums Archive | Visual Basic Programming | Plugins (Specialized for bots)

AuthorMessageTime
Networks
I understand how to load plugins mostly because I was given an example but I don't understand how to associate the plugin with things like a bots events such as when a user joins. I understand the use of host but how can specialize the plugin so that it can load a new whisper window or even associate it with your commands sub so that the user can create their own commands. Any information is appreciated. Thank you in advance. (Please correct me if I am wrong about anything.)
September 25, 2004, 7:55 PM
LivedKrad
Wouldn't a plugin be considered, (in specialized for bots as you say), a custom design AND implementation? How can one help you?
September 25, 2004, 9:08 PM
CrAz3D
You have a function in the bot tell a function in the plugin what is going down. Then the plugin tells the bot back what the plugin thinks about w/e the bot just said.
September 25, 2004, 10:36 PM
St0rm.iD
I'd say LoadLibrary or CreateObject would be helpful.
September 26, 2004, 2:01 PM
CrAz3D
After the plugin is already loaded, I know you know how to do this cuz I helped you before...try something similar to this:

In the Bot
[code]
Public Function PluginEvent(ByVal Info as string)
PluginObject.Run Info
end function

Sub EventUserJoinned(Username, Message)
PluginEvent Username & Message 'this would send the username & the message to the PluginEvent function which would then send the info to the plugin.
end sub
[/code]

Plugin Code[code]
Public Function Run(ByVal Info as String)
MsgBox Info
end function[/code]


You can add more & you can also use your form as a host so you can send message to battlenet or reconnect or mess with your userlist or w/e else you might want to do. It's all up to your wonderful imagination. I suggest using an object array so you can use more than 1 plugin at a time.
September 26, 2004, 2:37 PM
Quarantine
So Basicly you have to pre-configure your bot to accept all the Events and Functions it has? So for example BCP Plugins I see can basicly do anything to the bot is all that precoded into a class or something. More information would be appreciated just simply for my knowledge and maybe if I plan to implement plugins in the near future.
September 28, 2004, 1:17 AM
Networks
How would you access functions or sub in a class that's in the host? Such as if I wanted to add user to the databse or check their flags but all that is in a  class? How do I allow a user to create a command function to check these flags and then add them accordingly?
September 28, 2004, 10:45 PM
-MichaeL-
How would i go about making a plugin for spth bot v3?
September 28, 2004, 11:07 PM
TheMinistered
If you have a pointer/reference to the object in the plugin (usually all object references are passed upon initialization of the plugin) then you can call any method you want!
September 28, 2004, 11:27 PM
UserLoser.
[quote author=-MichaeL- link=topic=8845.msg82515#msg82515 date=1096412850]
How would i go about making a plugin for spth bot v3?
[/quote]

http://www.valhallalegends.com/pub/bcp/SDK/EmptyPlugin/EmptyPlugin.zip

That's basically what to build off of
September 29, 2004, 12:07 AM
TheMinistered
Userloser, is that a visual basic plugin or a c++ plugin?  If it's C++ then you need ignore that, because it's a totally different schema for visual basic plugins.
September 29, 2004, 3:29 AM
-MichaeL-
Well, thank userloser it would be helpful if i knew c++ but if you have a vb one that would be great i am not a very advanced person.
September 29, 2004, 9:00 PM
CrAz3D
Port it to VB?...I don't even know what that means.  Maybe ask someone that does to do it for you, if it is even possible because the difference in the languages may be the difference in it working or not.
September 29, 2004, 10:28 PM
UserLoser.
[quote author=TheMinistered link=topic=8845.msg82568#msg82568 date=1096428561]
Userloser, is that a visual basic plugin or a c++ plugin?  If it's C++ then you need ignore that, because it's a totally different schema for visual basic plugins.
[/quote]

Let me know when you see a BCP that would load with a bot such as SphtBotv3, written in Visual Basic
September 29, 2004, 11:43 PM
Networks
[quote author=TheMinistered link=topic=8845.msg82520#msg82520 date=1096414067]
If you have a pointer/reference to the object in the plugin (usually all object references are passed upon initialization of the plugin) then you can call any method you want!

[/quote]

Example?
October 1, 2004, 5:30 AM

Search