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
aslerjack
Newbie


Joined: 25 May 2002
Posts: 2
Location: USA

PostPosted: Thu Mar 27, 2003 6:25 pm   

Newbie Question
 
Trying to learn zMud. Going through the documentation. Have a bunch of scripts for DR and was going to see if I could convert some of them. I'm using ver 6.55a.

I was wondering if someone could show me how they would write this simple script in zMud? I just looking for an example so I can compare to my other scripts and work on them myself. I feel comfortable with alia's and triggers but am unclear on putting it togeter. Here is the script. It's just a basic swimming/climbing routine.

#climb2

top:
move climb tree
pause
move go ramp
pause
put dive hole
pause
move w
move s
move e
move n
move climb embank

expCheck:
match end mind lock
match top EXP HELP
put exp swim
matchwait

end:
put sit

Thanks,
Jack

Jack Murphy
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Mar 27, 2003 10:02 pm   
 
You are going to have to say which commands are MUD commands and which are commands for the client. Also explain what the commands for the client are supposed to do in order for us to be able to convert it to zScript.

Kjata
Reply with quote
aslerjack
Newbie


Joined: 25 May 2002
Posts: 2
Location: USA

PostPosted: Thu Mar 27, 2003 11:18 pm   
 
Sorry about that, makes sense. Thanks for letting me know. Hopefully, I will get it right this time.

(This is just a comment.)
#climb2

top: and end: are labels for the client, for looping purposes.

Move, put, and pause are client commands, ie. "put dive hole" sends "dive hole" to the mud. Move is pretty much the same but used for movement, it waits for a room description. Match builds a match table,ie. "'match' 'end' 'mind lock'"

Match is the client command, end is the label it's supposed to go to, mind lock is the text that triggers it. matchwait tells the client to wait for a match from the above match table. Generally you have multiple matches in the script. "put 'exp swim'" send the command to check your experience in swimming which it compares to the match table above it.

Pause tells the client to wait for 1 second before going to the next line, the time can be increased.

sit, dive, climb, swim are mud commands

tree, ramp, hole are objcts in the mud.

I hope that makes sense and I think I got the terms right. I see that the matches would be my triggers for zMud. I can create them indiviually but am having problems tying it all together.

Thanks again,
Jack



Jack Murphy
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Mar 28, 2003 12:59 am   
 
Most of that can be done the easiest by having the automapper working. Some would have to be done through triggers, and aliases in some cases. In general wherever you have 'match label text' that should become '#TR {test} {code marked by label}'. "Put" can simply be removed, as can "move" provided you allow a delay for the movement to be executed. A simple trigger would suffice for delays in movement, as it won't execute the code until the MUD is in sync. 'Pause' is problematic, in the case of most muds no such command is necessary (again precisely triggerring on the correct text creates the proper delay); if DR requires a delay due to round times then you might want to use #WAIT (just be aware of the nsty side effects described in a document in the support library http://www.zuggsoft.com/library), you can also use #ALARM to control timing (read the above link for more info about which is best).

As with everything you already noticed the help and other documentation is your friend. Even though the help file will be vastly improved in the next public version I suggest you read many of the documents in the Support Library, since they contain much that is not in the help (the help size would triple just to duplicate that information and provide logical ways to connect it).
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