|
Christopher Beginner
Joined: 01 May 2004 Posts: 11 Location: USA
|
Posted: Sat May 01, 2004 8:35 am
Reporting in multiple formats |
I have an alias to report stuff to my party or to my screen:
msg
#if (@scon=1) {p' %1} {#echo %1}
The problem is that in order to get the alias to spam everything, i need to enclose the message in brackets. For example:
msg {%1 is in Good Shape} if scon=1 will spam p' {%1 is in Good Shape} and if scon=0 #echo %1 is in Good Shape
The difference is the extra curly brackets that i'm actually sending to my party channel. Sorry if that's not well described its late and I've been looking at this all night. I'm just really picky about what I spam, and it bugs me that I can't control exactly what characters I'm sending in this case. If anyone knows an easy way to do what I'm trying to do I would really appreciate the help.
I've tried both %remove and %replace, interestingly, it works if i do (p' %remove ("{",%1)) although I can't for the life of me figure out why, since as far as I know, it should only be removing the first instance of the { and not the matching } on the other side.
Thanks all. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 01, 2004 9:18 am |
If you just want everything after 'msg' to be included, use %-1.
#if (@scon=1) {p' %-1} {#echo %-1} |
|
|
|
Christopher Beginner
Joined: 01 May 2004 Posts: 11 Location: USA
|
Posted: Sat May 01, 2004 3:21 pm |
Thank you very much! That did the trick nicely, I seem to recall the %-1 trick from somewhere, but I had looked through all the helps/documentation and nothing seemed to fit. Is there a resource that I can check to get better at the zmud syntax?
Again, thank for the quick help. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 01, 2004 5:46 pm |
Help is the primary resource for zMUD syntax. %-1 is explained in the help for the #ALIAS command but not in the Introduction to Aliases.
In addition to the zMUD helpfiles, there are articles covering a variety of subjects in the Support Library, which you can find from the Support link above. Most of these articles are by Zugg and provide additional details and examples.
Another resource is this forum itself. It usually takes less than an hour per day to read all the active topics, which will expose you to a variety of scripting styles. (It takes considerably longer to respond to them.) |
|
|
|
|
|