This commit is contained in:
TheLuda 2008-10-15 18:25:49 +02:00
parent 92441a0241
commit 2c38c1a8ee
8 changed files with 23 additions and 23 deletions

View file

@ -25,17 +25,17 @@ AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(srcdir) -I$(srcdir)/../../../dep/include -I
# libmangosscript shared library will later be reused by world server daemon.
lib_LTLIBRARIES = libmangosscript.la
libmangosscript_la_SOURCES = \
ScriptMgr.cpp \
ScriptMgr.h \
config.h \
system.cpp \
Scripts/sc_default.cpp \
Scripts/sc_defines.cpp \
Scripts/sc_defines.h
ScriptMgr.cpp \
ScriptMgr.h \
config.h \
system.cpp \
Scripts/sc_default.cpp \
Scripts/sc_defines.cpp \
Scripts/sc_defines.h
## libtool settings
# API versioning
# Link against dependencies
# Link against dependencies
# How to increase version info:
# - only bug fixes implemented:
# bump the version to LTMANGOS_CURRENT:LTMANGOS_REVISION+1:LTMANGOS_AGE
@ -51,6 +51,6 @@ libmangosscript_la_LIBFLAGS = -version-info $(LTMANGOS_CURRENT):$(LTMANGOS_REVIS
## Additional files to include when running 'make dist'
# Scripts defaults.
EXTRA_DIST = \
Scripts/sc_default.cpp \
Scripts/sc_defines.cpp \
Scripts/sc_defines.h
Scripts/sc_default.cpp \
Scripts/sc_defines.cpp \
Scripts/sc_defines.h

View file

@ -2,8 +2,8 @@
** 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.
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
@ -14,14 +14,14 @@ add your AddSC_myscript in here
// -- Scripts to be added --
extern void AddSC_default();
// -------------------
// -------------------
and here
// -- Inicialize the Scripts to be Added --
AddSC_default();
// ----------------------------------------
AddSC_default();
// ----------------------------------------
now start using the player fuctions to script ;)
see the sc_defines.h for some fuctions to use.

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify