How To Use C++ To Make Your Own .DLL

Results 1 to 1 of 1
  1. #1
    c++ CNDev is offline
    Grand MasterRank
    Oct 2010 Join Date
    1,680Posts

    How To Use C++ To Make Your Own .DLL

    Hello guys, since i'm still installing Visual Studio Professional i translate this guide to english

    This is a tutorial in adding and compiling sources in 1 .DLL

    Well lets get started
    Requirements:
    Visual Basic
    Source Functions

    Download Visual Basic Via Torrent:
    Microsoft Visual Studio 2010 Ultimate x86-TKiSO (download torrent) - TPB

    Download This First For Those Who Don't Have uTorrent:
    uTorrent download - Baixaki

    Source of Destiny Craft v3[Functions]:
    [RE-UP] Release Craft v3

    Index:

    Adding commands.
    How to configure the volatiles.


    > Download the source and extract the link above.
    > Open the file FunctionsV02

    Before you put everything in release mode, go
    > Build

    > Configuration Manager> and put everything in Release mode.

    1st step: Adding new commands ...

    Example, we will add the command /Armia

    Go Command.cpp

    Now add this under the end of a command Code:

    FINAL > return; }

    Code:
    if (strcmp (comand, "Armia") == 0) {a-> DoTeleport (clientid, 2100.2100);/ / coordinated that will teleport. a-> SendClientMsg (clientid, "Armia teleported"); / / display message __ asm {MOV EAX, 1} return;}
    Now just compile using the button (F5) to get functions.dll Release folder and put the source / substitute in tmsrv / run / Plugin.

    Step 2: Setting volatiles (effect when using items)

    Let's use based on a source casino posted by ZaTchBeLL

    Go on Objetos.h and declare that:

    Code:
    static void EntradaCassino (int clientid);

    Go on the Volatiles of your source file and create a new C + + File (. Cpp) with the name you want.

    Adding new cpp:



    declare:
    code:

    # include "DLLMain.h"
    And add the source sample:

    code:

    Volatiles EntradaCassino :: void (int clientid) {MOB thisclient = * (* MOB) GetMobFromIndex (clientid); Update * p, int item = p-> GetFirstSlotSADD (clientid, 3331.64); p-> DoTeleport (clientid, 4000 , 4000); thisclient-> inventory [item]. Index = 0, p-> SendClientMsg (clientid, "Welcome to the Casino,No Beggar Allowed Here!"); p-> Sendall (clientid); return ;}

    Getting well:
    Now we need to declare the Volatile.cpp, look at the last case under it and add this:

    code:

    case 339: v-> EntradaCassino (clientid); break;
    Getting well:


    Now we need to configure the item in the itemlist.csv tmsrv / run
    Open it with Notepad

    Choose the id of the item when you use the run function of source

    example:
    code:

    3331, Entrada_Cassino, 2774.0,0.0.0.0.0,0,5000000,0,0,0, EF_VOLATILE, 0, EF_GRID, 0
    At the EF_VOLATILE, 0 0 by you replace the number that you put in the case of source volatile.cpp if the case is 339:

    So lets just:
    code:

    3331, Entrada_Cassino, 2774.0,0.0.0.0.0,0,5000000,0,0,0, EF_VOLATILE, 339, EF_GRID, 0
    Save the ITEMLIST, compile the source using F5 go Release the source folder, take functions.dll, replace the tmsrv / run / Plugin and restart the server.

    Credits:
    To CB / ZaTchBeLL (Casino Map Source) / Barakuda21 (Posting Here in RZ) / Of Course Me ( Translating it very well )

    Don't Say Thanks Press Like BUTTON
    Last edited by CNDev; 30-08-12 at 05:47 PM. Reason: Some Links Updated!




Advertisement