I've tried creating a trigger to order followers to bash when something bumps into a wall, then turn off, but i cant seem to get either one to fire:
^(A|An) (.+) bumps into a massive wall of iron...
send("order followers bash " .. matches[3])
disableTrigger("Wall Bump")
I also tried:
^Oof! a (\w+) bumps into a massive wall of iron...
send("order followers bash " .. matches[2])
disableTrigger("Wall Bump")
Trigger and wilcard questions
Re: Trigger and wilcard questions
You've set the trigger types to 'perl regex' yes?
Re: Trigger and wilcard questions
Ya I had it as perl regex! I had to deconstruct everything and retry it and it worked. Thanks!
Re: Trigger and wilcard questions
Glad you got it sorted out in the end =)
Re: Trigger and wilcard questions
Thanks for taking the time to answer!
I do have one i can't figure out.
Trigger( from zmud) would be:
A %1 has set off your frost beacon at %2
An %1 has set off your frost beacon at %2
Response: say %1 tripped beacon at %2
I do have one i can't figure out.
Trigger( from zmud) would be:
A %1 has set off your frost beacon at %2
An %1 has set off your frost beacon at %2
Response: say %1 tripped beacon at %2
Re: Trigger and wilcard questions
pattern would be
(?:A|An) (.+) has set off your frost beacon at (.+)
and code would be
send("say " .. matches[2] .. " tripped beacon at " .. matches[3])
(?:A|An) (.+) has set off your frost beacon at (.+)
and code would be
send("say " .. matches[2] .. " tripped beacon at " .. matches[3])
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Trigger and wilcard questions
Could that not be made even simpler as:
An? (.+) has set off your frost beacon at (.+)
Also - you might want to watch out for terminal punctuation - the matches[3] will - as it is written - also include a full stop if the MUD puts one on the end of the sentence, if it always does that then you can use:
An? (.+) has set off your frost beacon at (.+)\.
to exclude it (the '\' converts that last '.' to be a full-stop and not a match any single character) - and with it being outside of the '(' ... ')' it will not be included in matches[3]...
An? (.+) has set off your frost beacon at (.+)
Also - you might want to watch out for terminal punctuation - the matches[3] will - as it is written - also include a full stop if the MUD puts one on the end of the sentence, if it always does that then you can use:
An? (.+) has set off your frost beacon at (.+)\.
to exclude it (the '\' converts that last '.' to be a full-stop and not a match any single character) - and with it being outside of the '(' ... ')' it will not be included in matches[3]...