Register for your free account! | Forgot your password?

You last visited: Today at 16:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Lua Function

Discussion on Lua Function within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2016
Posts: 11
Received Thanks: 2
Lua Function

How you put this in .lua function
Code:
	CLuaBase lua;
	lua.SetGlobalPointer("PRJ", this);
	lua.RegisterFunction("AddLimit", &CProject::AddUpgradeLimit);
	lua.SetGlobalInt32("NOLIMIT", 0);
	lua.SetGlobalInt32("GENERAL", 0);
	lua.SetGlobalInt32("ACCESSORY", 1);
	lua.SetGlobalInt32("ULTIMATE_WEAPON", 2);
	lua.SetGlobalInt32("BARUNA_WEAPON", 3);
	lua.SetGlobalInt32("BARUNA_SUIT", 4);
	lua.SetGlobalInt32("BARUNA_ARMORETC", 5);
	lua.SetGlobalInt32("PIERCING_SUIT", 6);
	lua.SetGlobalInt32("PIERCING_WEAPON", 7);
	lua.SetGlobalInt32("BARUNA_ACCESSORY", 8);
Code:
	lua_getglobal(luastate, "PRJ");
	CProject* ptr = (CProject*)lua_topointer(luastate, -1); // why not practice avoiding globals?
	switch (lua_tointeger(luastate, 1))
	{
		case 0: // GENERAL
			ptr->m_mapUpgradeCap_General.insert(make_pair(lua_tointeger(luastate, 2), lua_tointeger(luastate, 3)));
			break;
		case 1: // ACCESSORY
			ptr->m_mapUpgradeCap_Accessory.insert(make_pair(lua_tointeger(luastate, 2), lua_tointeger(luastate, 3)));
			break;
gwapingsjericho is offline  
Reply


Similar Threads Similar Threads
std::function of a function returning an std::function
11/11/2013 - C/C++ - 19 Replies
Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann. Ich verzweifle an Folgendem Vorhaben: #include <Windows.h> #include <string> #include <iostream> using namespace std;
Running Function 2 after Function 1 finished
09/15/2013 - AutoIt - 3 Replies
Hey, its me again. Im stuck on a problem since yesterday and as much as i hate to ask for help, i really dont know what else to try. I want Function 2 to run after Function 1 has finished. I tried GuiCtrlSetOnEvent and MsgLoop, but i dont really understand it. I tried to read tutorials but they didnt help at all. The line that are underline is what im talking about. I want gamestart() to run first and when its finished, i want iniviteteam() to run. #AutoIt3Wrapper_UseX64=n...
[HELP]Function LUA
08/21/2012 - Metin2 - 3 Replies
Hello guys, I have a problem with a function .. does anyone know how does it work? purge_area ()
What this Lua function does?
05/06/2012 - Metin2 Private Server - 0 Replies
Can someone tell me what does this lua function: get_server_timer_arg It exists in deviltower1 quest.
[VIP-function] ToxicSYS [VIP-function]
08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies
heeeey E-pvpers :pimp: this is a new hack by TSYS Status : UNDETECTED Functions (VIDEO) : YouTube - WarRock - Bikini event VIP hack



All times are GMT +1. The time now is 16:19.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.