Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, DotBot, Google

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Lua mprogs and commands
Forum Rules | Mark all | Recent Posts

Lua mprogs and commands
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 7, 2016, 4:46 pm
Go to the top of the page
Go to the bottom of the page

Kasji
Apprentice
GroupMembers
Posts62
JoinedDec 23, 2007

I've uploaded a snippet for an implementation of Lua to replace mprogs and also have Lua based commands.

It should be considered an incomplete implementation:

  • Nick Gammon's objectmap requires C++, so this isn't compatible with default Smaug & Co installs.

  • char_data, obj_data, room_index_data must inherit from Nick Gammon's tObject class

  • char_data, obj_data, room_index_data must use C++ new operator to invoke tObject constructor.

  • I generally leave the implementation of the system up to you. There are mprog triggers to replace the default ones.

  • The lua_command() function has to be implemented into the interpret() function if you want to use Lua based commands.

  • "g_luaUpdater->update();" needs to be put in the update handler (probably next to mpsleep_update() or whatever it's called.

  • There is generally a whole lot of sawdust left over inside the files from my experiments.



I am too busy to provide any technical support. Use google.
       
Pages:<< prev 1 next >>