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 ➜ two trigger questions

two trigger questions

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


Posted by SKYY   (28 posts)  Bio
Date Sat 05 Apr 2008 03:26 AM (UTC)
Message
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
Top

Posted by Terry   USA  (87 posts)  Bio
Date Reply #1 on Sat 05 Apr 2008 03:39 AM (UTC)

Amended on Sat 05 Apr 2008 03:42 AM (UTC) by Terry

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

Posted by SKYY   (28 posts)  Bio
Date Reply #2 on Sat 05 Apr 2008 03:45 AM (UTC)
Message
Thanks, terry. Sorry if my post in your thread hasn't helped yet.
Top

Posted by SKYY   (28 posts)  Bio
Date Reply #3 on Sat 05 Apr 2008 07:05 PM (UTC)
Message
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?
Top

Posted by SKYY   (28 posts)  Bio
Date Reply #4 on Sat 05 Apr 2008 07:09 PM (UTC)
Message
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.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 05 Apr 2008 08:42 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #6 on Sat 05 Apr 2008 08:44 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #7 on Sat 05 Apr 2008 08:54 PM (UTC)
Message
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.

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


25,631 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.