|
T0rin Beginner
Joined: 27 Dec 2008 Posts: 14
|
Posted: Sat May 30, 2009 2:05 am
#oninput used with movement char "." |
Is there any way to parse any .path or .newsud commands through an oninput? I tried using the pattern of ".(*)" but it didnt catch it, I assume because the "." is the movement char. I'd like to perform a specific action anytime I use a speedwalk path via .path or just speedwalking in general like .2ws. I also tried an alias of ".", but that didn't work either.
Any ideas? |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jun 01, 2009 6:15 pm |
Go to your #oninput trigger and turn on the "Trigger on Prompt" option. That will cause your command line to trigger the oninput pattern before it is parsed by anything else in CMUD (like the speedwalking system).
|
|
|
|
T0rin Beginner
Joined: 27 Dec 2008 Posts: 14
|
Posted: Mon Jun 01, 2009 10:22 pm |
Zugg wrote: |
Go to your #oninput trigger and turn on the "Trigger on Prompt" option. That will cause your command line to trigger the oninput pattern before it is parsed by anything else in CMUD (like the speedwalking system). |
Nope, still nothing. Using 3.06 if that matters.
Trigger pattern is ".(*)" and action is "say bye;#exec {.%1};say hi"
I type ".2u" and it just goes up twice.
Trigger type is "Command Input", the checked boxes are "Trigger on Newline" and "Trigger on Prompt". |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue Jun 02, 2009 4:58 pm |
I think your best bet would be to redefine the movement special character to something you're less likely to use. You can do this by going to Options -> Gerneral -> Scripting - Special Characters.
I hope that helps.
You could also add a debug message to make sure you oninput trigger is being called. |
|
_________________ Asati di tempari! |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 02, 2009 5:17 pm |
1) Turn off the "Trigger on Newline" option. Only enable "Trigger on Prompt". Otherwise your #oninput trigger might fire twice.
2) Use the #SEND command to send text to the MUD within the script.
3) Use the #NOINPUT command to prevent any other text or commands from being executed.
So your script should look like:
Code: |
#SEND "say bye"
#EXEC %concat(".", %1)
#SEND "say hi"
#NOINPUT |
Your existing #EXEC syntax might work fine, but using an explicit %concat function is better.
Tested this in 2.37 and 3.08 and it worked fine here. If I removed the #EXEC statement, then it didn't perform any speedwalking directions. |
|
|
|
|
|