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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
SoulSkorpion
Newbie


Joined: 07 Jan 2003
Posts: 6

PostPosted: Tue Jan 07, 2003 5:53 pm   

scripting question
 
I'm trying to write some scripts for my guild on the MUD I play, and most of them use zMUD so I'm trying to learn the zMUD scripting language. It seems pretty straightforward, but I can't find any information on IF statements or looping, which I really need. Actually, I was thinking of writing something to convert MM2k scripts into zMUD scripts. Either way, I can't find any info on ifs or loops. Can anyone explain how zMUD does these?
Reply with quote
Castaway
GURU


Joined: 10 Oct 2000
Posts: 793
Location: Swindon, England

PostPosted: Tue Jan 07, 2003 6:14 pm   
 
Theres help for both of these in the zMUD help. Your best bet is to click on 'reference' in the help menu and look in there.

The if goes like this:

#IF (condition) {true-statements} {false-statements}
You can leave off the false-statements if you dont need them.

There are two sorts of loops:

#LOOP from, to {statements}
This works like a for loop, if you leave out the 'from' it starts at one. (eg: #loop 3 {jump}) does jump 3 times.

#WHILE (@a = 0) {statements} <- do something as long as @a is 0
#UNTIL (@a = 0) {statements} <- do something until @a is 0

But look in the help, there are examples there.

Lady C.
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Tue Jan 07, 2003 6:14 pm   
 
I find it hard to believe that you don't know how to use a help file.

All commands are pretty well documented in help file, try it, you'll like it.

I've found the Search feature of help files particularly useful!
Reply with quote
SoulSkorpion
Newbie


Joined: 07 Jan 2003
Posts: 6

PostPosted: Tue Jan 07, 2003 6:43 pm   
 
Thanks! :)
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Tue Jan 07, 2003 7:41 pm   
 
Heh... No problem. Any time you need a healthy dose of sarcasm, just come on back!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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