Jump to content
Aftermath

Plugin support?

Recommended Posts

New Post:

 

Beep plugin. It makes software or hardware beeps available from SCAR scripts. See the link below for instructions.

http://villavu.com/forum/showthread.php?p=847790#post847790

 

Original Post:

 

I just made a Simba beep plugin http://villavu.com/forum/showthread.php?p=847790#post847790 and thought I might as well port it to SCAR Divi as well. Does SCAR Divi have plugin support? Post links to documentation if it does.

SimbaBeepSrc.zip

SimbaBeep.zip

Edited by Aftermath
Link to comment
Share on other sites

I just made a Simba beep plugin http://villavu.com/forum/showthread.php?p=847790#post847790 and thought I might as well port it to SCAR Divi as well. Does SCAR Divi have plugin support? Post links to documentation if it does.

 

Of course it does. The plugins folder isn't just there for show.

 

You can make plugins with delphi, I cbf to find documentation right now but here is a nice tutorial http://villavu.com/forum/showthread.php?t=41311

Link to comment
Share on other sites

Make sure you use Delphi use the shellutils plugin as example though, plugins for newer copies of SCAR require you to use Delphi 2009 and up, it's adapted to work properly because it has to maintain compatibility with older plugins.

 

The plugin system will be upgraded soon to provide a better plugin API and better support for C++ based plugins, as you can see on the roadmap: http://forums.scar-divi.com/showthread.php?3-SCAR-Development-Roadmap

Edited by Freddy
Link to comment
Share on other sites

I haven't used or even looked at SCAR Divi since somewhere in version 2, so I didn't know :D

 

I don't have much interest in using Delphi and the plugin is currently implemented in C++. However, they both compile to DLLs, so there should really be no difficulty in loading it regardless of the language it was loaded in - e.g. in VC++ I would load either with a LoadLibrary call. I'll take a look sometime later at the Delphi code and see what exports I need to provide to interface properly.

 

---------- Post added at 07:32 AM ---------- Previous post was at 07:29 AM ----------

 

You know, looking at the tutorial Wanted linked and comparing to my DLL, it should be compatible out-of-the box. It appears as if the interface implementation required is the same.

 

---------- Post added at 07:42 AM ---------- Previous post was at 07:32 AM ----------

 

If the current plugin API is still compatible with the one in Wanted's link, all I would have to do is define some dummy functions since I don't export any types. My current problem is getting SCAR to load a plugin - my install didn't come with a plugins directory. I've tried making /plugin, /plugins directories, but Reload Plugins never produced any output.

 

Also, what's the directive to load a plugin? It's LoadLib for Simba, but that doesn't appear to work with SCAR.

Link to comment
Share on other sites

There is a plugins directory. When you first started SCAR Divi you created a workspace, by default it's "My Documents\Scar Divi", it will contain a plugins folder. You can also find it through Tools=>Explore=>Plugins Folder. The API is still compatible, yes, I also have no intention of changing that, rathre introducing a new improved API with backwards compatibility support for the older plugins. SCAR doesn't have a LOADLIB directive like Simba, this is one of the things that will also be added in the next version. Currently it handles plugins the way kaintieks originally did it in SCAR 2.x, which is just loading all of them in every script, so if you place it in the plugins folder, it should be loaded the next time you start SCAR or if you go into Tools=>Reload Plugins.

Link to comment
Share on other sites

It turns out I was right - the plugin is fully compatible with SCAR Divi without any modifications. Thank Freddy for telling me where the plugins directory is. I prefer SCAR Divi's plugin support since it actually shows tooltips for DLL-imported functions.

 

You can just download it off the SRL link at the top and stick it in the plugins directory. There's also a test script there along with the DLL source. Feel free to distribute the DLL / test driver with SCAR Divi if you want.

Link to comment
Share on other sites

So, can you think of any plugins that might be useful and I might be interested in writing? Here's something I worked on recently that was determined would probably not be useful to my botting approach, but might be nifty for you guys (enables drawing on top of RuneScape in a separate window, without doing anything to the Java canvas, and is transparent to keyboard input and mouse clicks and all other input): http://www.moparisthebest.com/smf/index.php/topic,522145.msg3820213.html#msg3820213

Link to comment
Share on other sites

I never had to deal with that, first of all since I only run one client at a time, and second, because I don't bot aside from developing (and will never do so until I'm satisfied that I've created something undetectable). However, I don't think it would be very hard to differentiate them.

 

Here's one idea: every RS instance runs in a separate JVM; therefore the DLL most be loaded for every instance open. We maintain some shared memory or other means of communication - perhaps a server on the local machine, to which each instance announces itself on load and unload; and in that manner, we can keep the instances and their data produced straight, and route whatever message to the appropriate botting program.

 

As for how we associate the different OpenGL instances with the correct bot, for a SCAR-like application we could have a separate crosshairs for each OpenGL instance registered, and each would be dragged onto the correct client to associate that client HWND with that OpenGL instance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...