aboutsummaryrefslogtreecommitdiff
path: root/docs/HowToScript.txt
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-20 02:49:28 +0200
committerXanadu <none@none>2010-07-20 02:49:28 +0200
commit79622802f397258ee0f34327ba3ae6977ca3e7ff (patch)
tree1868946c234ab9ee256a6b7766a15713eae94235 /docs/HowToScript.txt
parent7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff)
parentf906976837502fa5aa81b982b901d1509f5aa0c4 (diff)
Merge. Revision history for source files should be all back now.
--HG-- branch : trunk rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'docs/HowToScript.txt')
-rw-r--r--docs/HowToScript.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/HowToScript.txt b/docs/HowToScript.txt
new file mode 100644
index 00000000000..73968a08b19
--- /dev/null
+++ b/docs/HowToScript.txt
@@ -0,0 +1,27 @@
+
+** HOW TO SCRIPT IN C++ **
+
+1 - create a file myscript.cpp in scripts folder.
+2 - copy the content of script_default.cpp, it as the structure on how the scripting fuctions are organized.
+ dont forget to change the name of fuctions, like GossipHello_default to GossipHello_myscript.
+
+3 - in fuction AddSC_default change to AddSC_myscript.
+4 - newscript->Name="default"; change the string to "myscript" this name is the one to be called from the db
+5 - dont forget to change the name in here to newscript->pGossipHello = &GossipHello_default; this is where the scripted fuctions are stored.
+6 - and last thing is in ScriptMgr.cpp
+
+add your AddSC_myscript in here
+
+// -- Scripts to be added --
+extern void AddSC_default();
+// -------------------
+
+and here
+
+// -- Inicialize the Scripts to be Added --
+ AddSC_default();
+// ----------------------------------------
+
+now start using the player fuctions to script ;)
+
+hope it helps, any question use our forum. \ No newline at end of file