I'm baffled about how these concepts may or may not apply to scripts, triggers and aliases. I've seen a thread on the forum which talks about how everything in mudlet uses the same namespace(!), but this mostly seems to be rants between devs about their preferences regarding packages or closures. Not really that helpful for me.
I can find nothing in the manual which tells me how trigger X might initialise a module in script Y. A really, really basic step.
Example: If I make a module script, such as the following (borrowed from lua-users.org/wiki/ModuleDefinition )
and then (if I was not in mudlet) I could initialise the module and use it with
so... how might I do this from a trigger or an alias instead? What is the equivalent to "require" which would initialise a mudlet script rather than loading an external file? Do I have to use the file system? Can't I just treat a script like a module definition? Maybe I can, but how?
BTW a really basic example of this in the wiki would help a great deal.