 |
SoulSkorpion Newbie
Joined: 07 Jan 2003 Posts: 6
|
Posted: 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?
|
|
|
 |
Castaway GURU

Joined: 10 Oct 2000 Posts: 793 Location: Swindon, England
|
Posted: 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. |
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: 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! |
|
|
 |
SoulSkorpion Newbie
Joined: 07 Jan 2003 Posts: 6
|
Posted: Tue Jan 07, 2003 6:43 pm |
Thanks! :)
|
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Tue Jan 07, 2003 7:41 pm |
Heh... No problem. Any time you need a healthy dose of sarcasm, just come on back!
|
|
|
 |
|
|