multiple variables in a line

Posted by Natasi on Sun 25 Jul 2004 03:16 AM — 15 posts, 51,336 views.

#0
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
USA #1
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.
#2
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.....
USA #3
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)
#4
<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>
Australia Forum Administrator #5
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.
Australia Forum Administrator #6
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?

#7
ohhh, I feel dumb, that fixed it, thanks
#8
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?
USA #9
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)
#10
That sounds good, but I am so lost in how to do that...
USA #11
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 &quot;RandomLineTrigger&quot;, 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 &quot;RandomLineTrigger&quot;, 1</send>
  </trigger>
</triggers>
Amended on Tue 27 Jul 2004 03:34 AM by Flannel
Russia #12
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.
#13
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
Australia Forum Administrator #14
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.