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
nazzireth
Beginner


Joined: 26 Jun 2007
Posts: 12

PostPosted: Sun Jun 30, 2013 8:50 pm   

open door direction?
 
Hello guys! I have a question, how do I make a trigger to read these 2 lines to see the direction i typed and then open the door/gate etc...?

<461/461hp 570/570m 530/530mv 100br 5,178,891xp -r> s
The door seems to be closed.

I have this so far :

The (%w) seems to be closed.
open %1

and it works but I cant seem to figure out how to grab the direction I typed after the prompt as well.


Thanx alot =)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jul 01, 2013 2:43 am   
 
It would be much simpler if your prompt ended in a newline (some games allow you to put one in the prompt), so that any command you entered would be on its own line, but failing that just start with a trigger that matches on your prompt and includes matching for whatever comes after. This trigger would then have a #condition for the closed-door line you made already, and since this is now a multistate trigger you can refer to the capture pattern for your command via %t1.
_________________
EDIT: I didn't like my old signature
Reply with quote
nazzireth
Beginner


Joined: 26 Jun 2007
Posts: 12

PostPosted: Tue Jul 02, 2013 6:36 pm   
 
Ok got it Thankies =)
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