How to add a custom script to your TrinityCore menu

User Tag List

Results 1 to 2 of 2
  1. #1
    turtleswin's Avatar Banned
    Reputation
    28
    Join Date
    Sep 2012
    Posts
    166
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to add a custom script to your TrinityCore

    So, your hung up on the dreaded script adding?!?!??!? NP, i'm here to help *Flex*. Okay, so in this example my scriptname will be CS_World_chat.cpp. So letsago!

    1. Open your trinitycore folder, and navigate from TrinityCore->src->scripts->custom. Open CMakelists.txt and then add the file right under the 2 examples.
    It should say custom/yourscriptname.cpp
    In my case,
    Code:
    set(scripts_STAT_SRCS
      ${scripts_STAT_SRCS}
    Custom/cs_world_chat.cpp
    )
    2. Open your build solution. After its open, go to game->scriptloader.CPP. Now, scroll to the bottom til you find

    Code:
    #ifdef SCRIPTS
    /* This is where custom scripts' loading functions should be declared. */
    
    #endif
    
    void AddCustomScripts()
    {
    #ifdef SCRIPTS
        /* This is where custom scripts should be added. */
    
    #endif
    }
    2. Place your info under each line. This is a bit tricky. Where it says the custom scripts loading functions should be declared, you should type void AddSC_scriptname
    or in my case void AddSC_cs_world_chat();

    3. Now, go under the custom scripts thing. If it does not tab for you, press tab so you are able to see it like this
    Code:
    /* This is where custom scripts should be added */
        |
    #endif
    NOT
    |
    #endif.
    Now, what you type is AddSC_yourscriptname();
    in my case AddSC_cs_world_chat();

    4. This is the hardest part. Now move to your scripts, right click source files and click add-> existing item. Now locate your custom script and click ok with that highlighted.
    Now recompile your core by clicking the Green > and enjoy.
    Recompiling is basically compiling like you did originally but going back into the bin folder and copying the new world and auth folders with the new DLLs, don't recopy your .confs.

    Enjoy.

    Need help? I do teamviewer and skype help. Add iamaturtlehehe on skype or PM me if you get stuck, I remember how bad this was for me when I was new.
    Last edited by turtleswin; 01-18-2013 at 12:52 PM.

    How to add a custom script to your TrinityCore
  2. #2
    turtleswin's Avatar Banned
    Reputation
    28
    Join Date
    Sep 2012
    Posts
    166
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If this has helped you in any way, tell me. If I need to explain more, tell me! I aim to please.

Similar Threads

  1. [Trinity] How to add a C++ Script to your core
    By jameyboor in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 01-19-2013, 03:40 AM
  2. [Guide] How to easily add a C++ script to your server
    By 2dgreengiant in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 06-05-2009, 12:08 AM
  3. [Question] Add an Lua Script to your Server from a different Computer?
    By kevinno in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 05-25-2008, 05:25 PM
  4. How to add a vote popup to your emu website!
    By Kael'Thas in forum WoW EMU Guides & Tutorials
    Replies: 44
    Last Post: 05-21-2008, 03:56 PM
  5. How To Add A New Database To Your Server!
    By Linkin.Park. in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 03-10-2008, 02:38 PM
All times are GMT -5. The time now is 03:12 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search