[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]  'grabbing' a single word from the screen to activate a trigger
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

'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] Refresh page


Posted by Samber   (1 post)  [Biography] 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.
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,391 posts)  [Biography] 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
[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.


3,510 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]