Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ Copying emote or remote text to chat redirector window plugin

Copying emote or remote text to chat redirector window plugin

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


Pages: 1  2  3 

Posted by Woki   (17 posts)  Bio
Date Reply #30 on Wed 06 May 2015 09:41 AM (UTC)
Message
I'm sorry, I'd honestly thought I'd mentioned it already, that's my fault.

I would like those that you replied were already there.
I would like:

Yes:
(thieves) Nienna's wispy voice comes from the wooden bracelet, saying: Angua is currently on Elm Street.

Yes:
Nienna tells you: Hello, how are you today!

Yes:
You tell Nienna: Very well thank you, I'm out stealing pretty jewellery!

Yes:
Nienna hugs you!

No:
The dark gold moon dragon flicks you with her tongue.
The grey rat bounces around, happily.

No:
Gassy Holmsfirth greets you.

I am getting some side effects, for example, when I look at my inventory, it appears across in my redirect,

You are underburdened (17%) - I do not want to see that.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #31 on Wed 06 May 2015 07:58 PM (UTC)

Amended on Wed 06 May 2015 08:06 PM (UTC) by Nick Gammon

Message
Your "match all" triggers would cause the side-effects. These three match what you said above:


<triggers>
  <trigger
   enabled="y"
   ignore_case="y"
   match="^.+ (greets|tells|asks|exclaims|tells|hugs) you[:!]?.*"
   regexp="y"
   script="chattrigger"
   sequence="60"
  >
  </trigger>
  <trigger
   enabled="y"
   ignore_case="y"
   match="^\((thieves|rogues|newbies)\).*"
   regexp="y"
   script="chattrigger"
   sequence="60"
  >
  </trigger>
  <trigger
   enabled="y"
   ignore_case="y"
   match="^you (newbie-tell|newbiehelpers-tell|tell|ask|exclaim|tell).*"
   regexp="y"
   script="chattrigger"
   sequence="60"
  >
  </trigger>
</triggers>



Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #32 on Thu 07 May 2015 05:57 AM (UTC)
Message
If there is confusion, turn on Trace.

Game Menu -> Trace.

Then you can see what triggers are firing.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Woki   (17 posts)  Bio
Date Reply #33 on Fri 08 May 2015 12:57 AM (UTC)
Message
Thank you I will give that a shot. So there isn't a way to specifically exclude items or names? :(
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #34 on Fri 08 May 2015 08:36 PM (UTC)
Message
If you give me an example then I'll try to demonstrate. So far your examples have been too vague. Your "catch all" regexps (copying ^(.*)$ ) will of course copy everything (like your inventory). So if you use a "catch all" regexp, naturally your inventory will be copied.

My three triggers above (without other catch-all ones) copied all the lines you wanted copied, and not other ones.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Woki   (17 posts)  Bio
Date Reply #35 on Sat 09 May 2015 04:38 PM (UTC)
Message
Fortunately the copy all's are only copying things of a certain text colour. Ok er, for example.

'Your dark gold moon dragon sniffles.'

I'm hoping to have anything the dragon does not copied over. I tried to do (?!dark gold moon dragon).
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #36 on Sat 09 May 2015 08:49 PM (UTC)
Message
OK, well your "copy all" triggers have to be stopped by one of an earlier sequence number that is not set to "keep evaluating". Like this:


<triggers>
  <trigger
   enabled="y"
   match="dark gold moon dragon"
   regexp="y"
   sequence="80"
  >
  </trigger>

  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^(.*?)$"
   match_text_colour="y"
   regexp="y"
   script="chattrigger"
   sequence="100"
   text_colour="13"
  >
  </trigger>
</triggers>



The sequence 80 trigger (which does nothing) stops the trigger evaluating reaching sequence 100 (which copies to the other window). Thus the dragon line is not copied.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


99,539 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

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

Go to topic:           Search the forum


[Go to top] top

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