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
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Thu Jun 22, 2017 5:19 pm   

How to send escape key to mud?
 
Just like the title says. I need to send the key "Escape" directly to the mud as a command. How can I achieve this?

I'm using a remote program to access my computer that has CMud, but the remote program cannot send the ESC key, so I need a way to have CMud do it for me instead.

Any help is appreciated, thank you very much!
Reply with quote
mikeC130
Apprentice


Joined: 03 Jul 2006
Posts: 108

PostPosted: Thu Jun 22, 2017 9:54 pm   
 
The #SENDRAW command should do it for you, using ascii code 27 for the escape key. So, you'd make an alias with the command #SENDRAW %char(27). Executing the alias would then send an escape character to the mud.

Mike
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Thu Jun 22, 2017 10:29 pm   
 
I tried using #send or #sendp, but not #sendraw. However, none of them work. When I do that, it says it fails, but it sends like a character itself to the mud, not the escape. Unless there's a different code for escape cmud uses?

The error (which is mud specific obviously) says:

There is no reason to ' here.

If I type lkj into the mud, it says:

There is no reason to 'lkj' here.

The difference tho, is the #sendraw %char(27) response doesn't have that trailing quote.
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Thu Jun 22, 2017 10:34 pm   
 
HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOLD ON! I've been asking the wrong question!!!

What I'm trying to do is send the escape key to CMUD itself... I need to abort the slow walk (#stop doesn't stop and I can't figure out why, unless I hit escape)..

Unless there's a better way to abort a speedwalk. I'm using #sl blah, with #pause and #step. But if I #stop blah, the next step I take, is followed by the rest of the speedwalk, sometimes hundreds of moves.
Reply with quote
mikeC130
Apprentice


Joined: 03 Jul 2006
Posts: 108

PostPosted: Fri Jun 23, 2017 10:34 pm   
 
Ah, what you have here then are two questions. The first question isn't about CMUD itself, but about the software you are using to access CMUD remotely. I would check that software's documentation to find out how to send unprintable/control keys.

As for ending your speedwalk through CMUD, the only thing I can suggest is to use #STOP without the name of the path. CMUD allows the "overloading" of the STOP command to halt a path or to end a thread, using the thread identifier. It is possible that adding the path identifier is causing CMUD to identify that as a command to end a thread rather than the walk. Using just #STOP with no following argument should halt the current path per the documentation, though I can't confirm that it will work.

Mike
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Fri Jun 23, 2017 11:30 pm   
 
Using #stop theoretically works, but in practicality does not. I send #stop all the time, and it says Slow Walking Aborted, but as soon as I move, it thinks it's okay to go, but since it isn't followed by #pause, it just spews out the rest of the directions.

I've thought about using #thread, but I'm unfamiliar with it and haven't quite figured it out yet. I'll maybe look into that for now.

Thank you!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Sat Jun 24, 2017 1:33 pm   
 
Sounds like your map is not in safe mode.
It's the man with the shield icon on the map.
That keeps the mapper from dumping all the movement commands at once.
#STOP can't stop the commands that have already been sent.
_________________
Discord: Shalimarwildcat
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