If you start with a new .cpp/.h file you have to add it to the right project and link it to cmake.
1. Create a new .cpp/.h files
1.1 Go to your main folder (the one you choose for cmake).
1.2 Navigate to src/scripts/src/
1.3 Choose the right project (in this example we choose "GossipScripts")
1.4 Create your new file. (in this example I create ExampleScript.cpp and ExampleScript.h)

2. Add your new files to CMakeLists
2.1 Go to your main folder (the one you choose for cmake).
2.2 Navigate to cmake\scripts\gossipscripts
2.3 Open the CMakeLists.txt
2.4 Add your files to the CmakeLists.txt

3. Re-Run cmake
Run cmake. After cmake is done you will find your files in the vs project "GossipScripts"

4. Add your scripts to Setup.cpp/.h and to your npc
4.1 Link your script to your npc:
ExampleScript.cpp
Display All
4.2 Open Setup.cpp and Setup.h and add the following lines:
Add the lines near to the other registered scripts.
Setup.cpp
Setup.h
Done
Now you can start with your script. Make shure you set the right flags in creature_proto table.
Best wishes
Zyres
1. Create a new .cpp/.h files
1.1 Go to your main folder (the one you choose for cmake).
1.2 Navigate to src/scripts/src/
1.3 Choose the right project (in this example we choose "GossipScripts")
1.4 Create your new file. (in this example I create ExampleScript.cpp and ExampleScript.h)
2. Add your new files to CMakeLists
2.1 Go to your main folder (the one you choose for cmake).
2.2 Navigate to cmake\scripts\gossipscripts
2.3 Open the CMakeLists.txt
2.4 Add your files to the CmakeLists.txt
3. Re-Run cmake
Run cmake. After cmake is done you will find your files in the vs project "GossipScripts"
4. Add your scripts to Setup.cpp/.h and to your npc
4.1 Link your script to your npc:
ExampleScript.cpp
C Source Code
- #include "ExampleScript.h" // include our header
- #include "Setup.h" // include the Setup header
- class ExampleScript : public Arcemu::Gossip::Script
- {
- YOUR SCRIP...
- };
- // Register the script to the npc
- void ExampleScript(ScriptMgr* mgr)
- { //(NPC_ID, Our Script)
- mgr->register_creature_gossip(30051, new ExampleScript);
- }
4.2 Open Setup.cpp and Setup.h and add the following lines:
Add the lines near to the other registered scripts.
Setup.cpp
Setup.h
Done

Now you can start with your script. Make shure you set the right flags in creature_proto table.
Best wishes
Zyres