|
Xerakon Apprentice
Joined: 10 May 2011 Posts: 111
|
Posted: Sat Oct 08, 2016 5:16 pm
Allow Mud-Side Tags to Pass Through, But Not Capture |
I'm having a difficult time with this... I'm playing a MUD that has color triggers. &W for white or &z for black and such.
An often-used command is something like: makearmor sienarium about cover &wA S&zuit &wo&zf &wD&zurasteel &wA&zrmor&G&w
But when I set an alias to capture it, it will not capture the full syntax with colorcodes. What I'd like for it to do is output the syntax with colorcodes to the MUD (&wA S&zuit &wo&zf &wD&zurasteel &wA&zrmor&G&w) but store just "A Suit of Durasteel Armor" in a variable.
Any ideas? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sat Oct 08, 2016 5:39 pm |
Try using #SENDRAW if your codes are getting eaten in parsing.
You can use %replace if you know exactly what you are trying to strip out. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Xerakon Apprentice
Joined: 10 May 2011 Posts: 111
|
Posted: Sat Oct 08, 2016 6:35 pm |
Code: |
startarmor_material = %1
startarmor_location = %2
startarmor_covering = %3
startarmor_name = %-4
makearmor @startarmor_material @startarmor_location @startarmor_covering @startarmor_name
|
This is the alias (STARTARMOR) that I have. I'm trying to work through how to do such a thing. Perhaps startarmor_name with the %replace covering all possible colorcodes? Does sendraw work with variables? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Oct 09, 2016 1:26 pm |
I doubt the problem is in the sending, but you can add #SEND or #SENDRAW to your makearmor line in the alias. I think the problem is that the & is special character so the command line is trying to do something with it. Using quotes should get the proper value passed to the alias.
startarmor sienarium about cover "&wA S&zuit &wo&zf &wD&zurasteel &wA&zrmor&G&w" |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sun Oct 09, 2016 2:21 pm |
%replace(%replace(%replace(@startArmor_name, "&w"), "&z"), "&G")
As for #SENDRAW, it does evaluate functions and variables unless you quote (tilde ~) out the operative character or "surround your @string in quotes"
do=look
#SENDRAW @do
sends look
#SENDRAW ~@do
sends @do
#SENDRAW {@do}
sends look
#SENDRAW "@do"
sends @do
You might want to switch that over to local $variables unless you have a need to use them in other settings
Otherwise it seems odd that you need an alias for this at al... just do :
#SENDRAW "makearmor sienarium about cover &wA S&zuit &wo&zf &wD&zurasteel &wA&zrmor&G&w" |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|