Basically, what I want to do is be able to add "notes" to a character. For example:
I type "Who" in the mud I play and it will display something along the lines of:
I would like to be able to add notes next to their names. I would like it to display something like:
I would like this information stored, and triggered each time I type "Who", or a variation "Whois" (You type "Whois Jezzabelle" and it will list one person at a time)
Is there any possible way to create something like this?
I searched a bit and came up with nothing near what I would like to accomplish, so if there is something already posted, I apologize.
Thanks in advance.
Edit: Also, could you make the note portion in a different color?
EDIT EDIT EDIT EDIT EDIT EDIT EDIT EDIT EDIT
The final revisions have been made by the wonderful Mister Gammon: It is!
- Enters information that will display next to the characters name on the Who list. Use quotation marks if the person has a two word name (Note "Robert Marley" Information)
- Will display all notes that you have written about everyone.
- Will delete a single persons name and note from your Shownotes list. Use quotation marks if the person has a two word name (Deletenote "Robert Marley")
I type "Who" in the mud I play and it will display something along the lines of:
[ 2 H-Elf Bar] Jezzabelle the Jester
[ 8 H-Drw Asn] Ghuron the 1st Brown
[ 1 Gnome Ran] Shizra the Tenderfoot
[ 5 Storm War] Leinadynous the Cadet
I would like to be able to add notes next to their names. I would like it to display something like:
[ 2 H-Elf Bar] Jezzabelle the Jester (Information here)
[ 8 H-Drw Asn] Ghuron the 1st Brown (I don't like this guy)
[ 1 Gnome Ran] Shizra the Tenderfoot (He's okay)
[ 5 Storm War] Leinadynous the Cadet (Blah blah)
I would like this information stored, and triggered each time I type "Who", or a variation "Whois" (You type "Whois Jezzabelle" and it will list one person at a time)
Is there any possible way to create something like this?
I searched a bit and came up with nothing near what I would like to accomplish, so if there is something already posted, I apologize.
Thanks in advance.
Edit: Also, could you make the note portion in a different color?
EDIT EDIT EDIT EDIT EDIT EDIT EDIT EDIT EDIT
The final revisions have been made by the wonderful Mister Gammon: It is!
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, January 28, 2007, 1:50 PM -->
<!-- MuClient version 3.84 -->
<!-- Plugin "Improved_who" generated by Plugin Wizard -->
<muclient>
<plugin
name="Improved_who"
author="Nick Gammon"
id="b8e59c12ea2d835e5a96d2bc"
language="Lua"
purpose="Adds comments to a 'who' list"
save_state="y"
date_written="2007-01-28 13:49:50"
requires="3.84"
version="1.0"
>
</plugin>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
match="^\[\s*\d+\s+[-\w]+\s+\w+\] ([\[\(]\w+?[\]\)] )*(?P<player>[\w ]+?) the \w+"
omit_from_output="y"
regexp="y"
send_to="14"
sequence="100"
>
<send>-- display original line with original colours
for k, v in ipairs (TriggerStyleRuns) do
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end -- for
notes = player_notes ["%<player>"] -- any notes?
if notes then
ColourTell ("blue", "", " (" .. notes .. ")")
end -- notes found
Note "" -- end line</send>
</trigger>
</triggers>
<!-- Aliases -->
<aliases>
<alias
match="^note (?P<player>[\w]+?) (?P<description>.*?)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
player_notes ["%<player>"] = "%<description>"</send>
</alias>
<alias
match="shownotes"
enabled="y"
send_to="12"
sequence="100"
>
<send>for k, v in pairs (player_notes) do
Note (k, ": ", v)
end -- for</send>
</alias>
<alias
match="^note "(?P<player>[\w ]+)" (?P<description>.*?)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
player_notes ["%<player>"] = "%<description>"</send>
</alias>
<alias
match="^deletenote (?P<player>[\w]+?)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
player_notes ["%<player>"] = nil</send>
</alias>
<alias
match="^deletenote "(?P<player>[\w ]+)"$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
player_notes ["%<player>"] = nil</send>
</alias>
</aliases>
<!-- Timers -->
<timers>
<timer enabled="y" minute="5" send_to="12"
>
<send>SaveState ()</send>
</timer>
</timers>
<!-- Script -->
<script>
<![CDATA[
-- load data from variable in state file into a Lua table
function OnPluginInstall ()
assert (loadstring (GetVariable ("player_notes") or "")) ()
player_notes = player_notes or {} -- ensure table exists
end -- function OnPluginInstall
-- save Lua table into MUSHclient variable "player_notes",
-- ready to save the state
require "serialize"
function OnPluginSaveState ()
SetVariable ("player_notes", serialize.save ("player_notes"))
end --- function OnPluginSaveState
]]>
</script>
</muclient>
Note Name InformationShownotesDeletenote Name