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 ➜ Suggestions ➜ Gaging lines which we take from buffer.

Gaging lines which we take from buffer.

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


Posted by Ovvi   Poland  (13 posts)  Bio
Date Thu 28 Nov 2002 09:41 AM (UTC)
Message
Hi,
I have some suggestion to gag lines. I try explain what I mean.
Example:
You see to ways: north and east.
Big happy ork, fat stupid goblin, old green goblin, Conrad,
Nicky, hard small dwarf, xxx yyy ork, xxx1 zzz
human, red head fast goblin and Roman arrvie from north.

My trigger:
^(.*) arrvie from (.*)\.$
Trigger open my script in VBasic and it starts analize text back.
Script take "human, red head fast goblin and Roman" and replay " and" to ",". After that script takes whole line before and check the last word. If last word is "." then put string "human, red head fast goblin, Roman" into array. Table [human,red head fast goblin,Roman]. But in my example last word is "zzz" and script takes whole line and add to my string: "Nicky, hard small dwarf, xxx yyy ork, xxx1 zzz human, red head fast goblin, Roman". Again the script takes all line before and try to find ".", when can't find than add to string: "Big happy ork, fat stupid goblin, old green goblin, Conrad, Nicky, hard small dwarf, xxx yyy ork, xxx1 zzz human, red head fast goblin, Roman". I the before line script finds "." and I use function 'split' to put whole string into array. Now I compare array with my database. For example: In my database name of fat stupid goblin is Gramk. I want to gag all lines and replace string:
Big happy ork, fat stupid goblin [Gramk], old green goblin, Conrad,
Nicky, hard small dwarf, xxx yyy ork, xxx1 zzz
human, red head fast goblin and Roman arrvie from north.

I know that is now impossible but my suggestion is add function to gag old lines. Now we can only read old lines by use: world.GetLineInfo().

Ovvi
ps. Sorry for my terrible English, I have hope that you understand what I mean.


Top

Posted by Puppetmaster   Poland  (2 posts)  Bio
Date Reply #1 on Tue 10 Dec 2002 11:53 PM (UTC)
Message
Have you considered the following solutions?

1. Swich the MUD screen width to the maximum value,
and analyze only the line with ".. arrive from .."
replacing every description with description+name.

2. Add triggers with every description.

Pozdrawiam ;)
Top

Posted by Ovvi   Poland  (13 posts)  Bio
Date Reply #2 on Wed 11 Dec 2002 06:04 AM (UTC)
Message
Hi,

I have about 1000 fields in my database. When I will move it into the triggers, than Mush will be worked too slow...
In my opinion easiest way will be add to the Mush function which will be gag line before.

Ovvi
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 12 Dec 2002 04:51 AM (UTC)
Message
The trouble with gagging old lines is, what if they are logged? The line is logged once triggers are processed and you haven't omitted it from logging, but if you can retrospectively gag lines this would not 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.


13,321 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.