Just wanted to tell everybody I've created a new page solely for my MUSHclient plugins, it's at:
http://geocities.com/cage_fire_2000/MCPlugins.htm
Most of my plugins are designed for pennMUSH based games, because that's all I play on, but a couple should work on anything, because they're not game-type specific.
Currently the plugins I have are:
* GrabName.xml - This is useful for editing object names, eg. adding aliases to an exit.
* GrabLock.xml - This lets you grab and edit a lock.
* RegExp_Tester.xml - This lets you test regular expressions using the MUSHes built-in regmatchi() and shows you what each argument to the command would be.
* GrabPack.xml - This is a combination of cosmetically improved versions of grab, editor, grabname, and grablock as well as @rnattr. News: 8/22/2007 v1.01 converted to Lua language for hopefully universal compatibility.
* Paste_As_MUSH.xml - This plugin will convert the contents of the clipboard into MUSHcode format(%b, %r, etc) and paste it into the command window. Just install it, copy what you want converted to the clipboard, then ctrl-click to bring up the alias menu, and click `Paste As MUSH`. It was designed for 8bitMUSH, but as long as you don't try to use extended characters it should work for any MUSH(at least pennMUSH based ones)
* ClientLock.xml - New 6/6/2007 v1.01. This plugin allows you to lock the command window so you can step away from the keyboard without somebody messing with your character.
* NoAnsi.xml - This plugin strips ANSI codes out of output, I personally don't see why anybody would want to, but I saw it on the MUSHclient suggestions/requests list(although it /was/ back in 1998) and decided that I might as well since it's soooo easy.
* QueueControl.xml - This plugin gives a little more functionality to the speedwalk queue, mainly the ability to pause and resume it.
* DailyLog.xml - This plugin closes and opens the logfile at midnight, you /must/ have a log filename with date substitutions set in the world preferences for this to work right.
* WeeklyLog.xml - This plugin is like the DailyLog plugin, but does it once a week.
Looks like a nice set of plugins. Unfortunately, the one I think is would be really useful to me that I haven't already written is the regex tester, and it's in VBscript, which I can't use. It is now on my list of things to convert to Lua. Aside from that issue, there are a lot of great utilities that you included in this list.
Uhm, the regexp tester doesn't use any script for its main function, it only uses it to display the plugin description. It does all the regexp processing on the pennMUSH server, all it is is two aliases, which you could copy out of the file and paste into your world aliases.
Update: I just editted and reuploaded the file to use LUA to display the description.
Ah, that explains my issue. I thought you meant it used some function in MUSHclient to do the matching, not one for pennMUSH. Although given a bit of thought, I suppose I could create one of my own for general purposes using Lua's regex searching capabilities.
I do need to create my own if I'm not using a pennMUSH though. Using the examples you included tried sending the commands to the mud, which don't help on a Diku based mud.
Uhm, the example I just posted uses MUSHclient's regexp parser, and it sends to output, just make it in a dummy world, and type stuff to check against it.
*facepalm* My /plugin/ is designed to send a command to a pennMUSH server that'll send back what it matches, and is meant for testing $-commands, and such, and thus will not work when not connected to a pennMUSH server. The /alias/ I posted /on this thread/ will work in a dummy world and uses MUSHclient's regexp matcher. I do believe that MUSHclient regexp syntax and pennMUSH regexp syntax are similar but different, I'd have to check.
My /plugin/ sends MUSHcode to the server.
@regset sets the regexp in an attribute on the player character that is grabbed by the matching code, not only so you don't have to keep entering the regexp, but also so that it doesn't need to be escaped in the code.
@regtest sends a regmatchi() command that'll match given input against the regexp in the attribute and display whether it matches or not, and if so, what the different subpatterns evaluate to.
Did you even read the description of the plugin next to the download link?
* RegExp_Tester.xml - This lets you test regular expressions using the MUSHes built-in regmatchi() and shows you what each argument to the command would be.
Quote: Ah, that explains my issue. I thought you meant it used some function in MUSHclient to do the matching, not one for pennMUSH. Although given a bit of thought, I suppose I could create one of my own for general purposes using Lua's regex searching capabilities.
The original confusion actually came from not being specific enough. MUSH could either be MUSHclient or PennMUSH. I was stating that the plugin wouldn't work as a general purpose tester, and the simple alias is not complete, since there are named wildcards now. As for the alias you posted, I added it into the plugin, since you did not mention where to add it, and we had been discussing plugins before. I'm sorry I misinterpreted things, but that's no reason to get so defensive, especially when the first post I had complemented you on the plugins you had.
At any rate, my responses to this thread end with this post.
I'm sorry for getting testy. But first of all I've never heard anybody refer to MUSHclient as 'MUSH' I've heard them refer to it as MC but never 'MUSH' since MUSH is the name of a server type it would be confusing. Also, I said 'using /the/ MUSHes builtin...'(That should probably be MUSH's but that's besides the point.) If I had just said 'using MUSH's built-in....' then I could understand your confusion, I suppose I should clarify the description of it on the website, but I had thought I had been clear enough with my current description, apparently I was mistaken.
I have also seen quite a few people refer to MUSHclient as "MUSH", probably because they mentally separate it into two words "MUSH client" (a client whose name is "MUSH") and then drop the word "client".
Really? Hmm, I've never heard that myself. I have to assume they are MUD players that don't know about MUSHes. Because I would assume MUSH players would know that they were different and thus would just refer to MUSHclient by either its full name or as MC.
Sooner or later I've got to get around to learning LUA and converting these plugins, but so far it's just not worth it.
Just wanted to let everybody know about some updates:
1.) Paste_As_MU has been renamed to Paste_As_MUSH for better clarity.
2.) GrabPack has been converted to Lua for hopefully universal compatiblity, It only had a very short and simple script in it to set the unique password, so I don't expect any problems, but let me know if there's any bugs.
I hope to convert some of my other plugins to Lua since that seems to be the thing to do lately, but my understanding of Lua syntax is very limited at the moment. Let me know if you guys think it'd be worth wild.
I discovered the GrabPack plugin had a problem with the grablock code, I have uploaded a fixed version of the plugin to my site. If you have downloaded a previous version of the plugin you should redownload it.
Sorry to dig up an old thread, but I have an update. I've rewritten my QueueControl plugin in Lua. It's available on my website. I had some difficulty getting the syntax right on this one since I'm new at Lua and there /might/ be bugs I haven't found yet, I'd appreciate if you guys could check it out for me. I still have the original JScript version up so you can compare the scripts and let me know if I did it right. Next up, converting the other plugins if I can figure out how. Many won't be that difficult, but at least one will.
Update: Holy cow, I just checked my last post, it's been over a year since I worked on this.
Ok, update. I'm pleased to announce I've finally gotten around to converting my Paste_As_MUSH plugin into Lua so that everybody should be able to use it. In addition I've rewritten the code so that /any/ character that is repeated a sufficient number of times will be converted into a repeat() call in addition to being escaped if necessary. For those not familiar with the plugin, it can be invaluable for showing code and logs to other people without having to manually go through and escape all the parenthesis and newlines and such. This plugin basically does a decompose()(for those familiar with newer penn) on the contents of the clipboard and pastes the result into the command window so that when it's evaluated by the game it /should/ come out exactly as it is in the clipboard, minus any color. Please try it out if you'd like and give me feedback and let me know of any bugs since I'm relatively new to Lua.
Another update. When converting my Paste_As_MUSH plugin to Lua I made the honest mistake of keeping the repeated appending code, which apparently in Lua can cause a lot of garbage collection after a while(using almost exponentially increasing amounts of memory.), so longer strings were slowing it down noticably. In v1.2 of my Paste_As_MUSH plugin, I've changed it to use table.insert() and table.concat() and it should be much better now, and it has been uploaded to my site. If you are using an older version please upgrade, as version 1.1 will run slowly with large strings.
I don't know if anybody cares or not. But I have some updates. First of all, I heard from a friend that geocities may be dropping free web hosting near the end of this month, I don't know if it's true or not, but just in case I'm moving everything to my tripod website. I'll leave the geocities site alone for this month but I won't update it. Anyway, the new page for the plugins is http://cagefire2000.tripod.com/MCPlugins/MCPlugins.html
Furthermore, I discovered a tiny bug in Paste_As_MUSH where if you had a single space at the end of the text to encode it mistakenly wouldn't escape it. Normally this wouldn't be an issue in most cases, but I was using the code in another plugin where it had to break it up and run through segment by segment and it caused problems. So I've released version 1.21 on my tripod site(It's not on my geocities, I don't see the point if it's going to be gone in a month.)
Stay tuned, I am working on a plugin that'll let you select text in the output window, click an alias menu option and convert it into MUSHCode /complete/ with color and then it pastes it into the command window. I already have it working, there might be a few bugs or ways to optimize it. Again it's mostly designed for 8bitMUSH, and we now use the extended 256 color ansi that mushclient added support for, but I did write an alternative standard 16 color version in the same plugin that should hopefully work with any pennmush game and supports underline, inverse, and flash. Although the 256 color version does not, as 256 color and standard ansi don't completely mix well on our game. Although with 256 colors to choose from, not many people bother with underline(we mostly use the colors for artwork anyway where underline doesn't matter much). I suppose I could hack it a little, but the output would be a bit larger... maybe in a later version.
The problem with the 16 color version is that if you use any coloring triggers to change text to custom colors then the code can't tell what the original color was and tries to find the closest matching color which does /not/ always work very well. (I don't have any better code for finding how close one color is to another.) For example I have one color that's /looks/ mostly yellow I think it was #FFFF80, but the code changes it to white or grey. The 256 code works great though, but unless your game uses the [color()] function(As far as I know it only comes if you hacked FANSI into your game, and probably wouldn't work with the latest pennmush code as I believe they changed how ansi is handled) then it won't work for you. Well, unless you hack it to use whatever function your game uses, but please inform me if you do.
Anyway, the 16 color version should work on just about any pennmush based game, with the exception of custom colors and if you use MXP or Pueblo for hyperlinks(which changes it to a custom color so same thing) or for color changes.
An interesting quirk is that due to the way mushclient works, if you do something like [ansi(rh,Te)][ansi(rh,st)] even though they come out the same color they are in two seperate style runs which is how the plugin converts them back into two [ansi()] statements. I could possibly fix this, but it'd get complicated fast, involving looking ahead to future style runs and checking if they have the exact same colors and flags, and then joining the text together before escaping it. All in all I don't think it's that big of an issue to bother myself with fixing it.
Cage_fire_2000 said: First of all, I heard from a friend that geocities may be dropping free web hosting near the end of this month, I don't know if it's true or not, but just in case I'm moving everything to my tripod website. I'll leave the geocities site alone for this month but I won't update it.
A simple google search led me to the Geocities homepage [1], where it says "GEOCITIES IS CLOSING ON OCTOBER 26, 2009" in a large font.
[1] http://geocities.yahoo.com/
Cage_fire_2000 said: Stay tuned, I am working on a plugin that'll let you select text in the output window, click an alias menu option and convert it into MUSHCode /complete/ with color and then it pastes it into the command window. I already have it working, there might be a few bugs or ways to optimize it. Again it's mostly designed for 8bitMUSH, and we now use the extended 256 color ansi that mushclient added support for, but I did write an alternative standard 16 color version in the same plugin that should hopefully work with any pennmush game and supports underline, inverse, and flash. Although the 256 color version does not, as 256 color and standard ansi don't completely mix well on our game. Although with 256 colors to choose from, not many people bother with underline(we mostly use the colors for artwork anyway where underline doesn't matter much). I suppose I could hack it a little, but the output would be a bit larger... maybe in a later version.
Okay... I'll admit I didn't read the whole post. But could you put the text into a utils.editbox() call? Would make it easier/cooler.
str = "this is some MUSHcode"
utils.editbox("MUSHcode", "MUSHcode Converted", str)
EDIT: Seems to be a Lua-only extension, and by the earlier discussion I'm not sure you're using it, but it's just one of those nice touches if you are.
Okay... I'll admit I didn't read the whole post. But could you put the text into a utils.editbox() call? Would make it easier/cooler.
str = "this is some MUSHcode"
utils.editbox("MUSHcode", "MUSHcode Converted", str)
EDIT: Seems to be a Lua-only extension, and by the earlier discussion I'm not sure you're using it, but it's just one of those nice touches if you are.
Hmm, sure, it's written in LUA, I've been trying to put all my plugins in LUA lately, even though I don't use the language for anything else. Heck, this is the first time I've even used the editbox. It just never occured to me that since I was using Lua I could use them. I'm not sure why you'd need the edit box, although it'd make editing large logs or whatever easier. Heck, I could alter my Paste_As_MUSH plugin to use it too... Let you edit it before it's pasted into the command window. Or... I have another idea. I'll get back to you. I'm not quite ready to release it anyway.
No, no, I meant paste the converted code into the editbox for easy copying, instead of into the command window.
Err, if you want that, I could just have the plugin put it on the clipboard directly... Or I could just make it so that it puts it in an edit box where you can edit/copy it, and if you click ok then it inserts it into the command window, and if you click cancel it does nothing. So if you simply want to copy the code, you just click the command, which brings up the edit box, where you can just copy it, and then click cancel. I could also just make seperate menu options where one is Insert as mushcode, and another is copy as mushcode, and so on.
Hmm, I wonder, with the alias menu, is it possible to make submenus to group commands together, like "Ctrl-Click > Copy As > Mushcode with 16 color" or "Ctrl-Click > Copy As > Mushcode with 256 color"? Or for general use it could be "Ctrl-Click > Attack > Punch" Well, there is a script thing for opening menus if I recall but it was meant for miniwindows. Wait, no you have to specify a miniwindow and I don't feel like having to make a background window just so I can popup a menu. Oh well.
Hmm, all this is making me start to think about editing some of my other plugins to use the edit box and such. Not to mention the other Lua utilities that I didn't have when I first wrote them. I have several ideas now actually. Thanks for suggesting it, I may come out with some new updates.
Sorry for the runon paragraphs I'm not quite sure where to break it up.
Ok, figured I'd start out with a simple plugin, before I start working on more complicated plugins. So here we go, new on my plugins page. The Edit_Command_Window plugin, almost ridiculously simple to make, but hopefully still useful. What it does is simple, you simply Ctrl-Click to bring up the alias menu. Click Edit Command Window, and the contents of the command window pop up in an edit box. Allowing you to edit large commands/messages that take up a lot of lines. Unfortunately there's no way to keep stuff like Auto-Complete and such that you have in the command window(I never use it anyway myself, but some might), but it's a trade off, for being able to edit large commands without increasing the size of your command window, and thus decreasing the size of your output, and also you don't need to write it in a notepad then copy and paste it into a command window. It's not my most /fantastic/ plugin I'll admit, but it does have it's uses.
Ok, I only posted the Edit_Command_Window plugin a few hours ago, but if anybody has downloaded it already, I've updated it. The description now explains that to bind it to an accelerator or macro use "Edit_Command_Window", also if unpause on send in the output config is not set it'll pause the output window while your editing the command, also, I forgot to set the omit from command history and omit from log file flags, so they're now in version 1.02.
Ok, new plugin, nothing big, I stumbled upon the hidden automatic resize feature of the command window in v4.30 and decided to write a command interface, so instead of having to go through the script to activate/change it, you can just type some commands to do the work.
On another note, I've been working a little more on my new yet-to-be-released mushcode conversion plugin, I've combined it with my Paste_As_MUSH plugin, and added different methods of using it, I may post it soon, but I looked and I noticed I ended up adding 5 different menu options to the alias menu, which seems like a little too much to me, so I'm trying to figure out a way to cut that down. One option would be to make it 1-2 menu option(s), and simply pop up a listbox to pick which option you want to use, however, that'd slow it down a bit I think, then again they might not be using it constantly, and some of them are already kinda... It'd be really nice if I could just have a way to make a sub-menu, although I'm not sure how that'd work without changing the way the alias menu works.
Anyways, I'll list the current options here:
* Convert Clipboard to MUSHcode(This takes the clipboard contents, converts them to MUSHcode, pops the result up in an edit box, allowing you to alter or copy it, then either click ok to insert in the command window, or cancel to discard it if you only wanted to copy it.)
* Convert Command Selection to MUSHcode(This takes the current selected text in the command window, converts to MUSHcode, then pastes it back, also selecting the converted text.)
* Convert Inputted Text to MUSHcode(This pops up an edit box for you to enter text, then proceeds like the Clipboard option, this option might be redundant so I might take that out. I suppose it might be good to type up a mail message or bbpost though, so I'm not sure, you could always type it in the command window and use the other option.)
* Convert Output Selection to MUSHcode 16 color(This takes the selected text in the output window, converts it to mushcode including using ansi() to get the colors, and pops up the result in an edit box for editing/copying, then allows you to either insert it or discard it.)
* Convert Output Selection to MUSHcode 256 color(8bit only, unless some other game uses the same color() function to make 256 color text. This works just like the 16 color option, only uses color() instead of ansi(), which also means it doesn't get stuff like underline and flash and the like.)
I'm trying to decide what to do, or how to tweak it. I was thinking I could combine the input selection, with the 16 color option, and simply have the code detect what window has the selection(as in a recent release it was made you can only have a selection in one or the other anyways.), if something is selected in the output window, use the 16 color code, otherwise check the input window, and if there's something selected then convert it. Then leave the 256 color as a seperate option, which can be disabled with a simple edit of the file just changing the 'enabled' status of the alias, or I can release 8bit and non-8bit versions. (BTW, I would be rather curious if there's any other games MUSH or not that use the 256 color standard.) Anyway, this would narrow it down to 3-4 options. Convert clipboard, Convert Inputted Text, Convert Selection, and optionally Convert Selection 256. Does anybody have any opinions about anything I could/should add/remove/change? Then again it's kinda hard to form an opinion without trying something first, but from what I've described?
Edit: I just had a thought, I could make it so that if nothing is selected in the output or input windows, then either prompt for something or grab it from the clipboard, but I'm not sure about that idea. Because that way you'd have to make sure nothing was selected to use that third option.
Edit: I could take that even further, first check the output window, then the input window, then prompt for input with the clipboard text as the default. Effectively combining 4 out of 5 options, but it'd be rather tricky for the user, as they'd have to make sure they meet the different conditions to get the effect they want.
OK, I altered my Edit_Command_Window plugin, now that I figured out selections in the command window, if you have something selected, only that will be editted, if you have version MC 4.40 or later, then it'll also reselect the changed selection afterwards. Although it's still compatible with previous versions back to 3.69, it just checks to see if SetCommandSelection exists and if not it can't select it. It's not really crucial to it's functioning anyway, so I didn't want to change the minimum version by such a large amount. They really should update to the most recent anyways, but if they don't want to that's their choice.
I think what I'm going to do with my MUSHcode conversion plugin, is narrow it down to three commands, one to convert the current selection, either output or input window. one to convert inputted text, which can easily be used with the clipboard by just hitting Ctrl-V in the edit box, and the third is the 256 color code, which most people besides 8bitters won't be able to use.
I was originally going to take Twisol's suggestion and pop up the results in an edit box for easy copying, but I think I have a better/faster alternative now. As of 4.40 they added SetCommandSelection(), so I'm just going to use that to highlight the code after it's been inserted into the command window, so if you want to copy/cut it, it's already selected and you just hit Ctrl-C or Ctrl-X. Also even with the editbox option, you'd still have to select it first before you could copy it(BTW, Ctrl-A for select all doesn't seem to work in the edit box, you have to right-click), this way you don't. Granted, you need 4.40 or later, but that's a minor thing, and if you still want to edit it in an editbox later, you could just use my new version of my Edit_Command_Window plugin that now allows you to edit the current selection. I think it covers all the bases.
If nobody has any more input, I may just make a few final tweaks to the plugin, and then maybe upload it.