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 ➜ Altering text output

Altering text output

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


Posted by Tamalak   (7 posts)  Bio
Date Wed 01 Aug 2001 01:55 AM (UTC)
Message
Hi, this seems like a simple problem but it's really bugging me!
Sometimes the MUD I'm in sends me text in parentheses like:

(Raidon drops a small dagger.)

What I want to do is not only get rid of the parentheses, but move the rest of the text one character to the left so that it reads:

Raidon drops a small dagger.

I'd like to do this -without- making it a world.note, because world.note is a different color and format from normal output text, and since several of my programs depend on that being the case, I'd like to keep it that way. Is this possible?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 01 Aug 2001 04:52 AM (UTC)

Amended on Wed 01 Aug 2001 04:53 AM (UTC) by Nick Gammon

Message
You can work around the world.note problem a bit by doing something like the following script. MUSHclient does not currently let you manipulate incoming text *and* preserve its colour, however you can do the following to stop it appearing in the note colour. What the script does is remember the note colour (foreground and background), then set note colour to normal output colour (white on black), display wildcard 1, then put the colours back.

The trigger would be:


Match on: (*)
Enabled: checked
Omit from output: checked
Label: Blahblah
Script: SpecialTrigger


The script is:



sub SpecialTrigger (strTriggerName, strTriggerLine, aryWildcards)
dim orignotefg
dim orignotebg

  ' remember note colours
  orignotefg = world.NoteColourFore
  orignotebg = world.NoteColourBack

  ' change note colour to world output colour
  world.NoteColourFore = world.NormalColour (8)
  world.NoteColourBack = world.NormalColour (1)

  ' display wildcard 1
  world.note aryWildcards (1)

  ' put colours back
  world.NoteColourFore = orignotefg 
  world.NoteColourBack = orignotebg 

end sub

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tamalak   (7 posts)  Bio
Date Reply #2 on Wed 01 Aug 2001 04:50 PM (UTC)
Message
Hmm, it didn't work, I got the message that

"Object doesn't support this property or method:
'world.NoteColourFore'"

Do I need to store the colour in another kind of variable (other than a dim)? Do I need to upgrade my MUSHclient? I played around with it and still can't get it to work...
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 01 Aug 2001 10:24 PM (UTC)

Amended on Wed 01 Aug 2001 10:27 PM (UTC) by Nick Gammon

Message
Make sure you have the latest version of MUSHclient (3.15) - the world property "NoteColourFore" is a recent one.

Also, make sure you copy and paste the script exactly, colour is spelt the Australian way, not "color".

In VBscript there is only one variable type (dim) - which is a variant that stores all sorts of data types.

I tested that script before posting it so it should work.

- 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.


15,508 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.