• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Sharing knowledge on Lua possibilities

Night Wolf

Night Wolf

I don't bite.
Feb 10, 2008
Reaction score
I can't edit the first message but just a disclaimer that I forgot to add:
The reason for this topic is to show a few possibilities, it's to share ideas rather than code tricks, code style or code efficiency.
Some of the things here are just "detail-oriented"adjustments on existing functions/systems, they don't bring anything new except to remind us all to pay attention to small details.
Most of the scripts were created several years ago, when we just had TFS 1.0 (6 years ago, maybe?). By then we didn't had the architecture that we have today and I wasn't so familiar with metamethods either, so lots of functions are compat based (tfs 0.x).

Of course some of the npcs/actions/spells here will work if you copy/paste in your server and adjust the XML tags, however I highly advise you to remake the idea considering cleaner cone and better code styles. Some redundancies can be eliminated.

I don't have a server anymore but I'll try to add screenshots/gifs later.