|
mikespot Newbie
Joined: 25 Oct 2016 Posts: 1
|
Posted: Tue Oct 25, 2016 6:24 pm
Alias Names in Triggers |
Hey everyone, quick question here, sorry if this has been asked before
I'm trying to have an event trigger the usage of an alias - however, the name of the alias being triggered is not explicit - in one possible example it would be concatted from characters from the trigger
Example
Trigger:
Code: |
From MUD: "You need to send a letter north"
My Trigger: "You need to send a (%w) (%w)"
Trigger Code: %concat(%1,%2)
Output: letternorth
|
I have an alias named "letternorth", but that alias does not execute the commands in it. It just sends "letternorth" to the MUD.
Any ideas? I have a number of triggers and aliases that are going to overlap and I'd like to avoid creating a new trigger for each specific situation
Thank you!
[/code] |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Oct 26, 2016 1:09 am |
Best method is to acknowledge that 'letter north' should be parameters passed to a single alias.
Trigger Code: doSomething %1 %2
Alias doSomething code: #IF (%1="letter") {#SEND {mail letter %2}}
Alternately you can use the #EXECUTE command. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Sun Oct 30, 2016 6:49 am |
Try
|
|
|
|
|
|