• Welcome to Valhalla Legends Archive.
 

Plugins (Specialized for bots)

Started by Networks, September 25, 2004, 02:55 PM

Previous topic - Next topic

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.)

LivedKrad

Wouldn't a plugin be considered, (in specialized for bots as you say), a custom design AND implementation? How can one help you?

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.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Banana fanna fo fanna

I'd say LoadLibrary or CreateObject would be helpful.

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

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


Plugin Code
Public Function Run(ByVal Info as String)
    MsgBox Info
end function



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.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Warrior

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.
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?

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?

Michael

How would i go about making a plugin for spth bot v3?

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!


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.

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.

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.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

UserLoser.

Quote from: TheMinistered on September 28, 2004, 10:29 PM
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.

Let me know when you see a BCP that would load with a bot such as SphtBotv3, written in Visual Basic

Networks

Quote from: TheMinistered on September 28, 2004, 06:27 PM
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!


Example?