User comments |
Guinn: Sat Oct 27, 2007 5:43 pm |
|
Any ETA on some CMUD examples? Looking forward to moving as much as possible to Lua :) |
|
 |
Tech: Sat Oct 27, 2007 5:53 pm |
|
I've done a little work with this. So I can put some together why don't you give some ideas of what you'd like to see some examples of? |
|
 |
Fang Xianfu: Sat Oct 27, 2007 6:21 pm |
|
I can't do much with this until the Lua interface is documented, for fairly obvious reasons. When the docs for the Lua interface are up, I'll finish this off.
My intention's to use this section to give more in-depth, specific solutions to common problems, with as detailed an explanation as I can give for each example. The idea's to show how the different elements are combined and to demonstrate ways of thinking. It's pretty hard to do that in a normal tutorial, but we're lucky because MUDing only requires a limited subset of the things Lua can do.
If there are any parts of the interface complex enough to warrant it, I might also throw in some examples that focus specifically on them. |
|
 |
oldguy2: Sun Nov 18, 2007 12:02 am |
|
What is the ETA on this now? Wouldn't it warrant having these things during beta testing to discover if there is problems involved? I'm curious how this works with CMUD, but there is no documentation to be found on how to create a script file and send to script file and so on. Documentation in general is really lacking. |
|
 |
Fang Xianfu: Sun Nov 18, 2007 12:22 am |
|
See my previous post in this thread. Documentation of new features in the CMUD beta version's taken a back seat to getting the beta in working order, and we're both waiting. And wait we shall.
I will say this, however: there's no such thing as a script file in CMUD. You just choose Lua from the language drop-down for any setting in the Package Editor, and any code you then put in the script box is Lua rather than zScript. |
|
 |
oldguy2: Fri May 09, 2008 9:52 pm |
|
Now that the second Public version has been released is there going to be any updates to the tutorial soon? I'd like to start learning LUA and do all my scripting in it so I am at least learning you know like a normal popular language that is useful elsewhere. |
|
 |
Fang Xianfu: Fri May 09, 2008 11:44 pm |
|
Insert generic excuse here. It'll be done when it's done, and when it's done, you'll be the first to know. That it's done. |
|
 |
waltv79: Tue Oct 05, 2010 8:39 am |
|
it's comming up on three years since Fang Xianfu did anything here last! I don't really care if this even gets be booted off the forums but come on dut get the lead out and do something about this so we can all finally start useing CMUD to it's fullest potential. yes I am complaining because you said in the past you would get to it and three years have past and now it's to the point where it seams you don't care. |
|
 |
Tech: Tue Oct 05, 2010 2:51 pm |
|
Couple of things...
All of the forum posters, with the exception of Zugg Chiara, are volunteers who take time from their schedules to provide the information. Fang, like myself, Matt, Taz and others gurus are folks who just happen to volunteer a lot more. Fang hasn't posted for a while, so I suspect that RL has become quite demanding for him. It hasn't happened to all gurus at some point. I hope he returns, as we all seem to do.
I admit that this topic could use some attention, and I'll probably take up the mantle here.
Question for you though, is there a particular example you'd like to see? |
|
 |
waltv79: Tue Oct 19, 2010 10:35 am |
|
Some examples I would like to see are basic reading of the MUD and interaction with the MUD while using if then else if statments and various loops and alot of the times my scripts can get very complex and having 15 nested #if statments can get a bit confuseing and lead me to beat my head aginst the wall when one of those don't work right. I do understand the use of the zs script integration and If memory serves me right it winds up being the way to read and send to the MUD. also a bit of a mix of useing function to be able to jump around the script would be great.
Sorry it took a bit to respond,my ranting, and I do understand that real life does take over. And thank you for taking up the reins to do some more work on the LUA tutorials. |
|
 |
Tech: Fri Oct 22, 2010 4:00 am |
|
I got a chance to add the section 8: Writing Functions of the Lua tutorial. |
|
 |
zBob: Sun Mar 06, 2011 10:45 pm example requests |
|
What I'm looking for is surely around here somewhere, but I have looked and looked in the help built into cMud and on the ZuggSoft site here and haven't found it - what I'm looking for is the cMud-specific parts for Lua.
If regular expression processing is enabled for the trigger, the name/pattern of a trigger can pass data into its associated zScript either thru positional parameters:
^(.*) tells you: (.*)
(passes the 2 groups in parenthesis to the script as %1 and %2)
or by setting specific variables like in this:
^(?teller:.*) tells you: (?msg:.*)
(sets the variables @teller and @msg for use in the associated zScript)
How does one pass information about the triggering event to the associated Lua script?
Also, in zScript there's the "%trigger" predefined variable which includes the whole line of text that triggered the trigger.
Is there an equivilant in Lua? And more importantly, where is the big list of predefined Lua variables and constants? |
|
 |
Tech: Sun Mar 06, 2011 11:28 pm |
|
I think you'll want to start by reading Lua Scripting. |
|
 |
zBob: Mon Mar 07, 2011 6:49 am |
|
Exactly what I was looking for. The "zs" object and all the docs on it. Thanks Tech. |
|
 |
|
 |