Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
treimor
Newbie


Joined: 14 Feb 2008
Posts: 9

PostPosted: Thu Mar 06, 2008 10:48 am   

LUA Request for commands
 
Maybe I missed a post somewhere, but i'm in need of some of the lua functionality, and cannot find where to get the basics.

Primarily, what are all the base calls for functions/commands from the cMud scripting language?

I'm curious how to call a cmud variable and command. I notice that zs.func.function_name("various", "parameters", "here") works, but i could not figure out how to reference the variables that are stored or the commands.

I understand there are comparable commands (print) in lua, but for instance if I needed to call echo from zScript, how would i? (first command that came to mind)

Also, if I need to reference a variable I have stored, such as "randomclass.counter" in lua, whats the equivalent lua call?

A simple primer on connecting lua to cmud's native commands / variables would be MUCH appreciated Smile
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Mar 06, 2008 10:53 am   
 
See the help. Basically, zs.cmd.whatever for commands, zs.var.whatever for vars, and zs.sys.whatever for predefined variables.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
treimor
Newbie


Joined: 14 Feb 2008
Posts: 9

PostPosted: Thu Mar 06, 2008 10:59 am   
 
excellent. Just what I was looking for. I scoured the lua tutorial / help pages and didn't find any of that information you provided. I appreciate your concise and perfect reply Very Happy
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net