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, 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.
Entire forum
MUSHclient
Tips and tricks
Forcing newlines on prompt lines
Forcing newlines on prompt lines
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Pages: 1
2
3
4
Posted by
| Nick Gammon
Australia (23,044 posts) bio
Forum Administrator |
Date
| Reply #45 on Wed 13 Apr 2005 01:56 AM (UTC) |
Message
| Version 3.66 now released. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Tsunami
USA (204 posts) bio
|
Date
| Reply #46 on Wed 13 Apr 2005 02:08 PM (UTC) |
Message
| You're my hero Nick! Sort of. | top |
|
Posted by
| Nexes
(65 posts) bio
|
Date
| Reply #47 on Fri 20 May 2005 02:15 AM (UTC) Amended on Sat 21 May 2005 04:53 AM (UTC) by Nexes
|
Message
| Ked, when I try to put your plugin in I get a bunch of errors:
Traceback (innermost last):
File "<Script Block >", line 4, in ?
terminated = False
NameError: False
Line in error:
terminated = False
Line 21: Error parsing script (problem in this file)
I don't really know what the problem is since I can't read Python. Could anyone help me?
EDIT: Its the second script you posted by the way.
EDIT: I got it fixed, just had to restart the computer to get python to reload. Then I had to change the pat1 expression to another one listed here. | top |
|
Posted by
| Full Metal
(1 post) bio
|
Date
| Reply #48 on Thu 08 Sep 2005 12:47 PM (UTC) |
Message
| I am new to this mushclient but i'm playing achaea and this newline trick is vital.
An enhancement to the gagging trigger would be to use the GetLineCount function. In Vbscript, my blank line gagging trigger is linked to this sub.
Sub GagBlankLine (name, line, wildcards)
dim Prompt
Prompt = World.GetVariable ("PromptLine")
If World.GetLineCount > Prompt + 1 Then
World.Note " "
End If
End Sub
I assume that there is a sub processing the prompt, the trick is to use GetLineCount to get the unique line number of the prompt and to put it in a Variable with World.SetVariable.
Now just link the gagging trigger to a simple sub which will compare the line number of the gag trigger to the line number of the last prompt. Now if the difference is greater than one, it would mean that this "new line" has not been "forced" and this "new line" is coming from the mud which could easily be re_created with a world.send " ".
| 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.
127,057 views.
This is page 4, subject is 4 pages long:
1
2
3
4
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.