[Archive] [TrinityCore] How To Add A Custom Script To Your Core
[Archive] [TrinityCore] How To Add A Custom Script To Your Core
Quote: set(scripts_STAT_SRCSEXAMPLE*
${scripts_STAT_SRCS}
Custom/NewCustomScript.cpp
)
Click to expand...
Quote: #ifdef SCRIPTS
/* This is where custom scripts' loading functions should be declared. */
#endif
Click to expand...
Quote: void AddCustomScripts()}
{
#ifdef SCRIPTS
/* This is where custom scripts should be added. */
#endif
Click to expand...
Quote: void AddSC_Example()I Just Used Example, But On Your Script There Would Be Something Else!
{
new Example;
}
Click to expand...
Quote: #ifdef SCRIPTS
/* This is where custom scripts' loading functions should be declared. */
void AddSC_Example();
#endif
Click to expand...
Quote: void AddCustomScripts()Remember! '' void '' Wil Only Stay On The #ifdef SCRIPTS part!
{
#ifdef SCRIPTS
/* This is where custom scripts should be added. */
AddSC_Example();
#endif
}
Click to expand...
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
NOTICE! THIS TUTORIAL IS OLD. BUT STILL WORKS
[TrinityCore] How To Add A Custom Script To Your Core
I know its already out there but, i made this a while back and thought it wanted to release it
Hello!
Today Im Here To Show You How To Add A Custom C++ Script To Your Core,
NOTICE: THIS ONLY WORKS FOR TRINITYCORE AND TRINITY BASED CORES!
Step 1: Getting The Script!
''By Getting The Script I Mean Either Copy Paste The Script Content Into *EXAMPLE* Microsoft Ultimate 2012
By Saving The Script As A .cpp File *ÊXAMPLE* NewCustomScript.cpp''
Step 2: Applying It To The Build.
''By Applying It To The Build, I Simply Mean Put It In The Custom Script Folder! -> source/src/server/scripts/custom
Now Thats Where You Place The .cpp File Into, Now You Need To Open Cmakelist.txt And Add The File Name Between Theese Two Column's As Id Like To Call Them!
*EXAMPLE*
Code:
Quote: set(scripts_STAT_SRCSEXAMPLE*
${scripts_STAT_SRCS}
Custom/NewCustomScript.cpp
)
Click to expand...
Quote: #ifdef SCRIPTS
/* This is where custom scripts' loading functions should be declared. */
#endif
Click to expand...
Quote: void AddCustomScripts()}
{
#ifdef SCRIPTS
/* This is where custom scripts should be added. */
#endif
Click to expand...
Quote: void AddSC_Example()I Just Used Example, But On Your Script There Would Be Something Else!
{
new Example;
}
Click to expand...
Quote: #ifdef SCRIPTS
/* This is where custom scripts' loading functions should be declared. */
void AddSC_Example();
#endif
Click to expand...
Quote: void AddCustomScripts()Remember! '' void '' Wil Only Stay On The #ifdef SCRIPTS part!
{
#ifdef SCRIPTS
/* This is where custom scripts should be added. */
AddSC_Example();
#endif
}
Click to expand...
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
what i need to do this ? i use emucoach_v8_vip 4.3.4
Quote:darkariam said:That would be a REPACK. you cannot add scripts to repacks, unless you have the source code
what i need to do this ? i use emucoach_v8_vip 4.3.4
Click to expand...
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
Quote:darkariam said:That would be a REPACK. you cannot add scripts to repacks, unless you have the source code
what i need to do this ? i use emucoach_v8_vip 4.3.4
Click to expand...
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
Thanks I have all these custom scripts that I never knew how to implement now I do lol thanks <3
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
Thanks bro it was very usefull
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
Very easy to understand, thank you.
Archived author: OMGhixD • Posted: 2025-11-04T18:04:34.163918
Original source
Thank you for your work