two trigger questions

Posted by SKYY on Sat 05 Apr 2008 03:26 AM — 8 posts, 35,175 views.

#0
1) How do I make a trigger that functions upon the input:

* DISARMS you! (in the color green)

Unfortunately, setting the trigger color to "green" via the trigger's menu only works for dark green. This menu is missing 8 other colors--perhaps this is a bug?

2) How do I make a trigger that functions upon connection to a world?

I've tried matching "Enter your character's name, or type new:", but it doesn't work.

Here's a screencap:

[URL=http://s2.supload.com/free/t4w3q5ur98s0afu903u45903qu90.png/view/][IMG]http://s2.supload.com/thumbs/default/t4w3q5ur98s0afu903u45903qu90.png[/IMG][/URL]
[URL=http://www.supload.com]Image hosting[/URL]

Bleh...nick, you need to make your home-brew forum software recognize URL/IMG tags. :D
USA #1
I can't really help you with the second question, because I can't see the image; it's too small. But, about the first question, hit 'Alt+6', and click the green that is under the "Bold" column. It'll give the name of the color you're looking for. Assuming you haven't changed around the colors, which is probably the case since you are asking in the first place :P, use "lime" instead of "green".


If you've made a custom color as your bold, I really dunno what to say... I don't think you can use RGB or HSL formats, though the ID it shows you might work...
Amended on Sat 05 Apr 2008 03:42 AM by Terry
#2
Thanks, terry. Sorry if my post in your thread hasn't helped yet.
#3
http://s2.supload.com/free/t4w3q5ur98s0afu903u45903qu90.png/view/

Copy/paste that to a browser...it shows the text.

I'm sure I can make a trigger to match that line, however, no trigger seems to be able to successfully catch it. Perhaps it's because this screen is a login screen? How can I capture stuff from a login screen, if that's the case?
#4
And concerning the color trigger--the problem seems to be that you can only select 8 colors in the drop-down menu for the trigger GUI interface. 'Green' is there, but 'lime' is not.
Australia Forum Administrator #5
Let's see exactly what the colour is first. Select it in the output window and go to Display menu -> Text Attributes.

I think you will find lime will show up with the bold checkbox checked (see lower part).

That means you have to match on Green but check the Bold box as well. That effectively will be Lime.
Australia Forum Administrator #6
Quote:

Perhaps it's because this screen is a login screen? How can I capture stuff from a login screen, if that's the case?


See http://mushclient.com/faq point 11. Triggers fire upon getting a newline.
Australia Forum Administrator #7
If you add this plugin it will add a newline to that specific prompt:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Add_NewLine_To_Login"
   author="Nick Gammon"
   id="5bcbb63dd485a1890e1ff1df"
   language="Lua"
   purpose="Forces a newline after a login prompt"
   date_written="2008-04-06 07:50:00"
   requires="3.82"
   version="1.0"
   >

</plugin>

<!--  Script  -->

<script>
function OnPluginPacketReceived (s)
  return (string.gsub (s, "\n\r\n\rEnter your character's name, or type new: $", "%1\n"))
end -- function OnPluginPacketReceived
</script>

</muclient>


I did a "debug packets" to see the exact prompt, including the fact that it was preceded by two lots of \n \r, to try to avoid false firing.

On an exact match of that, it adds a newline, so now your trigger will fire.