fork download
  1. <?xml version="1.1" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on 星期六, 三月 07, 2009, 9:05 下午 -->
  4. <!-- MuClient version 4.37 -->
  5.  
  6. <!-- Plugin "color_chat" generated by Plugin Wizard -->
  7.  
  8. <muclient>
  9. <plugin
  10. name="color_chat"
  11. author="Nick Gammon"
  12. id="1c6f23705043cda566f01135"
  13. language="Lua"
  14. purpose="抓取聊天訊息至另外的視窗"
  15. date_written="2009-03-07 20:58:07"
  16. requires="4.08"
  17. version="1.0"
  18. >
  19. <description trim="y">
  20. <![CDATA[
  21. 可以把聊天信息按照原來的顏色抓取到另外的視窗,參考Nick Gammon的版本製作。
  22. 使用前要新建一個遊戲視窗,名稱需與下方程式碼中「chat_world = ""」雙引號中的名稱相同(可自行修改)
  23. ip地址為0.0.0.0,並且和該遊戲檔案(*.mcl)置於同一個資料夾下。
  24. omit_from_output="y" 表示在主視窗中不顯示聊天信息,="n" 表示顯示聊天信息。
  25. 要增加或減少頻道請修改對應的trigger。
  26. 參考的英文原版地址為:http://w...content-available-to-author-only...m.au/forum/?id=7991
  27. ]]>
  28. </description>
  29.  
  30. </plugin>
  31.  
  32. <!-- Triggers -->
  33.  
  34. <triggers>
  35. <trigger
  36. enabled="y"
  37. match="^(&gt;)*( )*(.*偷偷的告訴|〔隊伍頻道〕|大呼:|$友克鑫拍賣|【聖殿八卦|.*\)說道:|你的技能|你技能中的|.*頻道-|【閒聊)"
  38. omit_from_output="n"
  39. regexp="y"
  40. script="color_chats"
  41. sequence="100"
  42. >
  43. </trigger>
  44. </triggers>
  45.  
  46. <!-- Script -->
  47.  
  48.  
  49. <script>
  50. <![CDATA[
  51. chat_world = "sanc_name"
  52. local first_time = true
  53.  
  54. function color_chats (name, line, wildcards, styles)
  55.  
  56. -- try to find "chat" world
  57. local w = GetWorld (chat_world) -- get "chat" world
  58.  
  59. -- if not found, try to open it
  60. if first_time and not w then
  61. local filename = GetInfo (67) .. chat_world .. ".mcl"
  62. Open (filename)
  63. w = GetWorld (chat_world) -- try again
  64. if not w then
  65. ColourNote ("white", "red", "Can't open chat world file: " .. filename)
  66. first_time = false -- don't repeatedly show failure message
  67. end -- can't find world
  68. end -- can't find world first time around
  69.  
  70. if w then -- if present
  71. w:ColourTell ("silver", "", os.date ("[%H:%M:%S] "))
  72. for _, v in ipairs (styles) do
  73. w:ColourTell (RGBColourToName (v.textcolour),
  74. RGBColourToName (v.backcolour),
  75. v.text)
  76. end -- for each style run
  77. w:Note ("") -- wrap up line
  78.  
  79. end -- world found
  80.  
  81. end -- function redirect
  82. ]]>
  83. </script>
  84. </muclient>
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty