|
raymondvinzant Beginner
Joined: 05 Dec 2001 Posts: 10
|
Posted: Mon Mar 21, 2011 7:32 pm
hunt trigger |
This is what I received from the command line.
You are certain that the dirty harpy is east from here.
So I tried to make a trigger.
#trigger {^You are certain that (%w) (%w) (%w) is (%w) from here.}{%4; hunt %3} Hunt
Which doesn't work. part of the problem is the mud returns (the, a, and an) right after that depending on what type of creature it is. In addition, sometimes it is a one word mud and sometimes 2 as in this chase it is a dirty harpy. How do I rewrite this trigger so it automatically hunts the mob, but still allows me to toggle it on and off, so if I hit an aggro mob, I can focus on fighting. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Mar 21, 2011 8:22 pm |
First thing, you don't have to put parentheses around parts that you don't need. Second, you should not use %2 as a command. Use #SEND to send the command to the mud instead.
Assuming that the target is always the last word before "is", the simplest pattern would be:
#trigger {^You are certain that * (%w) is (%w) from here.}{#SEND %2; hunt %1} Hunt
If that does not work, you'll have to give some examples of cases where it doesn't work. |
|
|
|
raymondvinzant Beginner
Joined: 05 Dec 2001 Posts: 10
|
Posted: Mon Mar 21, 2011 8:25 pm |
It tells me that there is an error in parsing, I copied it and pasted it directly into the command line.
|
|
|
|
raymondvinzant Beginner
Joined: 05 Dec 2001 Posts: 10
|
Posted: Mon Mar 21, 2011 8:26 pm |
It says illegal token {#send %2
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Mar 21, 2011 8:29 pm |
that's not where the problem actually is. The problem is the lack of space between the closing and opening curly braces that separate the pattern from the executed code.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
raymondvinzant Beginner
Joined: 05 Dec 2001 Posts: 10
|
Posted: Mon Mar 21, 2011 8:32 pm |
removed them still same message, error in parsing : illegal token {#send %2
|
|
|
|
DraxDrax Apprentice
Joined: 22 Mar 2009 Posts: 149
|
Posted: Mon Mar 21, 2011 9:09 pm |
Try:
#TRIGGER {^You are certain that * (%w) is (%w) from here.} {#SEND %2;hunt %1} Hunt |
|
|
|
raymondvinzant Beginner
Joined: 05 Dec 2001 Posts: 10
|
Posted: Mon Mar 21, 2011 9:15 pm |
That worked
|
|
|
|
|
|