I hate LUA so I decided to make an alternative.
You can use this GameMonkey scripting engine in any aspire server I haven't tried arcemu but they should be the same or easy to convert.
The engine is based on ascent rev 2000's gm engine with a lot of changes to work on the latest patch.
Warning: You have to know some c++ and be able to configure projects yourself
HOW TO SETUP
Download the patch below, and the latest version of GameMonkey here GameMonkey Script
Extract the GameMonkey source files in dep/src/gm in your emu
Create a new visual c++ project for gamemonkey that compiles it to a .lib file
Put my visual c++ project in src/scripts/projects and the source code in src/scripts/src/GMEngine
Edit the core and configs
Link the GM project to the one I made
Compile
Run
HOW TO EDIT THE CORE
(Note: You cant be using a repack to edit the core.)
Open ScriptMgr.h in your emu
Find
Code:
enum ScriptTypes
{
SCRIPT_TYPE_MISC = 0x01,
SCRIPT_TYPE_INFODUMPER = 0x02,
SCRIPT_TYPE_SCRIPT_ENGINE = 0x20,
SCRIPT_TYPE_SCRIPT_ENGINE_LUA = 0x21,
Put SCRIPT_TYPE_SCRIPT_ENGINE_GM somewhere, I did this
Code:
enum ScriptTypes
{
SCRIPT_TYPE_MISC = 0x01,
SCRIPT_TYPE_INFODUMPER = 0x02,
SCRIPT_TYPE_SCRIPT_ENGINE = 0x20,
SCRIPT_TYPE_SCRIPT_ENGINE_LUA = 0x21,
SCRIPT_TYPE_SCRIPT_ENGINE_PYTHON = 0x22,
SCRIPT_TYPE_SCRIPT_ENGINE_GAME = 0x23,
};
Open ScriptMgr.cpp
Search for this
Code:
if( itr->Type & SCRIPT_TYPE_SCRIPT_ENGINE_LUA )
{
// lua :O
if( Config.MainConfig.GetBoolDefault("ScriptBackends", "LUA", false) )
{
Log.Notice("ScriptMgr","Initializing LUA script engine...");
itr->InitializeCall(this);
_handles.push_back( (SCRIPT_MODULE)itr->Handle );
}
else
{
FreeLibrary( itr->Handle );
}
}
Add this right after
Code:
else if( itr->Type & SCRIPT_TYPE_SCRIPT_ENGINE_GAME )
{
if( Config.MainConfig.GetBoolDefault("ScriptBackends", "GameMonkey", false) )
{
Log.Notice("ScriptMgr","Initializing GameMonkey script engine...");
itr->InitializeCall(this);
_handles.push_back( (SCRIPT_MODULE)itr->Handle );
}
else
{
FreeLibrary( (*itr).Handle );
}
}
Then find your world config file
Search for
Code:
<ScriptBackends LUA="1"
Add
Right under it
Then recompile the core and you're good
The patch is over here: Filebeam - Beam up that File Scottie!
Btw here is a sample script, to get a feel for the language
Code:
/* Kobold script for northshire */
global KoboldAggro = function(plr)
{
Unit.SendChatMessage("You no take candle!");
};
.RegisterUnitEvent(6, 1, KoboldAggro);