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


Joined: 21 Jan 2004
Posts: 1

PostPosted: Sat Feb 21, 2004 5:37 pm   

Toggling special characters
 
I play on a mud that uses special characters with the emote command, http://www.armageddon.org/cgi-bin/help_index/show_help?emote
http://www.armageddon.org/cgi-bin/help_index/show_help?emote_examples
look at those links for examples. What I would like to know is whether or not there is any way I could toggle zmuds use of the special characters on the fly as I input things to the mud, without having to change my preferences or click the icons in the lower right. For example I’d like to do something like this: chartog emote looks down at ~red, and smiles at !red. The idea would be to make zmud ignore the special characters for that input. Anyone know how I can do this?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Feb 21, 2004 6:15 pm   
 
You could use and emote alias with the #DEFAULT and #NODEF commands. You may still have a problem with the tilde (~).
Reply with quote
smeagain
Beginner


Joined: 21 Feb 2004
Posts: 11
Location: United Kingdom

PostPosted: Sat Feb 21, 2004 9:45 pm   
 
I've been having a similar problem. I have a zmud alias to load my mud based aliases. Unfortunately the mud also uses % as the parameter character. Therefore for my aliases to be entered correctly i must disable the parameter char on zmud then reenable it afterwards. I tried switching the an alternative character, but this hinders some of the functions of the map (e.g. door opening).

I tried using the #default and #nodef commands as you suggested, but they do not seem to be having any effect. Do you have any idea what it is I am doing wrong?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Feb 21, 2004 9:56 pm   
 
Even better solution is to put you whole command in quotes.
Example for for Werd: "emote looks down at ~red, and smiles at !red"
This works in the command line and aliases.
Reply with quote
Timas
Novice


Joined: 05 Jan 2003
Posts: 39
Location: Netherlands

PostPosted: Sun Feb 22, 2004 12:59 am   
 
A workaround would maybe be to try and do a replace on the chars to have them be replaced by the char with a tilde before it? %replace(%1, "!","~!") something along those lines..
perhaps:
#ALIAS {emote} {
#VAR emoteString %1
%replace(@emoteString, "~","~~")
%replace(@emoteString, "!","~!")
chartog emote @emotestring}

I'm not sure if this would work but I use something similair to replace " with ' in a string. I do think you need to do the tilde as first char to be replaced or the the code will replace all the tildes it places befor the others.

Timbo
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