Page 1 of 1
Scripts
Posted: 25 Aug 2007, 01:09
by KaTSuo
Hi !
I just wanted to know if the new tmwserv have a different script language ? Npcs will have to be recoded ?
Regards,
KaTSuo
Posted: 25 Aug 2007, 01:46
by Crush
Silene just added support for the Lua scripting language and created some basic NPC functions. Maybe we will implement other scripting languages too, but the eathena scripting language will most likely be none of them.
That means yes, all NPCs and other scripts will have to be rewritten for TMWServ.
Here is the current test script to give you an idea how the lua scripts for tmw will look:
http://themanaworld.svn.sourceforge.net ... iew=markup
Posted: 26 Aug 2007, 00:59
by KaTSuo
Wow ! Looks pretty hard..
What about shops ? Is there any kind of function like eathena or do you have to script the whole shop ?
I hope your new language will be more complete than eathena scripts.
Good luck

Posted: 28 Aug 2007, 09:00
by Bjørn
KaTSuo wrote:What about shops ? Is there any kind of function like eathena or do you have to script the whole shop ?
I hope your new language will be more complete than eathena scripts.
There is a function to do a shop, see the calls to tmw.npc_trade in the file Crush linked to.
Once you understand the structure of the script, it's actually not so hard. However, it would be nice if we could still get rid of some of the parameters that have to be passed around. At least the scripting language we use (
Lua) is a lot more complete than eAthena's scripting language.
Posted: 28 Aug 2007, 11:24
by Crush
Yes, Lua is a general purpose language and thus a lot more complex than the simple one-purpose scripting language of eAthena. This makes it not as easy and intuitive for server administrators without a programming background. But on the other hand using a common script interpreter gives us a lot of features that would take countless hours of work to integrate into a homebrewed scripting language.
String manipulation, scientific mathematics, reading and writing files, using external libraries... all stuff the eAthena scripting language can't.