Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Editing cryptic MUSH code

Editing cryptic MUSH code

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


Posted by Philip Mak   USA  (35 posts)  Bio
Date Sat 09 Mar 2002 07:11 AM (UTC)

Amended on Sat 09 Mar 2002 07:17 AM (UTC) by Philip Mak

Message
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?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 09 Mar 2002 09:31 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


12,234 views.

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

Go to topic:           Search the forum


[Go to top] top

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