 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sat Nov 08, 2008 1:32 am
Is my no parse command... bleeding? |
| Code: |
<trigger name="Quest Object - Grab" priority="1450" regex="true" id="145">
<pattern>(?:\(Glowing\) A little lost (Puppy) is here whining.|\(Glowing\) The King's (sceptre) is here.|\(Glowing\) A bright green (emerald) shines here.|\(Glowing\) A (Blue) diamond shard sits here gleaming.|\(Glowing\) The (Crown) Jewels are here.)</pattern>
<value>#IF (@Quest="on")
{
#IF (@found="no")
{
#SWITCH (@Quest_Item)
("a little lost puppy")
{
~~
get %1
Object_Quest=%1
}
("the King's Sceptre")
{
~~
get %2
Object_Quest=%2
}
("a bright green emerald")
{
~~
get %3
Object_Quest=%3
}
("a Blue diamond shard")
{
~~
get %4
Object_Quest=%4
}
("the Crown Jewels")
{
~~
get %5
Object_Quest=%5
}
}
}</value>
</trigger>
|
My MUD uses the ~ tilde as a way to clear the queue of commands, and, if I remember correctly, it can be used as an escape character in CMUD, so I double it up to escape itself. However, this is what happens:
| Quote: |
~
get emerald Object_Quest=emerald
|
My variable is getting placed and sent on the same line as "get emerald" and is thus being sent as a command to the MUD. This shouldn't be happening and didn't before I added the ~, so I'm wondering if there's something I don't know about it that makes it cause this sort of issue, and if there is any way around it? |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Nov 08, 2008 6:48 am |
#SEND or #SENDRAW should fix this issue for you. I think the latter, but I forget which goes straight to the game and which takes a detour to the parser first.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Nov 08, 2008 2:59 pm |
Sendraw goes straight to the game with this exception. It expands variables and functions.
An example.
dog=puppy
#sendraw {get @dog}
Sends
get puppy
If you do NOT want it to expand variables or functions you would need to put double quotes around the variable/function, or the whole line.
#sendraw {"get @dog"}
Sends
get @dog
Edit: And to answer your question yes it looks like it is bleeding but I am not sure that it would be considered a bug. Zugg would need to decide.
Personally I have started using the #send or #sendraw commands any time I want to send something to the mud.
Btw I forgot to mention above; If you use #sendraw the text does not appear on your screen.
If you used #send {"~"} or #send {~~} it goes through properly and shows on the screen.
If you use #sendraw {"~"} or #sendraw {~~} it goes through properly but does NOT show on the screen. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sat Nov 08, 2008 3:15 pm |
I used send and got it to work, thank you.
|
|
|
|
 |
|
|
|