How to make Eternity Client plugins in .NET

Discussion in 'Archives' started by Blupig, Jul 13, 2010.

How to make Eternity Client plugins in .NET
  1. Unread #1 - Jul 13, 2010 at 6:19 PM
  2. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    How to make Eternity Client plugins in .NET

    IMPORTANT: All plugins you make MUST be in .NET framework 3.5, no older and no newer. If you own a copy of Visual Studio or have the trial, you can select your framework like so:
    [​IMG]
    If you do not have a copy of Visual Studio, you'll need to download Visual Basic Express 2008 (NOT 2010 or 2005, 2008). You can get VB 2008 here.

    1. Create a new project (select class file).
    2. You'll need to have a few things within the class file. You'll need an author name, plugin description and plugin name. You'll also need to import the PluginPortal class library I made, available within the SytheClient download (if you navigate to your SytheClient install folder, it's right there; additionally, you can download it off our support site at [​IMG]).
    3. This is the code you need to have. Without it, your plugin will not work:
    Code:
        Implements IPlugin
    
        Public ReadOnly Property Name() As String Implements IPlugin.Name
            Get
                Return "Your plugin name"
            End Get
        End Property
    
        Public ReadOnly Property Description() As String Implements IPlugin.description
            Get
                Return "Your plugin description"
            End Get
        End Property
    
        Public ReadOnly Property Author() As String Implements IPlugin.Author
            Get
                Return "Your name"
            End Get
        End Property
    
        Public Sub initialize(ByRef form As Object) Implements IPlugin.initialize
            ' ' This is where your code will start. If you want a
            ' ' form in your program, add a form like you normally would
            ' ' and add something similar to the following code:
    
            Dim MyForm As New Form1
    
            ' ' The following line of code will be to incorporate your window
            ' ' within the client as all the other windows.
            ' ' It is completely optional.
            Form1.MdiParent = form
            MyForm.Show()
    
        End Sub
    
    This is the import code:
    Code:
    Imports PluginPortal.PluginPortal
    Don't forget you'll need to set the PluginPortal.dll library as a reference first.
    Additionally, you can reference and import Eternity.exe (the client executable) to utilize all of its functions. For now, just poke around the classes, I'll make documentation later.

    4. Once you've compiled, add the finished DLL file into the "plugins" folder in the SytheClient installation folder and run SytheClient. To select the plugin, click on the dropdown menu that says "Available plugins..." and select your plugin.

    Still don't understand? Here's the source of "TestPlugin.dll".
    Code:
    
    Imports PluginPortal.PluginPortal
    
    Public Class Class1
    
        Implements IPlugin
    
        Public ReadOnly Property Name() As String Implements IPlugin.Name
            Get
                Return "TestPlugin"
            End Get
        End Property
    
        Public ReadOnly Property Description() As String Implements IPlugin.description
            Get
                Return "Tests plugin system"
            End Get
        End Property
    
        Public ReadOnly Property Author() As String Implements IPlugin.Author
            Get
                Return "Blupig"
            End Get
        End Property
    
        Public Sub initialize(ByRef form As Object) Implements IPlugin.initialize
            MsgBox("This is a test plugin.")
        End Sub
    
    End Class
    
     
< Is there a way to fix this? | Sythe tinychat rules? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site