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


Joined: 02 Aug 2004
Posts: 18
Location: Right Here!

PostPosted: Sun May 14, 2006 1:00 am   

Simple Question
 
Hey, I know almost nothing about Zmud's script, and just have a simple need(if this is the wrong forum, sorry)

Anyway, here's what I need:

An alias that when I type "say This is my message", it would change it to "emote <extra stuff here> says, 'This is my message'"

Now, this would be very simple if I didn't need the closing quote, but it doesn't look really good without it. So, this would likely need to be parsed somehow? Problem is I really have no idea how to go about doing that.

Any help is appreciated, even if it's a link to some guide(haven't found one yet).
_________________
Try me, yet remember the price of failure.
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Sun May 14, 2006 2:21 am   
 
If I understand your question correctly you want to enclose what you have said in apostrophies?

The functions you need to investigate would be %ascii() to determine the appropriate number for displaying an apostrophy and using %char() within your script to display it. As shown bellow:
To find out what the character code number is for an apostrophy type the following on the command lne and hit enter:
Code:
#echo %ascii("'")
This will display the number '39' on the output window therefore we know the character code for an apostrophy is 39

To actually make use of this within your say alias would be as follows (in the settings editor create a new alias):
Code:
Name: say

Value: emote <extra stuff here> says, %char( 39)%-1%char( 39)


I hope this helps =)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Sun May 14, 2006 11:44 am   
 
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=13591

#ALIAS say {emote extra stuff here, says '%-1'}

If for whatever reason the quotes aren't working then you can escape them with ~, which would achieve the same as using %ascii

#ALIAS say {emote extra stuff here, says ~'%-1~'}
Reply with quote
Kison
Beginner


Joined: 02 Aug 2004
Posts: 18
Location: Right Here!

PostPosted: Sun May 14, 2006 2:21 pm   
 
Ok, so what I was really needing was the %-1, thank you both. :)
_________________
Try me, yet remember the price of failure.
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