[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  multi line trigger problem
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

multi line trigger problem

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Bon   (2 posts)  [Biography] bio
Date Wed 21 Sep 2005 10:48 PM (UTC)
Message
ok so basicly i have been trying to get this multi line trigger to work for liek 3 hours now and i cant get it to work right i dont know what im doing wrong i want to make this

You slide in your probe into A loot bag and feel out the inside.
Bonn: Attempts to probe A loot bag (picks +1, 444.0+14=458.0, 0.0 Target)
*progress*
... Clearly revealing its inner workings. 'pry' is your best option.
and basicly i want all the numbers and "A loot bag" and pry all to be wild cards and when i do that and make my respons pick %2 %11 it dosnt work and i duno what im doing wrong so if any one can help i would apreciate it
[Go to top] top

Posted by David Berthiaume   (202 posts)  [Biography] bio
Date Reply #1 on Thu 22 Sep 2005 08:18 AM (UTC)

Amended on Thu 22 Sep 2005 08:21 AM (UTC) by David Berthiaume

Message
You slide in your probe into A loot bag and feel out the inside.
Bonn: Attempts to probe A loot bag (picks +1, 444.0+14=458.0, 0.0 Target)
*progress*
... Clearly revealing its inner workings. 'pry' is your best option.
Is your exact output? Meaning all those lines pop up at the same exact time?

There is no waiting period or lag between the lines?
[Go to top] top

Posted by Bon   (2 posts)  [Biography] bio
Date Reply #2 on Thu 22 Sep 2005 12:41 PM (UTC)
Message
yes that is what it shows me and all at the same time they show up like i put on diff lines but they all pop up at the same time
[Go to top] top

Posted by David Berthiaume   (202 posts)  [Biography] bio
Date Reply #3 on Fri 23 Sep 2005 12:33 AM (UTC)
Message
It'd be easier to have individual triggers for each line. You can do it as a multi-line trigger, but if you set it up to set variable's instead of trying to do it all in one trigger. then on the last line you can just script the pick @variable1 @variable2

Just a suggestion. But anyays, that's the way I would do it. Making it all one big multiline is not exactly easy to line up all the wildcards.

You wouldn't even need to match on the progress line then.
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #4 on Mon 26 Sep 2005 12:49 PM (UTC)
Message


This should work.


<triggers>
  <trigger
   enabled="y"
   lines_to_match="4"
   match="^You slide in your probe into (.*?) and feel out the inside\.\n[A-Z][a-z]+\: Attempts to probe (.*?) \(picks [+-](\d+), (\d+\.\d+)\+(\d+)=(\d+\.\d+), (\d+\.\d+) Target\)\n\*progress\*\n\.\.\. Clearly revealing its inner workings. '(.*?)' is your best option\.\Z"
   multi_line="y"
   regexp="y"
   sequence="100"
  >
  <send>pick %1 %8</send>
  </trigger>
</triggers>
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


4,450 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]