[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]  Miniwindows
. . -> [Subject]  Mini-window for public chatter
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Mini-window for public chatter

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


Pages: 1  2  3 4  5  6  7  8  9  

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #30 on Sun 02 Jan 2011 09:30 PM (UTC)
Message
Chyort said:

Apparently, the plugin managed to omit the commands being sent by my standard triggers. (Kind of surprised by that interaction between a stand alone plugin, and standard triggers)


That behaviour of omitting from output also omitting other stuff should have been fixed in version 4.54 onwards.

http://www.gammon.com.au/scripts/showrelnote.php?version=4.54&productid=0

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Chyort   USA  (57 posts)  [Biography] bio
Date Reply #31 on Mon 03 Jan 2011 07:38 AM (UTC)

Amended on Mon 03 Jan 2011 08:16 AM (UTC) by Chyort

Message
I'm using Version 4.61... So your guess is as good as mine.

Edit
i managed to repeat it using a dirt simple plugin and matching world trigger. Here they are...


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Monday, January 03, 2011, 1:00 AM -->
<!-- MuClient version 4.61 -->

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

<muclient>
<plugin
   name="Test"
   author="Chyort"
   id="15e86600d1df02b666794e90"
   language="Lua"
   save_state="y"
   date_written="2011-01-03 00:59:13"
   requires="4.61"
   version="1.0"
   >

</plugin>


<!--  Triggers  -->

<triggers>
  <trigger
   enabled="y"
   match="You say 'test'"
   omit_from_output="y"
   sequence="100"
  >
  </trigger>
</triggers>

</muclient>


and


<triggers>
  <trigger
   enabled="y"
   match="You say 'test'"
   sequence="100"
  >
  <send>say test2</send>
  </trigger>
</triggers>



Not using world.note or any other notes like described in your release notes...

with Just the world trigger i get this

<49/49hp 91/91m 110/110mv> <Type HELP START>
say test
You say 'test'
say test2

<49/49hp 91/91m 110/110mv> <Type HELP START>You say 'test2'


With the plugin as well i get this instead


<49/49hp 91/91m 110/110mv> <Type HELP START>
say test

<49/49hp 91/91m 110/110mv> <Type HELP START>You say 'test2'


[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #32 on Mon 03 Jan 2011 10:44 PM (UTC)
Message
First of all, major compliments on making such a detailed bug report, that describes the problem exactly, and shows how to reproduce it.

As soon as I saw your detailed description I guessed what the problem was, and looking at the code confirmed it.

The change made in 4.54 addressed the problem of notes being omitted if they were made during an "omit from output" trigger. I overlooked that you might send a command (as you did).

A very minor change to the code preserves player commands as well as notes (this will be in version 4.72).

However there is one small problem. It actually preserves the lines which were previously omitted, waits until the omitting is done, then puts them back. However the mouse-over which pops up an "information box" will now show the line as a note line and not a player input line. I don't think this is going to be a major issue (after all, previously the lines were omitted completely and no-one complained) but it is worth knowing it happens.

I could store an extra flag to note the type of line, but this is likely to add to memory consumption in general for probably very little return.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Qyxquotl   (2 posts)  [Biography] bio
Date Reply #33 on Tue 04 Jan 2011 11:37 AM (UTC)
Message
I am using this plugin in Achaea and it captures fine, although it only ever displays text in the foreground colour. Some of my channels I use background colours on, but it isn't displaying them with that.

Any thoughts/suggestions?

Also is there way to change the colour the timestamp displays in? I prefer a uniform colour for all timestamps and the current method in the plugin injects the timestamp in the same colour as the foreground of the text.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #34 on Tue 04 Jan 2011 08:46 PM (UTC)

Amended on Tue 04 Jan 2011 08:47 PM (UTC) by Nick Gammon

Message
In the middle of the plugin, try changing:


-- display one line
function Display_Line (line, styles, backfill)
    local left = TEXT_INSET
    if (backfill) then
        WindowRectOp(Win, miniwin.rect_fill, 1, theme.TITLE_HEIGHT+(line*line_height)+1, WINDOW_WIDTH-SCROLL_BAR_WIDTH, theme.TITLE_HEIGHT+(line*line_height)+line_height+1, ColourNameToRGB("#333333"))
    end -- backfill
    if (styles) then
        for _, v in ipairs (styles) do
            left = left + WindowText (Win, "bodyfont"..Win, v.text, left, theme.TITLE_HEIGHT+(line*line_height), 0, 0, v.textcolour)
        end -- for each style run
    end -- if
    Redraw()
end -- function Display_Line


to:


-- display one line
function Display_Line (line, styles)
 
  local left    = TEXT_INSET
  local top     = theme.TITLE_HEIGHT + (line * line_height) + 1
  local bottom  = top + line_height
  local font    = "bodyfont" .. Win

  if backfill then
      WindowRectOp (Win, miniwin.rect_fill, 1, top, WINDOW_WIDTH - SCROLL_BAR_WIDTH, bottom, ColourNameToRGB("#333333"))
  end -- backfill
  
  if styles then
    for _, style in ipairs (styles) do
      local width = WindowTextWidth (Win, font, style.text) -- get width of text
      local right = left + width
      WindowRectOp (Win, miniwin.rect_fill, left, top, right, bottom, style.backcolour)  -- draw background
      WindowText (Win, font, style.text, left, top, 0, 0, style.textcolour)  -- draw text
      left = left + width  -- advance horizontally
    end -- for each style run        
  end -- if  styles
  Redraw()
  
end -- Display_Line




As for the timestamp colour, try changing:


    -- inject timestamp if wanted
    if timestamp then
        tstamp = os.date (date_format)
        styles[1].text = tstamp..styles[1].text
        styles[1].length = styles[1].length+string.len(tstamp)
    end -- if


to:


    -- inject timestamp if wanted
    if timestamp then
        local tstamp = os.date (date_format)
        table.insert (styles, 1, {
          text = tstamp,
          textcolour  = ColourNameToRGB ("white"),
          backcolour = ColourNameToRGB ("black"),
          length = string.len (tstamp),
          style = 0,
        } )
    end -- if


This adds a new style at the start of the line with the timestamp in whatever colours you specify.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #35 on Tue 04 Jan 2011 08:57 PM (UTC)
Message
Now modified the posting on page 1 of this thread to have the amended features discussed above.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Qyxquotl   (2 posts)  [Biography] bio
Date Reply #36 on Tue 04 Jan 2011 11:46 PM (UTC)
Message
Works great, thanks!

Your copy on page 1 though needs all the '\]' and '\[' fixed though.
[Go to top] top

Posted by BlueEyes   (28 posts)  [Biography] bio
Date Reply #37 on Wed 05 Jan 2011 12:03 AM (UTC)
Message
I'm trying to start coding again since I've actually found enough time to start doing it again. I am now looking at how other people have done Plugins, Scripts, and etc..

I'm having a problem with this Plugin though, could be some minor /[ or some such problem but here is what I am getting

[WARNING] C:\Program Files (x86)\MUSHclient\worlds\plugins\ChatMiniwindow.xml
Line   34: Attribute name must start with letter or underscore, but starts with "[" (Cannot load)
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #38 on Wed 05 Jan 2011 12:10 AM (UTC)
Message
Yeah, Nick seems to have accidentally left the [b][/b] forum bold tags in his post unescaped, so when you copied the plugin you got those too.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #39 on Wed 05 Jan 2011 12:27 AM (UTC)
Message
Sorry about that, fixed up on page 1 now.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #40 on Fri 04 Mar 2011 09:24 AM (UTC)
Message
For those intrepid adventurers from MUDs other than Aardwolf, I figured I'd re-re-re-announce that I've developed the channel capture plugin significantly since Nick made those conversion mods earlier in the thread. It now uses GMCP (sorry about that) and has a bunch of new features like logging to a file and allowing for arbitrary text selection (and therefore copying) inside the window. The new version probably requires way more modification to work with other MUDs, but I think that the new features (especially that last one) are really worth it.

https://aardwolfclientpackage.googlecode.com/svn/trunk/MUSHclient/worlds/plugins/aard_channels_fiendish.xml

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by CarpeMofo   (8 posts)  [Biography] bio
Date Reply #41 on Fri 18 Mar 2011 11:03 AM (UTC)
Message
Alright, I would like a miniwindow something like this to capture pages and channel chatter, example of the text are:

[Public] Com Title Bob says, "Testing" (Public would need to be a wildcard as there are several channels)

and pages come in one of two formats, normal talking:

John pages: testing
You paged Bob with 'testing'

and then page poses

From afar, Bob testing
Long distance to Bob: John testing

I want to have all this in a window with a width of 80 characters and a height of 50 characters justified to the top left of the screen. I would want the window to have a black background with standard silver text in a 9pt fixedsys font, however, I would also want for any ansi colors the game sends to show up in the window as well. And preferably no scroll bar or anything. Also, some kind option when I can choose if I want the text sent to the main window as well. Would this be terribly complicated?

Any help with this would be greatly appreciated.
[Go to top] top

Posted by CarpeMofo   (8 posts)  [Biography] bio
Date Reply #42 on Fri 18 Mar 2011 11:13 AM (UTC)
Message
Justified to the top right not to the top left. Sorry... Slightly dyslexic.
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #43 on Fri 18 Mar 2011 07:59 PM (UTC)
Message
Quote:
I want to have all this in a window with a width of 80 characters and a height of 50 characters justified to the top left of the screen. I would want the window to have a black background with standard silver text in a 9pt fixedsys font, however, I would also want for any ansi colors the game sends to show up in the window as well. And preferably no scroll bar or anything.

Do you mind if I ask why you want the user interface to be locked down like that? No scrolling, moving, or resizing seems like a giant step backward for usability.

If you're absolutely certain you want to have those limitations, you should perhaps look at another thread on the subject like maybe...
Template:post=10515 Please see the forum thread: http://gammon.com.au/forum/?id=10515.



https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by CarpeMofo   (8 posts)  [Biography] bio
Date Reply #44 on Fri 18 Mar 2011 11:06 PM (UTC)
Message
Well, I was thinking it would look like a column setup. With my widescreen monitor, I could have a column for RP, room desc's and so on. Then a column for pages and channel chat. It's a matter of trying to keep the whole world window uncluttered with stuff I really don't need; like the scroll bar and such.
[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.


105,034 views.

This is page 3, subject is 9 pages long:  [Previous page]  1  2  3 4  5  6  7  8  9  [Next page]

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]