Trigger Help
Posted by Gasman
on Wed 12 Nov 2003 04:26 AM
— 12 posts, 33,402 views.
hey i wanted to be able to track a mob, go the direction it is, and then track it again. (basically autotracking)
what i have so far is "The * is * from here" and under send i have "%2 (skip line) track %1". this isnt working, so what am i doing wrong, do i need to check any of those boxes, or do any of you have a better way to do it. another thing i would like is depositing money automatically. what i have for this is "you have * gold, *silver" and under send "dep %1 gold (skip line) dep %2 silver" what is wrong here, or what is a different way to do it. thanx a lot guys
How is this not working? Are you making sure to actually send to world as a command, and not as a world note?
Well at the moment i have it " Send to world" is that wrong? and another thing, the only box i have checked is enabled. should i have others? thanx once again
"Send to world" sounds right for what you are doing.
Make sure it triggers, set the "change colour to" to something. If the colour doesn't change it isn't matching.
You need to have an exact match. For instance, is there a trailing space? A trailing dot?
If the MUD sends: "The * is * from here " or "The * is * from here." then it won't match.
Also, is there a prompt? For instance, do you actually see:
<100HP 50M 25MV> The Frog is North from here
In that case, throw in another wildcard at the front, eg.
*The * is * from here
And adjust your wildcard counters accordingly (eg. %2 becomes %3 and so on).
hey it works, but it only works once, as soon as it goes east and tracks again, it doenst do it again. what is the deal with this. and thanx for your help!
Can you copy and paste from the output window (to here) what the MUD is sending? And indicate which line works and which doesn't.
Then also copy and paste the trigger itself - you can copy the whole thing (as XML) by clicking the Copy button on the trigger list.
5055/5055hp 802/802mn 13266tnl 1050ali 1228qp
track thief
The thief is north from here.
north
track thief
5055/5055hp 802/802mn 13266tnl 1050ali 1228qp The South Bridge
You are standing on a small, rickety bridge leading from the Midgaard
City Dump to the much more attractive promenade of the southern parts of
Midgaard. You can smell the stench of the dump to the north, the fresher
air of the promenade seems preferable. Below you are the swift-moving
currents of the Midgaard river.
[Exits: north south]
5055/5055hp 802/802mn 13266tnl 1050ali 1228qp The thief is north from here.
5055/5055hp 802/802mn 13266tnl 1050ali 1228qp
it just sorta stops there after it re=tracks it
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="The * is * from here."
sequence="100"
>
<send>%2
track %1</send>
</trigger>
</triggers>
and one other thing, i have tried checking the keep evaluating, and without checking teh box, neither works. ok thats it. thanx ; - )
You didn't fix the trigger like Nick suggested; it's not matching the second time because the text is prefixed with a prompt, instead of being on its own like on the first line.
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="^(\d+\/\d+hp \d+\/\d+mn \d+tnl \d+ali \d+qp )?The (.*) is (.*) from here\."
sequence="100"
regexp="y"
>
<send>%3
track %2</send>
</trigger>
</triggers>
I think the above will work. You could also have made it something like "*The * is * from here.", but that would respond incorrectly to 'any' line containing that text, including tells, say, etc., which wouldn't be good.
it still isnt evaluating it after it does it once. it will say the mob is east, go east, and track again, but then just stops. here is what it looks like.
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="^(\d+\/\d+hp \d+\/\d+mn \d+tnl \d+ali \d+qp )?The (.*) is (.*) from here\."
regexp="y"
sequence="100"
>
<send>%3
track %2</send>
</trigger>
</triggers>
Well.. There may be more spaces between things on your prompt, etc, which would make it fail. Without seeing the exact text of the prompt (including) correct spacing, I am not sure why it isn't working.