I have an alias

Posted by Warbit on Thu 25 Aug 2011 07:07 AM — 4 posts, 17,605 views.

USA #0
<aliases>
<alias
match="t *"
enabled="y"
sequence="100"
>
<send>track %1</send>
</alias>
</aliases>


It send allows me to track a creature. Without sending me to FAQ, I been there before asking.

How do I

turn %1 into a variable (trackie) to be used by triggers.

Then how do I get this trigger.

<triggers>
<trigger
enabled="y"
match="Tracks to * lead *ward."
sequence="100"
>
<send>%2

track %1
</send>
</trigger>
</triggers>


to use that variable (trackie)




What happens in game is I type
t alchemist
It outputs
track alchemist
Tracks to Tisa the alchemist lead southward.
south

track Tisa the alchemist
Who?
It replaces my word alchemist with Tisa the alchemist

Amended on Thu 25 Aug 2011 07:16 AM by Warbit
Australia Forum Administrator #1
Did you watch this video?

http://www.gammon.com.au/forum/?id=9616

Anyway, this shows how to track someone and remember their name:


<aliases>
  <alias
   match="t *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>Send ("track %1")
SetVariable ( "trackie", "%1")</send>
  </alias>
</aliases>


Look at the video for more information.
USA #2
Downloaded all 6 of your youtube videos from search. Mushclient+LUA+Variables.

But truthfully haven't watched them just yet. But definitely plan on it.

Just got my connection speed back up today.

Hey thanks for answer and will try it out now. And thanks for response.
USA #3
Love the video Nick !!!
It got me up and running perfectly.

Thank you so much for making it!!!
Whooo Hooo !!!

Ahh Here is the finished code for those who want it.


<aliases>
<alias
match="t *"
enabled="y"
variable="trackie"
send_to="12"
sequence="100"
>
<send>SetVariable("trackie","%1")
Send("track %1")</send>
</alias>
</aliases>

The above is for the alias

The below is for the trigger

<triggers>
<trigger
enabled="y"
expand_variables="y"
match="Tracks to * lead *ward."
sequence="100"
>
<send>%2
track @trackie</send>
</trigger>
</triggers>


Works for perfectly!!!