world.colournote executing after mud returns

Posted by MushclientNewbie on Tue 16 Nov 2004 02:28 AM — 5 posts, 21,133 views.

USA #0
Trigger:
<trigger
   enabled="y"
   match="*has some small wounds and bruises."
   script="OnLook75"
   sequence="100"
  >
  </trigger>
Calls script:
Sub OnLook75 (name, line, wildcards)
   world.ColourTell "#9ACD32", "", " 75-90%"
End sub
Result:
Soandso has some small wounds and bruises.
 75-90%
My problem:
How can I get the colornote to fire before the MUD's newline? I'd like the note to come at the end of the 'condition' line like this:
Soandso has some small wounds and bruises. 75-90%
Amended on Tue 16 Nov 2004 02:38 AM by MushclientNewbie
USA #1
Not with a trigger.

Triggers fire AFTER the newline, so nothing will happen beforehand.

Youre only option is to omit the whole line, and then replace (note, colournote, colourtell, etc) the full line, with the suffix.
USA #2
*nod* Alright. Thanks Flannel.
USA #3
Humm. Is there any way to turn on "Omit from output" in a trigger and then use "Send to: Script"? I've tried it, but it seems like the omit option omits everything. Even notes and colournotes I try to send from the send box. Any thoughts? Will I have to... *gulp* make dozens of subroutenes for another simiar project I'm working on?
Australia Forum Administrator #4
Check out this post:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4912&page=2

A recent change in MUSHclient lets you get the entire line (with style information) in a trigger, if you are using Lua.

Remember you can share the same trigger script between multiple triggers, so the "omit from output" problem shouldn't be too great.