Hi Nick and Co.,
First, thanks for coding a great freeware application.
I've been a lurker for a while now, and can't seem to uncover what I'm doing wrong. I'm a MC newbie, but know how to make basic aliases and triggers, and I understand (at least I thought I did) basic control.
I'm not using functions or a script file since that's over my head for now. I realise that what I want to do is easily handled with multiple aliases (like "seekon" and "seekoff"), but I'm trying to condense and thought I'd try using IF THEN ELSE.
1. I know there has to be a sexier way to do this.
2. I can't get the trigger to work.
3. Even though I don't know very much, I'm providing examples of my work--it's better than saying "Make me a trigger and some aliases that do..." right?
What I want:
Trigger
Called "seeking" that highlights output from the mud--the contents of up to three variables: seek1, seek2, seek3
Alias(es)
Called "seek" to toggle it off/on.
Enter "seek" and up to three arguments to store strings in the variables: seek1, seek2, seek3. Doing so enables the "seeking" trigger by default.
What I've tried:
The trigger:
I made four aliases that match like this...
The first three capture and store the variables seek1, seek2, and seek3. They also SetVariable("seektoggle",1)
The last is supposed to toggle the trigger. I always get my fail message when I try the command.
First, thanks for coding a great freeware application.
I've been a lurker for a while now, and can't seem to uncover what I'm doing wrong. I'm a MC newbie, but know how to make basic aliases and triggers, and I understand (at least I thought I did) basic control.
I'm not using functions or a script file since that's over my head for now. I realise that what I want to do is easily handled with multiple aliases (like "seekon" and "seekoff"), but I'm trying to condense and thought I'd try using IF THEN ELSE.
1. I know there has to be a sexier way to do this.
2. I can't get the trigger to work.
3. Even though I don't know very much, I'm providing examples of my work--it's better than saying "Make me a trigger and some aliases that do..." right?
What I want:
Trigger
Called "seeking" that highlights output from the mud--the contents of up to three variables: seek1, seek2, seek3
Alias(es)
Called "seek" to toggle it off/on.
Enter "seek" and up to three arguments to store strings in the variables: seek1, seek2, seek3. Doing so enables the "seeking" trigger by default.
What I've tried:
The trigger:
<triggers>
<trigger
custom_colour="17"
enabled="y"
match="@seeking|@seeking2|@seeking3"
name="seeklite"
sequence="100"
other_text_colour="deeppink"
other_back_colour="#000057"
>
</trigger>
</triggers>
I made four aliases that match like this...
^seek (.*?) (.*?) (.*?)$
^seek (.*?) (.*?)$
^seek (.*?)$
^seek$
The first three capture and store the variables seek1, seek2, and seek3. They also SetVariable("seektoggle",1)
The last is supposed to toggle the trigger. I always get my fail message when I try the command.
<aliases>
<alias
match="^seek$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
local seekcheck
seekcheck = GetVariable("seektoggle")
if "seekcheck" == 1
then SetVariable("seektoggle",0)
EnableTrigger("seeklite",false)
Note""
Note" Seeking Disabled "
Note""
elseif "seekcheck" == 0
then SetVariable("seektoggle",1)
EnableTrigger("seeklite")
Note""
Note" Seeking Enabled "
Note""
else
Note" Trigger Failed "
end
</send>
</alias>
</aliases>