Example #1
0
File: lua.cpp Project: Xackery/ZEQ
bool Lua::convertZone(const std::string& shortname)
{
    if (!runScript(LUA_GET_ZONE_CONVERTER_PATH, 1))
    {
        //throw
        gLog.printf("failed to get zone converter func\n");
        return false;
    }
    
    // Converter func is on top of stack, takes shortname as argument
    lua_pushstring(L, shortname.c_str());
    return runFunc(1);
}
Example #2
0
File: lua.cpp Project: Xackery/ZEQ
bool Lua::convertMob(int race, uint8_t gender)
{
    if (!runScript(LUA_GET_MOB_CONVERTER_PATH, 1))
    {
        //throw
        gLog.printf("failed to get mob converter func\n");
        return false;
    }
    
    // Converter func is on top of stack, takes race and gender as arguments
    lua_pushinteger(L, race);
    lua_pushinteger(L, gender);
    return runFunc(2);
}
int main(int argc, char *argv[])
{
	//default vars
	int max = 1000;
	int duration = 1;
	float ramp = 0.2;
	float tear = 0.2;
	

	runFunc(duration, max, ramp, tear);
	
	
	return 0;
	
}