Official CLOK Mushclient Plugin

Discussion of different MUD clients, plugins, etc. as well as technical help.
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

I was going to make an easy option to turn off the sounds but I thought to myself "it only happens when someone logs on or off so it won't bother anybody". lol Oh well.

Ok that means you have two ways to get rid of the sounds.

#1 You can delete the sounds folder under the MUSHclient directory. If you do this the system will still make a "beep" sound when someone logs on or off. Maybe that will be less annoying for you?

#2 To get rid of ALL sounds from the plugins forever and ever you will need to do a little editing to the plugin. Go to the mushclient menu FILE --> PLUGINS --> click on chat_redirector --> click edit --> close the plugin menu box --> search the text for anything that says sound="sounds\hooray.wav" or sound="sounds\booo.wav" and delete those. Alternatively, you can open the plugin file directly with notepad in (C:\Program Files\MUSHclient\worlds\plugins\CLOK\Chat_Redirector_Version_2.xml) and delete those lines that way.
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

Thanks to Rias the compass plugin now updates when you change rooms (so you can navigate via compass without a delay in the update) This also reduced the amount of info being sent to the plugins every second so those with slow connections will also notice an improvement in plugin stability.
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

Merry Christmas CLOK! .. or Kwanza or Hanukkah or whatever.

I bring to you the latest version of the custom mushclient. With many bug fixes and a few new improvements.

Download here:
http://wiki.contrarium.net/images/0/0e/Pluginator_ver3.zip

Changes:
- Updated MUSHclient to version 4.84.
- No more sounds (Nobody liked um so they went bye bye.)
- Say commands now use a better matching pattern. (So whisper, ask or exclaim away!)
- Esp has been updated to match the new format.
- You can now use a "/" to login. ex. /login Jaren tacos (And no that is not my real password.)
- The chat plugin now has two options. Type PLUGIN ECHO to have chat shown on both windows or PLUGIN NOECHO for chat to just show in the chat window.
- The miniwindows can now be moved and positioned to where -you- would like them. Just click and drag. However, the main status window will be tricky to move unless you shut it down temporarily. To do that type PLUGINSTATS 0 and to turn back on PLUGINSTATS 2
- I changed the way the windows looked. I changed them from a stark white bland border to a soothing blue gradient scheme.

Here's a pic

Image

Download here:
http://wiki.contrarium.net/images/0/0e/Pluginator_ver3.zip
Last edited by Jaren on Sat Dec 15, 2012 7:11 am, edited 1 time in total.
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
Alexander
Member
Posts: 298
Joined: Mon Oct 03, 2011 8:17 pm

Post by Alexander »

Excellent improvements, Jaren. Thank you.
(Alexander clenches a fist momentarily, then stops and calms himself with visible effort.)
[FROM Eira (OOC)]: LET IT OUT, MAN!
User avatar
Avedri
Member
Posts: 294
Joined: Sat Mar 17, 2012 2:49 am

Post by Avedri »

Thank you for working on this.
ANNOUNCEMENT: Octavia can sass sassy things now.

[CHAT - Kent the Shade Shatterer]: what do you mean, now?

[CHAT - Matilda]: Is that implying she couldn't before?
User avatar
hadesfire
Member
Posts: 205
Joined: Sat Aug 11, 2012 5:25 pm

Post by hadesfire »

This is some really awesome stuff, but I was wondering if you could post some tutorials or something on how to make windows, i'd like to make an effects window.
User avatar
Xzean
Member
Posts: 134
Joined: Mon Jul 09, 2012 9:09 pm
Location: Atlanta, GA

Post by Xzean »

Oh ye gods, all my aliases. Is there any way to get them back?
"The effort to understand the universe is one of the very few things that lifts human life a little above the level of farce, and gives it some of the grace of tragedy." `Steven Weinburg
User avatar
Lemuel
Member
Posts: 312
Joined: Fri Aug 03, 2012 9:13 am

Post by Lemuel »

[quote=Xzean]all my aliases. Is there any way to get them back?[/quote]

You can import aliases from a your previous file.
- locksmith Lemuel 'I do all my own stunts.'

Helpful tips, commands, and hints for new CLOKers: viewtopic.php?f=6&t=2367&p=12822#p12822
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

I have considered making an 'effects' window and a 'Also here:' window showing all the npcs in a room but both of those suffer from the same two problems. First is word wrap. If you notice these plugins are not designed to take a long sentence and if one did appear it would just push out past the screen into oblivion or cover the entire screen. In the past, I have seen 'effects' and 'Also here' grow to monumental sizes so that would be a problem. Also, I have experimented with word wrap in a mini window in the past.. it didn't work out. The second issue is clutter. I try not to overwhelm you with too much information and the screen is only so big which means I can only fit so much on there.

If you still want a tutorial I believe I posted one earlier for Lemuel here. Also, all of my plugins are open source and ready to read. Just open the plugins menu and click 'edit' on the one you want to view. The only part you can't see is the code on the server that Rias was kind enough to set up for me. What that does is send the update prompt (for the status window) to your client every second.
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
hadesfire
Member
Posts: 205
Joined: Sat Aug 11, 2012 5:25 pm

Post by hadesfire »

Thanks, Jaren
User avatar
hadesfire
Member
Posts: 205
Joined: Sat Aug 11, 2012 5:25 pm

Post by hadesfire »

I did exactly as the guy said but changed Inventory to Herbs (I decided I wanted a herb screen). When I tested the alias, I got this error:

[string "Alias: "]:25: '=' expected near 'end'

I tried several ways to fix it but nothing worked, any hints?
require "wait"

wait.make (function ()

local win = GetPluginID () -- ":herbs"
local font = "F"

if not WindowInfo (win, 1) then
WindowCreate (win, 0, 0, 0, 0, 6, 0, 0)
WindowFont (win, font, "lucida Console", 9)
end -- if

-- request herbs

send "herbs"


-- wait for herbs to start

local x = wait.match ("Herbs:", 10)

if not x then
ColourNote ("white", "blue", "no Herbs recieved within 10 seconds")
Return
end -- if


local Herbs = {}
local max_width = WindowTextWidth (win, font, "Herbs")

while true do
local line, wildcards, styles = wait.match ("*")

if not string.match (line, "~ ") then
break
end -- if

-- save herbs line
table.insert (herbs, styles)
-- work out max width
max_width = math.max (max_width, WindowTextWidth (win, font, line))

end - while loop

local font_height = WindowFontInfo (win, font, 1)

local window_width = max_width + 10
local window_height = font_height = (#herbs + 2) = 10

-- make window correct size

WindowCreate (win, 0, 0, window_width, window_height, 6, 0, ColournameToRGB "#373737")
WindowRectOp (win, 5, 0, 0, 0, 0, 5, 15 + 0x1000

-- heading line

WindowText (win, font, "Herbs", 5, 5, 0, 0, ColourNoteToRGB

-- draw each herb line

local y = font_height = 2 + 5

for i, styles in ipairs (inv) do

local x = 5
for _, style in ipairs (styles) do
x = x + WindowText (win, font, styles.text, x, y, 0, 0, style.textcolour)
end -- for
y = y +font_height

end -- for each Herb item

WindowShow (win, true)


end)
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

I went through and fixed all the minor syntax errors and misspells. It was things like forgetting to place a parenthesis or misspelling ColourNameToRGB as ColourNoteToRGB. Or checking capitalization ColournameToRGB is not the same as ColourNameToRGB. Or adding something when you should of been multiplying.

There is also a problem in the matching logic. (I'll get to that in a bit.)

Here is the original code with all the syntax errors fixed:

Code: Select all

require "wait"

wait.make (function ()

local win = GetPluginID () .. ":herbs"
local font = "f"

if not WindowInfo (win, 1) then
  WindowCreate (win, 0, 0, 0, 0, 4, 0, 0)
  WindowFont (win, font, "lucida Console", 9)
end -- if

    -- request herbs

Send "herbs"

    -- wait for herbs to start

local x = wait.match ("You have the following herbs on you:", 10)

if not x then
  ColourNote ("white", "blue", "no Herbs recieved within 10 seconds")
  return
end -- if

local herbs = {}
local max_width = WindowTextWidth (win, font, "Herbs")

while true do
  local line, wildcards, styles = wait.match ("*")

  if not string.match (line, "^   *") or not string.match (line, "^$")then
    break
  end -- if

      -- save herbs line
  table.insert (herbs, styles)
      -- work out max width
  max_width = math.max (max_width, WindowTextWidth (win, font, line))

end -- while loop

local font_height = WindowFontInfo (win, font, 1)

local window_width = max_width + 10
local window_height = font_height * (#herbs + 2) + 10

    -- make window correct size

WindowCreate (win, 0, 0, window_width, window_height, 4, 0, ColourNameToRGB "#373737")
WindowRectOp (win, 5, 0, 0, 0, 0, 5, 15 + 0x1000)

    -- heading line

WindowText (win, font, "Herbs", 5, 5, 0, 0, ColourNameToRGB "yellow")

    -- draw each herb line

local y = font_height * 2 + 5

for i, styles in ipairs (herbs) do

  local x = 5
  for _, style in ipairs (styles) do
    x = x + WindowText (win, font, styles.text, x, y, 0, 0, style.textcolour)
  end -- for
  y = y + font_height

end -- for each Herb item

WindowShow (win, true)

end)
Now here is the new code with the logic reworked. To add this to your client you will need to install the plugin here. Notice the changes and how I have it omitting certain information. In order to trim it up nicely I also created some triggers to go with it.

Code: Select all

<muclient>
<plugin
   name="Hadesherbs"
   author="Jaren Nick Gammon"
   id="d0e6c964fcf869d6b89cb703"
   language="Lua"
   purpose="Herb window"
   date_written="2012-12-16 22:04:37"
   requires="4.73"
   version="1.0"
   >

</plugin>


<!--  Get our standard constants -->

<include name="constants.lua"/>

<!--  Triggers  -->

<triggers>
  <trigger
   group="hadesherbs"
   match="^$"
   name="blanklinehades"
   omit_from_output="y"
   regexp="y"
   send_to="12"
   sequence="99"
  >
  <send>EnableTrigger ("blanklinehades", false)</send>
  </trigger>
  <trigger
   enabled="y"
   group="hadesherbs"
   lines_to_match="2"
   keep_evaluating="y"
   match="\[Roll Result\: (.*?)\]\nYou forage around for a bit and (.*?)\Z"
   multi_line="y"
   regexp="y"
   send_to="10"
   sequence="100"
  >
  <send>herby3</send>
  </trigger>
  <trigger
   enabled="y"
   group="hadesherbs"
   match="^You have the following herbs on you\:$"
   omit_from_output="y"
   regexp="y"
   send_to="12"
   sequence="99"
  >
  <send>EnableTrigger ("blanklinehades", true)</send>
  </trigger>
</triggers>

<!--  Aliases  -->

<aliases>
  <alias
   match="^herby3$"
   enabled="y"
   group="hadesherb"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>require "wait"

wait.make (function ()  -- coroutine starts here


local wins = GetPluginID () .. ":hadesherb"
local font = "j"

if not WindowInfo (wins, 1) then
  WindowCreate (wins, 0, 0, 0, 0, 4, 0, 0)
  WindowFont (wins, font, "Lucida Console", 6)  
end -- if

-- request inventory

SendNoEcho ("herbs")  -- this mud uses info to get the status

-- wait for status screen to start


local line, wildcard, styles = wait.match ("   some *", 10, trigger_flag.OmitFromOutput)

if not line then
  return
end -- if

local inv = {}
local max_width = WindowTextWidth (wins, font, "Herbs")

-- loop until end of status

while true do
  -- save status line
  table.insert (inv, styles)
  -- work out max width
  max_width = math.max (max_width, WindowTextWidth (wins, font, line))

  line, wildcards, styles = wait.match ("*", 10, trigger_flag.OmitFromOutput)

  -- see if end of status

  if not string.match (line, "^   *") then
    break
  end -- if

end -- while loop

local font_height = WindowFontInfo (wins, font, 1)

local window_width = max_width + 10
local window_height = font_height * (#inv + 2) + 10

-- make window correct size

WindowCreate (wins, 0, 0, window_width, window_height, 4, 0, ColourNameToRGB "black")
WindowRectOp (wins, 5, 0, 0, 0, 0, 5, 15 + 0x1000)

-- heading line

WindowText (wins, font, "Herbs", 5, 5, 0, 0, ColourNameToRGB  "dodgerblue")

-- draw each status line

local y = font_height * 2 + 5

for i, styles in ipairs (inv) do

  local x = 5
  for _, style in ipairs (styles) do
    x = x + WindowText (wins, font, style.text, x, y, 0, 0, style.textcolour)
  end -- for
  y = y + font_height

end -- for each status item

WindowShow (wins, true)


end)   -- end of coroutine</send>
  </alias>
</aliases>

</muclient>

Enjoy!

EDIT: Oh and I also forgot to mention that I set up this window to update everytime you forage for something. You can also get more tips on how to use this code from Nick Gammon over at the mushclient forums. Here
http://www.gpascal.com/forum/bbshowpost ... 965&page=1
Last edited by Jaren on Sun Dec 16, 2012 11:27 pm, edited 1 time in total.
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
hadesfire
Member
Posts: 205
Joined: Sat Aug 11, 2012 5:25 pm

Post by hadesfire »

you are amazing
User avatar
Lemuel
Member
Posts: 312
Joined: Fri Aug 03, 2012 9:13 am

Post by Lemuel »

Thanks for the update, it's great.

On the next update, could I request that those rainbow-coloured announcement messages go into the chat window, so they are easy to locate with the ooc's, etc ?


Also, could we have a short form of the guild name? For example, instead of Mercenaries of the Western Coalition, could it simply read Mercenaries ?
- locksmith Lemuel 'I do all my own stunts.'

Helpful tips, commands, and hints for new CLOKers: viewtopic.php?f=6&t=2367&p=12822#p12822
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

I am working on ideas for the next major plugin update. For those who are interested, I ask that you please answer a few easy questions to help me decide what needs work.

#1. What kind "windows" devices do you use to play CLOK and what is most common desktop resolution you use? Widescreen or nay?

#2. (Optional) Of those devices do any have a resolution below 1280x1024?

#3. Did you prefer the older stationary plugin windows over the new moveable ones? Why?

#4. What do think needs improvement in the next version?

#5. Anything in particular you would like to see added in the next version? (Please exclude already posted ideas)
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
Blitz
Member
Posts: 108
Joined: Fri Mar 08, 2013 7:08 am

Post by Blitz »

Because of Kent's recommendation, I've used your MUSH plugin since day 1, and I must admit it's fancy. Very fancy indeed. Thanks for doing such a great job at it.

As for your questions -- I play it from my high-end desktop, running Windows 7. (I can play most of the newest, graphically intensive what-have-yous, but MUDs remain a bit of a passion.) My screen's resolution is above 1280x1024. I can't compare the older plugin version to the current one. I think the platform (MUSHclient) needs to be improved in the next version (see below). I think the following two features could be nice additions: a small clock or cooldown bar, visualizing the remaining duration of your roundtime; and an offline command queue, so that you can send more than 1 command which has a roundtime using the same alias. (The in-game command queue only stores one command, which is overwritten if a new command is sent before the current queue is fired.)

Regarding my requested improvement of the client/platform -- I can tell you're very adept in using MUSHclient, and setting up a plugin like this and maintaining it for all to use shows you enjoy working with it, but personally, I rather dislike MUSH and much prefer other clients like Mudlet. I just think it's much user-friendlier, but I admit this is purely a matter of personal preference. It's a very egoistic thing to ask, I'm aware, but I would happily collaborate with you porting your plugin to another platform if you'd be willing to.

Either way -- keep up the great work!
User avatar
Jaren
Member
Posts: 138
Joined: Thu Aug 25, 2011 11:20 pm

Post by Jaren »

[quote=Blitz]" I rather dislike MUSH and much prefer other clients like Mudlet. I just think it's much user-friendlier, but I admit this is purely a matter of personal preference."[/quote]

I have no problems with people porting these plugins over to other clients. All of my plugins are open source, just right click one with an editor and take a look. Unfortunately, I have never worked with another client so I would be useless helping you there. But the basics behind it are pretty simple. Just make a trigger that reads the open and close tags generated after typing PLUGINSTATS 2 into your client. Then throw that data into a window. I have no idea how mudlet would do that or if it even uses LUA.
Last edited by Jaren on Sun Mar 10, 2013 1:24 am, edited 1 time in total.
"When someone asks you if you're a god, you say "YES!"
Winston Zeddmore
User avatar
Karn
Member
Posts: 27
Joined: Wed Mar 06, 2013 10:35 am

Post by Karn »

Two suggestions.. make that three?.. or four?

One, to have a separate Travel Time roundtime.
Two, to have the roundtimes go down to zero.
Three, a constant update as to what you have in your hands?

Possible options for the pluginstats, to turn on/off what parts you actually want to use?
Last edited by Karn on Sun Mar 17, 2013 9:32 am, edited 1 time in total.
User avatar
Eraene
Member
Posts: 21
Joined: Thu Feb 07, 2013 8:03 pm

Post by Eraene »

[quote=Karn]Two suggestions.. make that three?.. or four?

One, to have a separate Travel Time roundtime.
Two, to have the roundtimes go down to zero.
Three, a constant update as to what you have in your hands?

Possible options for the pluginstats, to turn on/off what parts you actually want to use?[/quote]

Seconding all of this.
User avatar
Kent
Member
Posts: 660
Joined: Mon Feb 25, 2013 8:31 pm

Re:

Post by Kent »

Jaren wrote:I am working on ideas for the next major plugin update. For those who are interested, I ask that you please answer a few easy questions to help me decide what needs work.

#1. What kind "windows" devices do you use to play CLOK and what is most common desktop resolution you use? Widescreen or nay?

#2. (Optional) Of those devices do any have a resolution below 1280x1024?
I use a little Acer Aspire One notebook, 1024 x 600. I cannot tell if it's widescreen, I don't see an option for that under settings.

Jaren wrote:#3. Did you prefer the older stationary plugin windows over the new moveable ones? Why?
I often need to move the window to see what's under it, so I prefer the new window.
Jaren wrote:#4. What do think needs improvement in the next version?

#5. Anything in particular you would like to see added in the next version? (Please exclude already posted ideas)
I didn't see much in the way of already posted ideas, but overall, less is better in terms of little windows covering my main window. A shorter form of the name of one's guild as mentioned, or the option to omit the guild name altogether, as it never changes and doesn't need to be a perpetual part of the info window.

Also, I would love to see an option to exclude from the info window all body parts with injuries of 'scraped'...when I'm out fighting, I do not bandage wounds until they reach 'lightly damaged' and an average of 5 lines of text could be squelched if all the 'scraped' body parts were not mentioned in the info window.

And here's another one...would be nice if the little 'Who' window appeared in the 'chat' window instead of the main text window.

Once again, thanks for a great product in the form of Jaren's Plug-ins.

- K.
Post Reply

Return to “Technical Stuff”