Editing cryptic MUSH code

Posted by Philip Mak on Sat 09 Mar 2002 07:11 AM — 2 posts, 12,838 views.

USA #0
Is there a way to type like "edit object/attribute" and then have MUSHclient pop up a notepad window that contains the code of that attribute on that object, autoformatted so that e.g. this:

switch(setr(0,pmatch(%1)),#-1,pemit(%#,Invalid player name: %1),#-2,pemit(%#,Ambiguous player name: %1),ulocal(%0,%q0,%2,%3,%4,%5,%6,%7,%8,%9))

becomes like this:
switch(
  setr(0, pmatch(%1)),
  #-1, pemit(%#, Invalid player name: %1),
  #-2, pemit(%#, Ambiguous player name: %1),
  ulocal(%0, %q0, %2, %3, %4, %5, %6, %7, %8, %9)
)
and I can edit it like that, and when I save it MUSHclient compresses the spaces and puts it back onto the object?
Amended on Sat 09 Mar 2002 07:17 AM by Philip Mak
Australia Forum Administrator #1
MUSHclient doesn't do that at present, although I believe there are "pretty printers" around that would. However what you can do is use "Commented softcode" (look that up in the help).

This lets you take a line (like in your example), including with trailing comments, and it strips the comments, and compresses the line.

However what it won't do is expand out the text in the first place. I would look around on the www.pennmush.org site for a pretty-printer there. Conceivably you might find one that you can incorporate into a script, and thus use it with MUSHclient with little trouble.