Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Integrate Lua

Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
Anyone already integrated lua?
Im currently working on the use items function but the best way to do it is with lua.

If you are interested on it then feel free to pm me and we can work on this together. I already looked into it and know few things.



Status update:
Daneos - Integrate Lua - RaGEZONE Forums
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
Lua for many functions.
Like pet, drop item, events, item functions, gamble functions (example the mudosa point machine)

example to get level (from yourself or target)

function Lv(a) --Get level from "a"
LuaPrint("Obtain character lv")
local b = TurnToCha ( a )
local lv = GetChaAttr( b , ATTR_LV )
return lv
end

you can also create functions to make monsters say random things on the chat
 
Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
I miss so much the LUA :D i program with LUA my first time :D so many remembers.

Yes yes, i know about lua, we can do almost everything with lua.



For lua you use come special function in the system or FOPEN?
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
fopen? xd


and yea, lua was my first language too :D I still got somewhere a book on how to learn lua xd
 
Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
Isn't dificult, i remember almost everything, one game use this code, Tibia, i love Tibia, but i don't play it anymore. REALLY ALL CODE FOR LUA? F@%K

I'm going to create a LUA code for, life and this stuff.



UPDATE

I'm thinking in do a lot of code in LUA, a lot of quest and stuff, i think i'm gonna to start this when i finish my Fight System, i almost done, the skills isn't very dificult but, i don't know why, atomatic, get off the life of npc.
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
I will also rework my server files and do the most things in lua.
Why? Because its much easier and faster than c++ and then I dont need to keep compiling the files all time.
 
Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
I think exactly like you, i have the function @/reloadlua



I gonna to rework all server with lua xD, i almost made the function of lua.



Maybe latter we can work together.
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
The only problem Im having right now is the lua register function



But I think today ill get everything to work
 
Joined
Jun 23, 2006
Messages
782
Reaction score
399
Lua isn't as fast as C++ is :p It's still just a script language in our case and you should remember that many functions has to be done in C++ and then you just create a script and access it.. For newbies it'll most likely cause crashes as soon as your server gets more features(like a fully working monster system). I think I'll join also start to dev here :) and you should learn about mutexes and critical sections..
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
I know that c++ is faster than lua but it doesnt matter. If you do all the item functions in c++ then its so ugly and almost no overview xD And if you write things like item functions in lua then you dont have to recompile the server every 5 minutes
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
Anyone wanna help with register functions? Im going to die here my brain is already under fire xd
 
RaGEZONER || Webdevloper
Banned
Joined
Oct 6, 2011
Messages
614
Reaction score
130
Would not it be easier to write PHP in the account registration?
 
RaGEZONER || Webdevloper
Banned
Joined
Oct 6, 2011
Messages
614
Reaction score
130
Why not use PHP? Made much easier with the account registration.
 
Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
Hey Daneos what i have to download? In one the zip have SRC in there files .h and .c what i have to download?



Never mind, at the end is the download xD



Why this doesn't work??

luaL_dofile(L, "LUA\test.lua");

and this yes

luaL_dofile(L, "test.lua");

??
 
Super-Moderator
Staff member
Super-Moderator
Joined
Apr 28, 2007
Messages
1,501
Reaction score
758
how about every thing
That's a strange answer. That ain't even an answer.. What is everything? How can you compare any sort of ... speed with LUA and C++? Do you know what binding LUA to C++ is?

In this concept, as far as I know, there's no single difference at "any speed" compared with C++. You're using LUA to solve problems or create functions you cannot do in C++, in this case. Usually you're doing this because of a lack of knowledge in C++. LUA is easier than C++ to understand and write. Programming in LUA has shorter terms as well, which saves some time when writing a big piece of code.
 
Back
Top