[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  additions to line (like notes)

additions to line (like notes)

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


Posted by Angelomcm   (7 posts)  [Biography] bio
Date Mon 24 Nov 2003 11:12 AM (UTC)
Message
Hello, i was wondering if this was possible, and if someone
could guide me in the general direction to achieve this:

Let us take a line in thegeneric output from the 'whois' command on a mud:

[18 Cloud War] Bigbadgiant the Dragoon

Is there any sort of way to add notes to that persons name
for example, so if i type "addcomment bigbadgiant 'axe spec'" the 'whois bigbadgiant' output would look as follow next time i use it:

[18 Cloud War] Bigbadgiant the Dragoon (axe spec)

I figure out i will need a lot of triggers/aliases
and serious scripting abilities (which i do not have).
(If it is even possible)

Anyone has suggestions, solutions, maybe code ? hints ?
everything would be appreciated. My sincere thanks.

-Angelo
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Mon 24 Nov 2003 03:35 PM (UTC)
Message
You can capture the whois output, using a trigger, and then display it as a note with a comment added. The comment would be added using an alias and stored in a dynamic array, next to the person's name. Actual technical details depend on what the names look like in your mud, since it would be rather difficult to figure out where is the name and where the title. You'd have to match a name with a comment, and if people in your mud can have arbitrary titles (suffixes and prefixes) then extracting an actual name using a trigger would be difficult, if not impossible.
[Go to top] top

Posted by Angelomcm   (7 posts)  [Biography] bio
Date Reply #2 on Mon 24 Nov 2003 03:39 PM (UTC)
Message
I considered this.

Perhaps its easier to just stick it near the name "Bigbadgiant" everytime it pops up ?
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #3 on Tue 25 Nov 2003 04:51 PM (UTC)
Message
There are a few things to consider:

1. Mushclient isn't really adept at changing text on a line. The current methodology involves ommitting the triggered line from output, then sending your own line instead using the family of world.note and world.tell commands.

The main problem with this is retaining text colouring. To be frank, it's such a hassle, if even possible, that nobody here seems to have pulled off this trick in a successful example (as far as I recall).

So, what you end up doing is creating your own line, either using one solid colour of your choosing, or using multiple colours of your own choosing.

2. It seems like you may require a large set of information for a project like this. It help a lot to consider first how you want to store that information.

One method may be to store all the information in one or more world variables. The thing to consider about this method is that the information is 'trapped' in your world file. If you have other characters on the mud, and if you use separate world files for each character (something I recommend), then you would not be able to share the information among character/world files.

Another method is to store the information in a dedicated file on your computer. This could either be a basic text file that your read and write manually using script, or you could use SQL commands in script to construct and interact with a real database file. This has the advantage of being more easily shared among different worlds if you so choose, but the downside is that file access is always slower than memory access, so you would likely notice some lag while doing a "whois" on your mud. Actually, if you are only viewing one person at a time, this may be perfectly acceptable. However, if you are fetching a chart of everybody online, this would likely create too much lag.

When it comes to coding the project, I think you could likely pull it off with just a single trigger. The trigger would call a script, and that's where the heavy duty work would need to be performed.

From your example, "[18 Cloud War] Bigbadgiant the Dragoon", I notice that the name you want to trigger on is the first word after the square brackets. Is this always the case? If so, processing this project just became much easier! If, on the other hand, you might see something like "[18 Cloud War] Lord Bigbadgiant the Dragoon" on some occasions, well... then this complicates matters, as it becomes difficult for the script to know which keyword to look up.

I'll leave you to mull these things over.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #4 on Tue 25 Nov 2003 08:43 PM (UTC)
Message
It may be possible in SQL to do something like:

"FROM whois SELECT name, comment WHERE name LIKE " & chr(34) & wilds(1) & chr(34)

Where wilds(1) is the wildcards that contains the name.However, it will tend to return everyone with 'the Dragoon' as well. Addition checking would still be needed to find the record returned that has the right name in it. However, Magnum is correct that to display the information requires omit from output and rebuilding the line using Coloutell and Colournote. There is no way to directly add stuff into a line, an issue that has caused me no end of trouble in the case of one experiment I attempted. :p
[Go to top] top

Posted by Angelomcm   (7 posts)  [Biography] bio
Date Reply #5 on Wed 26 Nov 2003 01:29 PM (UTC)
Message
My thanks for this thoroughly detailed and precise
reply. I shall work on it.
[Go to top] 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.


17,778 views.

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

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]