Login
User Name:

Password:



Register

Forgot your password?
void nanny_get_new_race -- comm.c
Mar 13, 2025 7:08 am
By Elwood
IPv6
Jan 25, 2025 10:45 pm
By Samson
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
SWFotEFUSS 1.5.3
Author: Various
Submitted by: Samson
SWRFUSS 1.4.3
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.8
Author: Various
Submitted by: Samson
AFKMud 2.5.2
Author: AFKMud Team
Submitted by: Samson
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
Users Online
Anthropic, Bytespider, AhrefsBot, Google, Yandex

Members: 0
Guests: 28
Stats
Files
Topics
Posts
Members
Newest Member
507
3,812
19,722
592
MariKleema

» SmaugMuds » 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 6:46 pm   
Go to the top of the page
Go to the bottom of the page

Kasji
Apprentice
GroupMembers
Posts60
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 >>