Scripts

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
KaTSuo
Peon
Peon
Posts: 53
Joined: 25 Sep 2005, 20:01
Location: France
Contact:

Scripts

Post by KaTSuo » 25 Aug 2007, 02:09

Hi !

I just wanted to know if the new tmwserv have a different script language ? Npcs will have to be recoded ?

Regards,
KaTSuo
I'm French, sorry for my bad english XD !
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Post by Crush » 25 Aug 2007, 02:46

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
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
KaTSuo
Peon
Peon
Posts: 53
Joined: 25 Sep 2005, 20:01
Location: France
Contact:

Post by KaTSuo » 26 Aug 2007, 01:59

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 ;)
I'm French, sorry for my bad english XD !
Image
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » 28 Aug 2007, 10:00

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.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Post by Crush » 28 Aug 2007, 12:24

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.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Post Reply