[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / src / bindings / universal / Readme.txt
blobfd573fdf4566d92267080943303c271425b87b5e
2 ** HOW TO SCRIPT IN C++ **
4 1 - create a file myscript.cpp in scripts folder.
5 2 - copy the content of script_default.cpp, it as the structure on how the scripting fuctions are organized.
6         dont forget to change the name of fuctions, like GossipHello_default to GossipHello_myscript.
8 3 - in fuction AddSC_default change to AddSC_myscript.
9 4 - newscript->Name="default"; change the string to "myscript" this name is the one to be called from the db
10 5 - dont forget to change the name in here to newscript->pGossipHello = &GossipHello_default; this is where the scripted fuctions are stored.
11 6 - and last thing is in ScriptMgr.cpp
13 add your AddSC_myscript in here
15 // -- Scripts to be added --
16 extern void AddSC_default();
17 // -------------------
19 and here
21 // -- Inicialize the Scripts to be Added --
22     AddSC_default();
23     // ----------------------------------------
25 now start using the player fuctions to script ;)
26 see the sc_defines.h for some fuctions to use.
28 hope it helps, any question use our forum.
30 copy libscript.so and libscript.a to your server/lib path
32 made by: mmcs.