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 ➜ General ➜ 'grabbing' a single word from the screen to activate a trigger

'grabbing' a single word from the screen to activate a trigger

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


Posted by Samber   (1 post)  Bio
Date Wed 05 May 2004 11:07 AM (UTC)
Message
I use the discworld mud. i would like to be able to pick out a single word from the text appearing on screen and then repeat that word in a different colour to make it stand out to me.
in this particular case it is when portalling. the text on screen always says "a wire mesh/oak/crystal/stone door appears" or it says "a piece of fur appears". this would allow me to identify the type of door faster and then start typing "open xxxxx door"
it would be even better if i could set a trigger that looks to see what type of door it is and then 1, checks to see if it is burning. 2, if not open it. 3, check to see if it is rumbling,( a message "a rumbling sound"etc etc is displayed) if not. 4, shove the door/fur. 5, enter the door.
Top

Posted by Ked   Russia  (524 posts)  Bio
Date Reply #1 on Wed 05 May 2004 12:29 PM (UTC)

Amended on Wed 05 May 2004 12:31 PM (UTC) by Ked

Message
The easiest way to do it would probably be to replace the entire line with custom text. Here are the triggers to replace your lines with corresponding text in yellow against the same background:


<triggers>
<trigger
  enabled="y"
  name="portal_notice"
  match="a (wire mesh/oak/crystal/stone door|piece of fur) appears"
  regexp="y"
  keep_evaluating="y"
  send_to="12"
  sequence="99"
><send>world.ColourNote &quot;yellow&quot;, &quot;&quot;, &quot;%1&quot;</send>
</trigger>
<trigger
  enabled="y"
  name="protal_omit"
  match="a (?:wire mesh/oak/crystal/stone door|piece of fur) appears"
  regexp="y"
  sequence="100"
  omit_from_output_="y"
></trigger>
</triggers>


This requires you to have scripting enabled and Vbscript as a scripting language. In order to make it do those 1-5 tasks you'd need to provide a little more detail.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 06 May 2004 10:10 PM (UTC)
Message
Another approach is to leave the original line where it is and just add another line to warn you. Like this:


<triggers>
  <trigger
   enabled="y"
   match="a piece of fur appears"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>ColourTell "red", "black", "-----------------&gt;"
ColourTell "white", "red", "FUR PORTAL"
ColourNote "red", "black", "&lt;-----------------"
</send>
  </trigger>
</triggers>


- 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.


13,095 views.

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.