Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ multiple variables in a line
multiple variables in a line
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Natasi
(79 posts) Bio
|
Date
| Sun 25 Jul 2004 03:16 AM (UTC) |
Message
| How can I make an alias, or even a trigger, with more than one variable in the line. Such as,....
"shoot @target %1"
I had this set with the alias, "aa *" to "shoot badguy sw" and it would send it, but after the first variable (@target) it would end the line and send "sw" on the next line | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #1 on Sun 25 Jul 2004 03:54 AM (UTC) |
Message
| Sounds like your target variable is picking up a line return somewhere or maybe has a command stacking ( ie ; ) character tacked onto the end of it. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
Posted by
| Natasi
(79 posts) Bio
|
Date
| Reply #2 on Sun 25 Jul 2004 12:18 PM (UTC) |
Message
| I don't use command stacking and I've tried it before, I'm thinking I am missing to click one of the boxes or something...I have expand variables clicked..... | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Sun 25 Jul 2004 06:32 PM (UTC) |
Message
| How are you setting your variable? you might have a carriage return afterwards in the variable, that seems like what it is. copy/paste your trigger/alias. (both to send the variable, and set the variable) |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Natasi
(79 posts) Bio
|
Date
| Reply #4 on Sun 25 Jul 2004 11:05 PM (UTC) |
Message
| <aliases>
<alias
match="sh *"
enabled="y"
expand_variables="y"
sequence="100"
>
<send>shoot @target %1</send>
</alias>
</aliases>
also, ones set up like this don't work either....
<aliases>
<alias
match="nca"
enabled="y"
expand_variables="y"
sequence="100"
>
<send>elicit changeheart @target ally
</send>
</alias>
</aliases>
| Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sun 25 Jul 2004 11:08 PM (UTC) |
Message
| Your variable is the problem, not the alias. Check that you don't have a carriage-return in the variable value. That is, don't have:
variable: target
value: badguy(cr)
If you put the cursor into the "edit variable" window at the end, it should be directly after "badguy" not at the start of the next line. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #6 on Sun 25 Jul 2004 11:10 PM (UTC) |
Message
| It should look like this, if you copy the variable:
<variables>
<variable name="target">badguy</variable>
</variables>
Not like this:
<variables>
<variable name="target">badguy
</variable>
</variables>
Notice the difference, of the extra line?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Natasi
(79 posts) Bio
|
Date
| Reply #7 on Sun 25 Jul 2004 11:59 PM (UTC) |
Message
| ohhh, I feel dumb, that fixed it, thanks | Top |
|
Posted by
| Natasi
(79 posts) Bio
|
Date
| Reply #8 on Mon 26 Jul 2004 05:56 AM (UTC) |
Message
| Thanks for the help everyone, but I got one more question....I need to have a line gagged, but it's random each time...such as,
You stare intently at Talinon, opening his mind to the unspeakable visions that spew from the bowels of hell.
Your head spins as your mind is drowned in chaos and confusion.
The second line **Your head spins as your mind is drowned in chaos and confusion.** needs to be gagged somehow, but it's always different...is there a way to set a trigegr off
"unspeakable visions that spew from the bowels of hell." to gag the next line to follow? | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #9 on Mon 26 Jul 2004 06:13 AM (UTC) |
Message
| You stare intently at *, opening his mind to the unspeakable visions that spew from the bowels of hell.
Make it enable another trigger which then disables itself (upon firing) (or add a temporary trigger, either way, itll be send to script) and that trigger matches: ^.*$ (thats a regexp) and have it omit from output.
That will match the next line after your first trigger. (Itll match ANY one line, but since were only allowing it to be turned on after the first one, and then turning it off right away, Itll serve its purpose) |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Natasi
(79 posts) Bio
|
Date
| Reply #10 on Tue 27 Jul 2004 12:15 AM (UTC) |
Message
| That sounds good, but I am so lost in how to do that... | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #11 on Tue 27 Jul 2004 03:33 AM (UTC) Amended on Tue 27 Jul 2004 03:34 AM (UTC) by Flannel
|
Message
| Copy between <triggers> and </triggers> then click "paste" in the trigger dialog.
<triggers>
<trigger
ignore_case="y"
match="^(.*)$"
name="RandomLineTrigger"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>enabletrigger "RandomLineTrigger", 0</send>
</trigger>
<trigger
enabled="y"
ignore_case="y"
keep_evaluating="y"
match="^you stare intently at (.*?)\, opening his mind to the unspeakable visions that spew from the bowels of hell\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>enabletrigger "RandomLineTrigger", 1</send>
</trigger>
</triggers>
|
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #12 on Tue 27 Jul 2004 04:42 PM (UTC) |
Message
| If you want to not only gag but also avoid matching any triggers on the second line, then you might want to set the sequence number for the RandomLineTrigger trigger to 1, instead of 100. Otherwise, there's a very good chance of your affliction triggers still matching on the second line. | Top |
|
Posted by
| Natasi
(79 posts) Bio
|
Date
| Reply #13 on Thu 29 Jul 2004 03:32 AM (UTC) |
Message
| hmmm, here's another one I'm trying to figure out...I'm trying to set a trigger that will enable another trigger to fire once. Like, I'd want this trigger
"Sticky strands entrap * and inhibit their movement"
to activate this trigger for one fire (fire once?)
"You have recovered balance on all limbs"
this second trigger will be sending a command...soooo, if anyone understood what I just said, thanks for any help | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #14 on Thu 29 Jul 2004 06:52 AM (UTC) Amended on Thu 29 Jul 2004 06:53 AM (UTC) by Nick Gammon
|
Message
| You will have two triggers, give them names (labels) like "trigger_a" and "trigger_b". You can probably think of more descriptive ones.
First trigger, labelled trigger_a:
Match: Sticky strands entrap * and inhibit their movement
Send:
world.Send "do something"
world.EnableTrigger "trigger_b", 1
Send to: script
Second trigger, labelled trigger_b:
Match: You have recovered balance on all limbs
Send:
world.Send "do something else"
world.EnableTrigger "trigger_b", 0
Send to: script
The first trigger enables the second, the second disables itself when it fires. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
37,271 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top