[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Capturing Things with Triggers
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Capturing Things with Triggers

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


Posted by UnderStriker   (7 posts)  [Biography] bio
Date Tue 11 May 2004 03:39 PM (UTC)
Message
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...
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Tue 11 May 2004 04:22 PM (UTC)
Message
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> 
[Go to top] top

Posted by Zendu   (66 posts)  [Biography] bio
Date Reply #2 on Tue 11 May 2004 06:10 PM (UTC)
Message
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

God im helpless
Currently using MushClient 3.46 on Win Xp pro on [url=www.aetolia.com]Aetolia[/url]
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #3 on Tue 11 May 2004 06:42 PM (UTC)
Message
Also look at
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3946

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by UnderStriker   (7 posts)  [Biography] bio
Date Reply #4 on Thu 13 May 2004 10:27 AM (UTC)
Message
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....
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #5 on Thu 13 May 2004 03:05 PM (UTC)
Message
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.
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #6 on Thu 13 May 2004 05:21 PM (UTC)
Message
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...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Thu 13 May 2004 09:16 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


6,405 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]