relaren2007-02-17 09:02:45
So, getting tired of constantly having to go DELMSG X, DELMSG X, DELMSG X? Why not turn them into clickable links? So much easier!
Clicking the number will delete that message while clicking the name will read the message.
Enjoy!
That can put pasted straight into zMUD that can.
Clicking the number will delete that message while clicking the name will read the message.
Enjoy!
CODE
#REGEX {^\\#(\\d+) (\\a+): (\\d+)/(\\d+) (\\d+):(\\d+) \\"(.*)$} {#substitute {%ansi(grey)~#%ansi(high,yellow)~%1~ %ansi(grey)" - "%ansi( brown)~%2~ " "%ansi(high,red)%3~/%4~/%5~:%6 %ansi(white)%7%ansi(white)" "~"}}
That can put pasted straight into zMUD that can.
laeric2007-02-17 12:24:24
That's a very neat idea, Jeisha
*goes head to head*
Here's the mushclient equivelent:
    enabled="y"
  expand_variables="y"
  keep_evaluating="y"
  match="^\\#(\\d+) (.*?)\\: (\\d+)\\/(\\d+) (\\d+)\\:(\\d+) \\"(.*?)(\\"|\\.\\.\\.)$"
  name="hyperlink_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 Â    ColourTell ('silver', 'black', '#')
  Hyperlink ('delmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 1), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'blue', 'black', 0)
  ColourTell ('silver', 'black', ' ')
  Hyperlink ('rmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 2), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'maroon', 'black', 0)
  ColourTell ('silver', 'black', ': ' .. GetTriggerWildcard('  hyperlink_message', 3) .. '/' .. GetTriggerWildcard('hyperlink_message', 4) .. ' ' .. GetTriggerWildcard('hyperlink_message', 5) .. ':' .. GetTriggerWildcard('hyperlink_message', 6) .. ' "' .. GetTriggerWildcard('hyperlink_message', 7) .. GetTriggerWildcard('hyperlink_message', 8))
  Note ('')
 Â
EDIT: For MUSH users, you do need to have scripting enabled, and lua set as your scripting language. Simply copy and paste that entire thing from, and including to , and click PASTE in your trigger's dialog.
*goes head to head*
Here's the mushclient equivelent:
CODE
 Â
  expand_variables="y"
  keep_evaluating="y"
  match="^\\#(\\d+) (.*?)\\: (\\d+)\\/(\\d+) (\\d+)\\:(\\d+) \\"(.*?)(\\"|\\.\\.\\.)$"
  name="hyperlink_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 Â
  Hyperlink ('delmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 1), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'blue', 'black', 0)
  ColourTell ('silver', 'black', ' ')
  Hyperlink ('rmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 2), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'maroon', 'black', 0)
  ColourTell ('silver', 'black', ': ' .. GetTriggerWildcard('  hyperlink_message', 3) .. '/' .. GetTriggerWildcard('hyperlink_message', 4) .. ' ' .. GetTriggerWildcard('hyperlink_message', 5) .. ':' .. GetTriggerWildcard('hyperlink_message', 6) .. ' "' .. GetTriggerWildcard('hyperlink_message', 7) .. GetTriggerWildcard('hyperlink_message', 8))
  Note ('')
 Â
EDIT: For MUSH users, you do need to have scripting enabled, and lua set as your scripting language. Simply copy and paste that entire thing from, and including
laeric2007-02-17 12:43:01
More complete version:
#1 (system): 02/05 14:58 "Hello"
System has just left you message #1.
Message #1 Sent by: (system)
These triggers will add a nifty little (read) beside the second line, to become:
System has just left you message #1. (read)
and a (delete) beside the third line.
Message #1 Sent by: (system) (delete)
so you can click to read and delete, if the message isn't close to your latest read message for RM. Make sure you delete the trigger from the previous post before adding these three.
    enabled="y"
  group="misc-scripts"
  keep_evaluating="y"
  match="^Message \\#(\\d+)(\\s+)Sent by\\: (.*?)$"
  name="delete_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 ÂColourTell ('silver', 'black', 'Message #' .. GetTriggerWildcard("delete_message", 1) .. GetTriggerWildcard("delete_message", 2) .. 'Sent by: ' .. GetTriggerWildcard("delete_message", 3))
Hyperlink ('delmsg ' .. GetTriggerWildcard("delete_message", 1), ' (delete)', 'Click to read ' .. GetTriggerWildcard("delete_message", 1), 'maroon', 'black', 0)
Note ("")
 Â
    enabled="y"
  expand_variables="y"
  group="misc-scripts"
  keep_evaluating="y"
  match="^\\#(\\d+) (.*?)\\: (\\d+)\\/(\\d+) (\\d+)\\:(\\d+) \\"(.*?)(\\"|\\.\\.\\.)$"
  name="hyperlink_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 ÂColourTell ('silver', 'black', '#')
Hyperlink ('delmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 1), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'blue', 'black', 0)
ColourTell ('silver', 'black', ' ')
Hyperlink ('rmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 2), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'maroon', 'black', 0)
ColourTell ('silver', 'black', ': ' .. GetTriggerWildcard('Â Â hyperlink_message', 3) .. '/' .. GetTriggerWildcard('hyperlink_message', 4) .. ' ' .. GetTriggerWildcard('hyperlink_message', 5) .. ':' .. GetTriggerWildcard('hyperlink_message', 6) .. ' "' .. GetTriggerWildcard('hyperlink_message', 7) .. GetTriggerWildcard('hyperlink_message', 8))
Note ('')
 Â
    enabled="y"
  group="misc-scripts"
  keep_evaluating="y"
  match="^(\\w+) has just left you message \\#(\\d+)\\.$"
  name="received_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 ÂColourTell ('silver', 'black', GetTriggerWildcard("received_message", 1) .. ' has just left you message #' .. GetTriggerWildcard("received_message", 2) .. '.')
Hyperlink ('rmsg ' .. GetTriggerWildcard("received_message", 2), ' (read)', 'Click to read ' .. GetTriggerWildcard("received_message", 2), 'blue', 'black', 0)
Note ("")
 Â
#1 (system): 02/05 14:58 "Hello"
System has just left you message #1.
Message #1 Sent by: (system)
These triggers will add a nifty little (read) beside the second line, to become:
System has just left you message #1. (read)
and a (delete) beside the third line.
Message #1 Sent by: (system) (delete)
so you can click to read and delete, if the message isn't close to your latest read message for RM. Make sure you delete the trigger from the previous post before adding these three.
CODE
 Â
  group="misc-scripts"
  keep_evaluating="y"
  match="^Message \\#(\\d+)(\\s+)Sent by\\: (.*?)$"
  name="delete_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 Â
Hyperlink ('delmsg ' .. GetTriggerWildcard("delete_message", 1), ' (delete)', 'Click to read ' .. GetTriggerWildcard("delete_message", 1), 'maroon', 'black', 0)
Note ("")
 Â
 Â
  expand_variables="y"
  group="misc-scripts"
  keep_evaluating="y"
  match="^\\#(\\d+) (.*?)\\: (\\d+)\\/(\\d+) (\\d+)\\:(\\d+) \\"(.*?)(\\"|\\.\\.\\.)$"
  name="hyperlink_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 Â
Hyperlink ('delmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 1), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'blue', 'black', 0)
ColourTell ('silver', 'black', ' ')
Hyperlink ('rmsg ' .. GetTriggerWildcard('hyperlink_message', 1), GetTriggerWildcard('hyperlink_message', 2), 'Click to delete msg #' .. GetTriggerWildcard('hyperlink_message', 1), 'maroon', 'black', 0)
ColourTell ('silver', 'black', ': ' .. GetTriggerWildcard('Â Â hyperlink_message', 3) .. '/' .. GetTriggerWildcard('hyperlink_message', 4) .. ' ' .. GetTriggerWildcard('hyperlink_message', 5) .. ':' .. GetTriggerWildcard('hyperlink_message', 6) .. ' "' .. GetTriggerWildcard('hyperlink_message', 7) .. GetTriggerWildcard('hyperlink_message', 8))
Note ('')
 Â
 Â
  group="misc-scripts"
  keep_evaluating="y"
  match="^(\\w+) has just left you message \\#(\\d+)\\.$"
  name="received_message"
  omit_from_log="y"
  omit_from_output="y"
  regexp="y"
  send_to="14"
  sequence="100"
  >
 Â
Hyperlink ('rmsg ' .. GetTriggerWildcard("received_message", 2), ' (read)', 'Click to read ' .. GetTriggerWildcard("received_message", 2), 'blue', 'black', 0)
Note ("")
 Â
relaren2007-02-17 12:50:24
Very cute, though I cannot help but wince at the major size difference between the two scripts.
Good idea on the modified version, I think I will add that to the zMUD one a little later.
Good idea on the modified version, I think I will add that to the zMUD one a little later.