root/trunk/src/bindings/interface/Readme.txt

Revision 2, 1.1 kB (checked in by yumileroy, 17 years ago)

[svn] * Proper SVN structure

Original author: Neo2003
Date: 2008-10-02 16:23:55-05:00

Line 
1
2** HOW TO SCRIPT IN C++ **
3
41 - create a file myscript.cpp in scripts folder.
52 - 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.
7
83 - in fuction AddSC_default change to AddSC_myscript.
94 - newscript->Name="default"; change the string to "myscript" this name is the one to be called from the db
105 - dont forget to change the name in here to newscript->pGossipHello = &GossipHello_default; this is where the scripted fuctions are stored.
116 - and last thing is in ScriptMgr.cpp
12
13add your AddSC_myscript in here
14
15// -- Scripts to be added --
16extern void AddSC_default();
17// -------------------
18
19and here
20
21// -- Inicialize the Scripts to be Added --
22        AddSC_default();
23        // ----------------------------------------
24       
25now start using the player fuctions to script ;)
26see the sc_defines.h for some fuctions to use.
27
28hope it helps, any question use our forum.
29
30copy libscript.so and libscript.a to your server/lib path
31
32made by: mmcs.
Note: See TracBrowser for help on using the browser.