Capturing Things with Triggers

Posted by UnderStriker on Tue 11 May 2004 03:39 PM — 8 posts, 36,818 views.

#0
Is there anyway to possibly capture things on a screen, like a tell, it outputs into another window of some sort??

It's kinda annoying missing what gets said in a battle cause it scrolls off the screen too fast :(

If anyone can help me out with this, that'd be great, thanks for your time...
Russia #1
Here's an example plugin for capturing channels and redirecting them to a notepad window. The actual triggers need tweaking obviously, but if you provide your prompt, and examples of tells then that can be done easily.


<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE muclient>
<!-- Saved on Monday, May 10, 2004, 2:15 PM -->
<!-- MuClient version 3.49 -->

<!-- Plugin "ChatGrabber" generated by Plugin Wizard -->

<muclient>
<plugin
   name="ChatGrabber"
   author="Keldar"
   id="ab95212e3cc063f54d26212e"
   language="VBscript"
   purpose="Redirecting channel chat to a separate window"
   date_written="2004-05-10 14:13:17"
   requires="3.42"
   version="1.0"
   >

</plugin>

<!--  Triggers  -->

<triggers>
  <trigger
   keep_evaluating="y"
   match="^[0-9]+h, [0-9]+m \D*?-.*$"
   name="chat_end"
   regexp="y"
   send_to="12"
   sequence="1"
  >
  <send>world.AppendToNotepad &quot;Chat&quot;, vbCRLF
world.EnableTrigger &quot;chat_middle&quot;, 0
world.EnableTrigger &quot;chat_end&quot;, 0</send>
  </trigger>
  <trigger
   match="^(.*)$"
   name="chat_middle"
   omit_from_output="y"
   regexp="y"
   script="ChannelChat"
   sequence="2"
  >
  </trigger>
  <trigger
   enabled="y"
   lines_to_match="2"
   match="^(?:[0-9]+h, [0-9]+m \D*?-|)(\(.*?\)\: [A-Z][a-z]+? (?:say|says), &quot;.*)$"
   name="chat_start"
   omit_from_output="y"
   regexp="y"
   script="ChannelChat"
   sequence="100"
  >
  </trigger>
</triggers>

<!--  Script  -->

<script>
<![CDATA[
option explicit

sub ChannelChat(name, output, wildcs)
   select case name
      case "chat_start"
         world.AppendToNotepad "Chat", wildcs(1) & vbCRLF
         world.EnableTrigger "chat_middle", 1
         world.EnableTrigger "chat_end", 1
      case "chat_middle"
         world.AppendToNotepad "Chat", wildcs(1) & vbCRLF
      case "chat_end"
         world.AppendToNotepad "Chat", vbCRLF
         world.EnableTrigger "chat_middle", 0
         world.EnableTrigger "chat_end", 0
   end select
end sub
]]>
</script>
</muclient> 
#2
You could also color the tells a diffrent color, OR more imporantly, set up a system of gags, do you really need to see your attack messages? you know you hit the button? do you need to see them heal? etc etc
Greece #3
Also look at
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3946
#4
heh, wow.. much more complicated then Zmud...

Might as well go back to using it since its a whole lot easier to deal with....

:(

Mushclient seems to be good for coders, only... Zmuds more for people have no clue how to code....
Russia #5
Not really, Zmud's for simple tasks, while Mushclient is more suited for doing complicated things. It's like archiving a file - the larger the file the higher will be the compression gain achieved on it. With Zmud it's exactly the opposite - small things are small, large things grow exponentially larger until turning into a maze. And that plugin above actually took a total of 3 minutes to put together, since it just involved a few clicks of a mouse and running the Plugin Wizard to package the result.
Greece #6
I think telling people to select file->import->clipboard is better than telling them to go to the respective window and click on the paste button... Just saves time. I was wondering if you could make a new menu item, Nick, File->Import from clipboard, e.g. ctrl+shift+v. So we could tell people copy the entire thing, switch to MUclient, press ctrl+shift+v and it'll work. Also, plugins look very intimidating to newbies, is there a way we could get the forum to implement links? Maybe have an anonymous ftp where people could upload their plugins and then link to them from the forum using just the name, such as [link]MyPlugin.xml[/link] and it would become a link to ftp.mushclient.com/MyPlugin.xml or something... That would make it easier for people to use them...
Australia Forum Administrator #7
Quote:

heh, wow.. much more complicated then Zmud...

Might as well go back to using it since its a whole lot easier to deal with....



The simpler answer is that yes, you can do that with a single trigger.

Match on what you want, eg.

Match: * chats, *
Send: %0
Send to: Notepad (append)

This would send matching lines to a separate window. You can also check "omit from output" if you want it to be omitted from the main window.

I don't think it can get much simpler than that.