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

Posted by Samber on Wed 05 May 2004 11:07 AM — 3 posts, 16,737 views.

#0
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.
Russia #1
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.
Amended on Wed 05 May 2004 12:31 PM by Ked
Australia Forum Administrator #2
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>