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!

[C++] Dll can interpret lua script?

Newbie Spellweaver
Joined
Dec 9, 2012
Messages
12
Reaction score
18
I wonder how it is possible to work with C + +
I am intending to make edits in high level language via DLL, more I wonder if the following is possible.:

Make a dll interpret a lua script and edit the executable



_________________________________________________________________________________
Example.: I know the emu can interpret lua scripts... can i create a dll and load this on my executable?

sorry my bad situation.
 
Last edited:
Newbie Spellweaver
Joined
Dec 9, 2012
Messages
12
Reaction score
18
can i use LUA scripts to run movements on game/server with dll?
 
Custom Title Activated
Loyal Member
Joined
Jan 28, 2009
Messages
1,320
Reaction score
616
Do you mind telling us what you where trying to do? I think we are misunderstanding each other.

You can edit lua scripts without intercepting them since they are "external" files that are loaded at start.
 
Newbie Spellweaver
Joined
Dec 9, 2012
Messages
12
Reaction score
18
At first I'm not doing anything yet as this is still under study.
Most like to know if it is possible to use scripts lua, to make the game effects such as spells or even move the character otherwise.

You had made a new movement in the rider, can you tell me how it was made?
thanks.
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Jan 28, 2009
Messages
1,320
Reaction score
616
You can't use scripts to do character animation, you need to build that animation separately.
Skills don't have to use lua scripts and in fact some of them don't. You can use 3d animation + pt functions to move or rotate bitmaps/models around your characters.

Find yourself one skill and start playing with values to see what you can do.
I recommend 1st priestess skill (heal). It have a bit of everything.

You had made a new movement in the rider, can you tell me how it was made?
thanks.

I don't understand.
 
Over rock and under tree
Joined
Jul 20, 2011
Messages
568
Reaction score
347
By 'moon script' he means "LUA Script" (mistranslated, but elegant XD), and by 'Rider' he meant the Knight; he is asking about that 'X' attack skill you made to the Knight.

("Knight" is "Cavaleiro" in Portuguese, but "Cavaleiro" can also mean "a horse rider", so, in some languages, like Portuguese, the word "Cavaleiro" can refer to the nobility title ("Sir" Knight) and also to a man that rides horses ("Cavalo" = "Horse"), and 'Lua' = "Moon").
 
Moderator
Staff member
Moderator
Joined
Feb 22, 2008
Messages
2,404
Reaction score
724
I think the only thing you can edit with LUA, is the particle stuff, effects and skills...

As you didnt say anything in your first post, I was assuming you wanted to add new features using LUA... which is kinda odd.
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
As you didnt say anything in your first post, I was assuming you wanted to add new features using LUA... which is kinda odd.
But possible.

You could implement a DLL which would run a LUA script and provided methods and properties to for memory addresses and permissions and so on.

It could then modify memory locations within the game, change x86 code, grant invisibility and flight, speed boosts, insta-kill, teleportation etc. Anything you like really. *If* you create the correct LUA API in the source for your DLL.

You could script packet insertion, trigger scripts on events, create graphical or text overlays or effects. Whatever you want.

Additionally, if the LUA DLL was common, any modification in LUA could be edited and passed around by players, and developed to be stronger or less buggy and such.

It's a great idea... but too powerful. XD
 
Newbie Spellweaver
Joined
Dec 9, 2012
Messages
12
Reaction score
18
I bought a book for study and was reading that LUA is well recommended for use in most modern games. So I decided the one analyzed and see if anyone has more knowledge and maybe take some questions.

Bobsobol Thanks for the reply, I will see my possibilities and maybe a opensource project comes around.
Thanks sheen and vormav to explain too.
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Yes... it's confusing because, there is a LUA interpretor build into PT which you couldn't change much even if you did build a DLL. The only APIs it provides are for animating special effects for skills and such.

However, you could build a second LUA interpretor (or Java Script or CScript or such) into a DLL and give it APIs for doing just about anything you wanted to... if you know the right places in the client to implement such a thing. LUA is great for prototyping and getting quick developments going.

Unfortunately, the easiest things to implement would be such powerful APIs that they would immediately be latched onto by hackers and cheats. :\ You'd have to be very careful how you designed any LUA API you introduce to PT to prevent malicious use and still be useful.
 
Newbie Spellweaver
Joined
Dec 9, 2012
Messages
12
Reaction score
18
well bobsobol, if you create a dll server side and client side using sockets you might as well do some checks and changes using the server as sending and receiving client.

I thought a few times of doing this to update both tables item, spells as well as many checks that the client makes without server restart
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
That's not a bad idea. Have the server audit client side API use? Could be good. :)

Watch out for adding lag to the server, and consider cheaters using proxies to filter out your verification packets and fake server authorisation. ;)
 
Newbie Spellweaver
Joined
Dec 9, 2012
Messages
12
Reaction score
18
Yes, you have to be very careful with it. More can become easy if you use some validation techniques.

Off_topico:
I'm finishing a tutorial to post here.
It's been almost 4 hours I'm working on it = x
 
Back
Top