Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Runs a lua chunk
- string ExecuteLuaString( object oObjSelf, string sLua );
- //Run a lua function
- string ExecuteLuaFunction( object oObjSelf, string sFunc, string sParam );
- //Return the object that was previously set in luascript
- //Index 0 target 1
- //Index 1 target 2
- //Index 3 target set by lua SetObject
- object LuaGetObject(int index);
- object LuaGetObject(int index){
- return GetLocalObject(OBJECT_SELF,"NWNX!LUA!"+IntToString(index));
- }
- string ExecuteLuaFunction( object oObjSelf, string sFunc, string sParam ){
- SetLocalString( oObjSelf, "NWNX!LUA!"+sFunc, sParam+"| " );
- string sLua = GetLocalString( oObjSelf, "NWNX!LUA!"+sFunc );
- DeleteLocalString( oObjSelf, "NWNX!LUA!"+sFunc );
- return sLua;
- }
- string ExecuteLuaString( object oObjSelf, string sLua ){
- SetLocalString( oObjSelf, "NWNX!LUA!sexec", sLua+"| " );
- sLua = GetLocalString( oObjSelf, "NWNX!LUA!sexec" );
- DeleteLocalString( oObjSelf, "NWNX!LUA!sexec" );
- return sLua;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement