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
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Mon Apr 09, 2012 8:48 pm   

#NODIR - What am I doing wrong?
 
When I bump into a closed door that prevents me from moving I want the map to know I didn't move. To accomplish this, I created a class "#NODIRS" that contains triggers like this:

Trigger Text: The oak door is not open.
Trigger Action: #NODIR; #SAY TRIGGER FIRED

The #SAY statement is in there just for troubleshooting - I know that the trigger is "firing" because I see the say text - but my position on the map is still changing even though I bumped into the door. Any idea what I'm doing wrong?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Apr 09, 2012 8:58 pm   
 
What speedwalking mode are you in? The mapping-help commands (#nodir, #nomap, etc) don't work in fast mode, because all of the speedwalking commands get sent to the mud BEFORE anything else happens.
_________________
EDIT: I didn't like my old signature
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Mon Apr 09, 2012 9:03 pm   
 
I was in fast mode - but i was testing using a single direction at one time.
I switched to safe mode and now my map doesn't update after I move at all.
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Mon Apr 09, 2012 9:04 pm   
 
Then I switched to slow mode and it moves me one direction and then aborts.
Guessing maybe it's not detecting my prompt?
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Mon Apr 09, 2012 10:12 pm   
 
How can I troubleshoot/confirm the automapper's prompt detection? Is there a way to see if it's actually detecting the prompt?
The closest I can think of is to create a trigger that uses the same regex and just does a #SHOW to indicate that it's working. But that's not _really_ confirming that the automapper prompt detection is working, just that the regex syntax is correct.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Apr 09, 2012 11:38 pm   
 
The mapper is just creating an internal trigger (the same type you see in your package files, except you don't ever see this one). If the #SHOW trigger is firing, then the mapper IS finding the prompt. Just because it finds a prompt, though, doesn't mean it will find the room info; that's determined by your configuration settings so if those are off then either 1)you are in a place that doesn't conform to your settings or 2)your settings are just plain incorrect.
_________________
EDIT: I didn't like my old signature
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Tue Apr 10, 2012 2:52 am   
 
I'm having trouble actually detecting my prompt ... here it is:
Quote:
$Encrypt [0% 0% 0% 0%] [2160023 69 63942] good:

And here's the trigger string I'm using:
Code:
^\$\w+ \[\d+\% \d+\% \d+\% \d+\%\] \[\d+ \d+ \d+ \] \w+\: \s+

The action is:
Quote:
#SHOW CAUGHT PROMPT

I have the following checkboxes checked: Trigger on Trigger, Regular Expression, Trigger on Prompt.
Any idea what I'm doing wrong?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Apr 10, 2012 4:12 am   
 
I'm guessing your trigger pattern has too many spaces at the end of the trigger. If I recall the little bit of regex I've dealt with (there's no significant speed difference between regex and zscript, so I never bothered to learn regex), + means 1 or more characters and your example text only has one space at the end.
_________________
EDIT: I didn't like my old signature
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Tue Apr 10, 2012 7:21 am   
 
Ah-hah. Fixed it. The autoconfig didn't generate a working regex. I changed it to the following and now slow-walking works:
Code:
^\$\w+ \[\d+\% \d+\% \d+\% \d+\%\] \[\d+ \d+ \d+\] \w+\:\s*
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