 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Dec 02, 2008 7:44 pm
Some problems with the Oninput |
Right now, this trigger:
| Code: |
<trigger name="hiding" type="Command Input" priority="790" id="98">
<pattern>(*)</pattern>
<value>#IF (@idle=1 AND !%ismember(%word(%1,1),@nointerrupt))
{
#noinput
#exec %1
#exec {hide}
}</value>
</trigger>
|
Gags certain lines, such as those starting with ; or anything with color markers in it, like {g, {c, etc... I'm trying to figure out why and if it's unavoidable? |
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Dec 02, 2008 9:31 pm |
Try changing '#exec %1' to:
If that doesn't work, maybe:
but I think that might not work. |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Dec 02, 2008 9:53 pm |
The second one worked for ;
However, neither worked for anything involving color. Specifically - {Ytest{x
Perhaps if I could understand why it doesn't work I could think of something? |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Dec 02, 2008 10:00 pm |
You don't need {%1} or %quote.
The problem is that #EXEC is "executing" the %1 string as if it were a zScript script. For example, a line that starts with ; is a comment in zScript. So #EXEC will ignore a line that starts with a ;.
If you want to send the string to the MUD, then you should use #SEND and not #EXEC.
Also, in your last command, I'm assuming "hide" is an alias? If "hide" is an alias, then you don't need to call #EXEC. Just put it on it's own line:
That will execute the alias and will be faster. Remember that whenever you use #EXEC, you are specifically calling the script compiler and it will be slower. |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Dec 02, 2008 11:20 pm |
Alright, I'll try that. I remember using exec because of order issues (i.e. the command had to come BEFORE hide was sent), but I think that's implied and I'm thinking you probably figured that out.
|
|
|
|
 |
|
|
|