Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Thu Nov 09, 2006 10:23 pm   

[1.13] #ONINPUT trigger output is not checked for aliases.
 
Input triggers do not appear to parse their commands normally. Specifically:

#ALIAS foo {say Foo}
#ONINPUT {^bar (*)} {foo %1}

If you then type 'bar', it gets rewritten to foo and sent directly to the mud, not calling the foo alias. This does not seem to be proper behavior... if I wanted it to do that, I would have put this in the trigger: {#SEND {foo %1}}.

Now, this may be intended behavior. In that case, I need a way to force an alias call. I have looked, but cannot find a command that calls a given alias. Something like '#CALLALIAS foo {%-1}'
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Thu Nov 09, 2006 10:28 pm   Nevermind
 
I'm an idiot. I had parsing off... doh. Didn't realize it because the 'oninput' triggers were still firing, and I was thinking of them as disabled (due to parsing off), rather than thinking of them as triggers (which were on).

OnInput triggers seem more like a parsing thing... perhaps it would make more sense to have them turned off with parsing, rather than triggers? Maybe not.

So, end result... I'm an idiot.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Nov 10, 2006 10:31 am   
 
I think the decision Zugg reached in another thread was the scripts should still function even when parsing is off. In other words that toggle should only affect the command line if I recall correctly. So this might still be a bug.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 14, 2006 7:29 pm   
 
OnInput triggers are triggers, but they behave (as far as the functionality they provide) far more like aliases. Generally, people turn off parsing when they want to send commands directly to the MUD without them being altered... OnInput triggers make this harder, because they will still modify your commands even if you have parsing off.

Technically, it's accurate... but I don't think it's intuitive.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Nov 14, 2006 8:30 pm   
 
Actually, I think I agree with Raven. Since #oninput triggers are tied to the command line, they should be disabled with the Parse rather than the Trigger option (or maybe disabled by either?). You can't otherwise fire #oninput triggers from a script, so this wouldn't effect any scripts that are running.

And it's true that turning off Parsing is supposed to send all command line text to the MUD verbatim.
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Wed Nov 15, 2006 1:40 am   
 
is this why stuff entered through the macro number pad no longer trigger properly suck as hitting the 4 key for west no longer triggers oninput west triggers..
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 15, 2006 6:55 pm   
 
No, the macros *should* be firing oninput triggers. All output sent to the MUD should be going through the oninput triggers.

Raven's originally post was never really answered, but OnInput triggers are not supposed to process their text for aliases. I'm not sure if zMUD did this or not, but the way they have always worked is that any output normally generated by an OnInput trigger is captured and then sent to the MUD. It's possible that zMUD took an extra step and processed aliases, but I'll have to look into that.

But in 1.15, *all* text that is about to be sent to the MUD is processed by OnInput triggers. So if you have a macro that isn't working, let me know more details about the exact macro and #oninput script definitions.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Wed Nov 15, 2006 11:30 pm   
 
A command that I always thought was a little odd is #VERBATIM, which says it toggles the parsing mode but how can it? If you turn parsing off with #VERB then it is not possible to turn it back on with it since it gets sent to the mud instead.
_________________
Taz :)
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Thu Nov 16, 2006 3:04 am   
 
COMMAND INPUT TRIGGER PATTERN ^(%t)$
#VARIABLE lastDir %1

I will play with it more but this works wonderfully in zmud and not in cmud
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 20, 2006 3:12 pm   
 
#VERBATIM turns off the parsing in the command line. But that doesn't disable your scripts. For example, macros still work. The intent of the #VERBATIM command was to allow people to create their own macro that does what Ctrl-R already does.

edb, can you give me an example of the command line text that you are using to test that trigger that isn't working?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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