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
➜ Extra line feeds with aliases, triggers and world.send's
|
Extra line feeds with aliases, triggers and world.send's
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Rheede
USA (6 posts) Bio
|
| Date
| Mon 04 Nov 2002 05:11 AM (UTC) |
| Message
| I was wondering if there was a way to keep these ways of sending text to the mud from adding an extra line after them in the output window. I have a simple script for practicing my skills up to max(a for loop, actually), and after it sends all x number of times to the mud, I get x number of empty lines after it. I'm not entirely sure if these lines are sent to the mud or just displayed on my end.
I'm using MC 3.30 and I've noticed it with previous version of MC as well.
Thanks for your time,
Rheede | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 04 Nov 2002 10:02 PM (UTC) |
| Message
| I can't reproduce this, maybe there is a problem in your script. Here is what I did in the Immediate window...
for i = 1 to 5
world.send "think hi there"
next
I get this response (with "echo commands" enabled) ...
think hi there
think hi there
think hi there
think hi there
think hi there
hi there
hi there
hi there
hi there
hi there
However there are no extra blank lines. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #2 on Tue 05 Nov 2002 05:12 PM (UTC) |
| Message
| Actually.. I have noticed this as well.. One that does it with me is a single sub an some linked triggers. (Assuming you still have my files) they are all the triggers linked to the sub PartyTellIt. The triggers do not send anything, but call a sub that replaces any spaces in the trigger name and repeats it back as a world.colournote or sends a party tell command. It happens all of the time with this combination of triggers and sub (not sure if with all triggers, I stopped paying attention), but never with my potions alias, the timer for spell status or most any thing else. I have checked all the usually suspects, like the send fields, extra world.notes, etc. and there is no reason they should be doing it. :p
Of course for be this is just an oddity, not a serious mess like Rheede is talking about, but there is definitely something odd happening here that results in some, but not all trigger/sub combos producing these odd results. | | Top |
|
| Posted by
| Rheede
USA (6 posts) Bio
|
| Date
| Reply #3 on Tue 05 Nov 2002 08:12 PM (UTC) |
| Message
| Well, glad someone else had something similar. :)
The main probly I was getting was from my practice alias/script.
The script had the follow code:
Sub
i = 1
while i < 9
world.send "prac " & strWildCards(1)
loop
End Sub
That's the basic code, anyways.
I had an alias called do_prac *, and I would type in something like the following:
do_prac second
do_prac berserk
do_prac hand
all of these commands were sent at once, ie. multiline inputting. The result would be the designated number of prac such-n-such that was needed to raise to a certain level, and then a whole slew of carriage returns that followed for as many times as there were "prac such-n-such" lines.
Hope this helps out with any investigation that might be goin on regarding this. :p As Shodowfyr mentioned, it's not all that big of a deal, but just something that's a little annoying sometimes.
Thanks for your time,
Rheede | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Tue 05 Nov 2002 11:45 PM (UTC) |
| Message
| First I would check that in your alias "send" box you don't inadvertently have one or more blank lines. They can be hard to spot. Put the cursor in that box and backspace and delete until you are sure it is empty.
Second, I would check "Omit from output" on the alias. I suspect that the multi-line alias is contributing to the blank lines. When I tried what you described I got three blank lines, because I entered:
do_prac second
do_prac berserk
do_prac hand
By checking "omit from output" the blank lines were suppressed.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Rheede
USA (6 posts) Bio
|
| Date
| Reply #5 on Wed 06 Nov 2002 02:33 AM (UTC) |
| Message
| Thanks for the help, guys. What ya suggested, Nick, worked. No more extra carriage returns sent to the mud. It was the Omit from Output that was doing it.
On a side note, I had a thought that instead of just putting each do_prac on each line and then sending them all, I'd just do command stacking, but to my surprise, I got all these "Command not recognized" errors from the mud. How come your command stacking doesn't do aliases? Just a thought. ;)
Thanks again,
Rheede | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Wed 06 Nov 2002 03:31 AM (UTC) |
| Message
| | Seemed to work for me. Check you have command stacking enabled, and that the command stack character is what you think it is. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #7 on Wed 06 Nov 2002 08:15 PM (UTC) |
| Message
| | Hmm.. In my case it is not an alias doing it and I can't exactly try the 'omit from output' trick, since I want the line that triggered to remain visible. :p Even assuming it would in fact do the same thing.. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #8 on Thu 07 Nov 2002 02:21 AM (UTC) |
| Message
| | I've reinstalled everything on my PC. Might be quicker if you resend the relevant file, especially if you can isolate it down to a single on. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Rheede
USA (6 posts) Bio
|
| Date
| Reply #10 on Thu 07 Nov 2002 03:31 AM (UTC) |
| Message
| Hey, since we're on the subject of Omit from output. I was wondering if there's a way to keep a trigger's text from goin to the output window, but the "trigger" text stay visible? If there is, I havn't found it. Also, was wondering if there was some way, like with my do_prac script, to keep the world.send text from being displayed. Again, if there is, I havn't found it.
Thought I'd ask. Thanks again for the help, guys.
Bobby | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #11 on Thu 07 Nov 2002 05:19 AM (UTC) |
| Message
| | In both cases you could do a world.send inside a script, and before that save the "echo" flag, set it off, then restore it afterwards. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #12 on Thu 07 Nov 2002 08:31 PM (UTC) |
| Message
|
Quote:
The triggers do not send anything, but call a sub that replaces any spaces in the trigger name and repeats it back as a world.colournote or sends a party tell command.
OK, I see what you mean. If the script does a world.note you get a "free" extra line at the end. However if you do two notes, there is not a blank line between them, so the freebie seems to come only if there are any notes.
I'll look into it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #13 on Thu 07 Nov 2002 08:51 PM (UTC) |
| Message
| Right. Fixed that. Hope it doesn't have side-effects.
Basically when it got the newline it called the trigger scripts, which did their stuff, and then MUSHclient went on to actually display the newline, which was redundant because the world.note in the trigger had already caused the new line. |
- 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.
36,220 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top