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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Aardwolf: matching lines to trigger

Aardwolf: matching lines to trigger

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


Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Wed 14 Mar 2012 05:56 PM (UTC)
Message
when using the uncurse at the priestess, this is what i see:


A Benevolent Priestess gratefully accepts your 50 gold offering.
A Benevolent Priestess chants the phrase 'nnaprava cide'.
A Wave runner sword glows blue.


i want to trigger the "* glows blue".
but * glows blue doesn't work, and i have been reading all kinds of help files.
is this a multiline trigger that has to be a regular expression?

then ^*\n*\n* glows blue\.\n\z should be it, but that doesn't work either... :(
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 14 Mar 2012 08:55 PM (UTC)
Message
It helps to post your actual trigger that doesn't work, not just snippets of it.

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #2 on Wed 14 Mar 2012 10:02 PM (UTC)
Message
You are right there, but the trigger is just:


heal uncurse


(it's send to world)

in a certain area i get a load of items that are all cursed. and to type the 'heal uncurse' every time, i want to trigger a 'heal uncurse' every time an item gets uncursed, until all are free of curses.

so to state my original question. how to trigger when there are multiple lines?
the examples aren't helping :(
sorry for the inconvenience.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Wed 14 Mar 2012 11:56 PM (UTC)
Message
Quote:

then ^*\n*\n* glows blue\.\n\z should be it, but that doesn't work either... :(


That trigger I am referring to.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #4 on Thu 15 Mar 2012 02:01 AM (UTC)
Message
sorry i misunderstood.
but that is the whole trigger.
it's just a single stand alone trigger made in the trigger option.
or should i be making a plugin?
[Go to top] top

Posted by Mm1mark   (24 posts)  [Biography] bio
Date Reply #5 on Thu 15 Mar 2012 04:51 AM (UTC)

Amended on Thu 15 Mar 2012 05:04 AM (UTC) by Mm1mark

Message
what he means is what do have inside the trigger?
what do you send to world?
such as.



<triggers>
<trigger
 name="uncurse"
 match="A (.*) glows blue\."
 regexp="y"
 ignore_case="y"
 send_to="12"
 sequence="100"
 >
<send>
Send uncurse %2
end
</send>
</trigger>
</triggers>


ignore the lack of reg exp. using wifes comp.
amended for forum codes
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #6 on Thu 15 Mar 2012 10:49 AM (UTC)
Message


<triggers>
  <trigger
   name="uncurse"
   enabled="y"
   match="^(.*?) glows blue\.$"
   regexp="y"
   sequence="100"
  >
  <send>heal uncurse</send>
  </trigger>
</triggers>

[Go to top] top

Posted by Mm1mark   (24 posts)  [Biography] bio
Date Reply #7 on Thu 15 Mar 2012 07:44 PM (UTC)
Message
I'm not sure about the game you play.
but is * glow's blue. the uncursed portion or the cursed portion.
if there are multiple cursed items how does it know which to do and which order? is heal uncurse what triggers priestess to uncurse or let you know whats cursed? sorry not familiar with the game just trying to figure out the beginning middle and end result.
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #8 on Thu 15 Mar 2012 10:13 PM (UTC)
Message
game is aardwolf, just like it says in the title of the post.

when i get items from a kill or otherwise that are cursed, i can't drop them or remove them.
so then i go to the Benevolent Priestess, en type 'heal uncurse' to get the curse removed.
when the Benevolent Priestess casts her spell and the item gets "uncursed" it glows blue.
like the example in the first post.
but when i have multiple items that need to be uncursed, i want to trigger another 'heal uncurse' after the previous item is uncursed. in other words: when it 'glows blue.'

the thing is, i just type 'heal uncurse' and the game knows which item is cursed. so when there are no cursed items, the spell won't target any of my items, and it fizzles.
and no item will 'glow blue.' so the trigger stops.
[Go to top] top

Posted by Mm1mark   (24 posts)  [Biography] bio
Date Reply #9 on Thu 15 Mar 2012 10:40 PM (UTC)
Message
after relooking at it.
where is the send_to= "" portion?
have you tried putting a "test" phrase in there to see if its matching on your trigger?
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Thu 15 Mar 2012 11:59 PM (UTC)
Message
Jsportive-Thalanvor said:

but that is the whole trigger.


No, it isn't. We went through this in another thread.

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


^^^^^^^^^^^^^
Read it again.

If you are saying a trigger "doesn't work" post your trigger. Then I will see: <triggers> .... </triggers>.

"heal uncurse" is not a trigger. It is two words.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #11 on Fri 16 Mar 2012 02:15 AM (UTC)
Message
read 4 posts back. there i posted my trigger in the way you linked.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Fri 16 Mar 2012 06:31 AM (UTC)
Message
Jsportive-Thalanvor said:

when using the uncurse at the priestess, this is what i see:


A Benevolent Priestess gratefully accepts your 50 gold offering.
A Benevolent Priestess chants the phrase 'nnaprava cide'.
A Wave runner sword glows blue.


i want to trigger the "* glows blue".
but * glows blue doesn't work ...


Right. Well I tried it:


A Benevolent Priestess gratefully accepts your 50 gold offering.
A Benevolent Priestess chants the phrase 'nnaprava cide'.
A Wave runner sword glows blue.
heal uncurse


It triggered. If by "doesn't work" you mean something else can you clarify?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #13 on Fri 16 Mar 2012 09:58 AM (UTC)
Message
that might be something i have no idea of.
since yesterday my vote trigger isn't working either.
i have a trigger that reacts to [*Time To Vote*], which worked for the last 5 days, except yesterday.
[Go to top] top

Posted by Jsportive-Thalanvor   Netherlands  (71 posts)  [Biography] bio
Date Reply #14 on Fri 16 Mar 2012 10:35 PM (UTC)
Message
everything works now. have no idea why :P
but i do thank you for your patience,
and if i find why it didn't work for a while, i'll let you know.
[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.


32,341 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 HostDash]