• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[AscEmu] Add your custom script

Tulba

Glorious
In this tutorial I will show you how you can add your custom scripts (C++) to AscEmu.

We will use the module "ExtraScripts" to add our script to the script loader.

1. Open up the module folder "ExtraScripts" in trunk/src/scripts/

2. Create a new .cpp file. In this example we will create the file "CustomScript.cpp".
G1UyjkJ.jpg


3. Add this file to the CMakeLists.txt
4c1zInU.jpg


4. Save the CMakeLists.txt file and re-run CMake. Open VS and navigate to the module "ExtraScripts".
FxdC35v.jpg

5. Fill your new file with your script. Add at the bottom of this file the following lines. (NOTE the linked script is just an example)
BunH1O2.jpg


6. Add the script to our script loader (Setup.cpp and Setup.h in module "ExtraScripts")
Sorpwnp.jpg


tAwPTAW.jpg



DONE ;) Save the files, compile the source and copy the updated "ExtraScripts.dll" into your server module folder.
 

Rochet2

Moderator / Eluna Dev
What about on linux? Copy .so?

EDIT: read the post too quick.
 
Last edited:
Top